/* Tema pixel art (Habbo/eBoy): contornos escuros, bordas chanfradas, fonte pixelada nos títulos. */
:root {
  --teal: #23786a; --teal-d: #17564b; --teal-l: #dff2ec; --ink: #241f1c; --muted: #5f5953; --line: #2a2522;
  --orange: #f08a24; --gold: #ffc93c; --red: #d83a2b; --bg: #f3efe6; --panel: #fffdf7; --sky: #dfe9ee;
  --px: "Jersey 15", "Nunito", system-ui, sans-serif; --txt: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--ink); background: var(--bg);
  font: 600 17px/1.5 var(--txt); }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
body > footer { background: var(--teal-d); color: #fff; text-align: center; padding: 12px 16px; font: 400 1.3rem var(--px); border-top: 4px solid var(--ink); }
body > footer a { color: var(--gold); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.title { text-align: center; font: 400 2rem/1.1 var(--px); text-transform: uppercase; letter-spacing: .02em; margin: 22px 0 14px; }
.title em { font-style: normal; color: var(--teal); }
.sub { text-align: center; font: 400 1.4rem/1.1 var(--px); text-transform: uppercase; margin: 6px 0 10px; }
.sub em { font-style: normal; color: var(--teal); }

/* Moldura pixelada: borda escura + chanfro claro/escuro por dentro (sem border-radius). */
.choice, .go, .card, .pricard, .pol, .rcard, .panel, .citybox, .alert, .opt, .conseq, .pill, .catres > button, .acc, input[type=text] {
  border: 3px solid var(--line); border-radius: 0; box-shadow: inset -3px -3px 0 rgba(0,0,0,.14), inset 3px 3px 0 rgba(255,255,255,.7);
}

/* Cidade isométrica */

/* Layout com personagem à esquerda */
.split { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 560px); gap: 40px; align-items: center; justify-content: center; }
.split.top { align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 16px; } }
.who { display: flex; align-items: flex-end; justify-content: center; }
.who .avatar { width: 120px; height: auto; flex: none; animation: breathe 1.6s steps(1) infinite; }
@keyframes breathe { 50% { transform: translateY(calc(100% / 36)); } }
@media (prefers-reduced-motion: reduce) { .who .avatar { animation: none; } }
.bubble { position: relative; background: #fff; border: 3px solid var(--ink); box-shadow: 5px 5px 0 rgba(0,0,0,.18); padding: 12px 14px; max-width: 240px;
  font: 400 1.5rem/1.05 var(--px); margin: 0 0 110px 14px; }
.bubble::before { content: ""; position: absolute; left: -15px; top: 26px; border: 8px solid transparent; border-right: 12px solid var(--ink); border-left: 0; }
.bubble b { display: block; color: var(--teal-d); margin-top: 8px; font: 800 1rem/1.35 var(--txt); }
@media (max-width: 820px) { .bubble { margin-bottom: 50px; font-size: 1.3rem; } .who .avatar { width: 92px; } }

