/* Rolagem (ROLAGEM.md): regras de mundo. Carregado por último no index.html, ganha na cascata sem mexer nos CSS antigos. */

/* Mundo: o diálogo não rola. Coluna flex: título com as abas numa linha só, e a aba aberta ocupa o resto. */
body.map-first #world-hub[open]{display:flex;flex-direction:column;overflow:hidden}
body.map-first #world-hub .dialog-top{position:static;flex:none;margin:0 0 8px;padding:0}
body.map-first #world-hub .hub-tabs{flex:1;min-width:0;display:flex;gap:6px;margin:0 0 0 8px}
body.map-first #world-hub .hub-tabs button{min-height:44px;padding:0 14px;font-size:14px;white-space:nowrap}
body.map-first #world-hub>section:not([hidden]){flex:1;min-height:0}

/* Objetivo: rota à esquerda; números, conselho e botões à direita. Rolar aqui é só a rede de segurança. */
body.map-first #hub-overview:not([hidden]){display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:14px;align-items:stretch;overflow-y:auto}
body.map-first #victory-route{margin:0;min-width:0}
body.map-first #victory-route h3{margin:0 0 4px;font:600 11px/16px var(--body);letter-spacing:.06em;text-transform:uppercase;color:#9fbab7}
body.map-first #victory-route ol{gap:4px}
body.map-first #victory-route ol>li{display:block;padding:0;font:12px/1.35 var(--body)}
body.map-first #victory-route ol>li::before{content:none}
body.map-first #victory-route .route-step{display:flex;align-items:center;gap:8px;min-height:30px;padding:0 8px}
body.map-first #victory-route .route-step b{flex:none;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#1f363d;color:#c9dccf;font:600 11px var(--body)}
body.map-first #victory-route .is-done .route-step b{background:#b9e986;color:#14261b}
body.map-first #victory-route .is-now .route-step b{background:#ff8a5c;color:#1d1410}
body.map-first #victory-route .route-step strong{flex:1;min-width:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.map-first #victory-route .route-step small{flex:none;font:11px var(--mono);color:#c9dccf}
body.map-first #victory-route .route-step em{flex:none;padding:1px 7px;border-radius:9px;background:#ffffff0d;color:#9fbab7;font:600 11px/16px var(--body);font-style:normal}
body.map-first #victory-route .is-now .route-step em{background:#ff8a5c33;color:#ffcfb8}
body.map-first #victory-route .is-done .route-step em{color:#c9e7b4}
body.map-first #victory-route ol>li.is-now{border-color:#ff8a5c99;background:#24191a}
body.map-first #victory-route ol>li.is-done{opacity:.75}
body.map-first #victory-route ul{gap:0;margin:0;padding:0 8px 6px 36px}
body.map-first #victory-route ul li{min-width:0;line-height:20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.map-first #victory-route ul li::before{top:6px}
body.map-first #victory-route ul button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:44px;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left}
body.map-first #victory-route ul button span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.map-first #victory-route ul button i{flex:none;font-style:normal;font-weight:600;color:#ffcfb8}
body.map-first #victory-route ul li:has(button)::before{top:17px}

body.map-first #world-side{display:flex;flex-direction:column;gap:8px;min-width:0}
body.map-first #world-side>:is(.hud,.mission-card){display:none}
body.map-first #destruction-panel{display:flex;flex-direction:column;gap:6px;padding:0}
body.map-first #destruction-panel[hidden]{display:none}
/* Os 4 números num cartão só, de 1 linha. */
body.map-first #destruction-panel .destruction-progress{grid-template-columns:repeat(4,auto);justify-content:space-between;gap:8px;padding:6px 10px;border:1px solid #a6807133;border-radius:8px;background:#ffffff06}
body.map-first #destruction-panel .destruction-progress small{font:11px/14px var(--body);white-space:nowrap}
body.map-first #destruction-panel .destruction-progress strong{margin-top:2px;font-size:19px;line-height:1.1;white-space:nowrap}
body.map-first #destruction-advice{margin:0;font:12px/1.4 var(--body);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
body.map-first #human-research{margin:0;font-size:11px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.map-first #objective-line{margin:0;padding:4px 8px;font-size:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.map-first #objective-line[hidden]{display:none}
/* "Evoluir o colapso →" e Conflitos lado a lado, no pé da coluna. */
body.map-first .world-actions{display:flex;gap:8px;margin-top:auto}
body.map-first .world-actions>button{flex:1 1 0;min-width:0;min-height:44px;margin:0;font-size:13px}
body.map-first .world-actions>#show-conflicts{position:static;transform:none;display:flex;align-items:center;justify-content:center;gap:6px;height:auto;padding:0 10px;border:1px solid #f2a06555;border-radius:6px;background:#0a202980;font:14px var(--body)}
body.map-first .world-actions>[hidden]{display:none!important}

