:root {
  --bg: #211e27;
  --paper: #f3ecd8;
  --paper2: #e6dcc0;
  --line: #d8cba8;
  --ink: #1f1a24;
  --ink2: #5b5266;
  --hazard: #ffc93c;
  --orange: #f26b2b;
  --red: #d7263d;
  --blue: #2b59c3;
  --green: #2f8a3e;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg) radial-gradient(#2e2a36 1px, transparent 1px) 0 0 / 8px 8px;
  color: var(--paper);
  font: 14px/1.5 'Space Mono', ui-monospace, monospace;
  min-height: 100vh;
}
#app { max-width: 440px; margin: 0 auto; padding: 0 16px 40px; }

h2, h3 { font-family: 'Silkscreen', monospace; font-weight: 700; margin: 0 0 8px; line-height: 1.2; }
h2 { font-size: 19px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
p { margin: 0 0 10px; }
a { color: var(--blue); font-weight: 700; }
.small { font-size: 12px; color: var(--ink2); }
.up { color: var(--green); }
.dn { color: var(--red); }

/* ---------- topo ---------- */
.hazard { height: 12px; margin: 0 -16px 14px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 10px, var(--ink) 10px 20px); }
.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
@media (max-width: 400px) { .logo { font-size: 20px; } .chip { font-size: 10px; padding: 3px 6px; } }
.logo {
  font: 700 24px/1 'Silkscreen', monospace; color: var(--hazard); letter-spacing: 1px; white-space: nowrap;
  text-shadow: 3px 3px 0 var(--orange), 6px 6px 0 #000;
}
.chip { font: 700 11px 'Silkscreen', monospace; color: var(--hazard); background: var(--ink); border: 2px solid var(--hazard); padding: 4px 8px; white-space: nowrap; }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 5px 5px 0 #000;
  padding: 12px 14px; margin: 0 0 16px;
}
.btn {
  display: block; width: 100%; text-align: left; cursor: pointer;
  font: 700 14px 'Silkscreen', monospace; color: var(--ink);
  background: var(--paper2); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  padding: 10px 12px; margin: 0 0 10px;
}
.btn small { display: block; margin-top: 2px; font: 400 12px/1.4 'Space Mono', monospace; color: var(--ink2); }
.btn:hover { background: #fff6dc; }
.btn:active, .act:active { transform: translate(3px, 3px); box-shadow: none; }
.btn:focus-visible, .act:focus-visible { outline: 3px dashed var(--blue); outline-offset: 2px; }
.btn.primary { background: var(--orange); text-align: center; font-size: 16px; margin: 12px 0 0; }
.btn.primary:hover { background: #ff8247; }
.btn.primary small { color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.event p, .result p, .end > p { font-size: 15px; }
.warn { color: var(--red); font-weight: 700; font-size: 13px; }
.refs { border-top: 2px dashed var(--line); margin-top: 12px; }
.refs summary { color: var(--ink2); }
details summary { cursor: pointer; font: 700 12px 'Silkscreen', monospace; margin-top: 12px; }

/* ---------- barras ---------- */
.bar-row { display: grid; grid-template-columns: 24px 74px 1fr 40px; align-items: center; gap: 6px; margin: 5px 0; }
.ic { display: flex; }
.bl { font: 700 11px 'Silkscreen', monospace; }
.bv { font: 700 12px 'Space Mono', monospace; text-align: right; white-space: nowrap; }
.bv em { font-style: normal; font-size: 10px; margin-left: 2px; }
.seg { display: flex; gap: 2px; border: 2px solid var(--ink); background: #cfc4a6; padding: 2px; }
.seg i { flex: 1; height: 10px; }
.seg.g i.f { background: var(--green); }
.seg.y i.f { background: var(--hazard); }
.seg.r i.f { background: var(--red); }
.money { border-top: 2px dashed var(--line); padding-top: 6px; margin-top: 8px; }
.mv { font: 700 15px 'Space Mono', monospace; }
.mv.neg { color: var(--red); }

/* ---------- cartão de ponto ---------- */
.ponto { background: var(--paper) repeating-linear-gradient(transparent 0 23px, var(--line) 23px 24px); }
.stamp.clt { border-color: var(--blue); color: var(--blue); }
.stamp {
  position: absolute; right: 8px; top: -12px; transform: rotate(5deg); background: var(--paper);
  border: 3px solid var(--red); color: var(--red); font: 700 10px 'Silkscreen', monospace; padding: 2px 6px; opacity: .85;
}
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kv div { background: #ffffffa0; border: 2px solid var(--ink); padding: 4px 6px; min-width: 0; }
.kv b { display: block; font: 700 12px 'Silkscreen', monospace; white-space: nowrap; }
.kv span { font-size: 10px; text-transform: uppercase; color: var(--ink2); }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: center; margin-top: 10px; }
.stepper .btn { margin: 0; text-align: center; padding: 6px 0; }
.lib { font-size: 11px; text-align: center; font-style: italic; color: var(--ink2); }
.note { font-style: italic; font-size: 13px; margin: 8px 0 0; }

/* ---------- planejamento ---------- */
.free { height: 18px; border: 3px solid var(--ink); background: #cfc4a6; margin: 6px 0 4px; }
.free i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--orange) 0 6px, #d95a1f 6px 8px); }
.acts { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.act {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center;
  text-align: left; cursor: pointer; color: var(--ink); background: #fff;
  border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 8px 10px; min-width: 0;
  font: 400 12px/1.35 'Space Mono', monospace;
}
.act:hover { background: #fff6dc; }
.chk { width: 24px; height: 24px; border: 3px solid var(--ink); background: #fff; display: flex; align-items: center; justify-content: center; font: 700 16px/1 'Space Mono', monospace; color: var(--hazard); }
.act-main b { display: block; font: 700 12px 'Silkscreen', monospace; }
.act .fx { display: block; font-weight: 700; }
.act-side { text-align: right; white-space: nowrap; }
.act-side b { display: block; font: 700 15px 'Silkscreen', monospace; }
.act-side small { display: block; font-size: 11px; color: var(--ink2); }
.act.on { background: var(--hazard); }
.act.on .chk { background: var(--ink); }
.act.cheio { background: transparent; border-style: dashed; box-shadow: none; cursor: not-allowed; color: var(--ink2); }
.act.cheio .fx, .act.cheio .act-side { opacity: .5; }
.nao-cabe { display: block; margin-top: 2px; font: 700 10px 'Silkscreen', monospace; color: var(--red); }
.conta-sem { margin: 0 0 10px; }
.conta-sem summary { margin: 0; font: 400 13px 'Space Mono', monospace; color: var(--ink2); }
.conta-sem summary b { color: var(--ink); }
.conta-sem .conta { margin-top: 8px; }
.orcamento { border: 3px solid var(--ink); background: #fff8; padding: 8px 10px; }
.orc-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.orc-top > b { font: 700 11px 'Silkscreen', monospace; }
.orc-top .zero { color: var(--red); }
.horas { display: flex; gap: 2px; margin: 6px 0; }
.horas i { flex: 1; height: 16px; border: 2px solid var(--ink); background: #fff; }
.horas i.u { background: var(--orange); }
.orcamento .small { margin: 0; }

.lines div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.lines .tot { border: 0; font-weight: 700; }
.lines b { font-family: 'Space Mono', monospace; }
.conta { font-size: 13px; margin-bottom: 8px; }
.conta div { align-items: baseline; gap: 8px; }
.conta small { display: block; font-size: 11px; color: var(--ink2); line-height: 1.3; }
.conta b { white-space: nowrap; }
.conta .tot { border-top: 2px solid var(--ink); padding-top: 4px; }

/* ---------- final / fontes ---------- */
.gota { background: var(--paper2); border-style: dashed; box-shadow: none; }
.gota h3 { color: var(--red); }
.gota p { font-size: 13px; margin: 0; color: var(--ink2); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.stats div { border: 2px solid var(--ink); background: #fff8; padding: 6px 8px; }
.stats b { display: block; font: 700 15px 'Silkscreen', monospace; }
.stats span { font-size: 11px; color: var(--ink2); }
.src { list-style: none; padding: 0; margin: 10px 0 0; }
.src li { border-left: 4px solid var(--hazard); padding: 2px 0 2px 10px; margin-bottom: 12px; }
.src b { font-size: 13px; }
.src p { font-size: 12px; margin: 2px 0; }
.diary ul { margin: 8px 0 0; padding-left: 18px; font-size: 12px; }

/* ---------- cena pixel ---------- */
.scene {
  position: relative; height: 184px; overflow: hidden; margin-bottom: 16px;
  border: 3px solid var(--ink); box-shadow: 5px 5px 0 #000; transition: filter .6s steps(4);
}
.sky { position: absolute; inset: 0; }
.t-dia .sky { background: linear-gradient(#7cc6f5 0 40%, #9ad4f7 40% 70%, #bfe4fa 70%); }
.t-tarde .sky { background: linear-gradient(#f2795a 0 40%, #f79a63 40% 70%, #fbc27a 70%); }
.t-noite .sky { background: linear-gradient(#141331 0 40%, #1d1a44 40% 70%, #2a2558 70%); }
.sun, .moon {
  position: absolute; top: 16px; right: 24px; width: 28px; height: 28px;
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
}
.sun { background: #ffe066; }
.moon { background: var(--paper); box-shadow: inset -8px -4px 0 #c9c1a8; }
.stars {
  position: absolute; top: 0; left: 0; width: 2px; height: 2px;
  box-shadow: 30px 20px #fff, 80px 44px #fff, 140px 14px #fff8, 200px 36px #fff, 250px 12px #fff,
    300px 50px #fff8, 60px 70px #fff6, 360px 24px #fff, 110px 90px #fff6, 330px 84px #fff8;
}
.ground { position: absolute; left: 0; right: 0; bottom: 0; height: 36px; border-top: 4px solid var(--ink); background: #3b3842; }
.sc-fabrica .ground, .sc-rua .ground, .sc-onibus .ground {
  background: repeating-linear-gradient(90deg, transparent 0 24px, var(--hazard) 24px 40px) 0 14px / 100% 4px no-repeat, #3b3842;
}
.sc-casa .ground { background: #4e7f35; box-shadow: inset 0 8px 0 #5f9a41; }
.sc-hospital .ground { background: #8f8a9c; }
.actor { position: absolute; bottom: 36px; line-height: 0; }
.spr { position: relative; display: inline-block; }
.spr i { position: absolute; display: block; }
.bob { animation: bob 1.2s steps(1) infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.clock { position: absolute; left: 8px; top: 8px; font: 700 10px 'Silkscreen', monospace; color: var(--hazard); background: var(--ink); padding: 2px 6px; }

/* fábrica */
.fab { position: absolute; left: 5%; bottom: 36px; width: 60%; height: 80px; background: #77718a; border: 4px solid var(--ink); border-bottom: 0; }
.fab-roof {
  position: absolute; left: -4px; right: -4px; top: -24px; height: 20px; background: #4b4656;
  clip-path: polygon(0 100%, 0 0, 16.6% 100%, 16.6% 0, 33.3% 100%, 33.3% 0, 50% 100%, 50% 0, 66.6% 100%, 66.6% 0, 83.3% 100%, 83.3% 0, 100% 100%);
}
.fab-win { position: absolute; left: 8px; right: 8px; top: 8px; height: 22px; border: 4px solid var(--ink); background: repeating-linear-gradient(90deg, #9fc3d9 0 16px, var(--ink) 16px 20px); }
.t-noite .fab-win { background: repeating-linear-gradient(90deg, #ffe08a 0 16px, var(--ink) 16px 20px); }
.fab-sign { position: absolute; left: 8px; bottom: 8px; font: 700 8px 'Silkscreen', monospace; color: var(--ink); background: var(--hazard); border: 2px solid var(--ink); padding: 1px 4px; }
.fab-door { position: absolute; right: 10px; bottom: 0; width: 28px; height: 34px; border: 4px solid var(--ink); border-bottom: 0; background: repeating-linear-gradient(0deg, #3d3947 0 4px, #2d2a33 4px 8px); }
.chimney { position: absolute; left: calc(5% + 20px); bottom: 116px; width: 16px; height: 44px; background: #5b5566; border: 4px solid var(--ink); }
.smoke { position: absolute; left: -2px; top: -16px; width: 12px; height: 12px; background: #cfcad8; animation: smoke 2.4s steps(5) infinite; }
.smoke.d2 { animation-delay: 1.2s; }
@keyframes smoke { from { transform: translate(0, 0); opacity: 1; } to { transform: translate(20px, -44px); opacity: 0; } }

/* casa */
.house { position: absolute; left: 6%; bottom: 36px; width: 120px; height: 68px; background: #e0a35e; border: 4px solid var(--ink); border-bottom: 0; }
.roof { position: absolute; left: -20px; right: -20px; top: -48px; height: 44px; background: #b8442f; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.hwin {
  position: absolute; left: 12px; top: 14px; width: 32px; height: 26px; border: 4px solid var(--ink);
  background: linear-gradient(90deg, transparent 10px, var(--ink) 10px 14px, transparent 14px), linear-gradient(transparent 7px, var(--ink) 7px 11px, transparent 11px), #3a3550;
}
.t-noite .hwin { background-color: #ffe08a; }
.hdoor { position: absolute; right: 16px; bottom: 0; width: 24px; height: 40px; background: #6b3d24; border: 4px solid var(--ink); border-bottom: 0; }

/* ônibus */
.bus { position: absolute; left: 3%; bottom: 28px; width: 70%; height: 64px; background: #2b9e8f; border: 4px solid var(--ink); }
.bus-win { position: absolute; left: 8px; right: 40px; top: 6px; height: 26px; background: #bfe0ee; border: 4px solid var(--ink); overflow: hidden; }
.bus-win i { position: absolute; left: -12px; top: 6px; width: 12px; height: 16px; }
.bus-door { position: absolute; right: 8px; top: 6px; bottom: 0; width: 24px; background: #bfe0ee; border: 4px solid var(--ink); border-bottom: 0; }
.bus-sign { position: absolute; left: 8px; bottom: 6px; font: 700 8px 'Silkscreen', monospace; color: var(--hazard); }
.wheel { position: absolute; bottom: -14px; width: 20px; height: 20px; background: var(--ink); box-shadow: inset 0 0 0 6px #555; }
.w1 { left: 20px; } .w2 { right: 52px; }

/* hospital */
.hosp { position: absolute; left: 4%; bottom: 36px; width: 54%; height: 100px; background: #ebe7f2; border: 4px solid var(--ink); border-bottom: 0; }
.cross {
  position: absolute; left: 50%; top: 10px; width: 32px; height: 32px; margin-left: -16px;
  background: linear-gradient(var(--red), var(--red)) center / 10px 100% no-repeat, linear-gradient(var(--red), var(--red)) center / 100% 10px no-repeat;
}
.hosp-sign { position: absolute; left: 0; right: 0; top: 48px; text-align: center; font: 700 8px 'Silkscreen', monospace; color: var(--red); }
.hdoor2 { position: absolute; left: 50%; margin-left: -16px; bottom: 0; width: 32px; height: 30px; background: #9fc3d9; border: 4px solid var(--ink); border-bottom: 0; }
.fila { position: absolute; bottom: 36px; display: flex; gap: 2px; line-height: 0; }

/* boteco */
.sc-bar .sky { background: repeating-linear-gradient(90deg, #4a2f2f 0 28px, #432a2a 28px 32px); }
.sc-bar .sun, .sc-bar .moon, .sc-bar .stars { display: none; }
.sc-bar .ground { background: #2d2a33; }
.tv { position: absolute; left: 8%; top: 14px; width: 140px; height: 100px; background: var(--ink); padding: 6px; }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; background: #3d6fb0; }
.screen::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 2px, #0003 2px 4px); animation: flick .4s steps(2) infinite; }
@keyframes flick { 50% { opacity: .5; } }
.tv-face { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); line-height: 0; }
.live { position: absolute; left: 4px; top: 4px; z-index: 1; background: var(--red); color: #fff; font: 700 7px 'Silkscreen', monospace; padding: 1px 3px; }
.counter { position: absolute; left: 0; right: 0; bottom: 36px; height: 20px; background: #6b3d24; border-top: 4px solid var(--ink); }

/* sala (abertura) */
.sc-sala .sky { background: #5c4a6b repeating-linear-gradient(90deg, transparent 0 22px, #0000001a 22px 26px); }
.sc-sala .sun, .sc-sala .moon, .sc-sala .stars { display: none; }
.sc-sala .ground { background: #6b4a33 repeating-linear-gradient(90deg, transparent 0 30px, #0003 30px 32px); }
.tv-sala { top: 22px; left: 10%; width: 150px; height: 96px; }
.screen.ad { background: #1f9e4a; }
.screen.pec { background: #1c3c8c; }
.losango { position: absolute; left: 50%; top: 50%; width: 110px; height: 66px; transform: translate(-50%, -50%); background: #f7d117; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.losango::after { content: ''; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; background: #2b59c3; clip-path: circle(50%); }
.manchete { position: absolute; left: 6px; right: 6px; top: 30px; font: 700 12px/1.3 'Silkscreen', monospace; color: var(--hazard); text-align: center; }
.rack { position: absolute; left: calc(10% - 8px); bottom: 36px; width: 166px; height: 28px; background: #3f2a1d; border: 4px solid var(--ink); border-bottom: 0; }
.sofa { position: absolute; right: 2%; bottom: 36px; width: 120px; height: 34px; background: #8c3b33; border: 4px solid var(--ink); border-bottom: 0; box-shadow: inset 0 10px 0 #a2463c; }

/* anúncio e nome */
.anuncio { border-color: #1f9e4a; box-shadow: 5px 5px 0 #f7d117; }
.tarja { display: inline-block; margin-bottom: 10px; background: #1f9e4a; color: #f7d117; font: 700 10px 'Silkscreen', monospace; text-transform: uppercase; padding: 3px 8px; }
.anuncio blockquote { margin: 0 0 10px; padding: 8px 10px; background: #fff8; border-left: 5px solid #f7d117; font-size: 15px; font-weight: 700; }
.aviso { margin: 12px 0 0; padding: 8px 10px; border: 2px dashed var(--ink2); font-size: 12px; line-height: 1.45; color: var(--ink2); }
.aviso b { color: var(--ink); }
.selo { display: inline-block; font: 700 10px 'Silkscreen', monospace; color: var(--red); border: 2px solid var(--red); padding: 2px 6px; transform: rotate(-1deg); }
.nome { display: block; font: 700 12px 'Silkscreen', monospace; margin: 4px 0 12px; }
.nome input {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: 700 16px 'Space Mono', monospace; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.nome input:focus-visible { outline: 3px dashed var(--blue); outline-offset: 2px; }

/* modal de horas */
.modal-bg { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 16px; background: #000a; }
.modal { width: 100%; max-width: 400px; margin: 0; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal .btn { text-align: center; }
.modal .btn.primary { margin-top: 4px; margin-bottom: 10px; }
.modal .btn:last-child { margin-bottom: 0; }
.cmp { margin: 4px 0 10px; border: 2px solid var(--ink); background: #fff8; padding: 4px 8px; }
.cmp div { display: grid; grid-template-columns: 1fr auto 18px auto; gap: 4px; align-items: center; padding: 3px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.cmp div:last-child { border: 0; }
.cmp b { font-family: 'Space Mono', monospace; text-align: right; }
.cmp i { font-style: normal; text-align: center; color: var(--ink2); }
.modal.chefe { text-align: center; }
.chefe-spr { display: flex; justify-content: center; margin: 4px 0 10px; line-height: 0; }
.gesto { font-style: italic; color: var(--ink2); }
.modal blockquote { margin: 0 0 12px; padding: 10px; background: #fff8; border-left: 5px solid var(--hazard); font-size: 15px; font-weight: 700; text-align: left; }
.stepper .btn:disabled { opacity: .4; cursor: not-allowed; }

/* rua */
.board { position: absolute; left: 6%; bottom: 96px; width: 96px; height: 54px; background: var(--paper); border: 4px solid var(--ink); text-align: center; font-family: 'Silkscreen', monospace; color: var(--ink); line-height: 1.1; padding-top: 4px; }
.board b { display: block; font-size: 12px; }
.board span { font-size: 22px; color: var(--red); }
.post { position: absolute; left: calc(6% + 44px); bottom: 36px; width: 8px; height: 64px; background: var(--ink); }

/* fim de jogo em tela cheia */
.fim { --fim: var(--red); position: fixed; inset: 0; z-index: 30; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: 32px 16px; background: #000; animation: fim-corte .9s steps(1) both; }
.fim-colapso { --fim: var(--red); }
.fim-acidente { --fim: var(--hazard); }
.fim-esgotado { --fim: #a39fb0; }
.fim-sozinho { --fim: #5b8def; }
.fim-despejo { --fim: var(--orange); }
.fim-ano { --fim: #5fbf6e; }
.fim-box { width: 100%; max-width: 420px; text-align: center; color: var(--paper); }
.fim-tag { margin: 0; font: 700 11px 'Silkscreen', monospace; color: var(--fim); letter-spacing: 1px; text-transform: uppercase; animation: fim-surge .3s .3s steps(3) backwards; }
.fim-cena .scene { margin: 12px 0 20px; box-shadow: 0 0 0 3px var(--fim), 6px 6px 0 3px #000; animation: fim-tremor .08s .2s steps(2) 12; }
.fim-t { margin: 0 0 14px; font: 700 34px/1.1 'Silkscreen', monospace; color: var(--fim); text-shadow: 4px 4px 0 #000; animation: fim-surge .2s 1s steps(2) backwards, fim-tremor .1s 1.2s steps(2) 8; }
.fim-txt { font-size: 16px; line-height: 1.6; text-align: left; animation: fim-surge .6s 1.6s steps(6) backwards; }
.fim-ok { margin-top: 20px; text-align: center; animation: fim-surge .3s 2.5s steps(3) backwards; }
.fim-ano .fim-cena .scene { animation: none; }
.fim-ano .fim-t { animation: fim-surge .2s 1s steps(2) backwards; }
@keyframes fim-corte { 0% { background: var(--fim); } 12% { background: #000; } 24% { background: var(--fim); } 36%, 100% { background: #000; } }
@keyframes fim-tremor { 0% { transform: translate(-6px, 3px); } 50% { transform: translate(6px, -3px); } 100% { transform: none; } }
@keyframes fim-surge { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- layout em jogo ---------- */
/* Celular: uma coluna, na ordem cena, decisão, vida, atividades, cartão, diário. */
.jogo { display: flex; flex-direction: column; }
.col-vida, .col-acao { display: contents; }
.jogo .scene { order: 1; }
.jogo .event, .jogo .result, .jogo .report { order: 2; }
.jogo .vida { order: 3; }
.jogo .plan { order: 4; }
.jogo .ponto { order: 5; }
.jogo .diary { order: 6; }

/* Desktop: vida fixa à esquerda, decisões à direita. */
@media (min-width: 900px) {
  #app { max-width: 600px; }
  #app.em-jogo { max-width: 1040px; }
  .jogo { display: grid; grid-template-columns: 440px 1fr; gap: 0 24px; align-items: start; }
  .col-vida, .col-acao { display: block; min-width: 0; }
  .col-vida .scene { height: 220px; }
  .acts { grid-template-columns: 1fr 1fr; }
  .event p, .result p { font-size: 16px; }
}
/* Só fixa a coluna da vida quando ela cabe inteira na tela. */
@media (min-width: 900px) and (min-height: 960px) {
  .col-vida { position: sticky; top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .bob, .smoke, .screen::after { animation: none; }
  .fim, .fim-cena .scene { animation: none; }
  .fim-t { animation: fim-surge .2s 1s steps(2) backwards; }
}
