/* Orbis — sala de cartas náuticas: oceano petróleo, tinta marfim, latão para o que é seu. */
@font-face { font-family: Fraunces; src: url(../fonts/fraunces-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Fraunces; src: url(../fonts/fraunces-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Fraunces; src: url(../fonts/fraunces-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Plex; src: url(../fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Plex; src: url(../fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Plex; src: url(../fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ocean: #0F2B33; --abyss: #0A1F25; --chart: #133640; --raised: #1A434E; --land: #2B5661;
  --ink: #EDE7D6; --muted: #9FB4B1; --faint: #6F8A89; --line: rgba(237, 231, 214, .13);
  --brass: #D4A84B; --brass-dim: #8F7436; --good: #62C6A3; --bad: #E66E5C; --sky: #74AEE0;
  --serif: Fraunces, Georgia, 'Times New Roman', serif; --sans: Plex, 'Segoe UI', system-ui, sans-serif;
  --rail: 76px; --top: 56px; --panel: 468px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--abyss); color: var(--ink); font: 400 14px/1.45 var(--sans); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .good { color: var(--good); } .bad { color: var(--bad); } .brass { color: var(--brass); }
.small { font-size: 12.5px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: #27535e; border-radius: 6px; border: 2px solid var(--chart); }

/* ---------- mapa */
#map-wrap { position: fixed; inset: 0; background: radial-gradient(120% 90% at 40% 35%, #143943 0%, var(--ocean) 55%, var(--abyss) 100%); }
#map { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#map.dragging { cursor: grabbing; }
#sphere { fill: none; stroke: rgba(212, 168, 75, .28); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
#graticule { fill: none; stroke: rgba(237, 231, 214, .055); stroke-width: 1; vector-effect: non-scaling-stroke; }
.land { fill: var(--land); fill-opacity: .5; stroke: rgba(10, 31, 37, .9); stroke-width: .8; vector-effect: non-scaling-stroke; transition: fill .5s; }
#map[data-mode="terreno"] .land { fill-opacity: 0; }
#map[data-mode="crescimento"] .land, #map[data-mode="aprovacao"] .land, #map[data-mode="relacoes"] .land, #map[data-mode="militar"] .land, #map[data-mode="renda"] .land, #map[data-mode="jogadores"] .land { fill-opacity: .72; }
.land.subject { stroke: var(--brass); stroke-dasharray: 5 3; stroke-width: 1.4; }
.land.playable { cursor: pointer; }
.land.playable:hover { filter: brightness(1.22); }
.land.off { fill: #1D4049; fill-opacity: .15; }
.land.sel { stroke: var(--brass); stroke-width: 2.2; }
.land.war { stroke: var(--bad); stroke-width: 1.6; stroke-dasharray: 4 3; }
#tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--abyss); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 12.5px; max-width: 260px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
#tooltip b { font-family: var(--serif); font-size: 15px; font-weight: 600; display: block; }

/* ---------- controles */
.btn { white-space: nowrap; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; cursor: pointer; font-weight: 500; line-height: 1.2; }
.btn:hover { border-color: var(--brass-dim); background: #20505c; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brass); color: #1b1608; border-color: var(--brass); font-weight: 600; }
.btn.primary:hover { background: #e2b95f; }
.btn.danger { border-color: rgba(230, 110, 92, .5); color: #f3a093; }
.btn.danger:hover { background: rgba(230, 110, 92, .16); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.ghost { background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input[type=text], input[type=number], select, textarea { background: var(--abyss); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; min-width: 0; }
input[type=number] { width: 96px; }
select { cursor: pointer; }
label.field { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
label.field > input, label.field > select { color: var(--ink); font-size: 14px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--brass) var(--fill, 50%), #2a5560 var(--fill, 50%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: #2a5560; }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--brass); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 3px solid var(--brass); margin-top: -6px; }
input[type=range]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); border: 3px solid var(--brass); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { background: transparent; border: 0; border-right: 1px solid var(--line); padding: 5px 10px; cursor: pointer; font-size: 12.5px; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--raised); }
.seg button.on { background: var(--brass); color: #1b1608; font-weight: 600; }
.flag { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; vertical-align: -3px; margin-right: 5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.flag.lg { width: 44px; height: 32px; border-radius: 3px; margin-right: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tag.brass { border-color: var(--brass-dim); color: var(--brass); }
.tag.bad { border-color: rgba(230, 110, 92, .5); color: #f3a093; }

/* ---------- entrada */
.screen { position: fixed; inset: 0; z-index: 20; display: grid; overflow: auto; }
#home { grid-template-columns: minmax(340px, 520px) 1fr; background: linear-gradient(90deg, rgba(10, 31, 37, .96) 0%, rgba(10, 31, 37, .86) 38%, rgba(10, 31, 37, 0) 78%); }
.home-col { padding: clamp(28px, 6vh, 72px) clamp(24px, 4vw, 56px); display: flex; flex-direction: column; gap: 26px; }
.wordmark { font: 600 clamp(56px, 8vw, 92px)/.9 var(--serif); letter-spacing: -.035em; }
.wordmark i { font-weight: 400; color: var(--brass); }
.lede { font: 400 19px/1.45 var(--serif); color: #d4d6c8; max-width: 30em; }
.choices { display: grid; gap: 10px; }
.choice { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; text-align: left; background: rgba(19, 54, 64, .82); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; }
.choice:hover { border-color: var(--brass); }
.choice strong { font: 600 18px var(--serif); }
.choice span { grid-column: 1; color: var(--muted); font-size: 13px; }
.choice em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; color: var(--brass); font-weight: 600; }
.joinrow { display: flex; gap: 8px; }
.joinrow input { flex: 1; text-transform: uppercase; letter-spacing: .18em; font-weight: 600; }
.inviterow { display: grid; gap: 5px; margin-top: 8px; } .inviterow span { color: var(--muted); font-size: 13px; }
.saves { display: grid; gap: 6px; }
.saves button { display: flex; justify-content: space-between; gap: 12px; text-align: left; }
.fine { color: var(--faint); font-size: 12.5px; margin-top: auto; }

#create { justify-items: start; pointer-events: none; background: linear-gradient(90deg, rgba(10, 31, 37, .5), rgba(10, 31, 37, 0) 70%); }
.create-box { pointer-events: auto; width: min(620px, 100%); min-height: 100%; background: rgba(15, 43, 51, .96); border-right: 1px solid var(--line); padding: 22px 26px; display: grid; gap: 16px; align-content: start; box-shadow: 20px 0 60px rgba(0, 0, 0, .35); }
.create-grid { display: grid; gap: 16px; }
.origins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.origin { text-align: left; background: var(--chart); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; cursor: pointer; }
.origin strong { font: 600 16px var(--serif); display: block; }
.origin span { font-size: 12.5px; color: var(--muted); }
.origin.on { border-color: var(--brass); background: #1b4450; }
.clist { max-height: 212px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.clist button { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 6px 10px; cursor: pointer; }
.clist button:hover { background: var(--raised); }
.clist button.on { background: #1f4b57; box-shadow: inset 3px 0 0 var(--brass); }
.picked { display: flex; gap: 12px; align-items: center; min-height: 40px; }
.picked h3 { font-size: 22px; }

/* ---------- jogo */
#topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--top); z-index: 12; display: flex; align-items: center; gap: 18px; padding: 0 16px 0 14px; background: rgba(10, 31, 37, .93); border-bottom: 1px solid var(--line); }
.brand { font: 600 24px var(--serif); letter-spacing: -.03em; width: calc(var(--rail) - 14px); }
.brand i { color: var(--brass); font-weight: 400; }
.clock { display: flex; align-items: center; gap: 12px; }
.date { font: 600 19px var(--serif); min-width: 128px; }
.speed { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.speed button { background: transparent; border: 0; border-right: 1px solid var(--line); width: 34px; height: 30px; cursor: pointer; display: grid; place-items: center; }
.speed button:last-child { border-right: 0; }
.speed button.on { background: var(--brass); color: #1b1608; }
.speed button:disabled { cursor: default; opacity: .6; }
.speed svg { width: 16px; height: 12px; fill: currentColor; }
.stats { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.stat { display: grid; line-height: 1.15; text-align: right; }
.stat small { color: var(--muted); font-size: 11.5px; }
.stat b { font: 600 16px var(--serif); }
.bell { position: relative; }
.bell .count { position: absolute; top: -6px; right: -6px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; border-radius: 10px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.roomcode { font-weight: 600; letter-spacing: .14em; color: var(--brass); cursor: pointer; background: transparent; border: 1px dashed var(--brass-dim); border-radius: 6px; padding: 3px 9px; }

#rail { position: fixed; top: var(--top); left: 0; bottom: 0; width: var(--rail); z-index: 11; background: rgba(10, 31, 37, .93); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 0; gap: 2px; }
#rail button { background: transparent; border: 0; border-left: 3px solid transparent; padding: 9px 2px 8px 0; cursor: pointer; display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 11.5px; position: relative; }
#rail button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#rail button:hover { color: var(--ink); }
#rail button.on { color: var(--brass); border-left-color: var(--brass); background: rgba(212, 168, 75, .07); }
#rail button .pip { position: absolute; top: 6px; right: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }

#panel { position: fixed; top: var(--top); right: 0; bottom: 0; width: var(--panel); z-index: 10; background: rgba(19, 54, 64, .965); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
#panel-head { padding: 14px 18px 0; border-bottom: 1px solid var(--line); }
#panel-head h2 { font-size: 25px; line-height: 1.1; }
#panel-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.headline { display: flex; gap: 12px; align-items: center; }
.tabs { display: flex; gap: 18px; margin-top: 12px; }
.tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 6px 0 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brass); }
#panel-body { flex: 1; overflow-y: auto; padding: 14px 18px 26px; display: flex; flex-direction: column; gap: 18px; }
#panel-body > * { flex-shrink: 0; }
.sec { display: grid; gap: 9px; }
.sec > h3 { font-size: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sec > h3 small { font: 400 12.5px var(--sans); color: var(--muted); }
.note { color: var(--muted); font-size: 13px; }
.callout { border-left: 3px solid var(--brass); background: rgba(212, 168, 75, .07); padding: 9px 12px; border-radius: 0 6px 6px 0; font-size: 13.5px; }
.callout.bad { border-left-color: var(--bad); background: rgba(230, 110, 92, .08); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.kpi { padding: 9px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi:nth-child(3n) { border-right: 0; }
.kpi:nth-last-child(-n+3) { border-bottom: 0; }
.kpi small { color: var(--muted); font-size: 12px; display: block; }
.kpi b { font: 600 18px var(--serif); }
.kpi span { font-size: 12px; margin-left: 4px; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.row.col { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.row.col .r { justify-content: flex-start; flex-wrap: wrap; }
.row .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.row:last-child { border-bottom: 0; }
.row .r { text-align: right; display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.bar { height: 6px; background: #24505b; border-radius: 3px; overflow: hidden; position: relative; }
.bar i { display: block; height: 100%; background: var(--brass); border-radius: 3px; }
.bar.goal::after { content: ''; position: absolute; top: -2px; bottom: -2px; left: var(--goal); width: 2px; background: var(--ink); opacity: .7; }
.idx { display: grid; grid-template-columns: 112px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.stack { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: #24505b; }
.stack i { display: block; height: 100%; }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.slider:last-child { border-bottom: 0; }
.slider .lab { font-weight: 500; }
.slider .val { font: 600 15px var(--serif); text-align: right; min-width: 70px; }
.slider input { grid-column: 1 / -1; }
.slider .hint { grid-column: 1 / -1; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.balance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 8px; }
.balance div { padding: 8px 10px; border-right: 1px solid var(--line); }
.balance div:last-child { border-right: 0; }
.balance small { display: block; color: var(--muted); font-size: 12px; }
.balance b { font: 600 17px var(--serif); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); font-size: 12px; }
td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.me td { background: rgba(212, 168, 75, .08); }
tr.click { cursor: pointer; } tr.click:hover td { background: rgba(237, 231, 214, .04); }
.law { border-bottom: 1px solid var(--line); padding: 9px 0; display: grid; gap: 6px; }
.law:last-child { border-bottom: 0; }
.law .t { display: flex; justify-content: space-between; gap: 8px; font-weight: 500; }
.spark { width: 100%; height: 46px; display: block; }
.spark path { fill: none; stroke: var(--brass); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark .zero { stroke: var(--line); stroke-dasharray: 3 3; }
.spark .area { fill: rgba(212, 168, 75, .1); stroke: none; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.charts figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 4px; }
.charts figcaption { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.cocard { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; display: grid; gap: 6px; cursor: pointer; background: transparent; text-align: left; width: 100%; }
.cocard:hover { border-color: var(--brass-dim); }
.cocard h4 { font: 600 17px var(--serif); margin: 0; display: flex; justify-content: space-between; gap: 8px; }
.cocard .m { display: flex; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.cocard .m b { color: var(--ink); font-weight: 500; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.compass { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

#mapmodes { position: fixed; left: calc(var(--rail) + 14px); top: calc(var(--top) + 12px); z-index: 9; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100vw - var(--rail) - var(--panel) - 30px); }
#mapmodes button { background: rgba(10, 31, 37, .8); border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
#mapmodes button.on { color: #1b1608; background: var(--brass); border-color: var(--brass); font-weight: 600; }
#mapmodes .legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: rgba(10, 31, 37, .8); border-radius: 20px; padding: 4px 12px; border: 1px solid var(--line); }
#mapmodes .legend i { width: 90px; height: 8px; border-radius: 4px; display: block; }

#feed { position: fixed; left: calc(var(--rail) + 14px); bottom: 14px; width: min(430px, calc(100vw - var(--rail) - var(--panel) - 30px)); z-index: 9; background: rgba(10, 31, 37, .86); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#feed header { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 6px 12px; border-bottom: 1px solid var(--line); font: 600 14px var(--serif); cursor: pointer; }
#feed .items { max-height: 132px; overflow-y: auto; }
#feed.open .items { max-height: 46vh; }
#feed.closed .items { display: none; }
.news { display: grid; grid-template-columns: 62px 1fr; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; cursor: pointer; }
.news:hover { background: rgba(237, 231, 214, .04); }
.news time { color: var(--faint); font-variant-numeric: tabular-nums; }
.news.big p { color: #f1dca8; }
.news.mine { box-shadow: inset 3px 0 0 var(--brass); }

#modal { position: fixed; inset: 0; z-index: 60; background: rgba(5, 16, 20, .66); display: grid; place-items: center; padding: 20px; }
#modal-box { width: min(560px, 100%); max-height: 86vh; overflow: auto; background: var(--chart); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: grid; gap: 14px; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
#modal-box h2 { font-size: 24px; }
.opt { white-space: normal; text-align: left; display: grid; gap: 2px; padding: 10px 13px; }
.opt small { color: var(--muted); font-weight: 400; }
.msg { border-bottom: 1px solid var(--line); padding-bottom: 14px; display: grid; gap: 8px; }
.msg:last-child { border-bottom: 0; padding-bottom: 0; }
.msg h3 { font-size: 18px; }

#toasts { position: fixed; z-index: 70; left: 50%; top: calc(var(--top) + 12px); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--abyss); border: 1px solid var(--good); border-radius: 8px; padding: 9px 14px; max-width: 520px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: rise .18s ease-out; }
.toast.err { border-color: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } }
.chatlog { display: grid; gap: 6px; }
.chatlog p b { font-weight: 600; }
.chatbar { display: flex; gap: 8px; position: sticky; bottom: -26px; background: var(--chart); padding: 10px 0 12px; margin-top: auto; }
.chatbar input { flex: 1; }
.votes { display: grid; gap: 4px; font-size: 13px; }

@media (max-width: 1100px) { :root { --panel: 400px; } .stats { gap: 14px; } .stat.opt2 { display: none; } }
@media (max-width: 820px) {
  :root { --panel: 100vw; --rail: 0px; }
  #rail { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 58px; flex-direction: row; justify-content: space-around; border-right: 0; border-top: 1px solid var(--line); padding: 0; }
  #rail button { border-left: 0; border-top: 3px solid transparent; flex: 1; }
  #rail button.on { border-top-color: var(--brass); }
  #panel { top: 46vh; bottom: 58px; border-left: 0; border-top: 1px solid var(--line); }
  #feed, #mapmodes .legend { display: none; }
  #home { grid-template-columns: 1fr; background: rgba(10, 31, 37, .9); }
  .create-grid { grid-template-columns: 1fr; }
  .brand { width: auto; } .stat small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- mapa detalhado */
.ic { cursor: default; }
.river { fill: none; stroke: #1a4652; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .9; pointer-events: none; }
.lake { fill: var(--ocean); stroke: none; pointer-events: none; }
.reg { fill: none; stroke: rgba(237, 231, 214, .2); stroke-width: .5; vector-effect: non-scaling-stroke; pointer-events: none; }
.regp { fill: rgba(237, 231, 214, 0); stroke: rgba(237, 231, 214, .5); stroke-width: .8; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.regp:hover { fill: rgba(237, 231, 214, .1); }
.regp.sel { fill: rgba(212, 168, 75, .22); stroke: var(--brass); stroke-dasharray: none; stroke-width: 1.6; }
.road-c, .road, .rr-c, .rr { fill: none; vector-effect: non-scaling-stroke; pointer-events: none; stroke-linejoin: round; }
.road-c { stroke: rgba(8, 20, 24, .9); stroke-width: 3; } .road { stroke: #b9bcbb; stroke-width: 1.5; }
#map[data-z="4"] .road-c { stroke-width: 5.5; } #map[data-z="4"] .road { stroke: #6f7577; stroke-width: 3.6; }
.rr-c { stroke: #cfd6d2; stroke-width: 1.5; opacity: .75; } .rr { stroke: #163640; stroke-width: 1.5; stroke-dasharray: 2.500 2.500; opacity: .75; }
.myroad-c, .myroad, .myroad-m, .myrail-c, .myrail { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.myroad-c { stroke: #06141a; stroke-width: 9; cursor: help; } .myroad { stroke: #5d6468; stroke-width: 6.5; pointer-events: none; } .myroad-m { stroke: #ffd34d; stroke-width: 1; stroke-dasharray: 6 5; pointer-events: none; }
.myrail-c { stroke: #f1e9d2; stroke-width: 5; cursor: help; } .myrail { stroke: #2a1d12; stroke-width: 5; stroke-dasharray: 1.500 4; pointer-events: none; stroke-linecap: butt; }
.myroad-c.wip, .myrail-c.wip { opacity: .45; }
.city { cursor: pointer; }
.city circle { fill: var(--ink); stroke: var(--abyss); stroke-width: 1.5; }
.city.cap circle { fill: var(--brass); }
.city.sel circle { stroke: var(--brass); stroke-width: 3; }
.city.occ circle { fill: var(--bad); stroke: #fff; }
.city text, .mark text { font: 500 11px var(--sans); fill: var(--ink); paint-order: stroke; stroke: rgba(10, 31, 37, .85); stroke-width: 3px; pointer-events: none; }
.mark circle { stroke: var(--abyss); stroke-width: 1.5; } .mark text { font-weight: 600; }
.poi circle { fill: rgba(10, 31, 37, .85); stroke: #6fa8c9; stroke-width: 1; } .poi use { fill: #9fd0ea; stroke: #9fd0ea; }
.poi.airport circle { stroke: #b9b3a0; } .poi.airport use { fill: #d9d3bf; stroke: none; }
.poi.airport.mil circle { stroke: var(--bad); } .poi.airport.mil use { fill: #f0a79b; }
.poi, .st { cursor: help; }
.splate { fill: #10303a; stroke: var(--brass); stroke-width: 1.2; } .st use { fill: #f1dca8; stroke: #f1dca8; }
.st-site.t-oil .splate, .st-site.t-gas .splate, .st-site.t-coal .splate { fill: #1b1b1b; } .st-site.t-gold use { stroke: #e6c34a; } .st-site.t-diamond use { stroke: #9fe3f0; } .st-site.t-uranium use { stroke: #b6e04e; }
.st-plant use { fill: #ffd34d; stroke: none; } .st-plant.t-hydro use { fill: #5db3ee; } .st-plant.t-wind use { fill: #bfe9f0; } .st-plant.t-nuclear use, .st-plant.t-fusion use { fill: #b6e04e; } .st-plant.t-coal use, .st-plant.t-gas use, .st-plant.t-oil use { fill: #a9adb0; }
.st.wip { opacity: .5; }
.bplate { fill: #3a1512; stroke: var(--bad); stroke-width: 1.4; } .base.own .bplate { fill: #4a3410; stroke: var(--brass); } .base.own { cursor: grab; }
.bic { fill: #f6e9d8; stroke: none; } .uplate { fill: rgba(10, 31, 37, .88); stroke: rgba(237, 231, 214, .35); stroke-width: .8; } .uic { fill: #e9e4d4; stroke: none; transform: scale(.82); }
.ucount { font: 600 9.500px var(--sans); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: rgba(10, 31, 37, .9); stroke-width: 2.500px; }
.base.other .uplate, .base.other .uic, .base.other .ucount { display: none; }
.oplate { fill: #0a1f25; stroke-width: 2.200; } .op.fight .oplate { stroke-dasharray: 3 2; }
.opline, .orderline { fill: none; stroke: var(--bad); stroke-width: 1.600; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.orderline { stroke: var(--brass); stroke-width: 2.400; }
#map.ordering { cursor: crosshair; }
#map[data-z="1"] .city:not(.cap), #map[data-z="1"] .city text, #map[data-z="1"] #structs, #map[data-z="1"] #poi, #map[data-z="1"] #regionsAll, #map[data-z="1"] #regions, #map[data-z="1"] #roads, #map[data-z="1"] #railsReal, #map[data-z="1"] #rails { display: none; }
#map[data-z="2"] #poi, #map[data-z="2"] .city.minor, #map[data-z="2"] .base.other { display: none; }
#map[data-z="3"] .city.minor text { display: none; }
#map[data-z="1"] #ops .ic, #map[data-z="2"] #ops .ic { display: block; }
#rail { overflow-y: auto; scrollbar-width: none; } #rail::-webkit-scrollbar { display: none; }
#rail button { padding: 7px 2px 6px 0; }
.tech { border-bottom: 1px solid var(--line); padding: 8px 0; display: grid; gap: 3px; }
.tech:last-child { border-bottom: 0; }
.tech .t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tech.done b { color: var(--good); } .tech.locked { opacity: .55; }
.lvl { display: inline-flex; gap: 3px; vertical-align: -1px; }
.lvl i { width: 9px; height: 9px; border-radius: 2px; background: #2a5560; display: block; }
.lvl i.on { background: var(--brass); }
.resbars { display: grid; gap: 2px; }
.pickrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

td.n, th.n { white-space: nowrap; }

.blocker { position: fixed; inset: 0; z-index: 90; background: rgba(5, 16, 20, .92); display: grid; place-items: center; padding: 24px; }
.blocker div { max-width: 520px; display: grid; gap: 12px; text-align: left; } .blocker h2 { font-size: 28px; }
.legend-map { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend-map svg { width: 14px; height: 14px; vertical-align: -2px; fill: currentColor; stroke: currentColor; }

#map[data-z="2"] #structs .uplate, #map[data-z="2"] #structs .uic, #map[data-z="2"] #structs .ucount { display: none; }

#map.moving #roads, #map.moving #railsReal, #map.moving #regionsAll, #map.moving #poi, #map.moving #water { display: none; }
#relief, #reliefHi image { pointer-events: none; }
#ctx { position: fixed; z-index: 80; min-width: 220px; background: var(--abyss); border: 1px solid var(--line); border-radius: 8px; padding: 5px; box-shadow: 0 12px 34px rgba(0, 0, 0, .5); display: grid; }
#ctx b { font: 600 14px var(--serif); padding: 6px 10px 4px; } #ctx small { padding: 0 10px 6px; color: var(--muted); }
#ctx button { text-align: left; background: transparent; border: 0; border-radius: 5px; padding: 7px 10px; cursor: pointer; }
#ctx button:hover { background: var(--raised); }
.avatar { border-radius: 50%; flex: none; display: block; }
.who { display: flex; gap: 12px; align-items: center; cursor: pointer; background: transparent; border: 0; padding: 0; text-align: left; }
.who:hover b { text-decoration: underline; }
.unitpick { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.unitpick input { width: 78px; }

/* ---- 0.5: peças militares, cartão da base, usinas e cidades desenhadas */
.stn { cursor: pointer; }
.stn .tile { fill: #1c3038; stroke: #8fa6ad; stroke-width: 1.5; }
.stn .tile-in { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 1; }
.stn .bic { fill: #d5e0e3; stroke: none; }
.stn.own .tile { fill: #0f3a5e; stroke: #5cc0ff; } .stn.own .bic { fill: #d9f1ff; } .stn.own { cursor: grab; }
.stn.foe .tile { fill: #521812; stroke: #ff705c; } .stn.foe .bic { fill: #ffe1db; }
.stn.neutral.other { opacity: .78; }
.stn.grp .tile { stroke-width: 2; } .stn.wip { opacity: .5; }
.stn:hover .tile { filter: brightness(1.35); }
.op .tile { stroke-width: 2; } .op.fight .tile { stroke-dasharray: 3 2; }
.burst { fill: #ffd23a; stroke: #f0612c; stroke-width: 1.2; animation: burst 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes burst { 50% { transform: scale(1.18) rotate(12deg); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .burst { animation: none; } }
.opline.own { stroke: #5cc0ff; } .opline.neutral { stroke: #9fb3b9; } .opline.transfer { stroke-dasharray: 2 5; }
.st-plant .splate { fill: #10303a; stroke: #62c6a3; stroke-width: 1.6; }
.st-plant.t-coal .splate, .st-plant.t-gas .splate, .st-plant.t-oil .splate { stroke: #c9a15a; fill: #2a2622; }
.st-plant.t-nuclear .splate, .st-plant.t-fusion .splate { stroke: #d7e86a; }
.st-plant.t-solar use { fill: #ffd34d; } .st-plant.t-hydro .splate { fill: #123a52; stroke: #5db3ee; }
#urban { pointer-events: none; } #urban .urb { pointer-events: auto; cursor: pointer; }
.ublot { fill: rgba(150, 138, 120, .78); stroke: rgba(70, 60, 48, .7); stroke-width: 1; }
.ush { fill: rgba(20, 22, 24, .45); } .urb rect { stroke: rgba(40, 36, 30, .55); stroke-width: .35; } .urb rect.ush { stroke: none; }
.uname { font: 500 10.500px var(--sans); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: rgba(10, 31, 37, .85); stroke-width: 3px; pointer-events: none; }
#map[data-u="1"] .city circle, #map[data-u="2"] .city circle { r: 2.2; }
#map:not([data-u="2"]) .city.minor text { display: none; }
#map { user-select: none; -webkit-user-select: none; }
.ustreet { fill: none; stroke: rgba(92, 96, 98, .9); stroke-width: 1.3; }
#map[data-z="2"] .stn.grp.neutral { display: none; }
#card { position: fixed; z-index: 70; width: 290px; background: var(--abyss); border: 1px solid #2f6f86; border-radius: 10px; padding: 12px 14px 12px; box-shadow: 0 14px 38px rgba(0, 0, 0, .55); display: grid; gap: 8px; }
#card h4 { font: 600 17px var(--serif, Fraunces, serif); margin: 0; } #card .sub { color: var(--muted); font-size: 12.500px; margin-top: -6px; }
#card .units { display: grid; gap: 4px; } #card .u { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; font-size: 13.500px; }
#card .u svg { width: 20px; height: 20px; fill: #d9f1ff; } #card .u b { font-variant-numeric: tabular-nums; }
#card .x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 4px; }
#card .capbar { height: 4px; border-radius: 2px; background: #1d4450; overflow: hidden; } #card .capbar i { display: block; height: 100%; background: #5cc0ff; }
.pot { display: grid; grid-template-columns: 74px 1fr 34px; gap: 8px; align-items: center; font-size: 13px; }
.pot .bar { height: 7px; border-radius: 4px; background: #1d4450; overflow: hidden; } .pot .bar i { display: block; height: 100%; background: var(--brass); }
.pot.lo .bar i { background: #8a8f8a; } .pot.hi .bar i { background: var(--good); }
.potbox { display: grid; gap: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }

/* ---- 0.6: mapa 3D, formato com painel à esquerda e resumo à direita, celular e tablet */
:root { --rail: 76px; --top: 54px; --panel: 440px; --outl: 290px; --left: 506px; --right: 290px; --bottom: 56px; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; user-select: none; -webkit-user-select: none; }
#ov g.ic { pointer-events: auto; } #ov .mark, #ov .poi { pointer-events: auto; }
#map-wrap { touch-action: none; } #map-wrap.dragging #gl { cursor: grabbing; } #map-wrap.ordering #gl { cursor: crosshair; }
#map-wrap.gl #map { display: none; } #map-wrap:not(.gl) #gl, #map-wrap:not(.gl) #ov { display: none; }
#ov[data-z="1"] .city:not(.cap), #ov[data-z="1"] .city text, #ov[data-z="1"] #ov-structs, #ov[data-z="1"] #ov-poi { display: none; }
#ov[data-z="2"] #ov-poi, #ov[data-z="2"] .city.minor, #ov[data-z="2"] .base.other, #ov[data-z="2"] .stn.grp.neutral { display: none; }
#ov:not([data-u="2"]) .city.minor text { display: none; } #ov[data-u="1"] .city circle, #ov[data-u="2"] .city circle { r: 2.6; }
#ov .city text, #ov .mark text { font: 600 11.5px var(--sans); fill: #fff; paint-order: stroke; stroke: rgba(6, 18, 24, .9); stroke-width: 3.2px; }
#ov .opline { vector-effect: none; stroke-width: 2; }
#ov .orderline { stroke: var(--brass); stroke-width: 2.6; fill: none; stroke-dasharray: 6 4; }
.poi circle { fill: rgba(10, 31, 37, .85); stroke: #9fc4d6; stroke-width: 1; } .poi use { fill: #cfe6f2; stroke: #cfe6f2; }
#aim { position: fixed; left: calc(var(--left) + (100vw - var(--left) - var(--right)) / 2); top: calc(var(--top) + (100vh - var(--top) - var(--bottom)) / 2); z-index: 8; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 30px; pointer-events: none; }
#aim[hidden] { display: none; }
#aim i { width: 46px; height: 46px; border: 2px solid var(--brass); border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(0, 0, 0, .45); background: radial-gradient(circle, var(--brass) 0 2.5px, transparent 3px); }
#aim button { pointer-events: auto; background: var(--brass); color: #1b1608; border: 0; border-radius: 20px; padding: 7px 16px; font: 600 13px var(--sans); cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }

#topbar { gap: 14px; padding: 0 12px; background: linear-gradient(180deg, rgba(7, 22, 28, .97), rgba(10, 31, 37, .93)); }
#topbar .home { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--ink); cursor: pointer; padding: 4px 8px 4px 2px; border-radius: 8px; min-width: 0; }
#topbar .home:hover { background: rgba(255, 255, 255, .06); } #topbar .home .fi, #topbar .home img { width: 38px; height: 27px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
#topbar .home b { font: 600 18px var(--serif); white-space: nowrap; } #topbar .home small { display: block; color: var(--muted); font-size: 11.5px; text-align: left; }
#topbar .stats { margin: 0 auto 0 4px; gap: 4px; display: flex; align-items: center; }
#topbar .stat { padding: 3px 11px; border-left: 1px solid var(--line); text-align: left; } #topbar .stat small { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; } #topbar .stat b { font-size: 15.5px; }
#topbar .clock { margin-left: auto; } #topbar .tb-right { display: flex; gap: 8px; align-items: center; }
#rail button { font-size: 10.5px; } #rail button.on { background: linear-gradient(90deg, rgba(212, 168, 75, .16), transparent); }
#panel { left: var(--rail); right: auto; width: var(--panel); border-left: 0; border-right: 1px solid var(--line); box-shadow: 14px 0 34px rgba(0, 0, 0, .28); background: linear-gradient(180deg, rgba(17, 48, 58, .975), rgba(13, 38, 46, .975)); }
body.noPanel #panel { display: none; }
#panel-x { position: absolute; top: 8px; right: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: rgba(10, 31, 37, .7); color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; }
#panel-x:hover { color: var(--ink); border-color: var(--brass); } #panel-head { padding-right: 48px; }
#outliner { position: fixed; top: var(--top); right: 0; width: var(--outl); max-height: calc(100vh - var(--top) - 150px); overflow-y: auto; z-index: 9; background: linear-gradient(180deg, rgba(10, 31, 37, .94), rgba(10, 31, 37, .86)); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 0 12px; scrollbar-width: thin; }
body.noOutl #outliner { display: none; }
.ol-sec { border-bottom: 1px solid var(--line); } .ol-sec h5 { margin: 0; padding: 7px 12px 5px; font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--brass); display: flex; justify-content: space-between; }
.ol-sec h5 span { color: var(--muted); letter-spacing: 0; text-transform: none; font-weight: 500; }
.ol-it { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; color: var(--ink); padding: 5px 12px; cursor: pointer; font-size: 12.5px; align-items: center; }
.ol-it:hover { background: rgba(255, 255, 255, .06); } .ol-it small { color: var(--muted); font-size: 11.5px; white-space: nowrap; } .ol-it.alert { box-shadow: inset 3px 0 0 var(--bad); }
.ol-it .bar { grid-column: 1 / -1; height: 3px; margin-top: 1px; }
#feed { position: static; width: auto; border: 0; border-radius: 0; background: transparent; } #feed .items { max-height: 150px; } #feed.open .items { max-height: 38vh; }
#mapmodes { left: auto; top: auto; right: 14px; bottom: 12px; justify-content: flex-end; max-width: calc(100vw - var(--left) - 90px); }
#camctl { position: fixed; right: 14px; bottom: 58px; z-index: 9; display: grid; gap: 5px; }
#camctl button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: rgba(10, 31, 37, .86); color: var(--ink); font: 600 16px var(--sans); cursor: pointer; }
#camctl button:hover { border-color: var(--brass); color: var(--brass); }
body.map2d #camctl button[data-v="tilt"], body.map2d #camctl button[data-v="north"] { display: none; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; } .keys kbd { background: #0a1f25; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 7px; font: 600 12px var(--sans); white-space: nowrap; }
.ledger td .bar { height: 5px; margin-top: 3px; }
@media (max-width: 1280px) { :root { --panel: 400px; --outl: 250px; } #topbar .stat.opt2 { display: none; } }
@media (max-width: 1040px) { #topbar .home small, #topbar .stat.opt3 { display: none; } }
@media (max-width: 820px) {
  :root { --rail: 0px; --panel: 100vw; --top: 48px; }
  #rail { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 56px; flex-direction: row; justify-content: flex-start; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid var(--line); padding: 0; z-index: 13; }
  #rail button { border-left: 0; border-top: 3px solid transparent; flex: 0 0 68px; padding-top: 6px; } #rail button.on { border-top-color: var(--brass); background: rgba(212, 168, 75, .1); }
  #panel { left: 0; right: 0; width: auto; top: auto; height: 58vh; bottom: 56px; border-right: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .4); z-index: 12; }
  #outliner { top: var(--top); left: 0; right: 0; width: auto; max-height: 52vh; border-radius: 0 0 12px 12px; z-index: 12; } body:not(.olOpen) #outliner { display: none; }
  #mapmodes { left: 8px; right: 56px; top: calc(var(--top) + 6px); bottom: auto; max-width: none; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; } #mapmodes button { flex: 0 0 auto; } #mapmodes .legend { display: none; }
  #camctl { right: 8px; bottom: 66px; } body:not(.noPanel) #camctl { display: none; }
  #topbar { gap: 6px; padding: 0 6px; } #topbar .home b { font-size: 15px; max-width: 24vw; overflow: hidden; text-overflow: ellipsis; } #topbar .home .fi, #topbar .home img { width: 28px; height: 20px; }
  #topbar .stats .stat:nth-child(n+3) { display: none; } #topbar .stat { padding: 2px 7px; } #topbar .stat small { display: block; font-size: 9px; } #topbar .stat b { font-size: 13px; }
  #topbar .speed button:nth-child(2), #topbar .speed button:nth-child(4) { display: none; } #topbar .tb-status, #topbar .date { font-size: 12px; } #topbar .tb-status .tag:not(.brass) { display: none; }
  #card { left: 8px !important; right: 8px; width: auto; top: auto !important; bottom: 66px; } #ctx { left: 8px !important; right: 8px; top: auto !important; bottom: 66px; }
  #aim { top: 38vh; } .btn, #rail button, .tabs button { min-height: 38px; } #modal-box { max-height: 86vh; overflow-y: auto; }
}
@media (min-width: 821px) { .only-mobile { display: none !important; } }

.wrapseg .seg { flex-wrap: wrap; } .wrapseg .seg button { flex: 0 0 auto; }
#ov .city.far circle { fill: #fff; stroke: rgba(6, 18, 24, .9); stroke-width: 1.4; }

body.map2d #camctl button:not([data-do="keysHelp"]):not([data-do="fullscreen"]) { display: none; }
@media (max-width: 820px) {
  #topbar .stats, #topbar .home small, #topbar .tb-status, #topbar .tb-right [data-do="leave"] { display: none; }
  #topbar .home { flex: 0 1 auto; padding: 4px; gap: 6px; } #topbar .home b { font-size: 14px; max-width: 26vw; display: block; }
  #topbar .clock { margin-left: auto; gap: 6px; } #topbar .date { font-size: 12px; white-space: nowrap; } #topbar .speed button { width: 30px; }
  #topbar .tb-right { gap: 4px; } #topbar .tb-right .btn { padding: 5px 8px; font-size: 12px; min-height: 32px; }
}
@media (max-width: 820px) { #topbar .home { flex: 0 0 auto; } }
@media (max-width: 520px) { #topbar .home span { display: none; } #topbar .date { font-size: 12.5px; } }
@media (max-width: 520px) { #topbar .speed button:nth-child(5) { display: none; } #topbar { padding: 0 4px; } }

/* ---- 0.7: peças em 3D. De perto o ícone some e fica só a área de clique por cima do modelo; contagem e "obras" continuam */
#ov .hit { fill: transparent; stroke: none; }
#ov .bdg rect { fill: rgba(8, 22, 28, .9); stroke: var(--brass); stroke-width: 1; }
#ov .bdg text { font: 700 9.5px var(--sans); fill: #f4f0e2; text-anchor: middle; }
#ov .bdg.wipb rect { stroke: #e0a53a; stroke-dasharray: 3 2; }
#ov.m3 .p3:not(.poi) > :not(.keep):not(.hit), #ov.m3p .p3.poi > :not(.keep):not(.hit) { opacity: 0; }
#ov.m3 .p3:not(.poi):hover .hit, #ov.m3p .p3.poi:hover .hit { stroke: rgba(244, 240, 226, .75); stroke-width: 1.5; stroke-dasharray: 4 4; }
#ov g.ic.pv, #ov g.ic.plandot { pointer-events: none; }
#ov .pin circle { fill: rgba(212, 168, 75, .22); stroke: var(--brass); stroke-width: 2; } #ov .pin path { stroke: var(--brass); stroke-width: 2; fill: none; }
#ov .planline { stroke: var(--brass); stroke-width: 3.5; stroke-dasharray: 9 6; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .7)); } #ov .planline.rail { stroke: #f0ece0; stroke-dasharray: 3 5; }
#ov .plandot circle { fill: var(--brass); stroke: #0a1f25; stroke-width: 1.5; } #ov .plandot text { font: 700 10.5px var(--sans); fill: #0a1f25; text-anchor: middle; }
#ov.routing .city.minor { display: inline !important; } #ov.routing[data-u="1"] .city.minor text { display: inline; } #ov.routing .city circle { stroke: var(--brass); stroke-width: 1.6; }
.pin2d circle { fill: rgba(212, 168, 75, .25); stroke: #d4a84b; vector-effect: non-scaling-stroke; stroke-width: 2; } .pin2d path { stroke: #d4a84b; vector-effect: non-scaling-stroke; stroke-width: 2; fill: none; }
.planline2d { stroke: #d4a84b; stroke-width: 3; stroke-dasharray: 8 5; fill: none; vector-effect: non-scaling-stroke; } .plandot2d { fill: #d4a84b; }

/* ---- 0.7: barra de construção no mapa (avaliação do local, custo, confirmar) */
#placebar { position: fixed; z-index: 30; left: calc(var(--left) + (100vw - var(--left) - var(--right)) / 2); top: calc(var(--top) + 12px); transform: translateX(-50%); width: min(600px, calc(100vw - var(--left) - var(--right) - 28px)); background: rgba(10, 31, 37, .96); border: 1px solid var(--brass); border-radius: 12px; padding: 12px 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
#placebar .pb-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; } #placebar .pb-h b { font: 600 18px var(--serif); } #placebar .pb-h > span { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; text-align: right; } #placebar .pb-h i { font-style: normal; }
#placebar p { margin: 4px 0 6px; font-size: 13.5px; } #placebar .btn-row { margin-top: 8px; }
.pb-n { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; } .pb-n span { padding: 6px 10px; border-right: 1px solid var(--line); } .pb-n span:last-child { border-right: 0; } .pb-n small { display: block; color: var(--muted); font-size: 11.5px; } .pb-n b { font: 600 15px var(--serif); }
.pb-l { margin: 4px 0 2px; padding-left: 18px; font-size: 13px; color: var(--ink); max-height: 132px; overflow: auto; } .pb-l li { margin: 2px 0; }
.pb-lens { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; font-size: 12px; color: var(--muted); margin-top: 8px; } .pb-lens span { grid-column: 1 / 3; } .pb-lens i { grid-column: 1 / 3; height: 7px; border-radius: 4px; background: linear-gradient(90deg, #8c2f2a, #c96a2e, #dcc542, #86c450, #2fa35e); } .pb-lens small:last-child { text-align: right; }
.seg.sm button { padding: 2px 8px; font-size: 12px; min-width: 0; }
.btn-row.wrap { flex-wrap: wrap; } .btn-row.wrap .btn small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
@media (max-width: 820px) { #placebar { top: auto; bottom: calc(var(--bottom) + 8px); left: 50%; width: calc(100vw - 16px); max-height: 46vh; overflow: auto; } }

/* matriz elétrica, parlamento, saldo em dinheiro */
.mixbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 2px 0 10px; background: var(--line); } .mixbar i { display: block; height: 100%; min-width: 2px; }
.balance em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 1px; } .balance em.good { color: var(--good); } .balance em.bad { color: var(--bad); } .balance b { font-size: 15.5px; white-space: nowrap; }
.hemi { margin: 2px 0 8px; } .hemi svg { width: 100%; height: auto; display: block; } .hemi text { fill: var(--muted); font: 500 11px var(--sans); text-anchor: middle; } .hemi text.big { fill: var(--ink); font: 600 26px var(--serif); } .hemi circle.gov { stroke: #f4f0e2; stroke-width: .9; }

/* árvore de tecnologia */
#modal-box:has(.tt) { width: min(97vw, 1560px); max-width: none; padding: 18px 20px; }
.tt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; } .tt-head h2 { margin: 0 0 2px; } .tt-head p { margin: 0; }
.tt-leg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .tt-leg .tn { position: static; display: inline-block; width: auto; height: auto; padding: 3px 9px; font-size: 11.5px; cursor: default; }
.tt-scroll { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: 10px; background: rgba(6, 20, 25, .6); }
.techtree { position: relative; } .techtree svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.techtree .lane { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); } .techtree .lane.alt { background: rgba(237, 231, 214, .025); } .techtree .lane em { position: sticky; left: 10px; display: inline-block; margin: 6px 0 0 10px; font: 600 11px var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--brass); font-style: normal; }
.tl { fill: none; stroke: rgba(237, 231, 214, .16); stroke-width: 1.6; } .tl.open { stroke: var(--brass); stroke-width: 2; } .tl.done { stroke: var(--good); stroke-opacity: .65; stroke-width: 2; }
.tn { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); background: #10303a; color: var(--ink); text-align: left; font: inherit; }
.tn b { font: 600 13px/1.2 var(--sans); } .tn span { font-size: 11.5px; color: var(--muted); line-height: 1.25; display: flex; align-items: center; gap: 6px; }
.tn.done { border-color: rgba(98, 198, 163, .55); background: rgba(98, 198, 163, .14); } .tn.done span { color: var(--good); }
.tn.cur { border-color: var(--brass); background: rgba(212, 168, 75, .18); box-shadow: 0 0 0 2px rgba(212, 168, 75, .25); } .tn.cur span { color: var(--brass); }
.tn.avail { border-color: rgba(237, 231, 214, .55); background: #17414e; } button.tn.avail { cursor: pointer; } button.tn.avail:hover { border-color: var(--brass); background: #1d5060; }
.tn.locked { opacity: .55; border-style: dashed; }
.tbar { display: inline-block; width: 54px; height: 5px; border-radius: 3px; background: rgba(237, 231, 214, .18); overflow: hidden; } .tbar i { display: block; height: 100%; background: var(--brass); }

/* ajustes 0.7 */
.tabs { gap: 15px; overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } .tabs button { white-space: nowrap; flex: none; }
.kpi .kx { display: block; font-size: 11.5px; margin-top: 1px; }
.src { display: flex; align-items: baseline; gap: 0; } .src .dot { flex: none; }
.tn span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .tn.cur span { display: flex; }
.techtree { min-width: 100%; } .tt-scroll { max-height: calc(86vh - 190px); }
#ov[data-z="1"] .bdg, #ov[data-z="2"] .bdg, #ov:not(.m3) .bdg.wipb { display: none; }
@media (hover: hover) and (pointer: fine) { body.placing #aim { display: none !important; } }
table.tight td, table.tight th { padding-left: 5px; padding-right: 5px; } .nw { white-space: nowrap; }
#modal-box:has(.tt) { grid-template-columns: minmax(0, 1fr); } .tt { min-width: 0; display: grid; gap: 10px; }
@media (max-width: 820px) { .tt-leg .tn { display: none; } .tt-head h2 { font-size: 20px; } #modal-box:has(.tt) { padding: 14px 12px; } }
.tabs { flex-wrap: wrap; row-gap: 0; overflow: visible; }
.balance { grid-template-columns: 1fr 1fr .85fr 1.1fr; } .balance div { padding: 8px 8px; min-width: 0; } .balance b { font-size: 14.5px; }

/* ---- 0.8: menus de agricultura, indústria, serviços e comunicações */
#rail { overflow-y: auto; scrollbar-width: none; } #rail::-webkit-scrollbar { display: none; }
@media (min-width: 821px) { #rail { padding: 4px 0; gap: 0; } #rail button { padding: 6px 2px 5px 0; gap: 2px; font-size: 11px; flex: none; } #rail button svg { width: 20px; height: 20px; } }
@media (min-width: 821px) and (max-height: 840px) { #rail button { padding: 4px 2px 3px 0; font-size: 10.5px; } #rail button svg { width: 18px; height: 18px; } }
@media (max-width: 820px) { #rail { overflow-x: auto; overflow-y: hidden; justify-content: flex-start; } #rail button { flex: none; min-width: 68px; } }
.tag.good { color: var(--good); border-color: rgba(98, 198, 163, .5); } .tag.bad { color: var(--bad); border-color: rgba(230, 110, 92, .5); } .tag.warn { color: #e0b45a; border-color: rgba(224, 180, 90, .5); }
.btn.inv { line-height: 1.15; padding: 4px 9px; } .btn.inv small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
td.tops { white-space: nowrap; } .top { display: inline-block; margin-right: 3px; opacity: .9; } .top.me { outline: 2px solid var(--brass); outline-offset: 1px; border-radius: 2px; } .top .flag { width: 20px; height: auto; vertical-align: middle; }
.netrow { padding: 9px 0; border-bottom: 1px solid var(--line); display: grid; gap: 5px; } .netrow:last-child { border-bottom: 0; } .netrow > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .netrow .num { font: 600 15px var(--serif); } .netrow .r { flex: none; text-align: right; max-width: 55%; }
.lvl.wide { display: flex; gap: 4px; } .lvl.wide i { flex: 1; height: 7px; border-radius: 3px; background: var(--line); } .lvl.wide i.on { background: var(--brass); }
.apt { font-size: 11.5px; color: var(--muted); } .apt.good { color: var(--good); } .apt.warn { color: #e0b45a; } .apt.bad { color: var(--bad); }
#panel-body table.tight { width: 100%; table-layout: fixed; } #panel-body table.tight th:first-child, #panel-body table.tight td:first-child { width: 36%; } #panel-body table.tight td { overflow-wrap: anywhere; } #panel-body table.tight .btn.inv { padding: 4px 7px; }

/* ---- 0.9: globo. De longe o mapa fica limpo: portos, aeroportos e bases dos outros só aparecem mais de perto */
.globe #ov[data-z="3"] #ov-poi, .globe #ov[data-z="4"] #ov-poi, .globe #ov:not([data-u="2"]) .base.other, .globe #ov:not([data-u="2"]) .stn.grp.neutral { display: none; }
#ov path[data-a] { fill: none; }
#camctl button svg { display: block; margin: auto; }

/* ---- 0.10: nomes e ícones que caem um em cima do outro na tela: o menos importante espera o zoom separar os dois */
#ov .city.nolab text { display: none !important; }
#ov g.ic.dcl { display: none; }
#ov .city.lft text { text-anchor: end; transform: translateX(-14px); } /* nome do lado esquerdo do ponto, quando o direito está ocupado por um ícone */
#ov.m3 .p3.tag:not(.poi) > :not(.keep):not(.hit), #ov.m3p .p3.poi.tag > :not(.keep):not(.hit) { opacity: .96; } /* modelo ainda pequeno: o ícone fica logo acima dele */
