html:has(#modlar:target, #diyarlar:target) {scroll-padding-top:0}
/* Compact chapters: the native interface and its characters share one stage. */
.mode-exhibition,.realm-inner {max-width:1440px;margin:auto}
.mode-exhibition {height:min(900px,100svh);min-height:620px;padding:26px var(--gutter);display:flex;flex-direction:column;scroll-margin-top:0}
.world-heading {display:grid;grid-template-columns:1.15fr 1fr;gap:40px;align-items:center;margin-bottom:18px;flex-shrink:0}
.world-heading h2 {font:400 clamp(36px,3.8vw,54px)/1.06 var(--display);letter-spacing:-.5px;color:var(--ink)}
.world-heading p {font-size:15px;line-height:1.55;max-width:43ch}
.mode-menu {display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px;flex-shrink:0}
.mode-tab {font:400 19px/1.2 var(--display);padding:10px 18px;background:transparent;border:2px solid transparent;border-radius:7px;color:var(--ink);min-height:44px}
.mode-tab[aria-selected=true] {background:var(--ink);color:var(--surface)}
.mode-tab:hover:not([aria-selected=true]) {border-color:var(--ink)}
.mode-stage {position:relative;isolation:isolate;border-radius:16px;overflow:hidden;flex:1;min-height:0}
.mode-panel {height:100%;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,2fr);gap:28px;align-items:center;padding:24px 3%;background:#FFD166}
.mode-panel.mode-outgoing {position:absolute;inset:0 0 auto;pointer-events:none;z-index:0}
.mode-panel.mode-incoming {position:relative;z-index:1}
.mode-tab {transition:background-color 220ms ease,color 220ms ease,border-color 220ms ease}
@media(prefers-reduced-motion:reduce){.mode-tab{transition:none}}
.mode-1 {background:#D7C9F2}.mode-2 {background:#97D9CF}.mode-3 {background:#F7AB8C}.mode-4 {background:#C8D7ED}
.mode-story {min-width:0;height:100%;position:relative;display:flex;flex-direction:column;justify-content:center;padding-bottom:90px}.mode-name {display:none}
.mode-story h3 {font:400 clamp(36px,3.4vw,52px)/1.05 var(--display);letter-spacing:-.6px}
.mode-description {font-size:15px;line-height:1.55;max-width:42ch;margin:16px 0}
.mode-facts {list-style:none;padding:0;display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600;line-height:1.5}
.mode-facts li {display:flex;gap:9px;align-items:baseline}.mode-facts li::before {content:'+';font-size:16px;font-weight:400}
.mode-story-footer {margin-top:18px}
.mode-download {display:inline-flex;gap:20px;align-items:center;margin-top:0;font-weight:700;font-size:13px;padding:7px 0;min-height:40px}
.mode-download span {font-size:20px}
.mode-gallery {height:100%;min-height:0;min-width:0;container-type:size}
.mode-visual {height:100%;min-height:0;min-width:0;display:flex;justify-content:center;align-items:center;gap:clamp(16px,2vw,30px);padding:4px 6px;outline-offset:-2px}
.mode-figure {width:min(30%,calc((100cqh - 32px)*.48247));max-width:250px;flex:0 0 auto;margin:0}
.mode-figure figcaption {display:flex;gap:7px;align-items:baseline;justify-content:center;font-size:10px;font-weight:600;line-height:1.4;margin-top:12px;white-space:nowrap}
.mode-figure figcaption span {font-size:9px;font-weight:500;opacity:.6;font-variant-numeric:tabular-nums}
.mode-swipe {display:none}
/* Large portraits emerge from the card edge; the face stays above the crop. */
.mode-companion {width:clamp(180px,17vw,240px);aspect-ratio:455/510;position:absolute;right:-16px;bottom:-86px;pointer-events:none}
.mode-companion .character-sprite {position:relative}
.realm-atlas {background:var(--ink);color:var(--surface);height:min(900px,100svh);min-height:620px;padding:26px 0;overflow:hidden;scroll-margin-top:0}
.realm-inner {padding:0 var(--gutter);height:100%;display:flex;flex-direction:column}
.realm-atlas .world-heading {margin-bottom:18px}
.realm-atlas .world-heading h2 {color:var(--surface)}
.realm-welcome {display:flex;gap:20px;align-items:center;min-width:0}
.realm-guide {width:92px;aspect-ratio:455/510;flex-shrink:0}
.realm-scale {margin-top:9px;font-weight:700;color:#FFD166;font-size:12px!important}
.realm-stage {position:relative;flex:1;min-height:0;isolation:isolate}
.realm-journey {display:grid;grid-template-columns:1fr 1.2fr 1fr;gap:22px;align-items:stretch;height:100%;min-height:0}
.realm-current {margin:0;min-width:0;height:100%;min-height:0;display:flex;align-items:center}
.realm-current>img {display:block;width:100%;height:100%;object-fit:contain;border-radius:10px}
.realm-neighbour {padding:24px 0 0;background:transparent;color:var(--surface);width:100%;height:100%;text-align:left;min-width:0;min-height:0;display:flex;flex-direction:column}
.realm-neighbour>img {display:block;width:100%;flex:1;min-height:0;object-fit:contain;border-radius:10px}
.realm-neighbour>span {display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:9px 0 0;font:400 clamp(19px,2vw,26px)/1.15 var(--display)}
.realm-neighbour b {display:grid;place-items:center;flex-shrink:0;font:400 22px var(--text);width:34px;height:34px;border:1px solid #fff0db66;border-radius:50%}
.realm-footer {display:grid;grid-template-columns:1.2fr 1fr;gap:40px;align-items:center;margin-top:16px;flex-shrink:0}
.realm-caption {display:grid;grid-template-columns:1fr auto;column-gap:20px;align-items:baseline;min-width:0}
#realm-range {grid-column:2;grid-row:1;font-size:10px;color:#FFD166;letter-spacing:.5px;white-space:nowrap}
#realm-name {grid-column:1;grid-row:1;font:400 clamp(28px,2.8vw,38px)/1.1 var(--display);overflow-wrap:break-word}
#realm-description {grid-column:1/-1;font-size:13px;line-height:1.5;margin:8px 0 0;min-height:39px;max-width:65ch}
.realm-navigation {display:grid;grid-template-columns:1fr auto;gap:8px 16px;align-items:center;font-size:12px;max-width:350px;width:100%;justify-self:end}
#realm-position {color:#FFD166;font-variant-numeric:tabular-nums;white-space:nowrap}
#realm-select {grid-column:1/-1;min-width:0;width:100%;background:var(--ink);color:var(--surface);border:1px solid #fff0db80;padding:11px 36px 11px 12px;border-radius:6px;font:500 13px var(--text);min-height:44px}
#realm-status:empty {display:none}#realm-status {grid-column:1/-1;color:#FFD166;font-size:12px;line-height:1.4}
.realm-atlas :focus-visible {outline-color:#FFD166}
.realm-incoming {position:absolute;inset:0;opacity:0;pointer-events:none;z-index:2;background:var(--ink)}
@media(min-width:901px) and (max-height:740px){
 .mode-exhibition,.realm-atlas {padding-top:20px;padding-bottom:20px}
 .world-heading h2 {font-size:40px}.world-heading p {font-size:14px}
 .mode-panel {padding:18px 3%}.mode-story h3{font-size:40px}.mode-description{font-size:14px;line-height:1.45;margin:12px 0}.mode-story{padding-bottom:74px}.mode-story-footer{margin-top:14px}.mode-companion{width:190px;bottom:-76px}
 .realm-guide{width:76px}.realm-welcome{gap:16px}.realm-footer{margin-top:12px}#realm-name{font-size:30px}
}
@media(max-width:1100px) and (min-width:901px){
 .world-heading {gap:24px}.realm-guide{width:70px}.realm-welcome{gap:12px}.realm-welcome h2{font-size:36px}
 .mode-panel{gap:20px;grid-template-columns:minmax(0,.9fr) minmax(0,2fr)}.mode-story h3{font-size:36px}.mode-story{padding-bottom:90px}.mode-companion{width:168px;bottom:-90px;right:-12px}.mode-visual{gap:16px}.mode-figure figcaption{font-size:9px;gap:4px}
 .realm-footer{gap:24px}.realm-caption{column-gap:12px}#realm-range{font-size:9px}
}
@media(max-width:900px){
 .mode-exhibition{height:auto;min-height:0;padding:44px 24px}.world-heading{gap:24px}.world-heading h2{font-size:40px}.world-heading p{font-size:14px}
 .mode-panel{padding:28px;gap:24px;grid-template-columns:1fr;height:auto}.mode-story{height:auto;padding-bottom:0;display:grid;grid-template-columns:1.3fr 1fr;column-gap:32px;align-items:center}.mode-story h3{font-size:44px;grid-column:1}.mode-description{grid-column:1}.mode-facts{grid-column:2;grid-row:1/3}.mode-story-footer{grid-column:1/-1;position:relative;min-height:180px;display:flex;align-items:center;margin-top:0;overflow:hidden}.mode-companion{width:160px;bottom:0;right:10px}
 .mode-gallery{height:auto;container-type:normal;min-width:0}.mode-visual{height:auto;justify-content:flex-start;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:6px;padding:5px 6px 18px;gap:24px;scrollbar-width:thin;scrollbar-color:#17223b66 transparent}.mode-figure{width:210px;max-width:none;scroll-snap-align:start}.mode-figure figcaption{font-size:11px;white-space:normal}.mode-swipe{display:flex;justify-content:space-between;font-size:11px;margin-top:8px;opacity:.7}
 .realm-atlas{height:auto;min-height:0;padding:44px 0}.realm-inner{padding:0 24px}.realm-stage{flex:none;height:360px}.realm-guide{width:70px}.realm-welcome{gap:12px}.realm-welcome h2{font-size:34px}
 .realm-journey{gap:16px}.realm-footer{grid-template-columns:1.2fr 1fr;gap:24px}.realm-caption{display:block}#realm-name{margin-top:6px}#realm-range{font-size:10px}
}
@media(max-width:700px){
 .mode-exhibition {padding:36px 20px 40px}.world-heading {display:block;margin-bottom:20px}.world-heading h2{font-size:clamp(36px,9.5vw,48px)}.world-heading p{margin-top:18px;font-size:14px;line-height:1.55}
 .mode-menu {gap:3px;margin-bottom:12px}.mode-tab{font-size:17px;padding:9px 12px}
 .mode-stage{border-radius:12px}.mode-panel{display:flex;flex-direction:column;gap:24px;align-items:stretch;padding:25px 22px 20px;min-height:0;height:auto}
 .mode-story{display:block}.mode-story h3{font-size:clamp(36px,10vw,50px)}.mode-description{font-size:14px;margin:14px 0;max-width:42ch}
 .mode-facts{font-size:11px;gap:4px}.mode-download{font-size:12px;margin-top:0}.mode-story-footer{margin-top:14px;min-height:200px;margin-right:-22px}.mode-companion{width:180px;right:-22px;bottom:0}.mode-download{max-width:175px;gap:12px}
 .mode-visual{gap:22px}.mode-figure{width:210px}.mode-figure figcaption{font-size:11px}
 .realm-atlas{padding:36px 0 32px}.realm-inner{padding:0 20px}.realm-atlas .world-heading{margin-bottom:20px}.realm-scale{font-size:11px!important;margin-top:10px!important}
 .realm-welcome{gap:16px}.realm-guide{width:76px}.realm-welcome h2{font-size:clamp(30px,8vw,44px)}
 .realm-stage{height:300px}.realm-journey{grid-template-columns:.3fr 1fr .3fr;gap:10px}.realm-current>img{border-radius:8px}.realm-neighbour{padding-top:28px;position:relative;padding-bottom:34px}.realm-neighbour>img{border-radius:6px}
 .realm-neighbour>span{padding:0;min-height:34px;position:absolute;bottom:0;left:0;right:0;justify-content:center}.realm-neighbour>span>span{display:none}.realm-neighbour b{border-color:#fff0db80;width:32px;height:32px;font-size:21px}
 .realm-footer{display:block;margin-top:16px}.realm-caption{display:grid;column-gap:12px}#realm-name{font-size:30px;margin:0}#realm-range{font-size:9px}#realm-description{font-size:13px;min-height:39px;margin-top:10px}
 .realm-navigation{max-width:none;margin-top:18px;grid-template-columns:auto 1fr;gap:10px 14px}.realm-navigation label{justify-self:end}#realm-select{font-size:13px}
}
@media(max-width:370px){
 .mode-figure{width:200px}.mode-panel{padding:22px 18px 18px}.mode-story-footer{margin-right:-18px;min-height:178px;align-items:flex-start;padding-top:10px}.mode-companion{width:154px;right:-24px;bottom:0}
 .realm-guide{width:60px}.realm-welcome{gap:12px}.realm-caption{display:block}#realm-name{margin-top:5px}.realm-stage{height:280px}
}

/* Square compositions stay intact; narrow screens show one scene with arrows. */
@media(max-width:700px){
 .realm-journey{grid-template-columns:34px minmax(0,1fr) 34px;gap:8px}
 .realm-neighbour{padding:0;justify-content:center}
 .realm-neighbour>img{display:none}
 .realm-current>img{height:auto;aspect-ratio:1}
 .realm-neighbour>span{position:static}
}

@media(min-width:701px){
 .realm-atlas{height:auto;min-height:0;padding:32px 0}
 .realm-stage{flex:none;height:auto;aspect-ratio:3.2/1.2}
 .realm-current>img{height:auto;max-height:100%;aspect-ratio:1}
 .realm-neighbour{padding:0;justify-content:center}
 .realm-neighbour>img{flex:none;height:auto;aspect-ratio:1;max-height:calc(100% - 44px)}
 .realm-footer{margin-top:20px}
}
