/* Atlas layout. Real map stays interactive; artwork is decorative, never state. */
#orientation-gate[hidden] { display:none; }
.orientation-blocked #orientation-gate[hidden] { display:flex; }
#orientation-gate { position:fixed;inset:0;z-index:2000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:32px 24px;background:radial-gradient(ellipse at 50% 25%,rgb(var(--sk-234c55, 35, 76, 85)),rgb(var(--sk-07171d, 7, 23, 29)) 68%);text-align:center;overflow-y:auto; }
#orientation-gate h1 { font-size:24px;margin:0; }
#orientation-gate p { max-width:380px;margin:0;color:rgb(var(--sk-ccdfdf, 204, 223, 223));line-height:2; }
#orientation-gate small { color:rgb(var(--sk-aac7c9, 170, 199, 201)); }
#orientation-gate button { min-height:48px; }
.rotate-brand { font-size:14px;letter-spacing:6px;color:rgb(var(--sk-d3bd89, 211, 189, 137));direction:ltr; }
.rotation-symbol { width:120px;height:120px;margin-bottom:14px; }
.rotation-symbol svg { width:100%;height:100%;fill:none;stroke:rgb(var(--sk-9bd9ca, 155, 217, 202));stroke-width:3;stroke-linecap:round;stroke-linejoin:round; }
.rotate-phone { transform-origin:60px 60px;animation:phone-turn 2.8s ease-in-out infinite;fill:rgb(var(--sk-0b2930, 11, 41, 48)); }
@keyframes phone-turn { 0%,12%{transform:rotate(0)}55%,85%{transform:rotate(-90deg)}100%{transform:rotate(0)} }
.orientation-blocked #loading,.orientation-blocked #app,.orientation-blocked #sheets { visibility:hidden!important; }
@media(prefers-reduced-motion:reduce) { .rotate-phone { animation:none;transform:rotate(-90deg); } }
.reduce-motion .rotate-phone { animation:none;transform:rotate(-90deg); }
#loading { background:linear-gradient(rgba(var(--sk-07171d, 7, 23, 29), 0.4),rgba(var(--sk-07171d, 7, 23, 29), 0.851)),url('../assets/scenes/capital.webp') center/cover!important; }
#loading .grid { display:none; }
#loading .mark { width:100px;height:100px; }
#loading .word { font-size:32px; }
#loading .prog { height:5px; }
.landscape-tools,.landscape-rail { display:none; }
.section-art { display:block;width:100%;height:104px;object-fit:cover;object-position:center 52%;border-radius:18px;margin-bottom:12px;mask-image:linear-gradient(rgb(var(--sk-000000, 0, 0, 0)) 55%,rgba(var(--sk-000000, 0, 0, 0), 0.467)); }
.home-story { display:none; }
#app[data-guide-focus] .section-art,#app[data-guide-focus] .home-story { display:none; }

