@media (max-width:760px) {
  body.atlas-home {--section-gap:clamp(32px,7vw,44px)}
  body.atlas-home .at-page {padding-inline:max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));padding-bottom:calc(26px + env(safe-area-inset-bottom))}
  .atlas-home .at-top {height:54px;position:relative;z-index:20;gap:12px}
  .atlas-home .at-top:has(.phone-menu) > nav {margin-left:auto}
  .phone-menu {position:relative;color:var(--paper)}
  .phone-menu summary {display:flex;align-items:center;gap:7px;list-style:none;min-height:44px;font-weight:700;font-size:.875rem;cursor:pointer}
  .phone-menu summary::-webkit-details-marker {display:none}
  .phone-menu summary::after {content:'';width:12px;height:6px;border-block:1.5px solid currentColor}
  .atlas-home .phone-menu > .sidebar {position:absolute;inset:calc(100% + 2px) 0 auto auto;transform:none;width:min(298px,calc(100vw - 28px));height:auto;max-height:70dvh;overflow:auto;padding:8px;display:block;border-radius:16px;background:var(--panel);box-shadow:0 12px 28px #0005}
  .atlas-home .phone-menu:not([open]) > .sidebar {display:none}
  .atlas-home .phone-menu .sidebar nav {display:grid;grid-template-columns:1fr 1fr;gap:2px}
  .atlas-home .phone-menu .sidebar nav .nav-item {display:flex;flex-flow:row;align-items:center;justify-content:flex-start;gap:8px;min-height:44px;padding:0 9px;font-size:.86rem;color:var(--paper)}
  .atlas-home .phone-menu .nav-item.active {color:var(--ink)}
  .phone-menu .nav-item .sr-only {position:static;clip:auto;clip-path:none;overflow:visible;width:auto;height:auto;margin:0}
  .atlas-home .phone-menu .sidebar-preferences {width:100%;display:block;border-top:1px solid var(--rule);margin-top:4px}
  .atlas-home .phone-menu .theme-toggle {width:100%;display:flex;align-items:center;justify-content:space-between;padding-inline:9px;color:var(--paper)}
  .atlas-home .phone-menu .theme-caption {display:inline;font-size:.85rem}
  .atlas-home .at-page :is(h2,h3) {text-wrap:balance}
}
@media (max-width:540px) {
  body.atlas-home .at-cover {display:flex;flex-direction:column;align-items:stretch;min-height:0}
  body.atlas-home .at-cover .at-hero-glyph {position:relative;inset:auto;align-self:center;width:clamp(128px,38vw,184px);height:auto;max-width:72%;margin:-4px 0 -6px;mask-image:radial-gradient(ellipse 68% 66% at 50% 50%,black 47%,transparent 84%);transform:none}
  body.atlas-home .at-covertext {padding:8px clamp(15px,4.4vw,22px) 18px}
  .atlas-home .at-covertext:before {display:none}
  body.atlas-home .at-cover h1 {font-size:clamp(2.05rem,9.2vw,2.95rem);line-height:1.05;margin:0 0 7px}
  .atlas-home .at-cover .at-strap {font-size:clamp(1rem,4.1vw,1.23rem);line-height:1.28;margin:0;text-wrap:balance}
  .atlas-home .at-cover .at-lead {line-height:1.4;margin:8px 0 0}
  .atlas-home .at-coverlinks {gap:7px; margin-top:12px}
  body.atlas-home .at-coverlinks :is(.at-ip,.at-solid) {padding-inline:10px;font-size:.88rem;min-height:44px}
  .atlas-home .at-edition {inset:13px auto auto 15px}
  .atlas-home .at-portals {display:grid;grid-template-columns:minmax(0,1fr);gap:7px;margin-top:8px}
  body.atlas-home .at-portal {grid-template-columns:25% minmax(0,1fr);--art-x:12.5%;padding:9px 22px 9px 0;min-height:76px}
  .atlas-home .at-portal .portal-figure {max-width:24%;height:85%}
  .atlas-home .at-portal > span {gap:2px;padding:0 10px 0 2px}
  body.atlas-home .at-portal strong {font-size:clamp(1.06rem,4.4vw,1.34rem)}
  .atlas-home .at-portal small {font-size:.66rem}
  .atlas-home .at-portal .portal-arrow {right:9px;top:9px}
  body.atlas-home .at-section h2 {font-size:clamp(1.55rem,7vw,2.05rem);line-height:1.15}
  .atlas-home .at-about {display:block}
  .atlas-home .at-aboutart {float:right;position:static;width:clamp(72px,23vw,108px);height:auto;margin:0 0 4px 10px}
  .atlas-home .at-about .at-row {clear:both;display:grid;grid-template-columns:24px minmax(0,1fr) 10px;gap:8px;padding:10px 2px;align-items:start}
  .atlas-home .at-row .about-sign {width:24px;height:24px}
  .atlas-home .at-row b {font-size:1.1rem;padding:0;align-self:center}
  .atlas-home .at-row small,.atlas-home .at-world small {font-size:.91rem;line-height:1.42}
  .atlas-home .at-row strong,.atlas-home .at-world strong {font-size:1.01rem;line-height:1.3}
  .atlas-home .at-worlds {grid-template-columns:1fr;margin-left:4px;padding-left:15px}
  body.atlas-home .at-world {display:grid;grid-template-columns:clamp(62px,22vw,104px) minmax(0,1fr);gap:10px;padding:8px 10px;align-items:center}
  body.atlas-home .at-world img {width:100%;height:auto;max-height:76px;object-fit:contain}
  body.atlas-home .at-exhibit .carousel-stage {height:clamp(165px,50vw,230px)}
  body.atlas-home .at-exhibit .carousel-slide {height:80%;width:23%}
  .atlas-home .journey-current {display:flex;flex-wrap:wrap;gap:5px 10px;margin:4px 12px 8px}
  .atlas-home .journey-current strong {font-size:1rem}
  .atlas-home .at-exhibit .carousel-controls {display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
  .atlas-home .at-exhibit .carousel-controls button {min-height:44px;min-width:44px;padding:6px 10px}
  body.atlas-home .at-exhibit .artifact-example {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:16px}
  .atlas-home .artifact-example .soul-sword-scene {grid-row:2}
  .atlas-home .artifact-example .soul-sword {min-height:88px;padding:0}
  .atlas-home .artifact-example .artifact-example-art {height:96px}
  .atlas-home .artifact-example .soul-ability-panel {grid-row:3}
  .atlas-home .artifact-example .artifact-stats {margin:8px 0 0}
  body.atlas-home .gallery-grid .gallery-card {display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;min-width:0;padding:0}
  body.atlas-home .gallery-card .gallery-photo {display:block;width:100%;aspect-ratio:16/9;height:auto}
  .atlas-home .at-page .gallery-caption {padding:10px 12px}
}
@media (max-width:440px) {
  body.atlas-home .at-page .gallery-grid {grid-template-columns:minmax(0,1fr)}
  .atlas-home .gallery-grid .gallery-caption strong {font-size:1.02rem}
}
.at-top-start{display:flex;align-items:center;gap:clamp(8px,1.4vw,18px);min-width:0}
.at-top-start .at-brand{white-space:nowrap}
.at-profile{display:inline-flex;flex:none;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 11px;border:1px solid var(--rule,var(--border));border-radius:12px;color:var(--paper);background:color-mix(in srgb,var(--paper) 5%,transparent);font:700 .88rem/1.1 Manrope,Arial,sans-serif;white-space:nowrap;transition:background .18s,border-color .18s}
.at-profile svg{flex:none}
.at-top .at-profile:hover,.at-top .at-profile:focus-visible{border-color:var(--ink);background:color-mix(in srgb,var(--ink) 12%,transparent);color:var(--paper)}
.at-profile:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
@media(max-width:430px){.atlas-home .at-top{gap:8px}.atlas-home .at-top-start .at-brand{font-size:clamp(.95rem,5vw,1.28rem)}.at-profile{gap:5px;padding-inline:7px;font-size:.8rem}.at-profile svg{width:17px;height:17px}}
@media(prefers-reduced-motion:reduce){.at-profile{transition:none}}

/* One continuous header: brand, profile and primary section links. */
.atlas-home .at-top{
  height:auto;min-height:66px;margin:16px 0 14px;padding:8px clamp(12px,2.2vw,26px);
  border:1px solid var(--rule);border-radius:20px;
  background:linear-gradient(115deg,color-mix(in srgb,var(--ink) 8%,var(--panel)),var(--panel) 66%);
  box-shadow:0 8px 28px #0805032b;isolation:isolate
}
.atlas-home .at-top-start{gap:clamp(10px,2vw,24px)}
.atlas-home .at-top > nav{gap:clamp(8px,1.6vw,22px)}
.atlas-home .at-top > nav a{
  display:inline-flex;align-items:center;justify-content:center;padding:7px 6px;min-height:44px;
  border-radius:11px;white-space:nowrap
}
.atlas-home .at-top > nav a:hover,.atlas-home .at-top > nav a:focus-visible{background:color-mix(in srgb,var(--ink) 10%,transparent)}
.atlas-home .at-top .at-profile{background:color-mix(in srgb,var(--ink) 20%,var(--panel));border-color:color-mix(in srgb,var(--ink) 50%,var(--rule));color:var(--paper)}
.atlas-home .at-top .at-profile:is(:hover,:focus-visible){background:color-mix(in srgb,var(--ink) 30%,var(--panel));border-color:var(--ink)}
.atlas-home .sidebar .profile-nav svg{width:22px;height:22px}
@media(min-width:761px){
  .atlas-home.site-page .sidebar{bottom:auto;height:auto;min-height:0;max-height:calc(100dvh - 70px)}
}
@media(max-width:760px){
  .atlas-home .at-top{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 8px;margin:9px 0 10px;padding:6px 10px}
  .atlas-home .at-top-start{grid-row:1;grid-column:1}
  .atlas-home .at-top:has(.phone-menu) > nav,.atlas-home .at-top > nav{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;
    grid-row:2;grid-column:1/-1;margin:0;border-top:1px solid var(--rule);padding-top:3px;
  }
  .atlas-home .at-top > nav a{font-size:.84rem;padding-inline:3px}
  .atlas-home .at-top > .phone-menu{grid-row:1;grid-column:2}
}
@media(max-width:355px){
  .atlas-home .at-top-start{gap:7px}
  .atlas-home .at-top .at-profile{font-size:.74rem;padding-inline:6px}
  .atlas-home .at-top .at-brand{font-size:.93rem}
  .phone-menu summary{font-size:.78rem;gap:5px}
}
@media(max-width:760px){.atlas-home .at-top > nav a:nth-child(2){display:inline-flex}}

@font-face{font-family:ZatPixel;src:url('/assets/fonts/PressStart2P.woff') format('woff');font-display:swap}
@media(min-width:761px){
  .atlas-home.site-page .sidebar{top:50%;transform:translateY(-50%);max-height:calc(100dvh - 24px)}
  .atlas-home.site-page .sidebar nav{gap:6px}
  .atlas-home.site-page .sidebar .nav-item{display:grid;justify-items:center;align-content:center;gap:8px;min-height:57px;padding:6px 0}
  .atlas-home .sidebar .nav-item .side-label{display:block;font:400 .5rem/1.4 ZatPixel,monospace;text-transform:uppercase;letter-spacing:0}
}
@media(max-width:760px){
  .atlas-home .phone-menu .nav-item .side-label{display:inline}
}
.atlas-home .pixel-nav-icon{shape-rendering:crispEdges}
.atlas-home .at-profile span{font-family:ZatPixel,monospace;font-weight:400;font-size:clamp(8px,1vw,11px);line-height:1.5}

/* Pixel silhouettes already contain their own edges: inherited SVG strokes doubled them. */
.atlas-home .pixel-nav-icon{
  fill:currentColor;stroke:none;stroke-width:0;
  width:22px;height:22px;shape-rendering:crispEdges;flex:none
}
.atlas-home .at-top .pixel-nav-icon{width:18px;height:18px}

.atlas-home .at-top .at-profile span {
  font: 750 clamp(.78rem, 1.18vw, .94rem)/1.2 Manrope, Arial, sans-serif;
}
.atlas-home .at-top .at-profile:focus-visible,
.atlas-home .sidebar .nav-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