/* Países: uma rolagem só (a lista). Resumo e nota de rodapé saem; filtros numa linha de 44 px. */
body.map-first #hub-countries:not([hidden]){display:flex;flex-direction:column}
body.map-first #hub-countries>:is(#world-summary,small){display:none}
body.map-first #world-hub .country-filters{flex:none;flex-direction:row;gap:8px;margin:0 0 6px}
body.map-first #world-hub .country-filters input{flex:1 1 120px;min-width:0;min-height:44px;padding:0 12px}
body.map-first #world-hub .country-filters select,body.map-first #world-hub #country-sort{flex:none;width:auto;min-width:0;max-width:none;min-height:44px;font-size:13px}
body.map-first #world-hub .country-results{flex:1;min-height:0;max-height:none;overflow-y:auto}
/* Linha de país com 44 px: nome · status numa linha, domínio, resistência e ↗. */
body.map-first #world-hub .country-row{grid-template-columns:minmax(0,1fr) 104px 128px 16px;gap:10px;min-height:44px;padding:0 8px;font-size:13px}
body.map-first #world-hub .country-row>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.map-first #world-hub .country-row small{display:inline;margin:0 0 0 4px;font-size:11px}
body.map-first #world-hub .country-row>span:first-child small{margin:0}
body.map-first #world-hub .country-row>span:first-child small::before{content:' · '}

/* Notícias: rolar é aceitável (histórico), só a aba rola. Item de ~52 px, tocável inteiro, ↗ à direita. */
body.map-first #hub-news:not([hidden]){overflow-y:auto}
body.map-first #news-feed .news-item{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;align-items:center;min-height:44px;padding:6px 4px 6px 8px}
body.map-first #news-feed .news-item small{grid-column:1;font:11px/15px var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.map-first #news-feed .news-item .news-tag{margin-left:6px;padding:0 6px;line-height:14px}
body.map-first #news-feed .news-item strong{grid-column:1;margin:1px 0 0;font-size:13px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.map-first #news-feed .news-item>b{grid-column:2;grid-row:1/span 2;color:#9fbab7;font-weight:400}
/* CP no teto (rodada 7): depois do aviso único, o saldo do rodapé vira "no teto", em âmbar discreto. */
body.map-first #economy-pulse[data-cap=true] #compact-net{color:#e3c77e}
/* Resumo da rotina do período (rodada 7, news.mjs newsDigest): texto, não botão; mais apagado que a manchete. */
body.map-first #news-feed .news-item.is-digest{margin:0;cursor:default;border-left:2px solid #9fbab755}
body.map-first #news-feed .news-item.is-digest strong{font-weight:500;color:#b9cdcb}
body.map-first #news-feed .news-item.is-digest .news-tag{background:#9fbab722;color:#c9dcd9}
/* As consequências (antes no Objetivo, com rolagem própria) ficam no fim das Notícias, sem limite de altura. */
body.map-first #hub-news details>summary{display:flex;align-items:center;min-height:44px;cursor:pointer}
body.map-first #hub-news #impact-news{max-height:none;overflow:visible;margin:0;padding:0}
/* Mortes por causa (rodada 6): até 2 linhas, no tom do contador do rodapé; o texto inteiro fica no title. */
body.map-first #death-causes{margin:0;font:11px/1.4 var(--body);color:#e9a596;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* Canal da IA no letreiro (NARRATIVA.md, duas vozes): diagnóstico em mono e verde, distinto da notícia e do marco. */
.map-first #news-ticker.is-diagnostic{border-color:#c1f58252;background:#0b1c14e6}
.map-first #news-ticker.is-diagnostic b:after{content:'▸ DIAGNÓSTICO';font:700 11px var(--mono);letter-spacing:.06em;color:var(--green)}
.map-first #news-ticker.is-diagnostic #news-headline{font:12px var(--mono)!important;color:#d8f5b8}