/* Botões */
.choice { display: block; width: 100%; background: var(--panel); padding: 8px 12px; font: 400 1.4rem/1.1 var(--px); text-transform: uppercase; margin-bottom: 8px; }
.choice:hover { background: #fff6dc; }
.choice.on { background: var(--teal); color: #fff; box-shadow: inset 3px 3px 0 rgba(0,0,0,.25); }
.go { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; background: var(--gold); padding: 8px 14px; font: 400 1.45rem/1.1 var(--px); text-transform: uppercase; }
.go::after { content: "▶"; font-size: .9rem; }
.go:hover:not(:disabled) { background: #ffd866; }
.go:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: inset 3px 3px 0 rgba(0,0,0,.2); }
.go:disabled { background: #d9d3c7; color: #8a847c; cursor: not-allowed; }
.go.alt { background: var(--panel); }
.back { background: none; border: 0; font: 400 1.4rem var(--px); text-transform: uppercase; padding: 10px 4px; }
.back::before { content: "◀ "; font-size: .85rem; }
.nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; margin-top: 22px; }
.nav.wide { grid-template-columns: auto minmax(0, 480px); justify-content: space-between; }
.or { text-align: center; font: 400 2.3rem var(--px); color: var(--muted); margin: 14px 0 4px; }
label.lbl { display: block; font: 800 .88rem var(--txt); margin: 2px 0 4px; }
input[type=text] { font: inherit; width: 100%; padding: 8px 12px; background: #fff; margin-bottom: 8px; }
.err { color: var(--red); font-size: .9rem; min-height: 1.3em; font-weight: 600; }
.note { font-size: .82rem; color: var(--muted); }
.teacher { display: block; text-align: center; margin-top: 18px; font: 400 1.3rem var(--px); color: var(--teal-d); }
.netstat { text-align: center; font: 700 .88rem var(--txt); color: var(--muted); margin-top: 8px; min-height: 1.2em; }
.netstat.bad { color: var(--red); }

/* Ícones */
.ico { width: 60px; height: 60px; background: #3a3a3a; border: 3px solid var(--ink); box-shadow: inset 0 0 0 2px var(--teal); display: grid; place-items: center; flex: none; }
.ico svg { width: 58%; height: 58%; }
.ico.sm { width: 44px; height: 44px; }

/* Prioridades */
.prigrid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 18px; }
@media (max-width: 760px) { .prigrid { grid-template-columns: 1fr; } }
.pri { display: grid; grid-template-columns: 30px 60px 1fr; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 3px dashed #cfc6b6; }
.check { width: 30px; height: 30px; border: 3px solid var(--ink); background: #fff; display: grid; place-items: center; padding: 0; box-shadow: inset -2px -2px 0 rgba(0,0,0,.15); }
.check.on { background: var(--teal); }
.check.on::after { content: ""; width: 12px; height: 6px; border: solid #fff; border-width: 0 0 4px 4px; transform: translateY(-2px) rotate(-45deg); }
.check:disabled { opacity: .45; cursor: not-allowed; }
.pri h3 { font: 400 1.4rem/1.05 var(--px); text-transform: uppercase; }
.pri h3 button { background: none; border: 0; padding: 0; text-align: left; text-transform: inherit; font: inherit; }
.more { background: none; border: 0; padding: 0; color: var(--teal-d); margin-top: 8px; font: 800 .92rem var(--txt); }
.more::after { content: " ▼"; font-size: .7rem; }
.more[aria-expanded=true]::after { content: " ▲"; }
.pri .txt { grid-column: 2 / 4; font-weight: 600; font-size: .92rem; }
.chosen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .chosen { grid-template-columns: 1fr; gap: 8px; } }
.card { display: flex; align-items: center; gap: 12px; min-height: 96px; background: var(--panel); padding: 14px 18px; font: 400 1.35rem/1.05 var(--px); text-transform: uppercase; }
.card.empty { border-style: dashed; color: #9a9389; box-shadow: none; justify-content: center; background: transparent; }

/* Rodada */
.column { max-width: 560px; margin: 0 auto; }
.pricards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pricard { background: var(--panel); padding: 8px 6px 10px; text-align: center; text-transform: uppercase; font: 400 1.1rem/1 var(--px); display: grid; justify-items: center; gap: 6px; }
.stars { display: flex; gap: 1px; align-items: flex-end; height: 20px; }
.stars svg { width: 18px; height: 18px; }
.stars svg:nth-child(2) { width: 20px; height: 20px; transform: translateY(-4px); }
.acc { background: var(--teal); color: #fff; margin-bottom: 12px; overflow: hidden; }
.acc > button { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: #fff; padding: 12px 14px; font: 400 1.45rem/1.1 var(--px); text-align: left; }
.acc > button svg.cat { width: 30px; height: 30px; flex: none; }
.acc > button .chev { margin-left: auto; font-size: .9rem; transition: transform .2s; }
.acc > button[aria-expanded=true] .chev { transform: rotate(180deg); }
.acc .count { font: 700 .8rem var(--txt); opacity: .9; margin-left: 6px; }
.pols { background: #efe9dc; padding: 10px; display: grid; gap: 8px; color: var(--ink); border-top: 3px solid var(--line); }
.pol { background: #fff; border-width: 2px; }
.pol .head { display: grid; grid-template-columns: 1fr 30px; gap: 12px; align-items: center; padding: 12px 14px; }
.pol .name { background: none; border: 0; padding: 0; color: var(--teal-d); font-weight: 700; text-align: left; }
.pol.done .name { color: #998f84; }
.pol .done-tag { display: block; font-size: .78rem; color: #8a847c; font-weight: 500; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--teal-d); border-top: 2px solid var(--line); }
.tabs button { background: none; border: 0; color: #bfe0d8; padding: 7px 4px 8px; font: 400 1.2rem var(--px); text-transform: uppercase; }
.tabs button[aria-selected=true] { color: #fff; background: var(--teal); }
.tabbody { padding: 12px 14px; font-size: .95rem; }
.tabbody ul { margin: 0; padding-left: 18px; }
.tabbody small { display: block; color: var(--muted); margin-top: 8px; }
.indic { text-align: center; margin: 26px 0 16px; }
.indic h2 { font: 400 1.5rem var(--px); text-transform: uppercase; margin-bottom: 10px; }
.gauges { display: inline-grid; grid-template-columns: auto auto; gap: 8px 10px; align-items: center; }
.gauges span { text-align: right; font: 800 .95rem var(--txt); }
.gauge { width: 230px; height: 22px; display: block; }
.gauge.sm { width: 168px; height: 17px; }
.pill { background: var(--panel); text-align: center; color: var(--teal-d); font: 400 1.55rem/1.1 var(--px); padding: 7px; margin-top: 10px; }

/* Revisão da rodada */
.review { display: grid; gap: 10px; }
.rcard { background: var(--panel); overflow: hidden; }
.rcard h3 { background: var(--teal); color: #fff; text-align: center; font: 800 .95rem var(--txt); padding: 9px 12px; border-bottom: 3px solid var(--line); }
.rcard .gauges { display: grid; justify-content: center; padding: 12px; }
.rcard .gauges span { font-size: .95rem; }

/* Evento */
.modal { position: fixed; inset: 0; background: rgba(36, 31, 28, .55); display: grid; place-items: center; padding: 16px; z-index: 10; overflow: auto; }
.modal[hidden] { display: none; }
.box { width: 100%; max-width: 900px; }
.alert { background: var(--panel); overflow: hidden; }
.alert .bar { background: var(--red); color: #fff; text-align: center; font: 400 2.2rem/1 var(--px); text-transform: uppercase; padding: 8px; border-bottom: 3px solid var(--line); }
.alert .bar svg { width: 24px; height: 24px; vertical-align: -3px; margin-right: 4px; }
.alert .body { padding: 16px 20px; }
.alert h3 { text-transform: uppercase; font: 400 1.65rem/1.1 var(--px); margin-bottom: 12px; }
.alert p { font-weight: 700; font-size: 1.05rem; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 640px) { .opts { grid-template-columns: 1fr; } }
.opt { background: var(--panel); padding: 18px 16px; font-size: 1.05rem; text-align: center; }
.opt:hover:not(:disabled) { background: #fff6dc; }
.opt.on { background: var(--teal-l); box-shadow: inset 0 0 0 3px var(--teal); }
.opt:disabled:not(.on) { color: #9a9389; background: #ebe5d8; cursor: default; }
.conseq { background: var(--panel); padding: 12px; margin-top: 10px; text-align: center; }
.conseq h3 { font: 400 1.3rem var(--px); text-transform: uppercase; margin-bottom: 8px; }
.box .nav { max-width: 540px; margin: 16px auto 0; }

/* Resultado */
.prires { display: flex; justify-content: center; gap: 26px; margin: 16px 0 22px; }
.prires div { display: grid; justify-items: center; gap: 4px; text-align: center; font: 800 .8rem/1.15 var(--txt); max-width: 92px; }
.quote { position: relative; max-width: 300px; margin: 0 auto; padding: 14px 18px; border-top: 3px dashed var(--orange); border-bottom: 3px dashed var(--orange); font-weight: 700; font-size: .92rem; }
.quote::before, .quote::after { position: absolute; color: var(--orange); font: 400 3.2rem var(--px); line-height: 1; }
.quote::before { content: "“"; left: -18px; top: -6px; }
.quote::after { content: "”"; right: -14px; bottom: 6px; }
.quote small { display: block; color: #8a847c; font-weight: 500; margin-top: 10px; }
.score { display: flex; gap: 24px; justify-content: center; margin: 4px 0 18px; text-align: center; }
.score b { display: block; font: 400 3.6rem var(--px); color: var(--teal); line-height: 1; }
.score small { color: var(--muted); font-weight: 600; }
.catres { margin-bottom: 8px; }
.catres > button { display: flex; gap: 10px; align-items: center; width: 100%; background: var(--teal); color: #fff; padding: 6px 12px; font: 400 1.35rem var(--px); text-align: left; }
.catres > button svg { width: 20px; height: 20px; }
.catres .n { padding: 6px 12px; color: var(--teal-d); font-weight: 700; font-size: .85rem; }
.catres ul { margin: 0 0 6px; padding: 0 12px 0 30px; font-size: .88rem; }
.citybox { overflow: hidden; margin: 18px 0; background: var(--panel); }
.citybox h3 { background: var(--teal); color: #fff; text-align: center; text-transform: uppercase; font: 400 1.45rem var(--px); padding: 8px; border-bottom: 3px solid var(--line); }
.citybox p { padding: 12px 16px; text-align: center; font-size: .9rem; }
.share { text-align: center; margin: 22px 0 14px; font: 400 1.4rem var(--px); }
.share em { font-style: normal; color: var(--teal); }
.dark { display: block; margin: 8px auto 0; background: var(--ink); color: #fff; border: 3px solid var(--ink); padding: 6px 16px; font: 400 1.4rem var(--px); text-transform: uppercase; box-shadow: inset -3px -3px 0 rgba(255,255,255,.15); }
.chart { width: 100%; height: 150px; }
.legend { display: flex; gap: 14px; justify-content: center; font-size: .82rem; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; background: var(--c); border: 2px solid var(--ink); }
.evlist { font-size: .88rem; margin: 6px 0 0; padding-left: 18px; }
.panel { background: var(--panel); padding: 12px 14px; margin: 14px 0; }
.panel h3 { font: 400 1.35rem var(--px); text-transform: uppercase; margin-bottom: 6px; text-align: center; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Tela da rodada em modo jogo: tudo numa tela, sem rolar a página ---------- */
body.playing { height: 100dvh; overflow: hidden; }
body.playing > footer { display: none; }
body.playing main { max-width: none; height: 100dvh; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "hud hud" "city side" "tray tray"; }
body.playing #app { display: contents; }
body.playing .city { grid-area: city; height: auto; margin: 0; min-height: 0; border-bottom: 0; border-right: 4px solid var(--line); }
.hud { grid-area: hud; display: flex; align-items: center; gap: 14px; padding: 6px 12px; background: var(--teal-d); color: #fff; border-bottom: 4px solid var(--line); flex-wrap: wrap; }
.hud .rnd { display: grid; line-height: 1; text-align: center; font-family: var(--px); }
.hud .rnd small { font-size: .95rem; text-transform: uppercase; }
.hud .rnd b { font-size: 2.3rem; font-weight: 400; }
.hud .rnd b span { font-size: 1.2rem; opacity: .75; }
.hgs { display: flex; gap: 16px; flex: 1; justify-content: center; flex-wrap: wrap; }
.hg { display: grid; justify-items: center; gap: 2px; font: 800 .82rem var(--txt); }
.hg .gauge { width: 176px; height: 18px; background: #fffdf7; border: 2px solid var(--line); padding: 1px 3px; box-sizing: content-box; }
.hg b.up { color: #8ff0c4; } .hg b.down { color: #ffb1a6; }
.gauge .blink { animation: blink .8s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.hbtn svg { width: 22px; height: 22px; }
.hpri { display: flex; gap: 8px; }
.hpri > div { display: grid; justify-items: center; gap: 1px; }
.hpri .stars { height: 14px; } .hpri .stars svg { width: 12px; height: 12px; } .hpri .stars svg:nth-child(2) { width: 13px; height: 13px; transform: translateY(-2px); }
.ico.xs { width: 30px; height: 30px; border-width: 2px; }
.hbtn { display: flex; gap: 6px; }
.hbtn button { display: grid; place-items: center; padding: 0; width: 40px; height: 40px; background: var(--panel); color: var(--ink); border: 3px solid var(--line); font: 400 1.4rem/1 var(--px); box-shadow: inset -3px -3px 0 rgba(0,0,0,.15); }
.hbtn button[aria-pressed=true] { background: var(--gold); }
.side { grid-area: side; display: flex; flex-direction: column; min-height: 0; background: #efe9dc; }
.ctabs { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--teal); border-bottom: 3px solid var(--line); }
.ctabs button { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 2px 6px; background: none; border: 0; border-right: 2px solid var(--teal-d); color: #d3ece5; font: 400 .9rem/1 var(--px); }
.ctabs button svg { width: 24px; height: 24px; }
.ctabs button[aria-selected=true] { background: #efe9dc; color: var(--teal-d); box-shadow: inset 0 4px 0 var(--gold); }
.ctabs i { position: absolute; top: 3px; right: 4px; min-width: 18px; height: 18px; background: var(--gold); color: var(--ink); font: 400 .95rem/15px var(--px); border: 2px solid var(--line); font-style: normal; }
.ctitle { font: 400 1.45rem/1.1 var(--px); margin: 10px 12px 4px; color: var(--teal-d); }
.ctitle small { font: 700 .8rem var(--txt); color: var(--muted); margin-left: 6px; }
.plist { flex: 1; min-height: 0; overflow: auto; padding: 4px 10px 10px; display: grid; gap: 6px; align-content: start; }
.pcard { display: grid; grid-template-columns: 1fr 36px; background: #fff; border: 2px solid var(--line); box-shadow: inset -2px -2px 0 rgba(0,0,0,.1); }
.pcard.on { background: var(--teal-l); box-shadow: inset 0 0 0 3px var(--teal); }
.pcard.kbd { outline: 3px dashed var(--orange); outline-offset: 1px; }
.pcard.done { opacity: .62; }
.pmain { display: flex; gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 9px 10px; font: 800 .95rem/1.25 var(--txt); color: var(--teal-d); }
.pmain:disabled { cursor: default; color: #8a847c; }
.pname small { display: block; font-weight: 700; font-size: .76rem; color: var(--muted); }
.pname small.mine { color: #a8650a; }
.tick { width: 22px; height: 22px; flex: none; border: 3px solid var(--ink); background: #fff; display: grid; place-items: center; }
.pcard.on .tick, .pcard.done .tick { background: var(--teal); }
.pcard.on .tick::after, .pcard.done .tick::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 3px 3px; transform: translateY(-1px) rotate(-45deg); }
.pinfo { background: var(--panel); border: 0; border-left: 2px solid var(--line); font: 400 1.4rem var(--px); color: var(--teal-d); }
.detail { flex: 0 0 34%; max-height: 34%; overflow: auto; background: var(--panel); border-top: 3px solid var(--line); padding: 10px 12px; font-size: .88rem; }
.detail h3 { font: 400 1.3rem/1.1 var(--px); color: var(--teal-d); margin-bottom: 4px; }
.detail .pc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.detail ul { margin: 2px 0 0; padding-left: 16px; }
.detail .up { color: #2e7d4f; } .detail .down { color: var(--red); } .detail small { color: var(--muted); }
.hintx { color: var(--muted); }
.dclose { display: none; float: right; background: none; border: 0; font: 400 1.6rem/1 var(--px); color: var(--ink); }
.alert.good { border-color: var(--teal); } .alert.good .bar { background: var(--teal); }
.tray { grid-area: tray; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 12px; background: #2a2522; border-top: 4px solid var(--line); }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 6px 4px 10px; border: 3px dashed #6b625c; color: #a59d94; font: 400 1.15rem var(--px); }
.slot.on { border: 3px solid #000; background: var(--gold); color: var(--ink); font: 800 .85rem/1.15 var(--txt); }
.slot svg { width: 22px; height: 22px; flex: none; }
.slot span { flex: 1; }
.slot button { background: none; border: 0; font: 400 1.7rem/1 var(--px); padding: 0 4px; color: var(--ink); }
.tray .go { width: auto; min-width: 190px; }
.tray .netstat { color: #d8d0c4; margin: 0; max-width: 210px; text-align: right; }
.tray.full .slots { animation: shake .25s 2; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
/* Revisão e atalhos em janela por cima da cidade */
.rbox { max-width: 780px; background: var(--panel); border: 4px solid var(--line); padding: 14px 18px; max-height: 92dvh; overflow: auto; }
.rvhead { display: flex; align-items: flex-end; }
.rvhead .avatar { width: 84px; flex: none; }
.rvhead .bubble { margin: 0 0 34px 16px; max-width: none; }
.rbox .review { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rbox .rcard .gauges { padding: 8px 4px; } .rbox .rcard .gauge.sm { width: 132px; }
.rbox .indic { margin: 16px 0 6px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
.keys dd { margin: 0; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 2px solid var(--line); background: #fff; font: 400 1.05rem var(--px); text-align: center; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.opt kbd { margin-right: 6px; }
/* Modo sala de aula: tudo maior para projetar */
html.projector { font-size: 19px; }
html.projector .hg .gauge { width: 210px; height: 21px; }
@media (prefers-reduced-motion: reduce) { .gauge .blink { animation: none; opacity: .45; } .tray.full .slots { animation: none; } }
/* Celular: cidade em cima, abas que deslizam, bandeja embaixo */
@media (max-width: 900px) {
  body.playing main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 27dvh minmax(0, 1fr) auto; grid-template-areas: "hud" "city" "side" "tray"; }
  body.playing .city { border-right: 0; border-bottom: 4px solid var(--line); }
  .hud { gap: 8px; padding: 4px 8px; }
  .hud .rnd b { font-size: 1.7rem; }
  .hgs { order: 3; flex-basis: 100%; gap: 6px; justify-content: space-between; }
  .hg { font-size: .68rem; } .hg .gauge { width: 98px; height: 11px; }
  .hpri { margin-left: auto; }
  .hbtn button { width: 34px; height: 34px; font-size: 1.15rem; }
  .ctabs { display: flex; overflow-x: auto; }
  .ctabs button { flex: 0 0 auto; min-width: 82px; padding: 6px 8px; }
  .detail { max-height: 42%; } .detail.empty { display: none; } .dclose { display: block; } .detail .pc { grid-template-columns: 1fr; }
  body.playing .city .hint { display: none; }
  .tray { grid-template-columns: minmax(0, 1fr); padding: 6px 8px; gap: 6px; } .tray .netstat { display: none; }
  .slots { gap: 4px; } .slot { min-height: 38px; padding: 2px 2px 2px 5px; gap: 3px; font-size: .9rem; } .slot.on { font-size: .72rem; }
  .slot span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .slot svg { width: 16px; height: 16px; } .slot button { font-size: 1.3rem; padding: 0 2px; }
  .tray .go { padding: 5px 14px; }
  .rbox .review { grid-template-columns: 1fr; } .rvhead .avatar { width: 64px; }
}

/* ---------- Página de votação no celular ---------- */
.vbox { max-width: 560px; margin: 0 auto; padding-top: 8px; }
.vote .title { font-size: 1.7rem; }
.vpicks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.vpicks span { min-height: 44px; display: grid; place-items: center; text-align: center; padding: 4px; border: 3px dashed #b9b0a3; color: #8a847c; font: 700 .78rem/1.15 var(--txt); }
.vpicks span.on { border: 3px solid var(--line); background: var(--gold); color: var(--ink); }
.vtabs { display: flex; overflow-x: auto; margin-top: 6px; }
.vtabs button { flex: 0 0 auto; min-width: 104px; padding: 9px 24px 9px 10px; font-size: 1.05rem; }
.vlist { max-height: none; overflow: visible; padding: 8px 0; }
.vlist .pcard { grid-template-columns: 1fr 44px; }
.vinfo { grid-column: 1 / 3; border-top: 2px solid var(--line); padding: 8px 12px; font-size: .88rem; background: var(--panel); }
.vinfo ul { margin: 2px 0 6px; padding-left: 18px; }
.vinfo .up { color: #2e7d4f; } .vinfo .down { color: var(--red); }
.vote .score { display: grid; text-align: center; margin: 18px 0; }

/* ---------- Votação da turma no telão ---------- */
.hroom { display: grid; justify-items: center; line-height: 1.05; background: var(--gold); color: var(--ink); border: 3px solid var(--line); padding: 3px 10px; box-shadow: inset -3px -3px 0 rgba(0,0,0,.15); }
.hroom small { font: 800 .68rem var(--txt); }
.hroom b { font: 400 1.6rem/1 var(--px); letter-spacing: .08em; }
.vt { flex: none; min-width: 26px; height: 24px; display: grid; place-items: center; background: var(--orange); color: #fff; border: 2px solid var(--line); font: 400 1.05rem/1 var(--px); }
.tray .usevote { width: auto; }
.evv { display: block; margin-top: 4px; font: 400 1.1rem var(--px); color: var(--orange); }
.bigcode { text-align: center; }
.bigcode p { font-size: 1.2rem; }
.bigcode .code { font: 400 clamp(4rem, 14vw, 8rem)/1 var(--px); letter-spacing: .12em; color: var(--teal); margin: 10px 0 0; }
@media (max-width: 900px) { .hroom b { font-size: 1.2rem; } .hroom small:first-child { display: none; } .tray .usevote { padding: 5px 10px; } }
.tray { grid-template-columns: minmax(0, 1fr); grid-auto-flow: column; grid-auto-columns: auto; }
@media (max-width: 900px) { .tray { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } .tray .slots { grid-column: 1 / -1; } .tray:not(:has(.usevote)) .go { grid-column: 1 / -1; } }

/* ---------- Jornal da cidade e balanço da assessoria (IA) ---------- */
.paper { max-width: 760px; max-height: 92dvh; overflow: auto; background: #f7f1e3; color: #2a2420; border: 4px solid var(--line); padding: 16px 22px; box-shadow: 8px 8px 0 rgba(0,0,0,.25); }
.paper header { text-align: center; border-bottom: 4px double #2a2420; padding-bottom: 6px; margin-bottom: 10px; }
.paper header small { font: 800 .75rem var(--txt); text-transform: uppercase; letter-spacing: .08em; color: #6b5f52; }
.paper header h2 { font: 400 2.4rem/1 var(--px); text-transform: uppercase; letter-spacing: .04em; }
.paper .headline { font: 400 2rem/1.05 var(--px); margin: 6px 0; }
.paper .dek { font-weight: 700; color: #5a4e43; margin-bottom: 12px; }
.paper .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 2px solid #2a2420; padding-top: 10px; }
.paper article h4, .paper .op h4 { font: 400 1.3rem/1.1 var(--px); margin: 0 0 4px; }
.paper article p { font-size: .92rem; margin: 0; }
.paper .op { margin-top: 14px; padding: 10px 12px; background: #efe5cf; border: 2px solid #2a2420; font-size: .92rem; }
.paper .op p { margin: 4px 0 0; }
.paper .up, .debrief .up { color: #2e7d4f; } .paper .down, .debrief .down { color: var(--red); }
.ainote { font-size: .75rem; color: #7a6e62; text-align: center; margin-top: 10px; }
.paper .nav { margin-top: 10px; }
.hbtn button.new { background: var(--gold); animation: pulse 1s steps(2) infinite; }
@keyframes pulse { 50% { transform: translateY(-3px); } }
.debrief .pc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0; font-size: .9rem; }
.debrief ul { margin: 4px 0 0; padding-left: 18px; }
.debrief .ask { font-weight: 800; color: var(--teal-d); }
@media (max-width: 700px) { .paper .cols, .debrief .pc { grid-template-columns: 1fr; } .paper header h2 { font-size: 1.8rem; } .paper .headline { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { .hbtn button.new { animation: none; } }

/* ---------- Tela de título ---------- */
.titlescr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 36px; align-items: end; margin-top: 10px; }
.hero { display: grid; gap: 10px; }
.logo { display: grid; justify-items: start; line-height: .9; color: var(--teal); font: 400 4.2rem/.9 var(--px); text-transform: uppercase; text-shadow: 4px 4px 0 var(--ink); letter-spacing: .02em; }
.logo small { font-size: 1.6rem; color: var(--orange); text-shadow: 2px 2px 0 var(--ink); margin: 2px 0 2px 6px; }
.tagline { font-weight: 700; max-width: 520px; }
.stage { position: relative; padding-top: 96px; }
.cast { display: flex; align-items: flex-end; justify-content: center; gap: 4px; position: relative; z-index: 1; margin-bottom: -6px; }
.cast .avatar { display: block; width: 84px; height: auto; }
.cast .actor.man .avatar { width: 108px; }
.cast .actor:nth-child(2n) .avatar { animation-delay: .8s; }
.ground { height: 30px; background: repeating-linear-gradient(90deg, #dad4c9 0 26px, #c6c0b5 26px 28px); border-top: 4px solid #f1ece4; border-bottom: 8px solid #8f9196; box-shadow: 0 4px 0 #50555e; }
.hb { position: absolute; left: 50%; top: 0; transform: translateX(-62%); margin: 0; max-width: 300px; z-index: 2; }
.hb::before { left: auto; right: 34%; top: auto; bottom: -15px; border: 8px solid transparent; border-top: 12px solid var(--ink); border-bottom: 0; }
.mcard { background: var(--panel); border: 3px solid var(--line); box-shadow: inset -3px -3px 0 rgba(0,0,0,.12), 6px 6px 0 rgba(0,0,0,.15); padding: 14px 16px; display: grid; gap: 8px; }
.mcard .sub { margin: 0 0 4px; }
.mcard .choice { margin: 0; text-align: left; }
.mcard .choice small { display: block; font: 700 .78rem/1.2 var(--txt); text-transform: none; color: var(--muted); margin-top: 2px; }
.mcard .choice.on small { color: #d3ece5; }
.extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 30px 0 10px; }
.xcard { background: var(--panel); border: 3px solid var(--line); box-shadow: inset -3px -3px 0 rgba(0,0,0,.12); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.xcard h3 { font: 400 1.45rem var(--px); color: var(--teal-d); margin: 0; }
.xcard p { font-size: .9rem; color: var(--muted); margin: 0; flex: 1; }
.xcard .go { text-decoration: none; color: var(--ink); }
@media (max-width: 900px) {
  .titlescr { grid-template-columns: 1fr; gap: 18px; }
  .logo { font-size: 3.2rem; justify-items: center; justify-self: center; } .tagline { text-align: center; justify-self: center; }
  .stage { padding-top: 112px; } .cast .avatar { width: 58px; } .cast .actor.man .avatar { width: 76px; }
  .hb { max-width: 290px; width: max-content; font-size: 1.15rem; transform: translateX(-55%); } .hb b { display: inline; margin-left: 4px; }
  .extras { grid-template-columns: 1fr; }
}

/* ---------- Logo: brasão da prefeitura em pixel art, letras em degradê com sombra 3D, faixa e brilhos ---------- */
.logo { display: flex; align-items: center; gap: 18px; justify-items: initial; color: inherit; text-shadow: none; font: inherit; margin: 6px 0 4px; }
.logo .emblem { width: 150px; flex: none; animation: bob 2.4s steps(1) infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.lg-words { position: relative; display: grid; justify-items: start; }
.lg-word { position: relative; font: 400 4.6rem/.8 var(--px); text-transform: uppercase; letter-spacing: .04em; }
/* A sombra é uma cópia do texto atrás (::before); o texto em degradê fica numa camada por cima (b), com um reflexo que atravessa as letras. */
.lg-word b { position: relative; z-index: 1; font: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  background-image: linear-gradient(105deg, transparent 0 47%, #fff 47% 49%, transparent 49% 50.5%, #fff 50.5% 51.5%, transparent 51.5%), var(--fill);
  background-size: 300% 100%, 100% 100%; background-repeat: no-repeat; background-position: 120% 0, 0 0; animation: shine 4.5s steps(18) infinite; }
.lg-word { --fill: linear-gradient(180deg, #fff6cf 0 26%, #ffd166 26% 60%, #f7a531 60% 82%, #e5762a 82% 100%); --deep: #17564b; }
.lg-word.w2 { --fill: linear-gradient(180deg, #e3fbf2 0 26%, #7fe0c4 26% 60%, #2fb59a 60% 82%, #1f8f86 82% 100%); --deep: #8e3a2a; }
.lg-word.w2 b { animation-delay: .35s; }
@keyframes shine { 0% { background-position: 120% 0, 0 0; } 40%, 100% { background-position: -20% 0, 0 0; } }
.lg-word::before { content: attr(data-t); position: absolute; inset: 0; z-index: 0; color: #241f1c;
  text-shadow: -3px 0 #241f1c, 3px 0 #241f1c, 0 -3px #241f1c, 0 3px #241f1c, -3px -3px #241f1c, 3px -3px #241f1c, -3px 3px #241f1c, 3px 3px #241f1c,
    5px 5px var(--deep), 7px 7px var(--deep), 9px 9px var(--deep), 11px 11px #241f1c; }
.lg-l2 { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.lg-tag { display: grid; justify-items: center; font: 400 1.45rem/.82 var(--px); color: #fff; text-transform: uppercase; letter-spacing: .06em;
  background: var(--red); border: 3px solid #241f1c; padding: 5px 7px 6px; box-shadow: inset 0 3px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.2), 3px 3px 0 #241f1c;
  transform: rotate(-6deg); animation: tilt 2.4s steps(1) infinite; }
.lg-tag i { font-style: normal; }
@keyframes tilt { 50% { transform: rotate(-2deg) translateY(-2px); } }
/* estrelinhas: nascem pequenas, crescem, encolhem e somem, cada uma no seu tempo */
.sp { position: absolute; width: 28px; transform: scale(0); animation: twinkle 2.6s steps(1) infinite; pointer-events: none; }
.sp svg { display: block; width: 100%; }
.s1 { top: -16px; right: -30px; } .s2 { top: 40%; right: -46px; width: 18px; animation-delay: .7s; } .s3 { bottom: -10px; left: 58px; width: 18px; animation-delay: 1.3s; }
.s4 { top: -16px; left: 34%; width: 18px; animation-delay: 1.9s; animation-duration: 3.1s; } .s5 { bottom: 6px; right: -18px; animation-delay: 2.3s; } .s6 { top: 34%; left: -16px; width: 18px; animation-delay: .3s; animation-duration: 3.4s; }
@keyframes twinkle { 0% { transform: scale(.34); } 6% { transform: scale(.67); } 12% { transform: scale(1); } 28% { transform: scale(.67); } 34% { transform: scale(.34); } 40%, 100% { transform: scale(0); } }
@media (max-width: 900px) {
  .logo { justify-content: center; gap: 10px; justify-self: center; }
  .logo .emblem { width: 76px; }
  .lg-word { font-size: 3rem; }
  .lg-word::before { text-shadow: -2px 0 #241f1c, 2px 0 #241f1c, 0 -2px #241f1c, 0 2px #241f1c, -2px -2px #241f1c, 2px -2px #241f1c, -2px 2px #241f1c, 2px 2px #241f1c, 4px 4px var(--deep), 6px 6px var(--deep), 8px 8px #241f1c; }
  .lg-l2 { gap: 8px; margin-top: 7px; } .lg-tag { font-size: 1rem; padding: 3px 5px 4px; border-width: 2px; }
  .sp { width: 18px; } .s2, .s3, .s4, .s6 { width: 12px; } .s2 { right: -24px; } .s1 { right: -16px; }
}
@media (prefers-reduced-motion: reduce) { .logo .emblem, .sp, .lg-tag, .lg-word b { animation: none; } .sp { transform: none; } }

/* ---------- Elenco animado da tela inicial ---------- */
.cast .actor { display: block; background: none; border: 0; padding: 0; cursor: pointer; }
.cast .frames { display: grid; animation: breathe 1.6s steps(1) infinite; }
.cast .frames > svg { grid-area: 1 / 1; }
.cast .student .frames { animation-delay: .4s; } .cast .man .frames { animation-delay: .8s; } .cast .elder .frames { animation-delay: 1.2s; } .cast .mayor .frames { animation-delay: .2s; }
/* aceno: o braço sobe e balança em dois quadros, depois volta */
.frames.wave .avatar.waveA, .frames.wave .avatar.waveB { opacity: 0; }
.frames.wave .avatar.idle { animation: wv-idle 5s steps(1) infinite; }
.frames.wave .avatar.waveA { animation: wv-a 5s steps(1) infinite; }
.frames.wave .avatar.waveB { animation: wv-b 5s steps(1) infinite; }
.cast .mayor .frames.wave .avatar { animation-delay: 2.5s; }
@keyframes wv-idle { 0% { opacity: 1; } 62% { opacity: 0; } 94% { opacity: 1; } }
@keyframes wv-a { 0% { opacity: 0; } 62% { opacity: 1; } 70% { opacity: 0; } 78% { opacity: 1; } 86% { opacity: 0; } }
@keyframes wv-b { 0% { opacity: 0; } 70% { opacity: 1; } 78% { opacity: 0; } 86% { opacity: 1; } 94% { opacity: 0; } }
/* piscar (vale para todos os avatares do jogo) */
.avatar .lids { opacity: 0; animation: blink 4.2s steps(1) infinite; }
@keyframes blink { 0% { opacity: 0; } 94% { opacity: 1; } 97% { opacity: 0; } }
.cast .student .lids { animation-delay: 1.3s; } .cast .man .lids { animation-delay: 2.1s; } .cast .elder .lids { animation-delay: .7s; } .cast .mayor .lids { animation-delay: 3s; }
/* pulinhos: a estudante de vez em quando, qualquer um ao ser clicado */
.cast .student { animation: hopidle 6s steps(1) infinite; }
@keyframes hopidle { 0% { transform: none; } 80% { transform: translateY(-6px); } 82% { transform: translateY(-12px); } 85% { transform: translateY(-6px); } 88% { transform: none; } }
.cast .actor.hop { animation: hop .5s steps(1); }
@keyframes hop { 0% { transform: translateY(-6px); } 20% { transform: translateY(-12px); } 40% { transform: translateY(-15px); } 60% { transform: translateY(-9px); } 80% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .cast .actor, .cast .frames, .avatar .lids, .frames.wave .avatar { animation: none; } }

/* ---------- Moradores, filme do mandato e eleição ---------- */
.hearts { display: inline-flex; gap: 2px; vertical-align: middle; }
.hearts i { width: 12px; height: 11px; background: #d8d0c4; clip-path: polygon(0 20%, 20% 0, 50% 18%, 80% 0, 100% 20%, 100% 50%, 50% 100%, 0 50%); }
.hearts i.on { background: var(--red); }
.vrow { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 2px dashed #e5ddd0; }
.vrow:first-of-type { border-top: 0; }
.vrow .avatar { width: 44px; flex: none; }
.vrow p { font-size: .9rem; line-height: 1.3; }
.vrow small { color: var(--muted); font-weight: 600; }
.voices { position: fixed; top: 76px; left: 12px; z-index: 9; width: min(340px, calc(100vw - 24px)); background: var(--panel); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 10px 12px; }
.voices h3 { font: 400 1.3rem var(--px); text-transform: uppercase; color: var(--teal); }
.voices h3 small { color: var(--muted); font-size: 1rem; }
.voices.in { animation: slidein .35s steps(4); }
@keyframes slidein { from { transform: translateX(110%); } }
.vclose { position: absolute; top: 4px; right: 6px; background: none; border: 0; font-size: 1.4rem; line-height: 1; }
.filmbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 14px 0 0; }
.filmbtn svg { width: 16px; }
.filmcap { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5; background: rgba(36, 31, 28, .88); color: #fff; padding: 10px 14px; border: 3px solid var(--ink); }
.filmcap .fhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filmcap .fhead b { font: 400 1.8rem/1 var(--px); text-transform: uppercase; color: var(--gold); }
.filmcap .fev { display: inline-flex; align-items: center; gap: 6px; background: var(--red); padding: 2px 8px; font-size: .85rem; }
.filmcap .fev svg { width: 16px; }
.filmcap .fhead button { margin-left: auto; background: #fff; color: var(--ink); border: 2px solid var(--ink); font: 400 1.1rem var(--px); padding: 2px 12px; }
.filmcap p { font-size: .95rem; margin: 4px 0 6px; }
.fgs { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; }
.fgs span { display: flex; align-items: center; gap: 6px; }
.fgs i { display: block; width: 90px; height: 8px; background: #5f5953; position: relative; }
.fgs i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--gold); transition: width .6s steps(6); }
.elec .cand { display: grid; grid-template-columns: 40px 76px 1fr 52px; gap: 8px; align-items: center; margin: 6px 0; }
.elec .cand .avatar { width: 40px; }
.elec .vbar { height: 20px; background: #ebe4d8; border: 2px solid var(--ink); }
.elec .vbar i { display: block; height: 100%; width: var(--w); background: var(--teal); animation: votebar 3s steps(15); }
.elec .opp .vbar i { background: var(--muted); }
@keyframes votebar { from { width: 0; } }
.elec .cnt { font: 400 1.5rem var(--px); text-align: right; }
.elec .verdict { text-align: center; font: 400 1.6rem var(--px); text-transform: uppercase; margin-top: 6px; animation: appear 3.3s steps(1); }
.elec .verdict.up { color: var(--teal); } .elec .verdict.down { color: var(--red); }
@keyframes appear { from { opacity: 0; } }
@keyframes slidein-l { from { transform: translateX(-110%); } }
.voices.in { animation-name: slidein-l; }
@media (max-width: 900px) {
  .voices { top: 8px; left: 8px; } .voices .vrow .avatar { width: 32px; } .voices .vrow p { font-size: .8rem; }
  .filmcap { left: 6px; right: 6px; bottom: 6px; padding: 6px 8px; } .filmcap .fhead b { font-size: 1.3rem; } .filmcap p { font-size: .75rem; } .fgs { display: none; }
}
@media (prefers-reduced-motion: reduce) { .voices.in, .elec .vbar i, .elec .verdict { animation: none; } }

/* ---------- Ouvir (voz do aparelho) e alto contraste ---------- */
.speak { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 2px solid var(--ink); padding: 4px 12px; font: 400 1.15rem var(--px); text-transform: uppercase; }
.speak svg { width: 18px; }
.debrief .speak, .detail .speak { float: right; margin: 0 0 6px 8px; }
html.contrast { --muted: #000; --bg: #fff; --panel: #fff; --teal: #0b4f45; --orange: #b85a00; }
html.contrast body { font-weight: 700; }
html.contrast .note, html.contrast small, html.contrast .hintx { color: #000 !important; }
html.contrast .pcard, html.contrast .panel, html.contrast .slot, html.contrast .detail { outline: 3px solid #000; }
html.contrast .pcard small.mine { color: #000; text-decoration: underline; }

/* ---------- Camada de bairros ---------- */
.dists .drow { display: grid; grid-template-columns: 150px 1fr 34px; gap: 8px; align-items: center; margin: 4px 0; font-size: .9rem; }
.dists .dbar { height: 14px; background: #ebe4d8; border: 2px solid var(--ink); }
.dists .dbar i { display: block; height: 100%; width: var(--w); }
.dists .dbar i.bad { background: #e53935; } .dists .dbar i.mid { background: #fdd835; } .dists .dbar i.good { background: #43a047; }
.dists b { font: 400 1.3rem var(--px); text-align: right; }
.xcard .mlink { display: block; margin-top: 10px; font-size: .9rem; color: var(--teal); }

/* ---------- Tutorial e medalhas ---------- */
.tut { position: fixed; inset: 0; z-index: 60; }
.tut .spot { position: fixed; border: 3px solid var(--gold); box-shadow: 0 0 0 9999px rgba(20, 16, 14, .62); pointer-events: none; }
.tut .tip { position: fixed; width: 320px; background: var(--panel); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 12px 14px; }
.tut .tip p { font-size: .95rem; }
.tut .tnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.tut .tnav > button:first-child { background: none; border: 0; text-decoration: underline; color: var(--muted); }
.tut .tnav .go { width: auto; margin: 0; padding: 6px 14px; }
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.medal { text-align: center; padding: 6px; opacity: .45; filter: grayscale(1); }
.medal.on { opacity: 1; filter: none; }
.medal .mico { display: inline-grid; place-items: center; width: 44px; height: 44px; background: var(--gold); border: 3px solid var(--ink); border-radius: 50%; color: #fff; box-shadow: inset -3px -3px 0 rgba(0,0,0,.18); }
.medal .mico svg { width: 24px; }
.medal b { display: block; font: 400 1.05rem/1.1 var(--px); text-transform: uppercase; margin-top: 4px; }
.medal small { display: block; font-size: .72rem; color: var(--muted); line-height: 1.2; }
.medal.new small { color: var(--red); font-weight: 800; }
.medal.new .mico { animation: tilt 1.2s steps(1) infinite; }
.medals.mini { grid-template-columns: repeat(4, 1fr); } .medals.mini small { display: none; } .medals.mini .mico { width: 32px; height: 32px; } .medals.mini b { font-size: .8rem; }
.privnote { display: block; margin-top: 8px; color: var(--muted); font-size: .8rem; }

/* ---------- Desafios, orçamento e segundo mandato ---------- */
.scens { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.schip { background: var(--panel); border: 2px solid var(--ink); padding: 3px 10px; font: 700 .8rem var(--txt); }
.schip[aria-pressed="true"] { background: var(--teal); color: #fff; }
.budget { display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 6px 0 12px; }
.budget .pie { width: 170px; height: 170px; border-radius: 50%; border: 4px solid var(--ink); }
.budget ul { list-style: none; padding: 0; margin: 0; }
.budget li { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.budget li i { width: 14px; height: 14px; border: 2px solid var(--ink); }
.mins p { font-weight: 800; margin: 4px 0; } .mins .up { color: var(--teal); } .mins .down { color: var(--red); }
.termbtn { width: 100%; margin: 0 0 14px; }

/* ---------- Modo Câmara ---------- */
.cvote { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 4px; text-align: center; font: 400 1.3rem var(--px); text-transform: uppercase; }
.cvote > div { border: 3px solid var(--ink); padding: 8px; background: var(--panel); }
.cvote b { display: block; font-size: 3.2rem; line-height: 1; }
.cvote .yes b { color: var(--teal); } .cvote .no b { color: var(--red); }
.cammsg { flex: 1 1 100%; order: -1; margin: 0; color: var(--gold); font: 400 1.2rem var(--px); text-transform: uppercase; }

/* ---------- Secretários e cidade da escola ---------- */
.askbtn { margin-left: auto; background: var(--panel); border: 2px solid var(--ink); font: 700 .75rem var(--txt); padding: 2px 8px; text-transform: none; letter-spacing: 0; }
.ctitle { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.asks { display: grid; gap: 8px; margin: 12px 0; }
.localbox ul { margin: 6px 0; padding-left: 20px; font-size: .9rem; }

/* ---------- Cores por área, promessa, indicador e porte (--c vem do HTML) ---------- */
.ctabs { background: #2b2622; }
.ctabs button { color: #f3efe6; border-right-color: #3d3631; box-shadow: inset 0 4px 0 var(--c); }
.ctabs button svg { color: var(--c); }
.ctabs button[aria-selected=true] { background: var(--c); color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); text-shadow: 1px 1px 0 rgba(0,0,0,.35); }
.ctabs button[aria-selected=true] svg { color: #fff; }
.side .ctitle { color: var(--c); }
.side .pcard.on { background: color-mix(in srgb, var(--c) 13%, #fff); box-shadow: inset 0 0 0 3px var(--c); }
.side .pcard.on .tick { background: var(--c); }
.side .pmain { color: var(--ink); }
.side .pinfo { color: var(--c); }
.side .detail { border-top-color: var(--c); }
.side .detail h3 { color: var(--c); }
.side .askbtn { border-color: var(--c); color: var(--c); }
.slot.on { box-shadow: inset 8px 0 0 var(--c); padding-left: 14px; }
.slot.on svg { color: var(--c); }
.catres > button { background: var(--c, var(--teal)); text-shadow: 1px 1px 0 rgba(0,0,0,.3); }
.rcard h3 { background: var(--c, var(--teal)); }
.choice { box-shadow: inset 8px 0 0 var(--c, transparent); padding-left: 18px; }
.choice.on { background: var(--c, var(--teal)); }
.ico { background: var(--c, #3a3a3a); box-shadow: inset -3px -3px 0 rgba(0,0,0,.25), inset 3px 3px 0 rgba(255,255,255,.2); }
.hud .lbl::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--c); border: 2px solid #000; vertical-align: -1px; }
.score b { color: var(--orange); } .score div + div b { color: #1e88e5; }
.elec h3 { color: #1e88e5; } .people h3, .voices h3 { color: #8e44ad; } .dists h3 { color: #2e7d4f; }
.title em, .sub em { color: var(--orange); }
/* combos */
.cbadge { flex: none; margin-left: auto; font: 400 .95rem/1 var(--px); color: #fff; background: #ec407a; border: 2px solid var(--ink); padding: 2px 6px; text-transform: uppercase; }
.cdetail { margin: 6px 0; padding: 6px 8px; background: #fde7f0; border-left: 4px solid #ec407a; font-size: .82rem; }
.cdetail p { margin: 2px 0; } .cdetail b { color: #ad1457; } .cdetail .have { font-weight: 800; text-decoration: underline; text-decoration-color: #ec407a; }
.cnext { text-align: center; font-weight: 800; color: #ad1457; background: #fde7f0; border: 2px dashed #ec407a; padding: 6px; margin: 10px 0; }
.combo { position: fixed; left: 50%; top: 22%; z-index: 70; transform: translateX(-50%); min-width: min(420px, 90vw); text-align: center; background: #ec407a; color: #fff; border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 10px 18px 12px; animation: pop .6s steps(4); pointer-events: none; }
.combo > b { display: block; font: 400 3rem/1 var(--px); text-transform: uppercase; text-shadow: 3px 3px 0 #880e4f; }
.combo p { font: 400 1.5rem/1.1 var(--px); margin-top: 6px; } .combo small { display: block; font: 700 .85rem var(--txt); opacity: .95; }
@keyframes pop { from { transform: translateX(-50%) scale(.3); } }
.clist { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.clist span { font-size: .78rem; padding: 2px 8px; border: 2px solid #d8d0c4; color: #9a928a; }
.clist span.on { border-color: var(--ink); background: #ec407a; color: #fff; font-weight: 800; }
.fcombo { color: #f8bbd0; }
@media (prefers-reduced-motion: reduce) { .combo { animation: none; } }
.citybox .grew { padding-top: 0; font-weight: 700; color: #2e7d4f; }
.posterbox input { width: 100%; margin-bottom: 8px; } .posterbox p { font-size: .9rem; margin-bottom: 8px; }

/* ---------- Debate da eleição e entrevista ---------- */
.debate { max-width: 860px; margin: 0 auto; }
.stagebox { display: flex; align-items: flex-end; justify-content: center; gap: 30px; margin: 10px 0; }
.pod { text-align: center; } .pod .avatar { width: 90px; display: block; margin: 0 auto; }
.pod b { display: block; font: 400 1.4rem var(--px); text-transform: uppercase; color: #fff; padding: 6px 20px; border: 3px solid var(--ink); }
.pod.you b { background: #1e88e5; } .pod.opp b { background: #e53935; }
.vs { font: 400 3rem/1 var(--px); color: var(--orange); text-shadow: 3px 3px 0 var(--ink); padding-bottom: 30px; }
.react { text-align: center; font-weight: 800; margin: 8px 0 12px; } .react.good { color: #2e7d4f; } .react.bad { color: var(--red); }
.attack { background: #fff3f0; border: 3px solid var(--red); padding: 10px 14px; margin-bottom: 12px; }
.attack small { color: var(--muted); font-weight: 700; } .attack p { font: 400 1.6rem/1.2 var(--px); color: #b71c1c; }
.debate .cards { display: grid; gap: 8px; } .debate .cards small { display: block; font-weight: 600; color: var(--muted); }
.debnote { text-align: center; font-weight: 700; margin: 4px 0; }
.alert.press { border-color: #1e88e5; } .alert.press .bar { background: #1e88e5; }
.alert .bar svg { width: 22px; vertical-align: -4px; }

/* ---------- Debate da eleição e entrevista ---------- */
.debate { max-width: 860px; margin: 0 auto; }
.stagebox { display: flex; align-items: flex-end; justify-content: center; gap: 30px; margin: 10px 0; }
.pod { text-align: center; } .pod .avatar { width: 90px; display: block; margin: 0 auto; }
.pod b { display: block; font: 400 1.4rem var(--px); text-transform: uppercase; color: #fff; padding: 6px 20px; border: 3px solid var(--ink); }
.pod.you b { background: #1e88e5; } .pod.opp b { background: #e53935; }
.vs { font: 400 3rem/1 var(--px); color: var(--orange); text-shadow: 3px 3px 0 var(--ink); padding-bottom: 30px; }
.react { text-align: center; font-weight: 800; margin: 8px 0 12px; } .react.good { color: #2e7d4f; } .react.bad { color: var(--red); }
.attack { background: #fff3f0; border: 3px solid var(--red); padding: 10px 14px; margin-bottom: 12px; }
.attack small { color: var(--muted); font-weight: 700; } .attack p { font: 400 1.6rem/1.2 var(--px); color: #b71c1c; }
.debate .cards { display: grid; gap: 8px; } .debate .cards small { display: block; font-weight: 600; color: var(--muted); }
.debnote { text-align: center; font-weight: 700; margin: 4px 0; }
.alert.press { border-color: #1e88e5; } .alert.press .bar { background: #1e88e5; }
.alert .bar svg { width: 22px; vertical-align: -4px; }