/* Chrome placement (row, tools, rail, troops, advisor, sheets) lives in chrome.css. */
html[data-layout=landscape] { --dock-w:78px;--rail-w:244px;--tab-h:0px; }
html[data-layout=landscape] #tabs { left:auto;right:calc(var(--safe-right) + 10px);top:calc(var(--hud-h) + 4px);bottom:calc(var(--safe-bottom) + 12px);width:var(--dock-w);height:auto;max-width:none;margin:0;padding:5px;display:flex;flex-direction:column;justify-content:center;gap:3px;border-radius:24px; }
html[data-layout=landscape] #tabs .tab { width:100%;min-height:48px;max-height:104px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:6px 2px;border-radius:18px;border:1px solid transparent; }
html[data-layout=landscape] #tabs .tab.on { border-color:rgba(var(--sk-a9ebd7, 169, 235, 215), 0.275);background:rgba(var(--sk-83c9b5, 131, 201, 181), 0.133); }
html[data-layout=landscape] #tabs .tab span:last-child { font-size:12px; }
html[data-layout=landscape] #tabs .plate { width:32px;height:30px;margin:0; }
html[data-layout=landscape] #tabs .ic { width:27px;height:27px; }
html[data-layout=landscape] #app:not([data-guide-focus]) .screen { left:calc(var(--safe-left) + 12px);right:calc(var(--dock-w) + var(--safe-right) + 24px);top:var(--hud-h);bottom:calc(var(--safe-bottom) + 12px);width:auto;max-width:none;margin:0;padding:18px 22px 76px;scroll-padding:18px 0 76px;border:1px solid var(--edge-2);border-radius:24px;background:rgba(var(--sk-102a32, 16, 42, 50), 0.961); }
html[data-layout=landscape] #app:not([data-guide-focus]) .screen[data-screen=home] { padding:0 0 24px; }
html[data-layout=landscape] #app.app-screen-open::after { display:none; }
.landscape-brand { display:flex;align-items:center;gap:6px;color:rgb(var(--sk-f0e6ca, 240, 230, 202));font-family:Georgia,serif;font-size:24px; }
html[data-layout=landscape] .landscape-brand { display:none; }
html[data-layout=landscape] #app.rail-open:not(.app-screen-open):not([data-guide-focus]) .landscape-rail { display:flex; }
.landscape-rail { position:absolute;left:var(--mid-l,12px);top:calc(var(--hud-h) + 6px);bottom:calc(var(--safe-bottom) + 12px);width:var(--rail-w);z-index:8;flex-direction:column;gap:12px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin; }
.rail-events,.rail-advisor { border:1px solid rgba(var(--sk-b2e5e4, 178, 229, 228), 0.231);border-radius:20px;padding:14px;background:linear-gradient(145deg,rgba(var(--sk-133c46, 19, 60, 70), 0.929),rgba(var(--sk-071d27, 7, 29, 39), 0.929));box-shadow:inset 0 1px #ffffff0f,0 10px 28px rgba(var(--sk-000000, 0, 0, 0), 0.2);backdrop-filter:blur(16px); }
.rail-events header { display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--edge-2);padding-bottom:6px; }
.rail-events h2 { font-size:16px;margin:0; }
.rail-events header button { min-width:44px;min-height:44px;border:0;background:none;font-size:24px; }
.rail-event { display:flex;gap:10px;align-items:center;width:100%;min-height:64px;padding:12px 0;text-align:start;border:0;border-bottom:1px solid var(--edge-2);background:none; }
.rail-event .ic { width:26px;height:26px;flex-shrink:0; }
.rail-event span { display:grid;gap:5px;min-width:0; }
.rail-event b { font-size:12px;line-height:1.7;font-weight:650;overflow-wrap:anywhere; }
.rail-event small,.rail-empty { color:var(--text-3);font-size:11px;line-height:1.9; }
.rail-all { display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;border:0;background:transparent;text-align:start;font-size:12px; }
.rail-all .ic { width:16px;height:16px; }
.rail-advisor { display:grid;grid-template-columns:64px minmax(0,1fr);gap:6px 12px;align-items:center; }
.rail-advisor>img { object-fit:contain;grid-row:span 2; }
.rail-advisor>div { display:grid;gap:4px; }
.rail-advisor small { color:var(--text-3);font-size:11px; }
.rail-advisor strong { font-size:15px; }
.rail-advisor p,.rail-advisor button { grid-column:1/-1; }
.rail-advisor p { font-size:13px;line-height:1.8;margin:6px 0; }
.rail-advisor .btn { width:100%; }
html[data-layout=landscape] #app:not([data-guide-focus]) .guide-root.expanded { left:calc(var(--safe-left) + 14px);right:auto;bottom:calc(var(--safe-bottom) + 14px);width:min(460px,calc(100% - var(--dock-w) - 42px));max-width:none;margin:0; }
html[data-layout=landscape] .guide-card { max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 28px); }
html[data-layout=landscape] .section-art { height:112px;object-position:center 55%; }
html[data-layout=landscape] .screen[data-screen=nation] .tiles { grid-template-columns:repeat(4,minmax(0,1fr)); }
html[data-layout=landscape] .journey-home { max-width:none;min-height:0; }
html[data-layout=landscape] #app .journey-header { padding:10px 20px;min-height:50px; }
html[data-layout=landscape] .journey-content { max-width:none;display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,1fr);grid-template-areas:'next identity' 'next level' 'next status' 'next actions' 'next active' 'discovery discovery' 'connection connection';align-content:start;align-items:start;gap:12px;padding:8px 20px 18px; }
html[data-layout=landscape] .journey-identity { grid-area:identity; }
html[data-layout=landscape] .journey-level { grid-area:level; }
html[data-layout=landscape] .journey-status { grid-area:status; }
html[data-layout=landscape] .journey-actions { grid-area:actions; }
html[data-layout=landscape] .journey-active { grid-area:active; }
html[data-layout=landscape] .discovery-card { grid-area:discovery; }
html[data-layout=landscape] .journey-connection { grid-area:connection; }
html[data-layout=landscape] .journey-next { grid-area:next;overflow:hidden;position:relative; }
html[data-layout=landscape] .journey-next::before { content:'';display:block;aspect-ratio:16/10;margin:-14px -14px 16px;background:linear-gradient(transparent 60%,rgb(var(--sk-15353b, 21, 53, 59))),var(--task-art,url('../assets/scenes/construction.webp')) center/cover; }
html[data-layout=landscape] .home-story { grid-area:story;display:none;overflow:hidden;border-radius:18px;border:1px solid var(--edge-2);background:rgb(var(--sk-0a222b, 10, 34, 43)); }
.home-story>img { display:block;width:100%;aspect-ratio:1/1.1;object-fit:cover; }
.home-story>div { padding:14px; }
.home-story h2 { font-size:19px;margin:0 0 6px; }
.home-story p { color:var(--text-3);font-size:12px;line-height:1.9; }
.home-story button { width:100%;min-height:44px; }
html[data-layout=landscape] #app[data-guide-focus] .landscape-tools,html[data-layout=landscape] #app[data-guide-focus] .landscape-rail { display:none; }
html[data-layout=landscape] #app[data-guide-focus] #hud,html[data-layout=landscape] #app[data-guide-focus] #tabs { display:none; }
@media(min-width:1100px) and (min-height:560px) {
  html[data-layout=landscape] .journey-content { grid-template-columns:minmax(220px,.8fr) minmax(280px,1.1fr) minmax(210px,.8fr);grid-template-areas:'next identity story' 'next level story' 'next status story' 'next actions story' 'next active story' 'discovery discovery discovery' 'connection connection connection'; }
  html[data-layout=landscape] .home-story { display:block; }
}
@media(max-height:559px) and (min-width:600px) {
  html[data-layout=landscape] { --dock-w:66px; }
  html[data-layout=landscape] #tabs { bottom:calc(var(--safe-bottom) + 8px);padding:3px;gap:1px;border-radius:18px; }
  html[data-layout=landscape] #tabs .tab { min-height:44px;gap:1px;padding:2px;border-radius:14px; }
  html[data-layout=landscape] #tabs .plate { width:22px;height:22px; }
  html[data-layout=landscape] #tabs .ic { width:21px;height:21px; }
  html[data-layout=landscape] #tabs .tab span:last-child { font-size:10px; }
  html[data-layout=landscape] #app:not([data-guide-focus]) .screen { padding:12px 16px 72px; }
  html[data-layout=landscape] .section-art { height:72px; }
  html[data-layout=landscape] .journey-next::before { aspect-ratio:2.7; }
  html[data-layout=landscape] .journey-content { grid-template-columns:minmax(190px,.85fr) minmax(0,1fr);padding:6px 14px 10px; }
  html[data-layout=landscape] #loading .mark { width:64px;height:64px; }
  html[data-layout=landscape] #loading .word { margin-top:8px;font-size:25px; }
  html[data-layout=landscape] #loading .prog { margin-top:18px; }
}
@media(max-width:700px) {
  html[data-layout=landscape] .screen[data-screen=nation] .tiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
html[data-map-quality=low] .rail-events,html[data-map-quality=low] .rail-advisor { backdrop-filter:none;background:rgb(var(--sk-102a32, 16, 42, 50)); }
/* Phones: the map redraws under the panel every frame; no live blur behind it. */
@media(pointer:coarse) { .rail-events,.rail-advisor { -webkit-backdrop-filter:none;backdrop-filter:none;background:linear-gradient(145deg,rgb(var(--sk-133c46, 19, 60, 70)),rgb(var(--sk-071d27, 7, 29, 39))); } }
html[data-layout=landscape] #app:not([data-guide-focus]) .screen:not([data-screen=home]) { padding-bottom:24px;scroll-padding-bottom:24px; }
html[data-layout=landscape] .section-art { position:absolute;left:18px;top:12px;width:112px;height:60px;margin:0;opacity:.8;mask-image:linear-gradient(90deg,rgb(var(--sk-000000, 0, 0, 0)),transparent);pointer-events:none; }
html[data-layout=landscape] #app:not([data-guide-focus]) .screen>.scr-head { min-height:64px;padding-left:116px; }
@media(min-width:1100px) and (min-height:560px) {
  html[data-layout=landscape] #app .screen>.section-art { width:180px;height:74px; }
  html[data-layout=landscape] #app:not([data-guide-focus]) .screen>.scr-head { min-height:78px;padding-left:186px; }
}
