/* STARTUP WARS — tema visual premium de estratégia empresarial (responsivo, modo reduzido de animações) */
:root {
  --bg: #0b1020; --bg2: #111833; --panel: #151d3b; --panel2: #1b2550; --line: #2a3566; --text: #e6e9f5; --muted: #93a0c8;
  --primary: #8b5cf6; --primary2: #6d28d9; --cyan: #22d3ee; --good: #10b981; --bad: #ef4444; --warn: #f59e0b;
  --r: 14px; --shadow: 0 10px 30px rgba(0, 0, 0, .35); --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: radial-gradient(1200px 600px at 10% -10%, #24185a 0, transparent 60%), radial-gradient(900px 500px at 110% 10%, #0c3b52 0, transparent 55%), var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; min-height: 100%; }
body { min-height: 100vh; }
a { color: var(--cyan); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: .2em 0 .5em; line-height: 1.2; }
h3 { font-size: 1.02rem; color: #c7cdf0; }
h4 { font-size: .92rem; color: var(--muted); margin-top: 1em; }
p { margin: .4em 0; line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.center { text-align: center; }
.pos { color: var(--good); } .neg { color: var(--bad) !important; } .warn-text { color: var(--warn); }
code { background: #0003; padding: 1px 5px; border-radius: 5px; }
.boot { display: grid; place-items: center; min-height: 100vh; text-align: center; }
.boot h1 span, .title span { background: linear-gradient(90deg, var(--primary), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Botões e campos */
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .55em 1em; font: inherit; cursor: pointer; transition: transform .12s, background .15s, border-color .15s; display: inline-flex; align-items: center; gap: .4em; justify-content: center; }
.btn:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary2)); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 4px 18px rgba(139, 92, 246, .35); }
.btn.warn { background: linear-gradient(135deg, #f59e0b, #d97706); border-color: transparent; color: #1b1300; font-weight: 600; }
.btn.danger { background: #3a1830; border-color: #6b2141; color: #fecaca; }
.btn.sm { padding: .3em .6em; font-size: .85rem; border-radius: 8px; }
.btn.big { padding: .9em 1.4em; font-size: 1.05rem; flex-direction: column; }
.btn.big small { font-size: .75rem; color: #ffffffb0; font-weight: 400; }
.btn.block { width: 100%; margin-top: .6em; }
input, select, textarea { background: #0b1230; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .45em .6em; font: inherit; max-width: 100%; }
input[type=range] { padding: 0; accent-color: var(--primary); width: 100%; }
input[type=number] { width: 9em; }
input:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.field { display: flex; flex-direction: column; gap: .3em; margin: .55em 0; color: var(--muted); font-size: .9rem; }
.field input:not([type=range]), .field select { color: var(--text); }
.check { display: flex; gap: .5em; align-items: center; margin: .5em 0; }
.row { display: flex; gap: .5em; align-items: center; }
.row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.center { justify-content: center; }
.tag { display: inline-block; font-size: .72rem; padding: 2px 7px; border-radius: 999px; background: #ffffff14; color: #c7cdf0; border: 1px solid #ffffff1c; vertical-align: middle; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.code { font-family: ui-monospace, monospace; font-size: 1.3em; letter-spacing: .15em; background: #0006; padding: 2px 10px; border-radius: 8px; color: var(--cyan); }

/* Cartões e grades */
.card { background: linear-gradient(180deg, var(--panel), #121937); border: 1px solid var(--line); border-radius: var(--r); padding: 1em 1.1em; box-shadow: var(--shadow); margin-bottom: 1em; min-width: 0; }
.card.highlight { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.card.empty, .empty { color: var(--muted); text-align: center; padding: 1.4em; }
.grid { display: grid; gap: 1em; }
.grid > .card { margin-bottom: 0; }
.grid + .grid, .grid + .card, .kpis + .grid { margin-top: 1em; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g2-1 { grid-template-columns: 2fr 1fr; }
.kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3em .9em; }
.kv { display: flex; justify-content: space-between; gap: .5em; padding: .35em 0; border-bottom: 1px dashed #ffffff14; font-size: .9rem; }
.kv span { color: var(--muted); } .kv b { text-align: right; }
.hint { font-style: normal; color: var(--cyan); cursor: help; }
.bar { height: 7px; background: #ffffff12; border-radius: 99px; overflow: hidden; min-width: 50px; flex: 1; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--cyan)); border-radius: 99px; transition: width .5s; }
.bar.bad i { background: linear-gradient(90deg, #f97316, var(--bad)); } .bar.mvp i { background: linear-gradient(90deg, #f59e0b, #10b981); }
td .bar { display: inline-block; width: 60px; vertical-align: middle; }
.alert { border-radius: 10px; padding: .7em 1em; margin: .7em 0; border: 1px solid; display: flex; flex-wrap: wrap; gap: .6em; align-items: center; }
.alert.good { background: #06392c; border-color: #10b98166; } .alert.bad { background: #3b1220; border-color: #ef444466; } .alert.info { background: #0c2c45; border-color: #22d3ee55; }

/* Tabelas */
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: .5em .4em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .45em .4em; border-bottom: 1px solid #ffffff0d; vertical-align: middle; }
.tbl tr.b td { font-weight: 700; } .tbl tr.total td { border-top: 2px solid var(--line); color: #fff; }
.tbl tr.me td { background: #8b5cf622; } .tbl tr.off { opacity: .45; } .tbl tr.mine td { background: #10b98118; }
.tbl.fin td:not(:first-child), .tbl.fin th:not(:first-child) { text-align: right; }
.tbl.rank tr { cursor: pointer; }
.tbl.channels input { width: 7.5em; }
.scroll { overflow-x: auto; }
.delta { font-size: .75rem; font-weight: 600; } .delta.up { color: var(--good); } .delta.down { color: var(--bad); }

/* Gráficos */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #ffffff12; } .chart .zero { stroke: #ffffff40; stroke-dasharray: 3 3; }
.chart .axis, .radar .axis { fill: var(--muted); font-size: 11px; } .chart .val { fill: #c7cdf0; font-size: 10px; }
.radar { width: 100%; max-width: 260px; display: block; margin: 0 auto; } .radar .grid { stroke: #ffffff1c; }
.legend { display: flex; flex-wrap: wrap; gap: .4em 1em; font-size: .8rem; color: var(--muted); margin-top: .3em; }
.legend.col { flex-direction: column; gap: .25em; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.donut-wrap { display: flex; gap: 1em; align-items: center; flex-wrap: wrap; }
.donut-label { fill: var(--text); font-size: 12px; font-weight: 600; }
.spark { width: 100%; height: 28px; margin-top: 4px; }
.hbars { display: flex; flex-direction: column; gap: .45em; }
.hbar { display: grid; grid-template-columns: minmax(90px, 32%) 1fr 70px; gap: .6em; align-items: center; font-size: .85rem; }
.hbar .track { height: 12px; background: #ffffff10; border-radius: 6px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--cyan)); border-radius: 6px; transition: width .6s; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); } .hbar b { text-align: right; }

/* Menu */
.menu-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2em 1em; gap: 1.5em; }
.hero { text-align: center; position: relative; }
.brand { letter-spacing: .4em; font-size: .8rem; color: var(--cyan); text-transform: uppercase; }
.title { font-size: clamp(2.6rem, 9vw, 5.4rem); font-weight: 900; letter-spacing: .02em; margin: .1em 0 0; text-shadow: 0 8px 40px rgba(139, 92, 246, .45); }
.subtitle { font-size: 1.2rem; color: var(--muted); letter-spacing: .25em; text-transform: uppercase; margin-top: 0; }
.hero-art { position: absolute; inset: -40px -80px; z-index: -1; pointer-events: none; }
.hero-art .sky { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); left: calc(10% + var(--i) * 20%); top: calc(20% + var(--i) * 11%); box-shadow: 0 0 20px var(--cyan); animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.2s); }
@keyframes float { 50% { transform: translateY(-24px); opacity: .4; } }
.menu-buttons { display: flex; flex-direction: column; gap: .7em; width: min(380px, 100%); }
.menu-buttons .row { justify-content: center; flex-wrap: wrap; }
.menu-foot { color: var(--muted); font-size: .85rem; text-align: center; }
.page { max-width: 1200px; margin: 0 auto; padding: 1.5em 1em 3em; }
.page.narrow { max-width: 760px; }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1em; margin: 1em 0 1.5em; }
.mode-card, .sector, .model { background: linear-gradient(180deg, var(--panel), #121937); border: 1px solid var(--line); color: var(--text); border-radius: var(--r); padding: 1.1em; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: .35em; transition: all .15s; }
.mode-card:hover:not(:disabled), .sector:hover:not(:disabled), .model:hover { border-color: var(--primary); transform: translateY(-2px); }
.mode-card .ic, .sector .ic { font-size: 2rem; } .mode-card p { color: var(--muted); margin: 0; font-size: .9rem; }
.mode-card:disabled, .sector:disabled { opacity: .5; cursor: not-allowed; }
.sector.on, .model.on { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan) inset; background: linear-gradient(180deg, #17305a, #121937); }
.sector small, .model small { color: var(--muted); font-size: .78rem; }
.sectors, .models, .founders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8em; margin-bottom: 1em; }
.wizard .steps { display: flex; gap: .4em; flex-wrap: wrap; margin-bottom: 1em; }
.wizard .steps span { padding: .35em .8em; border-radius: 99px; background: #ffffff0d; color: var(--muted); font-size: .85rem; }
.wizard .steps .now { background: var(--primary); color: #fff; } .wizard .steps .done { color: var(--good); }
.pick { display: flex; flex-wrap: wrap; gap: .4em; }
.chip { background: #0b1230; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: .35em .55em; cursor: pointer; font: inherit; font-size: 1.15rem; }
.chip.on { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan); }
.chip.color { width: 34px; height: 34px; }
.chip.wide { font-size: .9rem; text-align: left; }
.preview-card { text-align: center; padding: 1.5em; background: radial-gradient(circle at 50% 0, #2b1f6b, transparent 70%); border-radius: var(--r); }
.preview-card.small { padding: .6em; }

/* Jogo */
.game { display: grid; grid-template-columns: 210px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.game.crisis .topbar { border-bottom-color: var(--bad); box-shadow: 0 0 30px #ef444433; }
.topbar { grid-column: 1 / -1; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1em; padding: .55em 1em; background: #0b1020e6; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tb-left { display: flex; gap: .6em; align-items: center; min-width: 0; }
.tb-left small { display: block; color: var(--muted); font-size: .78rem; }
.tb-left b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 220px; }
.tb-stats { display: flex; gap: 1em; margin-left: auto; font-weight: 600; font-size: .92rem; }
.tb-actions { display: flex; gap: .4em; }
.sidenav { position: sticky; top: 57px; align-self: start; height: calc(100vh - 57px); overflow-y: auto; padding: .7em .5em; border-right: 1px solid var(--line); background: #0b10209c; }
.sidenav a { display: flex; align-items: center; gap: .6em; padding: .55em .7em; border-radius: 10px; color: var(--text); margin-bottom: 2px; position: relative; text-decoration: none; }
.sidenav a:hover { background: #ffffff0d; } .sidenav a.on { background: linear-gradient(90deg, #8b5cf633, transparent); box-shadow: inset 3px 0 0 var(--primary); }
.sidenav em { font-style: normal; font-size: .92rem; }
.badge-n { position: absolute; right: 8px; background: var(--bad); color: #fff; font-style: normal; font-size: .7rem; border-radius: 99px; padding: 1px 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: scale(1.15); } }
main { padding: 1em 1.3em 4em; min-width: 0; }
.screen-title { font-size: 1.35rem; margin-bottom: .7em; }
.toolbar { display: flex; gap: .7em; align-items: center; flex-wrap: wrap; margin-bottom: .8em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8em; }
.kpi { background: linear-gradient(160deg, #1d2758, #131a3a); border: 1px solid var(--line); border-radius: var(--r); padding: .8em .9em .5em; }
.kpi .kpi-top { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.kpi b { font-size: 1.35rem; display: block; margin-top: .15em; }
.kpi.neg b { color: var(--bad); } .kpi.pos b { color: #a7f3d0; }
.kpis.small .kpi b { font-size: 1.1rem; } .kpis.small .kpi small { font-size: .75rem; color: var(--muted); } .kpis.small .kpi span { color: var(--muted); font-size: .8rem; }
.kpis.small small.up { color: var(--good) !important; } .kpis.small small.down { color: var(--bad) !important; }
.office-wrap { background: radial-gradient(circle at 50% 30%, #1e2a5a, #0b1020 75%); border-radius: 12px; }
.office { width: 100%; display: block; max-height: 260px; }
.office .win { fill: #1e293b; } .office .win.lit { fill: #fde68a; animation: flicker 5s infinite; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 95% { opacity: .5; } }
.office .walker { animation: walk 9s linear infinite; } @keyframes walk { 50% { transform: translateX(12px); } }
.office .flag { animation: wave 1.8s ease-in-out infinite; transform-origin: left center; } @keyframes wave { 50% { transform: scaleX(.8); } }
.stages { display: flex; gap: 4px; margin-bottom: .6em; }
.stages .st { flex: 1; text-align: center; padding: .3em 0; border-radius: 6px; background: #ffffff0d; font-size: .8rem; color: var(--muted); }
.stages .st.done { background: #10b98144; color: #a7f3d0; } .stages .st.now { background: var(--primary); color: #fff; font-weight: 700; }
.flow { padding-left: 1.3em; margin: 0; font-size: .87rem; line-height: 1.7; } .flow li.auto { color: var(--muted); }
.insights, .news { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4em; }
.insights li { padding: .5em .7em; border-radius: 8px; background: #ffffff08; border-left: 3px solid var(--cyan); font-size: .9rem; }
.insights li.good { border-color: var(--good); } .insights li.bad { border-color: var(--bad); background: #ef444412; } .insights li.warn { border-color: var(--warn); }
.news li { font-size: .88rem; padding: .3em 0; border-bottom: 1px solid #ffffff0a; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1em; margin: 1em 0; }
.product { background: linear-gradient(180deg, var(--panel), #121937); border: 1px solid var(--line); border-radius: var(--r); padding: 1em; }
.product.live { border-color: #10b98166; } .product.discontinued { opacity: .5; }
.p-head { display: flex; justify-content: space-between; gap: 1em; }
.p-head h4 { margin: 0 0 .3em; color: var(--text); font-size: 1.05rem; }
.p-cust { text-align: right; } .p-cust b { font-size: 1.5rem; display: block; } .p-cust span { color: var(--muted); font-size: .8rem; }
.badge { font-size: .72rem; padding: 2px 8px; border-radius: 99px; } .badge.dev { background: #f59e0b33; color: #fcd34d; } .badge.live { background: #10b98133; color: #6ee7b7; } .badge.discontinued { background: #64748b33; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .4em 1em; margin: .8em 0; font-size: .82rem; color: var(--muted); }
.metrics > div { display: grid; grid-template-columns: 95px 1fr 28px; align-items: center; gap: .4em; } .metrics b { color: var(--text); text-align: right; }
.progress { margin: .7em 0; }
.focus { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: .5em; align-items: end; font-size: .8rem; color: var(--muted); margin-bottom: .6em; }
.focus label { display: flex; flex-direction: column; }
.p-controls .row { margin-top: .4em; } .p-controls details { margin-top: .6em; }
.funnel { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fstep { background: linear-gradient(90deg, #6d28d955, #0891b255); border: 1px solid var(--line); border-radius: 8px; padding: .45em .8em; display: flex; justify-content: space-between; font-size: .85rem; }
.cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6em; }
.cand { background: #0b1230; border: 1px solid var(--line); border-radius: 10px; padding: .7em; display: flex; flex-direction: column; gap: .3em; font-size: .85rem; }
.cand > div { display: flex; align-items: center; gap: .4em; }
.investors { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .7em; }
.investor { background: #0b1230; border: 1px solid var(--line); border-radius: 10px; padding: .8em; }
.investor.off { opacity: .55; } .iv-head { display: flex; justify-content: space-between; gap: .5em; }
.pitch { display: flex; flex-wrap: wrap; gap: .4em; margin-top: .5em; } .pitch input { width: 7em; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: .5em 0; border-bottom: 1px solid #ffffff0d; flex-wrap: wrap; }
.event .ev-head { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; } .event .ev-head h3 { margin: 0; color: var(--text); font-size: 1.15rem; }
.event.market { border-color: #22d3ee66; } .event.done { opacity: .75; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6em; margin-top: .8em; }
.btn.option { flex-direction: column; align-items: flex-start; text-align: left; padding: .8em; }
.btn.option span { color: var(--muted); font-size: .8rem; } .btn.option .risk { color: var(--warn); }
.ecomap { width: 100%; display: block; border-radius: 12px; }
.ecomap .mapgrid { stroke: #ffffff08; stroke-width: .2; }
.ecomap .brazil { fill: #13306b; stroke: #3b82f6; stroke-width: .6; }
.ecomap .region { cursor: pointer; } .ecomap .halo { fill: #22d3ee22; stroke: #22d3ee66; stroke-width: .3; }
.ecomap .region.mine .halo { fill: #10b98144; stroke: #10b981; animation: pulse 2.4s infinite; transform-box: fill-box; transform-origin: center; }
.ecomap .dot { fill: #fff; } .ecomap .rlabel { fill: #c7cdf0; font-size: 2.8px; }
.ecomap .route { stroke: #22d3ee44; stroke-width: .25; stroke-dasharray: 1 1; } .ecomap .route.mine { stroke: #10b981; }
.stage-list { display: flex; flex-direction: column; gap: .5em; }
.stage { display: flex; gap: .8em; padding: .6em; border-radius: 10px; background: #ffffff06; }
.stage .n { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #ffffff14; font-weight: 700; }
.stage.done .n { background: var(--good); } .stage.now { background: #8b5cf622; } .stage.now .n { background: var(--primary); }
.missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6em; }
.mission { display: flex; gap: .7em; padding: .7em; border-radius: 10px; background: #0b1230; border: 1px solid var(--line); opacity: .7; }
.mission.done { opacity: 1; border-color: #f59e0b66; } .mission .medal { font-size: 1.8rem; } .mission p { margin: .2em 0; font-size: .82rem; }
.trophies { display: flex; flex-wrap: wrap; gap: .5em; } .trophy { background: #f59e0b1c; border: 1px solid #f59e0b55; padding: .3em .7em; border-radius: 99px; }
.saves, .reports { display: flex; flex-direction: column; gap: .5em; margin-bottom: 1em; }
.save, .room, .challenge { display: flex; justify-content: space-between; align-items: center; gap: .6em; padding: .6em .2em; border-bottom: 1px solid #ffffff10; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: .3em; }
details summary { cursor: pointer; color: var(--muted); padding: .3em 0; }

/* Modal, toasts, overlay de rodada */
#modal { position: fixed; inset: 0; background: #04071299; backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 1em; animation: fade .2s; }
.modal-card { background: linear-gradient(180deg, #1a2350, #111833); border: 1px solid var(--line); border-radius: 18px; padding: 1.4em; width: min(560px, 100%); max-height: 90vh; overflow: auto; position: relative; box-shadow: var(--shadow); animation: pop .25s; }
.modal-card.wide { width: min(860px, 100%); }
.modal-x { position: absolute; right: .7em; top: .7em; background: none; border: 0; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: scale(.94); opacity: 0; } }
#toasts { position: fixed; right: 1em; bottom: 1em; z-index: 200; display: flex; flex-direction: column; gap: .5em; max-width: min(380px, 90vw); }
.toast { background: #1b2550; border: 1px solid var(--line); border-left: 4px solid var(--cyan); padding: .7em 1em; border-radius: 10px; box-shadow: var(--shadow); animation: pop .25s; font-size: .9rem; }
.toast.good { border-left-color: var(--good); } .toast.bad { border-left-color: var(--bad); } .toast.warn { border-left-color: var(--warn); }
.toast.out { opacity: 0; transform: translateX(20px); transition: all .4s; }
.round-overlay { position: fixed; inset: 0; z-index: 150; background: radial-gradient(circle, #1b1250ee, #050817f5); display: grid; place-items: center; animation: fade .25s; }
.ro-card { width: min(460px, 92vw); } .ro-card ol { list-style: none; padding: 0; }
.ro-card li { padding: .35em .6em; color: #ffffff55; border-radius: 8px; transition: all .2s; }
.ro-card li.done { color: var(--good); } .ro-card li.done::before { content: '✔ '; }
.ro-card li.now { color: #fff; background: #8b5cf633; } .ro-card li.now::before { content: '⟳ '; display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ro-bar { height: 6px; background: #ffffff14; border-radius: 99px; overflow: hidden; } .ro-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--cyan)); transition: width .25s; }

/* Resultado final */
.results { text-align: center; position: relative; overflow: hidden; } .results .lead { font-size: 1.2rem; }
.results.won h1 { font-size: 3rem; color: #fde68a; text-shadow: 0 0 30px #f59e0b88; }
.results .grid, .results .card { text-align: left; } .big-num { font-size: 3.5rem; font-weight: 900; text-align: center; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -20px; left: calc(var(--i) * 2.5%); width: 8px; height: 14px; background: hsl(calc(var(--i) * 37), 90%, 60%); animation: fall 3.5s linear infinite; animation-delay: calc(var(--i) * -0.09s); }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Responsivo */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .game { grid-template-columns: 1fr; }
  .sidenav { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; display: flex; overflow-x: auto; z-index: 30; border-right: 0; border-top: 1px solid var(--line); background: #0b1020f2; padding: .3em; padding-bottom: calc(.3em + env(safe-area-inset-bottom)); }
  .sidenav a { flex-direction: column; gap: 0; padding: .35em .55em; font-size: .7rem; min-width: 64px; margin: 0; }
  .sidenav a span { font-size: 1.2rem; } .sidenav em { font-size: .68rem; } .sidenav a.on { box-shadow: inset 0 3px 0 var(--primary); }
  .badge-n { right: 2px; top: 0; }
  main { padding: .8em .7em 6.5em; }
  .g2, .g3, .g4, .g2-1 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: .5em; padding: .5em .7em; }
  .tb-stats { order: 3; width: 100%; margin: 0; justify-content: space-between; font-size: .85rem; }
  .tb-actions { margin-left: auto; } .tb-actions .btn.primary { padding: .45em .7em; font-size: .85rem; }
  .products { grid-template-columns: 1fr; }
  .focus { grid-template-columns: 1fr 1fr 1fr; } .focus > span { grid-column: 1 / -1; }
  .metrics { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 90px 1fr 56px; }
}
@media (max-width: 480px) { body { font-size: 14px; } .kpi b { font-size: 1.1rem; } .tb-left b { max-width: 130px; } }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print {
  body { background: #fff; color: #000; } .topbar, .sidenav, .btn, #toasts { display: none !important; }
  .card { box-shadow: none; border-color: #999; background: #fff; color: #000; } .tbl th, .tbl td, .muted { color: #000; }
  body.printing .page > :not(.grid), body.printing .grid > div > .card:not(.print-area) { display: none; }
}

.burst { position: fixed; left: 50%; top: 45%; z-index: 300; pointer-events: none; }
.burst i { position: absolute; font-style: normal; font-size: 1.6rem; animation: burst 1.3s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes burst { from { transform: rotate(var(--a)) translateX(0) scale(.4); opacity: 1; } to { transform: rotate(var(--a)) translateX(var(--d)) scale(1.1); opacity: 0; } }
.game.crisis main::before { content: ''; position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px #ef444433; animation: crisis 3s ease-in-out infinite; }
@keyframes crisis { 50% { box-shadow: inset 0 0 60px #ef444411; } }
.mode-card.demo { border-style: dashed; }

.tbl.fin td:not(:first-child) { white-space: nowrap; }
.ecomap .region:hover .halo { fill: #22d3ee44; }
