/* ============================================================
   PONTES01 — estilo pixel / painel de nave (baseado na captura de tela)
   ============================================================ */
:root {
  --bg: #05061a; --bg2: #0b1030; --panel: rgba(9, 14, 42, 0.94); --panel2: #111a46;
  --line: #2f7fff; --cyan: #3cd2ff; --cyan2: #8ff0ff; --text: #e8f1ff; --muted: #8fa3d6;
  --orange: #ff8a2a; --red: #ff4a5a; --green: #46e08a; --yellow: #ffd23f;
  --pix: "Press Start 2P", monospace; --vt: "Pixelify Sans", "VT323", monospace; /* Pixelify só tem o "l" (carregado com text=l) */ --sk: "Silkscreen", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--vt); font-size: 21px; line-height: 1.25; }
a { color: var(--cyan); }
code, pre { font-family: var(--vt); }
.cyan { color: var(--cyan); } .orange { color: var(--orange); } .red { color: var(--red); } .green { color: var(--green); } .muted { color: var(--muted); } .small { font-size: 0.85em; }

/* ---------- navegação do site ---------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; background: rgba(5, 6, 26, 0.92); border-bottom: 2px solid #1b2a6a; backdrop-filter: blur(4px); flex-wrap: wrap; }
.brand { font-family: var(--pix); font-size: 16px; color: #fff; text-decoration: none; letter-spacing: 1px; }
.brand span, .logo h1 span, .logo-s b { color: var(--cyan); }
.nav nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nav nav a { font-family: var(--sk); font-size: 13px; color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--cyan2); }

/* ---------- área do jogo ---------- */
.play { padding: 16px; display: flex; flex-direction: column; align-items: center; background: radial-gradient(ellipse at top, #13194a, var(--bg) 70%); }
.game { position: relative; width: min(100%, calc((100vh - 120px) * 16 / 9), 1280px); aspect-ratio: 16 / 9; background: #000; border: 3px solid #1b2a6a; border-radius: 10px; box-shadow: 0 0 0 2px #05061a, 0 0 40px rgba(47, 127, 255, 0.25); overflow: hidden; container-type: inline-size; user-select: none; }
.game:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; aspect-ratio: auto; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.game:fullscreen #cv { object-fit: contain; }
#ui-layer { position: absolute; inset: 0; font-size: clamp(11px, 1.55cqw, 22px); pointer-events: none; }
#ui-layer > div > * { pointer-events: auto; }
#hud, #scr, #modal, #toast { position: absolute; inset: 0; pointer-events: none; }
#scr > *, #modal > *, #hud > *, #toast > * { pointer-events: auto; }
#side { position: absolute; right: 0.6em; top: 4.2em; bottom: 3.4em; width: 34%; pointer-events: none; display: flex; flex-direction: column; justify-content: flex-start; }
#side.wide { width: 52%; }
#side > * { pointer-events: auto; }
.under { width: min(100%, 1280px); display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 17px; flex-wrap: wrap; }

.start { position: absolute; inset: 0; z-index: 30; border: 0; background: radial-gradient(ellipse at center, rgba(19, 25, 74, 0.85), rgba(5, 6, 26, 0.97)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2em; cursor: pointer; font-family: var(--pix); font-size: clamp(12px, 1.6cqw, 20px); }
.start.hide { display: none; }
.start .logo-s { font-size: 3em; letter-spacing: 2px; text-shadow: 3px 3px 0 #1a2766, -1px -1px 0 #05061a; }
.start small { font-family: var(--vt); color: var(--muted); font-size: 1.1em; }
.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- componentes ---------- */
.btn, .mbtn, .chip, .opt, .card, .sw, .tile, .tray { font-family: inherit; color: var(--text); cursor: pointer; }
.btn { background: linear-gradient(#1a2766, #111a46); border: 2px solid #2f5bd7; border-radius: 4px; padding: 0.25em 0.8em; font-size: 1em; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35); }
.btn:hover:not(:disabled) { border-color: var(--cyan); color: #fff; box-shadow: 0 0 10px rgba(60, 210, 255, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.35); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(#1a5fd7, #0f3a9a); border-color: var(--cyan); }
.btn.big { font-size: 1.4em; padding: 0.4em 1.4em; }
.btn.small { font-size: 0.9em; padding: 0.1em 0.6em; }
.btn.tiny { font-size: 0.85em; padding: 0.05em 0.45em; border-width: 1px; }
.btn.ghost { background: transparent; }
.btn.on { border-color: var(--green); }
.row { display: flex; gap: 0.5em; flex-wrap: wrap; align-items: center; margin-top: 0.5em; }
.row.bottom { position: absolute; bottom: 1em; right: 1em; }
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 0.8em 1.1em; box-shadow: 0 0 0 2px #05061a, 0 0 24px rgba(47, 127, 255, 0.25), inset 0 0 30px rgba(47, 127, 255, 0.08); }
.panel.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(62%, 40em); max-height: 92%; overflow: auto; }
.panel.center.wide { width: min(86%, 60em); }
.scroll { overflow: auto; }
.panel h2, .stage-panel h2, .evp h2, .setup h2 { font-family: var(--pix); font-size: 0.95em; margin: 0.2em 0 0.6em; color: var(--cyan2); letter-spacing: 1px; line-height: 1.4; }
.panel h3, .panel h4, .evp h4, .stage-panel h4 { font-family: var(--sk); font-weight: normal; color: var(--cyan); margin: 0.6em 0 0.3em; font-size: 0.95em; }
.panel p { margin: 0.4em 0; }
.panel .big, .big { font-size: 1.3em; }
.quote { border-left: 3px solid var(--cyan); padding-left: 0.6em; color: #cfe3ff; }
.field { display: flex; align-items: center; gap: 0.6em; margin: 0.4em 0; }
.field input[type=range] { flex: 1; }
.field input:not([type]), .field input[type=text] { flex: 1; background: #070b24; color: #fff; border: 1px solid #2f5bd7; font-family: var(--vt); font-size: 1em; padding: 0.15em 0.4em; }
.check { display: flex; gap: 0.5em; align-items: center; margin: 0.3em 0; cursor: pointer; }
select { background: #070b24; color: #fff; border: 1px solid #2f5bd7; font-family: var(--vt); font-size: 1em; }
.err { color: var(--red); }
.code { color: var(--yellow); font-family: var(--pix); }
.credits { color: var(--yellow); font-size: 0.8em; float: right; }
.x { position: absolute; right: 0.4em; top: 0.3em; background: none; border: 0; color: var(--muted); font-size: 1.2em; cursor: pointer; }
.modal-bg { position: absolute; inset: 0; background: rgba(2, 3, 14, 0.55); }
.panel.station { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: min(62%, 44em); max-height: 84%; overflow: auto; }
.panel.station.wide { width: min(88%, 62em); }
.kv { display: grid; grid-template-columns: auto auto; gap: 0.1em 1em; margin: 0.4em 0; }
.kv span { color: var(--muted); } .kv b { font-weight: normal; color: #fff; }
.kv.small { font-size: 0.85em; }
.bar { display: inline-block; width: 4.5em; height: 0.6em; background: #070b24; border: 1px solid #2a3a7a; vertical-align: middle; position: relative; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); }
.bar.warn i { background: var(--yellow); } .bar.bad i { background: var(--red); }
.bar.time { width: 100%; height: 0.7em; } .bar.time i { background: var(--cyan); }
.sysline { display: flex; align-items: center; gap: 0.5em; margin: 0.2em 0; flex-wrap: wrap; }
.sysline > span:first-child { flex: 1 1 9em; }
.dmg { font-style: normal; font-size: 0.8em; padding: 0 0.4em; border-radius: 3px; border: 1px solid; }
.dmg.Baixo { color: var(--green); } .dmg.Médio { color: var(--yellow); } .dmg.Alto { color: var(--red); }
.alert { padding: 0.25em 0.6em; margin: 0.25em 0; border-left: 4px solid var(--muted); background: rgba(255, 255, 255, 0.04); }
.alert.bad { border-color: var(--red); } .alert.warn { border-color: var(--yellow); } .alert.good { border-color: var(--green); } .alert.info { border-color: var(--cyan); }
.tabs { display: flex; gap: 0.4em; margin: 0.3em 0 0.6em; flex-wrap: wrap; }
.chip { background: #0d1640; border: 1px solid #2f5bd7; border-radius: 12px; padding: 0.05em 0.7em; font-size: 0.95em; }
.chip.on { background: #1a5fd7; border-color: var(--cyan); }
.chip:disabled { opacity: 0.4; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: 0.45em; }
.opts1 { display: flex; flex-direction: column; gap: 0.3em; align-items: stretch; }
.opt { text-align: left; background: #0d1640; border: 2px solid #22357a; border-radius: 6px; padding: 0.35em 0.6em; display: flex; flex-direction: column; gap: 0.1em; font-size: 0.95em; }
.opt b { font-weight: normal; color: #fff; } .opt span { color: var(--muted); font-size: 0.9em; } .opt em { font-style: normal; color: var(--yellow); font-size: 0.85em; }
.opt.on { border-color: var(--green); background: #0f2a3a; box-shadow: 0 0 8px rgba(70, 224, 138, 0.3); }
.opt.cant { opacity: 0.45; }
.opt:hover:not(.cant) { border-color: var(--cyan); }
.cards { display: grid; gap: 0.8em; margin: 0.6em 0; } .cards.two { grid-template-columns: 1fr 1fr; }
.card { background: #0d1640; border: 2px solid #2f5bd7; border-radius: 8px; padding: 0.8em; text-align: left; font-size: 1em; }
.card:hover { border-color: var(--cyan); box-shadow: 0 0 14px rgba(60, 210, 255, 0.35); }
.card h3 { font-family: var(--sk); font-weight: normal; margin: 0 0 0.3em; color: var(--cyan2); }
.seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4em; margin: 0.6em 0; }
.seat { border: 1px solid #22357a; border-radius: 6px; padding: 0.3em 0.5em; display: flex; flex-direction: column; background: #0b1238; }
.seat.human { border-color: var(--green); }
.seat span { color: var(--muted); font-size: 0.9em; }

/* ---------- tela título (como a captura) ---------- */
.title-screen { position: absolute; inset: 0; }
.tbox { position: absolute; background: rgba(8, 14, 44, 0.88); border: 2px solid #2f5bd7; border-radius: 8px; padding: 0.5em 0.8em; box-shadow: inset 0 0 18px rgba(47, 127, 255, 0.15); font-family: var(--sk); font-size: 0.85em; }
.tbox.tl { left: 2%; top: 3%; min-width: 11em; } .tbox.tr { right: 2%; top: 3%; } .tbox.tc { left: 50%; transform: translateX(-50%); top: 3%; width: 42%; font-family: var(--vt); font-size: 1em; }
.tbox .lbl { color: #fff; } .tbox .sep { border-top: 1px solid #2f5bd7; margin: 0.3em 0; }
.tbox p { margin: 0; }
.logo { position: absolute; left: 50%; top: 27%; transform: translateX(-50%); text-align: center; }
.logo h1 { font-family: var(--pix); font-size: 3.4em; margin: 0; color: #f0f4ff; letter-spacing: 3px; text-shadow: 4px 4px 0 #1a2766, 8px 8px 0 #05061a; }
.logo .sub { font-family: var(--sk); letter-spacing: 0.4em; color: #cfe0ff; margin-top: 0.4em; }
.menu { position: absolute; left: 50%; top: 52%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 0.35em; width: 17em; }
.panel .menu { position: static; transform: none; margin: 0.5em auto; }
.mbtn { background: rgba(10, 16, 48, 0.92); border: 2px solid #2a3a7a; border-radius: 5px; padding: 0.35em 0.8em; text-align: left; font-family: var(--sk); font-size: 0.95em; display: flex; justify-content: space-between; align-items: center; }
.mbtn:hover, .mbtn.primary { border-color: var(--cyan); box-shadow: 0 0 12px rgba(60, 210, 255, 0.5); }
.mbtn small { color: var(--yellow); font-family: var(--vt); }
.mbtn.red { border-color: var(--red); }
.tfoot { position: absolute; right: 3%; bottom: 7%; text-align: right; font-family: var(--sk); font-size: 0.9em; }
.tfoot b { display: block; font-family: var(--pix); color: var(--cyan); font-size: 1.4em; font-style: italic; }

/* ---------- intro / terra ---------- */
.intro .narr { position: absolute; left: 6%; right: 6%; bottom: 16%; background: rgba(5, 8, 26, 0.85); border: 2px solid #2f5bd7; border-radius: 8px; padding: 0.8em 1.2em; font-size: 1.35em; min-height: 4.5em; }
.caret { animation: blink 0.8s steps(2) infinite; color: var(--cyan); }
.earth-hud .tbox { font-family: var(--vt); }
.earth-hud .hint { position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.6); padding: 0.2em 0.8em; border-radius: 4px; }
.comm { text-align: center; }

/* ---------- montagem ---------- */
.setup { position: absolute; inset: 2%; display: grid; grid-template-columns: 22% 1fr; grid-template-rows: 1fr auto; gap: 0.6em; }
.setup-side { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 0.6em; overflow: auto; }
.setup-side h3 { font-family: var(--pix); font-size: 0.8em; color: var(--cyan2); margin: 0.2em 0 0.5em; }
.budget { background: #070b24; border: 1px solid #2f5bd7; border-radius: 4px; padding: 0.3em 0.5em; margin-bottom: 0.5em; }
.budget b { color: var(--yellow); }
.steps { margin: 0; padding-left: 1.2em; font-size: 0.95em; }
.steps li { cursor: pointer; color: var(--muted); padding: 0.05em 0; }
.steps li.on { color: #fff; } .steps li.done { color: var(--green); }
.setup-main { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 0.6em 0.9em; }
.setup-main h4 { font-family: var(--sk); font-weight: normal; color: var(--cyan); margin: 0.6em 0 0.3em; }
.setup-nav { grid-column: 2; display: flex; justify-content: space-between; }
.fund { text-align: center; } .bignum { font-family: var(--pix); font-size: 3em; color: var(--yellow); margin: 0.4em; }

/* ---------- HUD da nave ---------- */
.hud-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; gap: 0.5em; padding: 0.3em 0.5em; background: linear-gradient(rgba(5, 6, 26, 0.92), rgba(5, 6, 26, 0.55)); }
.bars { display: flex; flex-wrap: wrap; gap: 0.15em 0.7em; font-size: 0.8em; }
.rb { display: flex; align-items: center; gap: 0.25em; }
.rb .ic { width: 1.4em; text-align: center; }
.rb .bar { width: 3.2em; height: 0.55em; }
.rb .v { min-width: 3.4em; } .rb small { color: var(--muted); margin-left: 1px; }
.clock { text-align: right; font-size: 0.85em; white-space: nowrap; }
.clock b { font-family: var(--sk); color: var(--cyan2); }
.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1.1fr 1fr auto; align-items: center; gap: 0.6em; padding: 0.3em 0.6em; background: linear-gradient(rgba(5, 6, 26, 0.55), rgba(5, 6, 26, 0.95)); font-size: 0.9em; }
.track { display: flex; align-items: center; gap: 0.4em; font-family: var(--sk); font-size: 0.75em; }
.track .line { position: relative; flex: 1; height: 0.4em; background: #1a2250; border-radius: 2px; }
.track .line i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--cyan); }
.track .mk, .track .ship { position: absolute; top: 50%; transform: translate(-50%, -50%); font-style: normal; }
.track .mk { color: var(--yellow); } .track .ship { color: #fff; text-shadow: 0 0 6px var(--cyan); }
.prompt { text-align: center; color: var(--yellow); }
.prompt b { background: #fff; color: #000; padding: 0 0.3em; border-radius: 2px; }
.hud-bottom .btns { display: flex; gap: 0.3em; }
.tut { position: absolute; left: 0.6em; top: 4.2em; max-width: 38%; background: rgba(8, 14, 44, 0.9); border: 2px solid var(--yellow); border-radius: 6px; padding: 0.3em 0.6em; font-size: 0.9em; }
.tut b:first-child { color: var(--yellow); font-family: var(--sk); margin-right: 0.3em; }
.toast { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); max-width: 60%; background: rgba(8, 14, 44, 0.95); border: 2px solid var(--cyan); border-radius: 6px; padding: 0.3em 0.9em; text-align: center; animation: pop 0.25s; }
.toast.bad { border-color: var(--red); } .toast.good { border-color: var(--green); } .toast.warn { border-color: var(--yellow); }
@keyframes pop { from { transform: translate(-50%, -8px); opacity: 0; } }

/* ---------- painel de evento ---------- */
.evp { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 0.5em 0.7em; overflow: auto; max-height: 100%; font-size: 0.92em; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); }
.evp.warn { border-color: var(--red); box-shadow: 0 0 22px rgba(255, 74, 90, 0.45); }
.evp.result.ok { border-color: var(--green); } .evp.result.bad { border-color: var(--red); }
.evp h3 { font-family: var(--pix); font-size: 0.9em; }
.timer { display: flex; align-items: center; gap: 0.5em; }
.evsteps { padding-left: 0.2em; list-style: none; margin: 0.4em 0; }
.evsteps li { margin: 0.25em 0; color: var(--muted); }
.evsteps li.cur { color: #fff; } .evsteps li.done { color: var(--green); }
.evsteps .st { display: block; color: var(--cyan); margin-left: 1.1em; }
.evsteps li > div { margin-left: 1.1em; display: flex; gap: 0.3em; flex-wrap: wrap; }
.evlog { border-top: 1px solid #22357a; margin-top: 0.4em; padding-top: 0.3em; font-size: 0.85em; color: #b9c8f0; }
.evlog .bad { color: var(--red); } .evlog .good { color: var(--green); } .evlog .earth { color: var(--cyan); } .evlog .ai { color: #c9a0ff; }
.puzzle { border: 1px dashed var(--cyan); border-radius: 6px; padding: 0.4em 0.6em; margin: 0.4em 0; background: rgba(60, 210, 255, 0.05); }
.filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3em; }
.filter { border: 1px solid #2a3a7a; padding: 0.2em; display: flex; flex-direction: column; gap: 0.15em; align-items: center; }
.filter.ok { border-color: var(--green); } .filter.bad { border-color: var(--red); background: rgba(255, 74, 90, 0.1); }
.filter em { font-style: normal; font-size: 0.85em; }
.map3 { display: grid; grid-template-columns: repeat(3, 2.2em); gap: 0.2em; }
.tile { width: 2.2em; height: 2.2em; font-size: 1.2em; background: #0d1640; border: 1px solid var(--cyan); transition: transform 0.15s; }
.radiomsg { font-family: var(--vt); background: #021008; color: #4dff9a; padding: 0.3em; border: 1px solid #1d6a3a; letter-spacing: 1px; word-break: break-word; }
.signal { display: flex; gap: 0.5em; align-items: center; }
.devs { display: grid; grid-template-columns: auto 1fr; gap: 0.2em 0.5em; align-items: center; }
.devs .btn { grid-column: 1; } .reading { color: var(--yellow); font-size: 0.9em; }
.devs .btn + .btn { grid-column: 1; }

/* térmico */
.evp.thermal { font-size: 0.85em; }
.evp.thermal h2 small { color: var(--yellow); font-family: var(--vt); font-size: 1.2em; }
.thermos { display: flex; gap: 0.5em; align-items: flex-end; }
.thermo { display: flex; flex-direction: column; align-items: center; width: 3.2em; }
.thermo .tube { position: relative; width: 0.9em; height: 5em; background: #070b24; border: 1px solid #2a3a7a; border-radius: 0.45em; overflow: hidden; }
.thermo .tube i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--cyan); }
.thermo .tube i.hot, .thermo .tube i.red { background: var(--red); } .thermo .tube i.cold, .thermo .tube i.cyan { background: #5ab0ff; } .thermo .tube i.green { background: var(--green); }
.thermo .band-safe { position: absolute; left: 0; right: 0; bottom: 36%; height: 16%; border-top: 1px dashed #fff; border-bottom: 1px dashed #fff; }
.thermo.main .tube { width: 1.3em; }
.thres { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.6em; font-size: 0.9em; }
.thres div { display: flex; align-items: center; gap: 0.3em; } .thres span { flex: 1; color: var(--muted); } .thres .bar { width: 2.6em; }
.tacts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35em; }
.tact { border: 1px solid #22357a; border-radius: 5px; padding: 0.2em 0.4em; background: #0b1238; }
.tact.active { border-color: var(--green); } .tact.dis { opacity: 0.4; }
.th-h { display: flex; align-items: center; gap: 0.4em; }
.light { width: 0.7em; height: 0.7em; border-radius: 50%; display: inline-block; }
.light.ok { background: var(--green); box-shadow: 0 0 6px var(--green); } .light.warn { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); } .light.bad { background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 0.5s steps(2) infinite; }
.band { font-style: normal; color: var(--cyan); font-size: 0.85em; }
.reroll { background: rgba(255, 210, 63, 0.12); border: 1px solid var(--yellow); padding: 0.2em 0.5em; margin: 0.3em 0; }

/* horta / cozinha */
.trays { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3em; }
.tray { background: #0b1a14; border: 1px solid #1d6a3a; border-radius: 4px; padding: 0.2em; display: flex; flex-direction: column; min-height: 2.6em; font-size: 0.85em; }
.tray.sel { border-color: var(--cyan); } .tray.pronto { border-color: var(--yellow); animation: blink 1s steps(2) infinite; } .tray.estragado { border-color: #6b4a2a; }
.tray span { color: var(--muted); }
.ings { display: flex; flex-wrap: wrap; gap: 0.3em; }
.pot { margin: 0.5em 0; padding: 0.3em 0.6em; background: #1a1008; border: 1px solid #8a5a2a; border-radius: 6px; }
.prefs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3em 0.8em; font-size: 0.9em; }
.rep { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.rep th, .rep td { border-bottom: 1px solid #1a2660; padding: 0.15em 0.3em; text-align: left; vertical-align: top; }
.rep th { color: var(--cyan); font-family: var(--sk); font-weight: normal; font-size: 0.8em; }
.reasons div { display: flex; justify-content: space-between; gap: 1em; color: var(--muted); font-size: 0.9em; }
summary { cursor: pointer; }
.crewlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4em; }
.crew { display: flex; gap: 0.5em; border: 1px solid #22357a; border-radius: 6px; padding: 0.3em; background: #0b1238; font-size: 0.9em; }
.crew img { width: 2.6em; image-rendering: pixelated; align-self: flex-start; }
.crew.dead { opacity: 0.45; }
.tag { font-size: 0.8em; color: var(--muted); }

/* estágios finais */
.stage-panel { position: absolute; right: 2%; top: 4%; bottom: 4%; width: 54%; background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 0.6em 0.9em; display: flex; flex-direction: column; }
.stage-panel .scroll { flex: 1; }
.minires { display: flex; flex-wrap: wrap; gap: 0.2em 0.8em; font-size: 0.85em; color: var(--muted); }
.exos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4em; }
.exo { border: 1px solid #22357a; border-radius: 6px; padding: 0.3em 0.5em; background: #0b1238; }
.exo.on { border-color: var(--green); }
.end.ok { border-color: var(--green); } .end.bad { border-color: var(--red); }
.end h1 { font-family: var(--pix); font-size: 1.3em; text-align: center; color: var(--cyan2); }
.end.bad h1 { color: var(--red); }

/* avatar */
.avatar-screen { position: absolute; inset: 2%; display: grid; grid-template-columns: 34% 1fr; gap: 0.6em; }
.av-left, .av-right { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 0.6em; overflow: auto; }
.previews { display: flex; gap: 0.6em; justify-content: center; }
.previews canvas { width: 3.6em; image-rendering: pixelated; background: #0b1238; border: 1px solid #22357a; }
.paintgrid { display: block; width: 8.5em; margin: 0.3em auto; image-rendering: pixelated; cursor: crosshair; border: 1px solid var(--cyan); touch-action: none; }
.pal { display: flex; flex-wrap: wrap; gap: 0.2em; justify-content: center; align-items: center; }
.grp { display: flex; flex-wrap: wrap; gap: 0.25em; align-items: center; margin: 0.35em 0; }
.grp > b { width: 100%; font-weight: normal; color: var(--cyan); font-family: var(--sk); font-size: 0.85em; }
.sw { width: 1.4em; height: 1.4em; border: 2px solid #22357a; border-radius: 3px; padding: 0; }
.sw.on { border-color: #fff; box-shadow: 0 0 6px #fff; }
.sw.erase { background: repeating-linear-gradient(45deg, #333, #333 3px, #666 3px, #666 6px); color: #fff; font-size: 0.8em; }

/* toque */
@media (orientation: portrait) and (max-width: 600px) { .under::before { content: '📱 Gire o celular e use “Tela cheia” para jogar melhor.'; color: var(--yellow); width: 100%; } }

/* ---------- seções do site ---------- */
.sec { padding: 48px 20px; }
.sec.alt { background: #080c26; border-top: 2px solid #121a4a; border-bottom: 2px solid #121a4a; }
.wrap { max-width: 1100px; margin: 0 auto; }
.wrap.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.sec h2 { font-family: var(--pix); font-size: 20px; color: var(--cyan2); margin: 0 0 16px; }
.warnline { color: var(--yellow); }
.stages { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.stages li { counter-increment: s; background: var(--panel); border: 2px solid #22357a; border-radius: 8px; padding: 10px 14px 10px 52px; margin-bottom: 10px; position: relative; }
.stages li::before { content: counter(s); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-family: var(--pix); color: var(--cyan); font-size: 18px; }
.sysgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sysgrid > div, .crewgrid > div { background: var(--panel); border: 2px solid #22357a; border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.sysgrid span, .crewgrid span { color: var(--muted); font-size: 18px; }
.sysgrid em { align-self: flex-start; }
.crewgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; text-align: center; }
.crewgrid img { width: 60px; image-rendering: pixelated; margin: 0 auto; }
.sprites-show { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: flex-end; }
.sprites-show img { width: 80px; image-rendering: pixelated; }
.sprites-show p { width: 100%; text-align: center; }
pre { background: #070b24; border: 1px solid #2f5bd7; padding: 10px 14px; border-radius: 6px; overflow: auto; }
.foot { text-align: center; padding: 30px 20px 40px; color: #cfe3ff; }

@media (max-width: 800px) {
  .wrap.two { grid-template-columns: 1fr; }
  .tbox.tc { display: none; }
  .under span { font-size: 14px; }
}
@container (max-width: 700px) {
  #side { width: 60%; } #side.wide { width: 96%; }
  .bars .rb .bar { display: none; }
}

/* ---------- idioma ---------- */
.langbox { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.langbox select { background: #0b1238; color: #fff; border: 2px solid #2f5bd7; border-radius: 6px; padding: 3px 6px; font-family: var(--sk); font-size: 13px; cursor: pointer; }
.langbox select:hover, .langbox select:focus { border-color: var(--cyan); outline: none; }

/* ---------- chat ---------- */
.chat { position: absolute; left: 0.6em; bottom: 3.7em; z-index: 12; width: min(30%, 22em); font-size: clamp(11px, 1.4cqw, 19px); pointer-events: none; display: flex; flex-direction: column; gap: 0.3em; }
.chat > * { pointer-events: auto; }
.chat-btn { align-self: flex-start; font-family: var(--sk); color: #fff; background: rgba(10, 16, 48, 0.88); border: 2px solid #2f5bd7; border-radius: 14px; padding: 0.15em 0.8em; font-size: 0.95em; cursor: pointer; }
.chat-btn:hover { border-color: var(--cyan); }
.chat-btn.new { border-color: var(--yellow); animation: blink 1s steps(2) infinite; }
.chat-box { display: none; flex-direction: column; background: rgba(6, 10, 34, 0.94); border: 2px solid var(--line); border-radius: 8px; height: 15em; box-shadow: 0 0 18px rgba(47, 127, 255, 0.3); }
.chat.open .chat-box { display: flex; }
.chat.open .chat-btn { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 0.2em 0.5em; border-bottom: 1px solid #22357a; color: var(--cyan2); font-family: var(--sk); font-size: 0.85em; }
.chat-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1em; }
.chat-list { flex: 1; overflow-y: auto; padding: 0.3em 0.5em; display: flex; flex-direction: column; gap: 0.15em; }
.chat-form { display: flex; gap: 0.3em; padding: 0.3em; border-top: 1px solid #22357a; }
.chat-in { flex: 1; min-width: 0; background: #070b24; color: #fff; border: 1px solid #2f5bd7; border-radius: 4px; font-family: var(--vt); font-size: 1em; padding: 0.1em 0.4em; }
.chat-go { background: #1a5fd7; border: 1px solid var(--cyan); color: #fff; border-radius: 4px; cursor: pointer; padding: 0 0.6em; }
.cm { line-height: 1.15; word-break: break-word; }
.cm.sys { color: var(--muted); font-size: 0.9em; border-left: 3px solid #2f5bd7; padding-left: 0.4em; }
.cm.sys.fact, .cm.sys.mc { color: #ffe9a0; border-color: var(--yellow); }
.cm.sys.bad { color: #ff9aa4; border-color: var(--red); }
.cm.sys.join { color: #9fe8b8; border-color: var(--green); }
.cm.mine > b { text-decoration: underline; }
.chat-peek { display: flex; flex-direction: column; gap: 0.15em; background: rgba(6, 10, 34, 0.8); border-radius: 6px; padding: 0 0.4em; max-height: 8em; overflow: hidden; pointer-events: none !important; }
.chat-peek:empty { display: none; }
@media (pointer: coarse) { .chat { bottom: 10em; } }

/* ---------- cidade, diálogos e colônia ---------- */
.citytxt { font-size: 1.15em; line-height: 1.3; }
.dialog { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); width: min(80%, 44em); display: flex; gap: 0.8em; align-items: flex-start; background: var(--panel); border: 2px solid var(--cyan); border-radius: 8px; padding: 0.6em 0.9em; z-index: 6; box-shadow: 0 0 20px rgba(60, 210, 255, 0.3); }
.dialog img { image-rendering: pixelated; width: 4.2em; height: auto; flex: none; background: #0b1238; border: 1px solid #22357a; border-radius: 6px; padding: 0.2em; }
.dialog p { margin: 0.3em 0; font-size: 1.1em; }
.dialog small { color: var(--muted); }
.objbox { position: absolute; left: 0.6em; top: 4.6em; width: 27%; background: rgba(6, 10, 34, 0.82); border: 1px solid #2f5bd7; border-radius: 6px; padding: 0.3em 0.6em; font-size: 0.85em; line-height: 1.15; pointer-events: none; }
.objbox b { display: block; color: var(--cyan2); font-family: var(--sk); margin-bottom: 0.2em; }
.objbox .done { color: var(--green); }
.exo.visited { border-color: var(--red); opacity: 0.8; }
.exo > b { display: block; }

/* barras da tripulação e nutrientes */
.meters { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; gap: 0.15em 0.35em; align-items: center; font-size: 0.9em; }
.meters .bar { width: 100%; min-width: 2.5em; }
.nutr { display: inline-flex; gap: 1px; align-items: flex-end; height: 1em; width: 1.4em; background: #070b24; border: 1px solid #2a3a7a; padding: 0 1px; }
.nutr i { flex: 1; background: #ffd23f; } .nutr i.n1 { background: #ff8a5a; } .nutr i.n2 { background: #46e08a; } .nutr i.low { background: var(--red); }
.nchip { display: inline-block; background: #0d1640; border: 1px solid #22357a; border-radius: 3px; padding: 0 0.3em; margin: 0.1em 0; white-space: nowrap; }

/* chamado de função (multiplayer) */
.callbar { position: absolute; left: 50%; bottom: 3.4em; transform: translateX(-50%); max-width: 80%; background: rgba(40, 30, 6, 0.95); border: 2px solid var(--yellow); border-radius: 6px; padding: 0.3em 0.8em; display: flex; gap: 0.5em; align-items: center; flex-wrap: wrap; justify-content: center; box-shadow: 0 0 16px rgba(255, 210, 63, 0.4); z-index: 3; }

/* ---------- modo jogo: some o texto do site, aparece a tripulação da partida ---------- */
body.playing #missao, body.playing #sistemas, body.playing #como-jogar, body.playing #multiplayer, body.playing .foot { display: none; }
body.playing #tripulacao .crewgrid:not(.live), body.playing #tripulacao > .wrap > p { display: none; }
#crew-live { display: none; }
body.playing #crew-live { display: grid; }
body.playing #tripulacao { padding-top: 12px; }
#crew-live > div { text-align: center; }
#crew-live > div.dead { opacity: 0.45; filter: grayscale(1); }
#crew-live img { image-rendering: pixelated; width: 60px; }
#crew-live em { display: block; font-style: normal; color: var(--yellow); font-size: 0.85em; }

/* ---------- abertura e introdução por modo ---------- */
.story, .mintro { position: absolute; inset: 0; }
.story-cap, .mcap { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); width: min(86%, 46em); background: rgba(5, 6, 26, 0.86); border: 2px solid var(--line); border-radius: 8px; padding: 0.6em 1em; }
.story-cap p, .mcap p { font-size: 1.2em; margin: 0.2em 0 0.4em; min-height: 2.6em; }
.story .row.bottom { bottom: auto; top: 1em; }
.dots { display: flex; gap: 0.35em; justify-content: center; }
.dots i { width: 0.6em; height: 0.6em; border-radius: 50%; background: #22357a; }
.dots i.done { background: var(--cyan); } .dots i.on { background: var(--yellow); }
.mtitle { position: absolute; left: 1em; top: 0.6em; font-family: var(--pix); font-size: 1em; color: var(--cyan2); margin: 0; }
.mnode { position: absolute; transform: translate(-50%, 0); font-family: var(--sk); font-size: 0.8em; background: rgba(10, 16, 48, 0.85); color: #fff; border: 1px solid #2f5bd7; border-radius: 10px; padding: 0 0.5em; cursor: pointer; }
.mnode.on { border-color: var(--yellow); color: var(--yellow); }
.mcap { bottom: 3%; }
.mcrew { display: flex; gap: 0.6em; justify-content: center; flex-wrap: wrap; }
.mcrew div { display: flex; flex-direction: column; align-items: center; font-size: 0.8em; }
.mcrew img { image-rendering: pixelated; width: 2.6em; }
kbd { font-family: var(--vt); font-size: 0.8em; border: 1px solid #5a6aa8; border-bottom-width: 2px; border-radius: 3px; padding: 0 0.3em; margin-left: 0.2em; color: #cfe3ff; background: rgba(0, 0, 0, 0.3); }

/* ---------- computador de bordo ---------- */
.assist-mini { position: absolute; left: 50%; top: 3.4em; transform: translateX(-50%); max-width: 62%; display: flex; align-items: center; gap: 0.4em; background: rgba(5, 12, 40, 0.9); border: 2px solid #2f5bd7; border-radius: 16px; padding: 0.1em 0.7em; cursor: pointer; font-size: 0.95em; }
.assist-mini .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assist-mini:hover { border-color: var(--cyan); }
.assist-mini.flash { border-color: var(--yellow); box-shadow: 0 0 14px rgba(255, 210, 63, 0.6); }
.game[data-scene=colony] .assist-mini { top: 3.6em; left: 62%; }
.game[data-scene=setup] .assist-mini, .game[data-scene=station] .assist-mini, .game[data-scene=planet] .assist-mini, .game[data-scene=migration] .assist-mini, .game[data-scene=detour] .assist-mini { top: auto; bottom: 0.4em; left: 30%; }
.game[data-scene=earth] .assist-mini { top: 0.5em; }
.pcpanel .nextcard { display: flex; gap: 0.8em; align-items: center; border: 2px solid var(--yellow); border-radius: 8px; padding: 0.5em 0.8em; background: rgba(255, 210, 63, 0.06); }
.pcpanel .big-ic { font-size: 2.4em; }
.pcpanel .nextcard p { font-size: 1.2em; margin: 0.1em 0 0.4em; }
.assist-mini.warn { border-color: var(--orange, #ff9a3c); }
.pcpanel h2 small { font-size: 0.55em; margin-left: 0.6em; }
.pcpanel .term { background: #020a08; border: 2px solid #1d5b3a; padding: 0.5em 0.7em; font-family: var(--mono, monospace); color: #7dffb0; max-height: 52vh; overflow-y: auto; box-shadow: inset 0 0 18px rgba(40, 255, 140, 0.08); }
.pcpanel .term .ln { padding: 0.15em 0; animation: pcin 0.25s steps(4); }
.pcpanel .term .ln .btn { margin-left: 0.4em; vertical-align: middle; }
.pcpanel .term .sys { color: #8ad; } .pcpanel .term .q { color: #fff; margin-top: 0.35em; } .pcpanel .term .a { color: #7dffb0; padding-left: 1em; }
.pcpanel .term .mis { color: var(--yellow); } .pcpanel .term .red { color: #ff6b6b; } .pcpanel .term .orange { color: #ffb15c; }
.pcpanel .term .cur { animation: blink 1s steps(2) infinite; }
.pcpanel .qs { display: flex; flex-wrap: wrap; gap: 0.35em; margin-top: 0.6em; }
@keyframes pcin { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.todo { list-style: none; padding: 0; margin: 0.2em 0; }
.todo li { padding: 0.1em 0; } .todo li.done { color: var(--muted); text-decoration: line-through; } .todo li.cur { color: var(--yellow); }
.keys { display: flex; flex-wrap: wrap; gap: 0.4em 1em; font-size: 0.9em; }

/* ---------- HUD enxuto ---------- */
.hud-top.slim .bars { display: flex; flex-wrap: wrap; gap: 0.3em 0.9em; align-items: center; }
.rb.big .nm { font-family: var(--sk); font-size: 0.8em; color: var(--muted); }
.rb.big .bar { width: 4.5em; height: 0.7em; }
.lowres { color: var(--red); margin-left: 0.2em; }
.hudfull { display: flex; flex-wrap: wrap; gap: 0.2em 0.6em; width: 100%; border-top: 1px solid #22357a; padding-top: 0.2em; }
.btn.tiny.on { border-color: var(--yellow); color: var(--yellow); }

/* ---------- desafios visuais ---------- */
.evp.compact .evhead { display: flex; align-items: center; gap: 0.5em; }
.evp.compact .evic { font-size: 2.2em; line-height: 1; }
.evp.compact h2 { margin: 0; }
.schips { display: flex; flex-wrap: wrap; gap: 0.4em; margin: 0.4em 0; }
.schip { display: flex; align-items: center; gap: 0.25em; background: #0b1238; border: 1px solid #22357a; border-radius: 6px; padding: 0.1em 0.4em; }
.schip .bar { width: 3em; }
.evinfo summary { cursor: pointer; color: var(--cyan); font-size: 0.9em; }
.stepcard { border: 2px solid #22357a; border-radius: 6px; padding: 0.3em 0.5em; margin: 0.3em 0; background: #0b1238; }
.stepcard.cur { border-color: var(--yellow); }
.dots-row { display: flex; gap: 0.3em; margin: 0.3em 0; }
.dots-row .dot { width: 1.4em; height: 1.4em; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8em; background: #0b1238; border: 1px solid #22357a; }
.dots-row .dot.done { background: #0f3a2a; border-color: var(--green); color: var(--green); } .dots-row .dot.cur { border-color: var(--yellow); color: var(--yellow); }
.bigres { font-family: var(--pix); font-size: 1.1em; margin: 0.4em 0; }
img.mini { image-rendering: pixelated; height: 1.4em; vertical-align: middle; margin-right: 0.2em; }

/* ---------- avatar ---------- */
.av-topbtns { position: absolute; right: 1.5%; top: 2%; display: flex; gap: 0.4em; z-index: 3; }
.previews.two { display: flex; gap: 1em; justify-content: center; }
.previews.two > div { display: flex; flex-direction: column; align-items: center; }
.previews.two canvas { width: 6em; height: auto; image-rendering: pixelated; background: rgba(255, 255, 255, 0.04); border-radius: 6px; }
.seats.sprites .seat { align-items: center; text-align: center; }
.seats.sprites img { image-rendering: pixelated; width: 2.4em; }
.avatar-screen .av-right { padding-top: 2.8em; }
.hud-top.slim .bars { flex-wrap: nowrap; gap: 0.6em; }
.rb.big .nm { font-size: 0.68em; }
.rb.big .bar { width: 3.4em; }
.hud-top.slim .bars:has(.hudfull) { flex-wrap: wrap; }

/* ---------- partida: só a tela do jogo, em tela cheia ---------- */
body.playing { background: #000; overflow: hidden; }
body.playing > header.nav, body.playing main > section:not(#jogar), body.playing .foot, body.playing .under, body.playing #crew-live { display: none !important; }
body.playing .play { padding: 0; background: #000; }
body.playing .game { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(100vw, calc(100vh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 0; box-shadow: none; z-index: 100; }

/* ---------- interface pixelada dentro do jogo ---------- */
img.pxe { width: 1.15em; height: 1.15em; image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: -0.18em; display: inline-block; }
#game *, #game *::before, #game *::after { border-radius: 0 !important; }
#game .panel, #game .evp, #game .tbox, #game .assist-mini, #game .toast, #game .callbar { box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55); }
#game .btn, #game .mbtn, #game .chip, #game .opt, #game .card { box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6); }
#game .bar, #game .bar i { image-rendering: pixelated; }
.assist-mini .cnt { color: var(--muted); font-size: 0.85em; }
.mbtn { justify-content: flex-start; gap: 0.5em; } .mbtn small { margin-left: auto; }
.game[data-scene=setup] .assist-mini { top: auto !important; bottom: 0.45em !important; left: 50% !important; max-width: 36%; }
.title-screen .menu { top: 45%; }

/* ---------- casa da cidade: cartão no canto da tela ---------- */
.house-card { position: absolute; right: 1.2%; bottom: 4.5em; display: flex; align-items: center; gap: 0.5em; background: rgba(8, 14, 44, 0.94); border: 2px solid var(--yellow); padding: 0.35em 0.6em; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55); cursor: pointer; z-index: 4; }
.house-card .hc-ic { font-size: 1.3em; } .house-card .hc-name { font-family: var(--sk); font-size: 0.9em; }
.house-card.open { display: block; padding: 0; border: 0; background: none; box-shadow: none; cursor: default; width: min(42%, 30em); bottom: 4.2em; top: auto; }
.house-card.open .panel { position: relative; max-height: 58vh; overflow: auto; padding: 0.6em 0.8em; }
.house-card.open h2 { font-size: 0.8em; padding-right: 1.5em; }
.house-card.open .citytxt { font-size: 0.95em; }

/* ---------- jogos salvos e recomeçar ---------- */
.saverow { display: flex; align-items: center; gap: 0.7em; border: 2px solid #22357a; border-radius: 8px; padding: 0.4em 0.6em; margin: 0.35em 0; background: #0b1238; }
.saverow.done { opacity: 0.75; }
.saverow .sv-ic { font-size: 1.6em; }
.saverow .sv-info { flex: 1; display: flex; flex-direction: column; }
.saverow .sv-info span { color: var(--cyan2); } .saverow .sv-info small { color: var(--muted); }
.saverow .sv-btns { display: flex; gap: 0.3em; }
.btn.red { border-color: var(--red); color: var(--red); }
.retry { border: 2px solid var(--yellow); border-radius: 8px; padding: 0.5em 0.8em; margin: 0.6em 0; background: rgba(255, 210, 63, 0.06); text-align: center; }


/* ---------- celular / toque ---------- */
#touch { position: absolute; inset: auto 0 3.6em 0; display: none; justify-content: space-between; align-items: flex-end; padding: 0 0.6em; z-index: 5; pointer-events: none; }
#touch > div { display: flex; gap: 0.35em; pointer-events: auto; flex-wrap: wrap; }
#touch .tt-act { justify-content: flex-end; max-width: 46%; }
#touch button { width: 2.5em; height: 2.5em; border-radius: 50%; border: 2px solid var(--cyan); background: rgba(10, 16, 48, 0.72); color: #fff; font-size: clamp(14px, 2cqw, 24px); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
#touch button.on { background: rgba(255, 210, 63, 0.35); border-color: var(--yellow); }
#touch .e { background: rgba(26, 95, 215, 0.85); font-weight: bold; }
@media (pointer: coarse) {
  .game[data-scene=ship] #touch, .game[data-scene=earth] #touch, .game[data-scene=colony] #touch { display: flex; }
  .game[data-ov="1"] #touch { display: none; }
  #ui-layer { touch-action: manipulation; -webkit-tap-highlight-color: transparent; font-size: clamp(13px, 1.9cqw, 22px); }
  #game .btn, #game .mbtn, #game .chip, #game .opt, #game .card, #game .btn.tiny, #game .btn.small { min-height: 2.3em; padding-top: 0.3em; padding-bottom: 0.3em; }
  #game .btn.tiny { min-width: 2.2em; }
  #game .panel, #game .scroll, #game .stage-panel, #game #side { touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  #game .x { font-size: 1.8em; padding: 0.1em 0.4em; }
  .assist-mini { padding: 0.3em 0.8em; }
  .chat { bottom: 4.5em; left: auto; right: 0.6em; }
  body.playing .game { width: min(100vw, calc(100dvh * 16 / 9)); }
  .under::before { display: none !important; }
  .start small::after { content: ' · 📱'; }
}
/* em pé, pede para girar o celular */
@media (orientation: portrait) and (pointer: coarse) {
  body.playing::before { content: '📱↻  Gire o celular para jogar na horizontal'; position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2em; background: rgba(5, 6, 26, 0.96); color: var(--yellow); font-family: var(--sk); font-size: 18px; }
}
.earth-hud .tbox.tr { max-width: 26%; }

/* tutorial */
.welcome { max-width: 30em; text-align: center; }
.welcome .wl { list-style: none; padding: 0; margin: 0.4em 0 0.8em; text-align: left; display: inline-block; }
.welcome .wl li { padding: 0.15em 0; } .welcome .wl li::before { content: '▸ '; color: var(--yellow); }
.goals { position: absolute; left: 0.6em; top: 6.6em; max-width: 34%; background: rgba(8, 14, 44, 0.92); border: 2px solid var(--yellow); padding: 0.3em 0.6em; font-size: 0.9em; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55); }
.goals b { font-family: var(--sk); color: var(--yellow); display: block; margin-bottom: 0.15em; }
.goals .done { color: var(--muted); text-decoration: line-through; } .goals .cur { color: #fff; }

/* zona de trocas da Ponte-Alfa */
.tradezone h4 { margin: 0.5em 0 0.25em; }
.tz-stock { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3em; }
.tz-res { display: flex; flex-direction: column; align-items: center; background: rgba(8, 14, 44, 0.8); border: 2px solid #2b3a78; padding: 0.1em 0.2em; font-size: 0.9em; }
.tz-res small { color: var(--muted); font-size: 0.75em; text-align: center; } .tz-res b { font-size: 1.05em; }
.tz-res.ok { border-color: #3fbf6a; } .tz-res.warn { border-color: #ffb15c; } .tz-res.bad { border-color: #ff4a5a; animation: blink 1.2s steps(2) infinite; }
.tz-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3em; font-size: 0.88em; }
.tz-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.4em; text-align: left; background: rgba(8, 14, 44, 0.9); border: 2px solid #2f5bd7; color: #fff; padding: 0.25em 0.4em; font: inherit; cursor: pointer; }
.tz-card:hover { border-color: var(--cyan); } .tz-card.cant { opacity: 0.5; cursor: not-allowed; } .tz-card.rec { border-color: var(--yellow); box-shadow: 0 0 10px rgba(255, 210, 63, 0.45); }
.tz-card small { display: block; color: var(--muted); font-size: 0.8em; }
.tz-give { color: #ff9a8a; } .tz-get { color: #7dffb0; } .tz-arrow { color: var(--yellow); }
.tz-card em { grid-column: 1 / -1; font-style: normal; font-size: 0.8em; }
@media (max-width: 800px) { .tz-stock { grid-template-columns: repeat(4, 1fr); } .tz-list { grid-template-columns: 1fr; } }
.yellow { color: var(--yellow); }
.goals.routine { max-width: 30%; }
.goals.routine b small { color: var(--muted); font-family: inherit; margin-left: 0.4em; }
.goals .how { color: var(--cyan); font-size: 0.85em; padding: 0.1em 0 0.25em 1.3em; }
.goals.paused { border-color: var(--red); } .goals.paused b { color: var(--red); } .goals.paused > div:not(.evline):not(.muted) { opacity: 0.45; }
.goals .evline { color: #fff; }
.meal { display: flex; align-items: center; gap: 0.5em; padding: 0.15em 0; border-bottom: 1px dashed #2a3a7a; }
.meal > span { min-width: 4.5em; color: var(--cyan); }
.mchips { display: flex; flex-wrap: wrap; gap: 0.25em; align-items: center; }
.mchips .chip small { color: var(--muted); }
.foodstat { border: 2px solid #3fbf6a; padding: 0.3em 0.5em; margin: 0.3em 0; background: rgba(8, 14, 44, 0.8); }
.foodstat.warn { border-color: #ffb15c; } .foodstat.bad { border-color: #ff4a5a; }
/* mensagem final */
.impact { margin: 0.8em 0 1em; padding: 1em 0.8em; border-top: 2px solid #2a3a7a; border-bottom: 2px solid #2a3a7a; background: rgba(0, 0, 0, 0.45); text-align: center; }
.impact p { margin: 0.35em 0; opacity: 0; animation: impactIn 1.2s ease forwards; }
.impact p.big { font-size: 1.35em; }
.impact p.huge { font-family: var(--sk); font-size: 2.1em; letter-spacing: 0.04em; text-shadow: 3px 3px 0 #000; }
.impact p.red { color: var(--red); } .impact p.cyan { color: var(--cyan); }
@keyframes impactIn { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.portions .opt span.big { color: var(--yellow); font-size: 1em; display: block; }
.goals .missed { color: var(--red); opacity: 0.7; }
/* animação dos controles */
.howto { position: absolute; left: 0; right: 0; bottom: 6%; display: flex; flex-direction: column; align-items: center; gap: 0.5em; pointer-events: auto; }
.howkeys { display: flex; gap: 0.5em; }
.howkeys kbd { font-family: var(--sk); font-size: 1.6em; min-width: 2.2em; padding: 0.2em 0.5em; text-align: center; background: #0a1030; color: #fff; border: 3px solid #4a5a9a; box-shadow: 0 5px 0 #1a2350; transition: transform 0.08s; }
.howkeys kbd.on { background: var(--yellow); color: #111; border-color: #fff; transform: translateY(4px); box-shadow: 0 1px 0 #1a2350; }
.howcap { font-family: var(--sk); font-size: 1.5em; color: var(--cyan); text-shadow: 3px 3px 0 #000; }
.howto .dots i { display: inline-block; width: 10px; height: 10px; margin: 0 3px; background: #2a3a7a; } .howto .dots i.on { background: var(--yellow); } .howto .dots i.done { background: var(--cyan); }
/* lições do computador de bordo */
.lesson-card { position: absolute; right: 0.6em; bottom: 3.2em; width: 34%; background: rgba(4, 12, 30, 0.95); border: 2px solid #3d7dff; padding: 0.45em 0.7em; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55); }
.lesson-card b { color: #7ab8ff; font-family: var(--sk); } .lesson-card p { margin: 0.3em 0; } .lesson-card small { color: var(--muted); } .lesson-card .x { position: absolute; right: 0.3em; top: 0.1em; }
.lesson-report { margin: 0.8em 0; border: 2px solid #3d7dff; padding: 0.5em 0.8em; background: rgba(4, 12, 30, 0.7); }
.lesson-report h4 { color: #7ab8ff; margin: 0 0 0.3em; } .lesson-report .nf { border-left: 3px solid #3d7dff; padding: 0.15em 0.5em; margin: 0.35em 0; } .lesson-report .nf p { margin: 0; } .lesson-report small { color: var(--muted); }

/* ---------- introdução da colônia e painéis em telas pequenas (celular) ---------- */
.introhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6em; }
.introhead h2 { margin: 0.1em 0; }
.objgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2em 0.5em; margin: 0.3em 0; }
.objgrid .alert { margin: 0; }
.stickyfoot { position: sticky; bottom: 0; background: var(--panel); padding: 0.3em 0; margin-top: 0.3em; }
@media (pointer: coarse) and (max-height: 520px) {
  #ui-layer { font-size: 11px; }
  #game .panel { padding: 0.4em 0.7em; }
  #game .panel.center, #game .panel.station { max-height: 96%; }
  #game .panel h2 { font-size: 0.85em; margin: 0.1em 0 0.3em; }
  #game .panel p { margin: 0.2em 0; }
  .objgrid { grid-template-columns: 1fr 1fr; }
  #game .btn.big { font-size: 1.1em; padding: 0.25em 0.9em; }
}
.opt.good{border-color:#5fe08a;background:rgba(60,160,90,.25)}
.opt.bad{border-color:#ff6a6a;background:rgba(180,50,50,.25)}
.quizfb{margin:8px 0;text-align:left}

.lesson-card { z-index: 30; }
.game[data-scene=station] .lesson-card, .game[data-scene=planet] .lesson-card, .game[data-scene=migration] .lesson-card, .game[data-scene=detour] .lesson-card { left: 0.6em; right: auto; bottom: 4.2em; }
.opt.rec { border-color: var(--yellow); box-shadow: 0 0 10px rgba(255, 210, 63, 0.45); }
/* regulação térmica simples: 3 controles */
.thctrls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4em; margin: 0.4em 0; }
.thc { display: flex; flex-direction: column; align-items: center; gap: 0.15em; text-align: center; background: rgba(8, 14, 44, 0.9); border: 3px solid #2b3a78; color: #fff; padding: 0.45em 0.4em; font: inherit; cursor: pointer; }
.thc .ic { font-size: 1.8em; } .thc b { font-family: var(--sk); } .thc em { font-style: normal; color: var(--muted); font-family: var(--sk); font-size: 0.9em; }
.thc small { font-size: 0.8em; color: #bcd3ff; }
.thc.on { border-color: var(--yellow); box-shadow: 0 0 12px rgba(255, 210, 63, 0.45); } .thc.on em { color: var(--yellow); }
.thc:hover { border-color: var(--cyan); }
.evp.thermal.simple .thres p { margin: 0.25em 0; }
.massbox{font-size:.82em;margin:6px 0 8px;padding:6px;border:1px solid rgba(95,208,255,.3);border-radius:4px}
.massbar{height:6px;background:#1a2342;margin:3px 0 5px}.massbar i{display:block;height:100%}
.orbitbox{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.orbitinfo{flex:1;min-width:180px;font-size:.85em}
.quizcats{margin:8px 0}
/* órbita em 3 passos */
.stage-panel .lead { font-size: 1.05em; margin: 0.2em 0 0.5em; }
.pstep { display: flex; gap: 0.6em; align-items: flex-start; border: 2px solid #2b3a78; padding: 0.4em 0.6em; margin: 0.35em 0; background: rgba(8, 14, 44, 0.7); }
.pstep.done { border-color: #3fbf6a; }
.pnum { min-width: 1.6em; height: 1.6em; display: flex; align-items: center; justify-content: center; font-family: var(--sk); background: #2f5bd7; color: #fff; }
.pstep.done .pnum { background: #3fbf6a; }
.pstep b { display: block; font-family: var(--sk); } .pstep > div > small { display: block; color: var(--muted); margin-bottom: 0.25em; }
.pbtns { display: flex; flex-wrap: wrap; gap: 0.3em; }
.pres { flex-basis: 100%; font-size: 0.88em; } .pres span { color: var(--muted); } .pres.bad { color: #ff8a8a; }
/* projeto da missão: restrições e requisitos */
.cstbox { border: 2px solid #2b3a78; padding: 0.3em 0.45em; margin: 0.4em 0; background: rgba(8, 14, 44, 0.7); font-size: 0.85em; }
.cstbox h4 { margin: 0 0 0.2em; font-size: 0.95em; }
.cst { display: flex; justify-content: space-between; gap: 0.4em; padding: 0.1em 0; } .cst b { color: #7dffb0; } .cst.bad b { color: #ffb15c; }
.reqs { display: flex; flex-direction: column; gap: 0.15em; margin: 0.2em 0 0.5em; font-size: 0.95em; }
.voicepick .vrow { display: flex; align-items: center; gap: 0.4em; padding: 0.2em 0; border-bottom: 1px dashed #2a3a7a; } .voicepick .vrow span { flex: 1; text-align: left; } .voicepick .vrow.on span { color: var(--yellow); }
/* barra de interação grande e clicável; botão de configurações em todas as telas */
.big-prompt { font: inherit; font-size: 1.25em; padding: 0.35em 0.9em; background: rgba(5, 12, 40, 0.92); border: 3px solid var(--yellow); color: #fff; cursor: pointer; box-shadow: 0 0 12px rgba(255, 210, 63, 0.35); }
.big-prompt b { color: var(--yellow); font-family: var(--sk); font-size: 1.05em; margin-right: 0.2em; }
.big-prompt:hover { background: rgba(40, 50, 110, 0.95); } .big-prompt:disabled { border-color: #2f5bd7; box-shadow: none; cursor: default; }
.gear { position: absolute; right: 0.4em; bottom: 3.4em; z-index: 25; font-size: 1.3em; width: 1.9em; height: 1.9em; padding: 0; background: rgba(5, 12, 40, 0.9); border: 2px solid #2f5bd7; color: #fff; cursor: pointer; }
.gear:hover { border-color: var(--cyan); }
.kbig { display: flex; align-items: center; gap: 0.6em; margin: 0.3em 0 0.5em; } .kbig .kbar { flex: 1; display: flex; align-items: center; gap: 0.4em; } .kbig .kbar .bar { flex: 1; }
.opt.port small { color: var(--muted); }
.thc { position: relative; } .thc.todo { border-color: #ff9a3c; }
.thtodo { position: absolute; top: -0.7em; left: 50%; transform: translateX(-50%); font-style: normal; font-family: var(--sk); background: var(--yellow); color: #111; padding: 0 0.4em; font-size: 0.85em; }
.evp.thermal.simple .thermo.main b { font-size: 1.5em; }
/* montagem mais visual: descrição só como dica */
.setup .opt .idesc { display: none; }
.setup .opt b { font-size: 1.05em; }
/* solução clara (jornada curta) e térmica liga/desliga */
.solbox { margin: 8px 0 4px; padding: 8px 12px; border: 3px solid #ffd84a; background: rgba(255, 216, 74, .14); color: #ffe98a; font-size: 15px; font-weight: bold; text-align: center; }
.solbox b { color: #fff; }
.sol, .btn.sol { outline: 3px solid #ffd84a; outline-offset: 2px; box-shadow: 0 0 12px #ffd84a; }
.filter.sol { background: rgba(255, 216, 74, .18); }
.thctrls.two { grid-template-columns: 1fr 1fr; }
.thc.onoff { padding: 14px 8px; }
.thc.onoff .ic { font-size: 2.2em; }
.thc.onoff .onsw { font-size: 1.1em; font-style: normal; margin-top: 6px; color: #8aa0c8; }
.thc.onoff.on .onsw { color: #7dffb0; }
.card.quick { position: relative; }
.card.quick .qtag { position: absolute; top: -10px; right: 10px; background: #ffd84a; color: #1a1a2e; font-style: normal; font-size: 12px; padding: 2px 8px; font-weight: bold; }
.thc.onoff .onsw { display: flex; align-items: center; justify-content: center; gap: 6px; }
.thc.onoff .led { display: inline-block; width: 0.7em; height: 0.7em; background: #3a4560; border: 2px solid #8aa0c8; }
.thc.onoff.on .led { background: #7dffb0; border-color: #7dffb0; box-shadow: 0 0 8px #7dffb0; }
/* quebra-cabeças visuais e de um clique */
.puzzle.vis h4 { font-size: 1.15em; margin: 0.2em 0; }
.pzhow { font-size: 1.05em; color: #ffe98a; font-weight: bold; margin: 0.3em 0; }
.btn.pzbig { font-size: 1.05em; padding: 0.55em 0.8em; min-height: 2.4em; border-width: 3px; }
.filters .fbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; color: #fff; border: 3px solid #2b3a78; background: rgba(8, 14, 44, .9); padding: 6px; }
.filters .fbtn:hover { border-color: var(--cyan); }
.fbtn .fic { font-size: 1.6em; } .fbtn em { font-style: normal; font-size: 1em; } .fbtn small { color: #8aa0c8; }
.fbtn .flow { width: 70%; height: 28px; background: #1a2350; display: flex; align-items: flex-end; }
.fbtn .flow i { display: block; width: 100%; background: #7dd8ff; }
.fbtn.ok { opacity: .5; }
.bands { display: flex; gap: 2px; height: 46px; align-items: stretch; margin: 4px 0; }
.band { flex: 1; display: flex; align-items: flex-end; padding: 0; background: #0b1440; border: 2px solid #22357a; cursor: pointer; }
.band i { display: block; width: 100%; background: #4fa3ff; }
.band:hover { border-color: var(--cyan); } .band.on { border-color: #ffd84a; } .band.on i { background: #ffd84a; }
.wslots { display: flex; align-items: center; gap: 4px; margin: 6px 0; flex-wrap: wrap; }
.wslot { flex: 1; min-width: 60px; border: 3px dashed #3a4f9a; text-align: center; padding: 4px; display: flex; flex-direction: column; align-items: center; }
.wslot b { color: #8aa0c8; } .wslot span { font-size: 1.5em; } .wslot.on { border-style: solid; border-color: #3fbf7f; background: rgba(63, 191, 127, .15); }
.warr { font-style: normal; color: #8aa0c8; }
.wopts, .meds { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.wopt, .med { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font: inherit; color: #fff; background: rgba(8, 14, 44, .9); border: 3px solid #2b3a78; cursor: pointer; }
.wopt:hover, .med:hover { border-color: var(--cyan); }
.wopt span, .med span { font-size: 1.8em; } .wopt small { color: #bcd3ff; font-size: .8em; }
.wopt.used { opacity: .35; }
.vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.vital { border: 2px solid #2b3a78; padding: 4px; text-align: center; font-size: .9em; } .vital span { display: block; font-size: 1.4em; }
.medref { font-size: .85em; color: #bcd3ff; margin-top: 6px; }
.solbox.okbox { border-color: #3fbf7f; background: rgba(63, 191, 127, .14); color: #7dffb0; }
/* nave recomendada */
.setup.quickset { display: flex; align-items: center; justify-content: center; }
.qpanel { background: rgba(8, 14, 44, .95); border: 3px solid #4fa3ff; padding: 18px 22px; max-width: 760px; width: 92%; text-align: center; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.qitem { border: 2px solid #2b3a78; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.qitem span { font-size: 1.8em; } .qitem b { font-size: .85em; }
.qline { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; color: #bcd3ff; margin-bottom: 12px; }
.qbtns { justify-content: center; gap: 14px; }
.btn.huge { font-size: 1.4em; padding: .6em 1.6em; }
.btn.huge2 { font-size: 1.05em; padding: .7em 1.2em; }
.wopts { grid-template-columns: repeat(4, 1fr); gap: 4px; }
.meds { grid-template-columns: repeat(5, 1fr); gap: 4px; }
.wopt, .med { padding: 5px 2px; font-size: .85em; }
.wopt span, .med span { font-size: 1.5em; }
.wslot { padding: 2px; min-width: 0; } .wslot span { font-size: 1.2em; }
.vitals .vital { padding: 2px; font-size: .8em; } .vital span { font-size: 1.2em; }
.puzzle.vis .opts1 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.puzzle.vis .opts1 .btn.pzbig { padding: .4em .5em; min-height: 2.2em; font-size: .9em; }
.opt.sug{box-shadow:0 0 0 1px #ffd34c inset}
#qbar{position:absolute;left:8px;top:50%;transform:translateY(-50%);z-index:30;pointer-events:none}
.qbar{display:flex;flex-direction:column;gap:8px}
.qb{pointer-events:auto;width:46px;height:46px;padding:0;border:2px solid rgba(143,163,214,.7);background:rgba(10,14,34,.85);color:#fff;border-radius:6px;cursor:pointer;font-size:24px;line-height:1}
.qb.off{opacity:.55}
.qb:hover{border-color:#ffd34c}
.exo.locked{opacity:.35;pointer-events:none;filter:grayscale(1)}
.exo.guide{border-color:#ffd34c;box-shadow:0 0 12px #ffd34c}
.bigarrow{font-size:2.4em;text-align:center;color:#ffd34c;animation:bob .6s ease-in-out infinite alternate;line-height:1}
@keyframes bob{from{transform:translateY(-4px)}to{transform:translateY(4px)}}
.btn.must{animation:pulse .5s ease-in-out infinite alternate;box-shadow:0 0 14px #ffd34c}
@keyframes pulse{from{transform:scale(1)}to{transform:scale(1.08)}}
.thguide{border:1px solid #ffd34c;border-radius:6px;padding:4px 8px;margin:4px 0;background:rgba(40,32,8,.55);font-size:.85em}
.thguide ol{margin:3px 0 3px 1.1em;padding:0}.thguide li{opacity:.6;margin:2px 0}.thguide li.now{opacity:1;color:#ffd34c;font-weight:bold}.thguide li.done{opacity:.45;text-decoration:line-through}
.homage{margin:10px auto;padding:6px 10px;border:1px solid rgba(70,224,138,.5);border-radius:6px;max-width:560px;font-size:.9em;color:#bff5d4}
.qorigin{margin:6px 0;text-align:center}.qorigin .mchips{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;margin:4px 0}
/* fotos dos planetas */
.ppic { image-rendering: pixelated; image-rendering: crisp-edges; display: block; border-radius: 0; background: #000; }
.exo .ppic.thumb { width: 72px; height: 72px; float: left; margin: 0 8px 4px 0; border: 2px solid #22357a; }
.exo::after { content: ''; display: block; clear: both; }
.phero { display: flex; gap: 12px; align-items: center; margin: 6px 0; }
.phero .ppic.hero { width: 150px; height: 150px; flex: none; border: 2px solid #22357a; box-shadow: 0 0 18px rgba(80, 140, 255, .25); }
.exo .kv { clear: both; padding-top: 4px; } .exo > b { font-size: 1.15em; }
.phero .ppic.hero, .exo .ppic.thumb { border-radius: 0; }
.sharebox{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;margin:6px 0;font-size:.85em}
.sharebox input{font-family:var(--pix);width:auto;min-width:90px;background:#0b1238;color:var(--yellow);border:1px solid #22357a;padding:2px 6px;user-select:all}
.sharebox input[readonly]{cursor:text}
/* porcentagem do caminho em cima da linha do tempo */
.track .line { position: relative; }
.track .line .pct { position: absolute; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; font-style: normal; font-size: .8em; color: #ffe98a; text-shadow: 1px 1px 0 #000; white-space: nowrap; pointer-events: none; }
