/* Chagua 6.14: All tools drawer, bubbles, Keep going, question of the day, Ready to vote, community pages. */
:root { --cg: #016b3f; --cgd: #014d2e; --cgold: #f2b705; --cred: #bb0000; --cink: #0f1f17; --cmut: #5b6b63; --cline: #e3e9e5; --csoft: #f4f8f5; }

/* Phone bar: the raised gold centre button is now "Tools" (same look Search had). */
html .cht-bar a.chgn-bar-tools { position: relative; color: #fff !important; }
html .cht-bar a.chgn-bar-tools svg { visibility: hidden; }
html .cht-bar a.chgn-bar-tools:before { content: ""; position: absolute; left: 50%; top: -18px; width: 58px; height: 58px; margin-left: -29px; border-radius: 50%; background: linear-gradient(145deg, #ffd54a, #f2b705); box-shadow: 0 8px 20px rgba(0,0,0,.28), 0 0 0 4px var(--cht-brand, #016b3f); }
html .cht-bar a.chgn-bar-tools:after { content: ""; position: absolute; left: 50%; top: -3px; width: 26px; height: 26px; margin-left: -13px; background: #06291d; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6' rx='1.5'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1.5'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1.5'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1.5'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6' rx='1.5'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1.5'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1.5'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1.5'/%3E%3C/svg%3E") center/contain no-repeat; }
html .cht-bar a.chgn-bar-tools span { position: relative; font-weight: 900; margin-top: 20px; color: #fff; }

/* Tool bubbles under the header */
.chgn-strip { position: relative; z-index: 5; background: #fff; border-bottom: 1px solid var(--cline); }
.chgn-row { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; max-width: 1240px; margin: 0 auto; }
.chgn-row::-webkit-scrollbar { display: none; }
.chgn-b { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #d6e2db; background: #fff; color: var(--cink) !important; font: inherit; font-size: 13.5px; font-weight: 700; text-decoration: none !important; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s; }
.chgn-b:hover { border-color: var(--cg); background: var(--csoft); }
.chgn-b.is-q { background: #fff6d6; border-color: #f3d36b; }
.chgn-b.is-mine { background: #e9f6ef; border-color: #9fd3b6; color: var(--cgd) !important; }
.chgn-b.is-all { background: var(--cg); border-color: var(--cg); color: #fff !important; }
.chgn-b.is-all svg { flex: none; }
.chgn-dot { position: absolute; top: 4px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--cred); box-shadow: 0 0 0 2px #fff; animation: chgn-pulse 1.8s infinite; }
@keyframes chgn-pulse { 50% { transform: scale(1.35); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .chgn-dot { animation: none; } }

/* Drawer: bottom sheet on phones, large panel on desktop */
html.chgn-lock, html.chgn-lock body { overflow: hidden !important; }
.chgn-dr { position: fixed; inset: 0; z-index: 100000; }
.chgn-dr[hidden] { display: none !important; }
.chgn-scrim { position: absolute; inset: 0; background: rgba(4,30,18,.45); opacity: 0; transition: opacity .2s; }
.chgn-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; display: flex; flex-direction: column; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.25); transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.chgn-dr.is-on .chgn-scrim { opacity: 1; }
.chgn-dr.is-on .chgn-sheet { transform: none; }
.chgn-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 6px; }
.chgn-head h2 { margin: 6px 0 0 !important; font-size: 19px !important; color: var(--cink) !important; }
.chgn-grab { position: absolute; left: 50%; top: 6px; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: #d6e2db; }
.chgn-x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--csoft); color: var(--cink); font-size: 16px; cursor: pointer; }
.chgn-tools-top { display: flex; gap: 8px; padding: 6px 18px 10px; }
.chgn-search { flex: none; height: 42px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--cg); color: #fff; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.chgn-filter { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #d6e2db; border-radius: 12px; font: inherit; font-size: 15px; }
.chgn-top { display: grid; gap: 8px; padding: 0 18px 8px; }
.chgn-mine { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #e9f6ef; color: var(--cink) !important; text-decoration: none !important; }
.chgn-mine.is-q { background: #fff6d6; }
.chgn-mine span:first-child { font-size: 22px; text-align: center; }
.chgn-mine small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cmut); }
.chgn-mine b { display: block; font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chgn-mine i { font-style: normal; color: var(--cg); font-weight: 900; }
.chgn-body { overflow-y: auto; padding: 4px 18px 8px; -webkit-overflow-scrolling: touch; }
.chgn-grp h3 { margin: 12px 0 8px !important; font-size: 12px !important; font-weight: 800 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--cmut) !important; }
.chgn-grp[hidden], .chgn-tool[hidden] { display: none !important; }
.chgn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.chgn-tool { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: var(--cink) !important; text-decoration: none !important; padding: 4px 2px; border-radius: 12px; }
.chgn-tool:hover { background: var(--csoft); }
.chgn-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--csoft); border: 1px solid var(--cline); font-size: 23px; margin-bottom: 4px; }
.chgn-grp[data-g="vote"] .chgn-ic { background: #e9f6ef; }
.chgn-grp[data-g="choose"] .chgn-ic { background: #fdecec; }
.chgn-grp[data-g="know"] .chgn-ic { background: #fff6d6; }
.chgn-grp[data-g="money"] .chgn-ic { background: #eef2fb; }
.chgn-grp[data-g="part"] .chgn-ic { background: #f3eefb; }
.chgn-tool b { font-size: 12.5px; line-height: 1.2; }
.chgn-tool small { display: none; }
.chgn-none { padding: 14px 0; color: var(--cmut); text-align: center; }
.chgn-every { display: block; margin: 0 18px 14px; padding: 12px; border-radius: 12px; background: var(--csoft); text-align: center; color: var(--cg) !important; font-weight: 800; text-decoration: none !important; }
@media (min-width: 901px) {
	.chgn-sheet { left: 50%; right: auto; bottom: auto; top: 92px; width: min(1040px, calc(100vw - 48px)); max-height: calc(100vh - 120px); border-radius: 22px; transform: translate(-50%, -12px); opacity: 0; transition: transform .18s, opacity .18s; }
	.chgn-dr.is-on .chgn-sheet { transform: translate(-50%, 0); opacity: 1; }
	.chgn-grab { display: none; }
	.chgn-body { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 18px; }
	.chgn-grid { grid-template-columns: 1fr; gap: 2px; }
	.chgn-tool { flex-direction: row; text-align: left; gap: 10px; padding: 7px 8px; align-items: center; }
	.chgn-ic { width: 38px; height: 38px; font-size: 18px; border-radius: 11px; margin: 0; flex: none; }
	.chgn-tool b { display: block; font-size: 13.5px; }
	.chgn-tool small { display: block; font-size: 12px; color: var(--cmut); line-height: 1.25; }
	.chgn-tool > b, .chgn-tool > small { width: 100%; }
	.chgn-tool { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; }
	.chgn-tool .chgn-ic { grid-row: span 2; }
	.chgn-top { grid-template-columns: 1fr 1fr; }
	.chgn-strip .chgn-row { padding: 10px 24px; }
}
@media (max-width: 380px) { .chgn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Keep going */
.chgn-keep { max-width: 1100px; margin: 28px auto 24px; padding: 0 16px; }
.chgn-keep h2 { margin: 0 0 10px !important; font-size: 18px !important; color: var(--cink) !important; }
.chgn-keep-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chgn-tool--big { display: grid !important; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left !important; padding: 14px !important; border: 1px solid var(--cline); background: #fff; border-radius: 16px !important; align-items: center; }
.chgn-tool--big .chgn-ic { grid-row: span 2; width: 46px; height: 46px; margin: 0; }
.chgn-tool--big b { font-size: 15px; }
.chgn-tool--big small { display: block !important; font-size: 13px; color: var(--cmut); }
@media (max-width: 760px) { .chgn-keep-grid { grid-template-columns: 1fr; } .chgn-keep { margin-bottom: 90px; } }

/* Engagement pages */
.chge-page { max-width: 1000px; margin: 0 auto; color: var(--cink); }
.chge-hero { position: relative; padding: 26px 24px 22px; border-radius: 22px; background: linear-gradient(155deg, #013a22, #016b3f 70%, #0a7d4c); color: #fff; overflow: hidden; margin-bottom: 16px; }
.chge-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #000 0 32%, #fff 32% 34%, #bb0000 34% 66%, #fff 66% 68%, #2f9e6b 68%); }
.chge-hero h1 { margin: 4px 0 8px !important; color: #fff !important; font-size: clamp(24px, 4vw, 36px); line-height: 1.15; }
.chge-hero p { margin: 0 !important; color: rgba(255,255,255,.9); max-width: 760px; font-size: 15.5px; line-height: 1.5; }
.chge-k { margin: 0 !important; font-size: 12px !important; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: #a6f0c6 !important; }
.chge-card, .chge-qotd { margin: 0 0 14px; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--cline); box-shadow: 0 6px 20px rgba(4,54,31,.06); }
.chge-card h2 { margin: 0 0 8px !important; font-size: 19px !important; color: var(--cink) !important; }
.chge-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .chge-grid2 { grid-template-columns: 1fr; } }
.chge-mut { color: var(--cmut); font-size: 13.5px; }
.chge-next { display: flex; flex-wrap: wrap; gap: 8px; }
.chge-next a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--csoft); border: 1px solid var(--cline); color: var(--cgd) !important; font-weight: 800; text-decoration: none !important; }
.chge-qotd .chge-k { color: var(--cg) !important; }
.chge-qq { margin: 6px 0 14px !important; font-size: clamp(20px, 3vw, 26px) !important; line-height: 1.3; color: var(--cink) !important; }
.chge-qq.is-small { font-size: 16px !important; margin: 0 0 10px !important; }
.chge-qopts { display: grid; gap: 8px; }
.chge-qopts button { min-height: 52px; padding: 10px 16px; border: 2px solid #d6e2db; border-radius: 14px; background: #fff; color: var(--cink); font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer; }
.chge-qopts button:hover:not(:disabled) { border-color: var(--cg); background: var(--csoft); }
.chge-qres { list-style: none !important; margin: 0 0 10px !important; padding: 0 !important; display: grid; gap: 8px; }
.chge-qres li { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px !important; margin: 0 !important; border-radius: 12px; border: 2px solid #e3e9e5; background: #fff; }
.chge-qres li.is-right { border-color: var(--cg); }
.chge-qres li.is-wrong { border-color: var(--cred); }
.chge-qbar { position: absolute; left: 0; top: 0; bottom: 0; background: #eef6f1; z-index: 0; }
.chge-qres li.is-right .chge-qbar { background: #d4efe0; }
.chge-qres li.is-wrong .chge-qbar { background: #fbe1e1; }
.chge-qres b, .chge-qres em { position: relative; z-index: 1; }
.chge-qres em { font-style: normal; font-weight: 900; }
.chge-why { margin: 0 0 6px !important; line-height: 1.5; }
.chge-why a { color: var(--cg) !important; font-weight: 800; }
.chge-share { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 !important; }
.chge-share a, .chge-share button { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid #d6e2db; background: #fff; color: var(--cgd) !important; font: inherit; font-size: 13.5px; font-weight: 800; text-decoration: none !important; cursor: pointer; }
.chge-streak { margin: 10px 0 0 !important; font-weight: 700; }
.chge-big { margin: 0 !important; font-size: 34px; font-weight: 900; }
.chge-big small { font-size: 15px; color: var(--cmut); font-weight: 700; }
.chge-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.chge-badge { padding: 6px 10px; border-radius: 999px; background: #f1f1ee; color: #6b6b66; font-size: 13px; font-weight: 700; }
.chge-badge.is-on { background: #fff1c2; color: #6b4d00; }
.chge-ready-top { display: flex; align-items: center; gap: 18px; margin: 0 0 12px; }
.chge-ready-top h2 { margin: 0 0 4px !important; }
.chge-ring { --p: 0; flex: none; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: conic-gradient(var(--cg) calc(var(--p) * 1%), #e3e9e5 0); }
.chge-ring b { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: #fff; font-size: 18px; font-weight: 900; }
.chge-steps2 { list-style: none !important; margin: 0 0 14px !important; padding: 0 !important; display: grid; gap: 8px; }
.chge-steps2 li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; margin: 0 !important; padding: 12px 14px !important; border-radius: 16px; background: #fff; border: 1px solid var(--cline); }
.chge-steps2 li.is-done { background: #f1faf5; border-color: #b9e0ca; }
.chge-st { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--csoft); font-size: 20px; }
.chge-steps2 li.is-done .chge-st { background: var(--cg); color: #fff; font-weight: 900; }
.chge-steps2 b { display: block; font-size: 15.5px; }
.chge-steps2 small { display: block; color: var(--cmut); font-size: 13px; }
.chge-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chge-acts a, .chge-acts button { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid #d6e2db; background: #fff; color: var(--cgd) !important; font: inherit; font-size: 13.5px; font-weight: 800; text-decoration: none !important; cursor: pointer; white-space: nowrap; }
.chge-acts button[data-tick] { background: var(--cg); border-color: var(--cg); color: #fff !important; }
.chge-acts .is-undo { padding: 0 10px; color: var(--cmut) !important; }
@media (max-width: 600px) { .chge-steps2 li { grid-template-columns: 40px 1fr; } .chge-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.chge-cert label { display: block; font-weight: 700; margin: 0 0 8px; }
.chge-cert input { display: block; width: 100%; max-width: 420px; height: 44px; margin-top: 4px; padding: 0 12px; border: 1px solid #d6e2db; border-radius: 12px; font: inherit; font-size: 16px; }
.chge-form { display: grid; gap: 10px; }
.chge-form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.chge-form input:not([type=hidden]), .chge-form textarea { width: 100%; box-sizing: border-box; max-width: 100%; padding: 10px 12px; border: 1px solid #d6e2db; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 400; background: #fff; }
.chge-form button { justify-self: start; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--cg); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.chge-form button:disabled { opacity: .6; }
.chge-msg { font-size: 13.5px; color: var(--cmut); }
.chge-form.is-ok .chge-msg { color: var(--cg); font-weight: 700; }
.chge-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.chge-tip { margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--csoft); border: 1px dashed #c7d8cd; }
.chge-tip summary { cursor: pointer; font-weight: 800; color: var(--cgd); }
.chge-tip p { font-size: 14px; color: var(--cmut); }
.chge-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--cline); font-size: 12px; font-weight: 700; color: var(--cmut); }
.chge-league { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; gap: 6px; }
.chge-league li { display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; margin: 0 !important; padding: 10px 12px !important; border-radius: 12px; background: var(--csoft); }
.chge-league li:nth-child(1) { background: #fff4cc; }
.chge-league .chge-rank { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; font-weight: 900; }
.chge-league small { color: var(--cmut); font-size: 12.5px; }
.chge-league em { grid-row: span 2; grid-column: 3; font-style: normal; font-weight: 900; font-size: 17px; color: var(--cg); }
.chge-steps { padding-left: 20px; line-height: 1.6; }
.chge-check { margin: 0 0 12px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--cline); }
.chge-check h3 { margin: 8px 0 6px !important; font-size: 17px !important; line-height: 1.35; }
.chge-v { display: inline-block; margin: 0 !important; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; }
.chge-v.is-ok { background: #d4efe0; color: #0c4a2c; }
.chge-v.is-mid { background: #fff1c2; color: #6b4d00; }
.chge-v.is-warn { background: #ffe1c7; color: #7a3a00; }
.chge-v.is-bad { background: #fbd5d5; color: #7a1010; }
.chge-v.is-none { background: #ececea; color: #4b4b47; }
.chge-src a { margin-right: 10px; color: var(--cg) !important; font-weight: 700; }
.chge-scroll { overflow-x: auto; }
.chge-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.chge-tbl th, .chge-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--cline); text-align: right; }
.chge-tbl th:first-child { text-align: left; }
html.cht-night .chgn-strip, html.cht-night .chgn-sheet, html.cht-night .chge-card, html.cht-night .chge-qotd, html.cht-night .chge-check, html.cht-night .chgn-tool--big, html.cht-night .chge-steps2 li, html.cht-night .chge-qres li, html.cht-night .chge-qopts button { background: #131c17; border-color: #26332c; color: #eef3ef !important; }
html.cht-night .chgn-b { background: #131c17; border-color: #2c3a33; color: #eef3ef !important; }
html.cht-night .chgn-ic, html.cht-night .chgn-filter, html.cht-night .chgn-x { background: #1d2a23; border-color: #2c3a33; color: #eef3ef; }
