/* Navigation and reading aids; the six original world palettes remain intact. */
.portal-nav{display:flex;justify-content:space-between;align-items:center;gap:1rem;max-width:1100px;margin:0 auto 1.5rem;padding:1rem 0;border-bottom:1px solid currentColor;font:400 .9rem/1.5 system-ui,sans-serif}.portal-nav a{color:inherit;text-decoration:underline;text-underline-offset:4px;min-height:44px;display:inline-flex;align-items:center}.portal-nav div{display:flex;gap:1.2rem;flex-wrap:wrap}.world-context{max-width:760px;margin:1.4rem auto;font:400 1.05rem/1.7 Georgia,serif;text-transform:none;letter-spacing:normal}.world-context a{color:inherit}.static-archive{margin:3rem auto;padding:2rem 1rem;max-width:1100px;border-top:1px solid currentColor;text-align:left}.static-archive h2{font:400 1.8rem/1.3 Georgia,serif;margin-bottom:1rem;text-transform:none;letter-spacing:normal}.static-archive p{font:400 1rem/1.65 system-ui,sans-serif}.static-archive nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem 1.5rem;margin-top:1.5rem}.static-archive a{display:block;color:inherit;padding:.65rem 0;font:400 1rem/1.5 Georgia,serif;text-underline-offset:4px;overflow-wrap:anywhere}.static-archive small{display:block;font:400 .8rem/1.5 system-ui,sans-serif}.card-detail-link{display:block;min-height:44px;padding:.6rem;color:inherit;font:400 .9rem/1.5 system-ui,sans-serif;text-underline-offset:4px}.card-detail-link[hidden]{display:none}.portal-nav a:focus-visible,.card-detail-link:focus-visible,.static-archive a:focus-visible,button:focus-visible,.card-container:focus-visible{outline:3px solid currentColor;outline-offset:5px}.portal-skip{position:absolute;top:-100px;left:1rem;z-index:20;padding:1rem;background:#241c16;color:#fff}.portal-skip:focus{top:1rem}.reading-status{font:400 .9rem/1.6 system-ui,sans-serif;margin:.8rem auto;text-align:center}.shop-secondary{display:block;margin:1rem auto;color:inherit;min-height:44px;font:400 .95rem/1.5 system-ui,sans-serif;padding:.5rem;text-underline-offset:4px}.world-shop-copy{max-width:700px;margin:1rem auto;font:400 1rem/1.7 Georgia,serif;letter-spacing:normal;text-transform:none}.card-container .inter-meaning,.card-container .inter-advice{font-size:1rem!important;line-height:1.65!important;overflow:visible!important;max-height:none!important}.card-container .inter-title{font-size:1.1rem!important;line-height:1.35!important}.card-container .card-front[aria-hidden=true],.card-container .card-back[aria-hidden=true]{visibility:hidden}.card-container.is-flipped .card-back{visibility:visible}
@media(max-width:760px){.portal-nav{flex-wrap:wrap;padding-inline:.5rem}.portal-nav div{gap:1rem}.static-archive nav{grid-template-columns:1fr 1fr}.world-context{padding-inline:.5rem}.card-container{max-width:100%}.static-archive{padding-inline:.25rem}}
@media(max-width:380px){.static-archive nav{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}html,body{scroll-behavior:auto!important}}
/* Complete foreground/background pairs avoid the old white-on-white hover. */
html[data-world]{--w-bg:#fcfaf5;--w-panel:#f7f1e9;--w-card:#fffcf7;--w-text:#241c16;--w-muted:#65554a;--w-line:#ac9579;--w-accent:#806020;--w-button:#332a21;--w-button-text:#fff7e9;color-scheme:light;background:var(--w-bg)}
html[data-world=malakor]{--w-bg:#0e0917;--w-panel:#171021;--w-card:#1d152a;--w-text:#f3eef7;--w-muted:#c4b5d1;--w-line:#6f5b85;--w-accent:#c9abdF;--w-button:#d0b4e5;--w-button-text:#21152c;color-scheme:dark}
html[data-world=lumina]{--w-bg:#231321;--w-panel:#311e30;--w-card:#3b2739;--w-text:#fff0f4;--w-muted:#dfc5d0;--w-line:#9b718c;--w-accent:#f3b8d7;--w-button:#f3b8d7;--w-button-text:#361c2a;color-scheme:dark}
html[data-world=prisma]{--w-bg:#060f14;--w-panel:#0f2028;--w-card:#152a33;--w-text:#eefbff;--w-muted:#b7d1d7;--w-line:#4e828b;--w-accent:#83dfdf;--w-button:#83dfdf;--w-button-text:#082428;color-scheme:dark}
html[data-world=astria]{--w-bg:#080e20;--w-panel:#111c32;--w-card:#17243b;--w-text:#f5f0df;--w-muted:#c8c4b9;--w-line:#867953;--w-accent:#e0c77b;--w-button:#e0c77b;--w-button-text:#28220d;color-scheme:dark}
html[data-world=vibration]{--w-accent:#965121;--w-panel:#f5ece1;--w-card:#fff9ef}
html[data-world=alchemia]{--w-accent:#93503b;--w-panel:#f3ebe3;--w-card:#fffaf3}
html[data-world][data-theme=light]{color-scheme:light;--w-bg:#fcfaf5;--w-panel:#f4eee6;--w-card:#fffcf7;--w-text:#241c16;--w-muted:#65554a;--w-line:#a3917d;--w-button:#332a21;--w-button-text:#fff7e9;--w-accent:var(--world-light,#806020)}
html[data-world][data-theme=dark]{color-scheme:dark;--w-bg:#141018;--w-panel:#211b25;--w-card:#2a2330;--w-text:#f4ede2;--w-muted:#d0c1b6;--w-line:#857083;--w-accent:var(--world-dark,#e0c77b);--w-button:var(--world-dark,#e0c77b);--w-button-text:#241820}
@media(prefers-color-scheme:dark){html[data-world]:not([data-theme=light]){color-scheme:dark;--w-bg:#141018;--w-panel:#211b25;--w-card:#2a2330;--w-text:#f4ede2;--w-muted:#d0c1b6;--w-line:#857083;--w-accent:var(--world-dark,#e0c77b);--w-button:var(--world-dark,#e0c77b);--w-button-text:#241820}}
html[data-world] body{background:var(--w-bg);color:var(--w-text);animation:none;opacity:1;padding-top:0}
html[data-world] body::before,html[data-world] body::after{animation:none}
html[data-world] :is(.spread-section,.glass-panel,.resonance-panel,.holographic-panel,.apothecary-panel,.cosmic-panel){background:var(--w-panel);border-color:var(--w-line);animation:none;box-shadow:none}
html[data-world] header{margin-bottom:2rem}
html[data-world] header h1{color:var(--w-accent);-webkit-text-fill-color:var(--w-accent);background:none;text-shadow:none;font-size:clamp(2rem,7vw,4rem);letter-spacing:.08em}
html[data-world] :is(.section-title,.spread-title,.card-title,.inter-title,.inter-meaning,.shop-banner-title){color:var(--w-text);-webkit-text-fill-color:var(--w-text);text-shadow:none}
html[data-world] :is(.subtitle,.slot-label,.card-header-meta,.inter-advice,.shop-inline-notice,.shop-banner-tag,.shop-banner-text,footer){color:var(--w-muted)}
html[data-world] .btn{background:var(--w-card);color:var(--w-text);border:1px solid var(--w-line);transition:background .18s,color .18s,transform .18s;min-height:44px}
html[data-world] .btn:hover,html[data-world] .btn:focus-visible,html[data-world] .btn.active{background:var(--w-button);color:var(--w-button-text);border-color:var(--w-button);box-shadow:none}
html[data-world] .btn-action{background:var(--w-button);color:var(--w-button-text)}
html[data-world] :is(.portal-nav a,.footer-links a,.shop-inline-notice a):hover{color:var(--w-text);background:var(--w-panel);text-decoration:underline;opacity:1}
html[data-world] :is(.card-front,.card-back){background:var(--w-card);color:var(--w-text);border:1px solid var(--w-line);box-shadow:0 8px 18px #00000015;backdrop-filter:none}
html[data-world] .card-front::before,html[data-world] .card-back::before{animation:none}
html[data-world] .card-back{transform:rotateY(180deg)}
html[data-world] .svg-icon-wrap{width:180px;height:180px;flex:0 0 180px;max-width:100%;margin:1.2rem auto;filter:none;animation:none}
html[data-world] .svg-icon-wrap svg{width:100%;height:100%;color:var(--w-accent)}
html[data-world] .svg-icon-wrap svg [stroke]:not([stroke=none]){stroke:var(--w-accent)}
html[data-world] .svg-icon-wrap svg [fill]:not([fill=none]){fill:var(--w-accent)}
html[data-world] .card-back-pattern{width:180px;height:180px;max-width:90%;color:var(--w-accent);stroke:var(--w-accent);animation:none}
html[data-world] .card-back-pattern [stroke]:not([stroke=none]){stroke:var(--w-accent)}
html[data-world] .card-back-pattern [fill]:not([fill=none]){fill:var(--w-accent)}
html[data-world] .card-container:hover .svg-icon-wrap,html[data-world] .card-container:focus-visible .svg-icon-wrap{animation:world-symbol-greet 1.7s ease-in-out 1;filter:none}
html[data-world] .card-container:hover .card-front{transform:none;box-shadow:0 8px 22px #00000022;border-color:var(--w-accent)}
html[data-world] .grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1.5rem;justify-items:center}
html[data-world] .card-container{width:280px;max-width:100%;height:auto;min-height:420px}
html[data-world] .card-container .card-inner{min-height:420px}
html[data-world] .card-title{font-size:1.15rem;letter-spacing:.03em}
html[data-world] [class^=shop-][class$=-banner],html[data-world] .shop-luxury-banner{background:var(--w-panel);border:1px solid var(--w-line);box-shadow:none}
html[data-world] .btn-shop{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:.8rem 1.4rem;background:var(--w-button);color:var(--w-button-text);border:1px solid var(--w-button);font:600 .95rem/1.5 system-ui,sans-serif;text-decoration:none;letter-spacing:normal}
html[data-world] .btn-shop:hover{background:var(--w-button);color:var(--w-button-text);filter:brightness(.9)}
html[data-world] .theme-toggle{background:var(--w-panel);color:var(--w-text);border:1px solid var(--w-line);padding:.5rem .7rem;min-height:44px;font:400 .8rem/1.4 system-ui,sans-serif;cursor:pointer}
html[data-world] .theme-toggle:hover{background:var(--w-button);color:var(--w-button-text)}
.world-emblem{width:150px;height:150px;margin:1rem auto;color:var(--w-accent)}.world-emblem svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.3}.world-emblem svg{animation:world-symbol-greet 2s ease-in-out 1}
@keyframes world-symbol-greet{0%,100%{transform:translateY(0) rotate(0)}40%{transform:translateY(-7px) rotate(-4deg)}70%{transform:translateY(-3px) rotate(2deg)}}
@media(max-width:600px){html[data-world] :is(.spread-section,.glass-panel,.resonance-panel,.holographic-panel,.apothecary-panel,.cosmic-panel){padding:1.5rem .65rem}html[data-world] body{padding-inline:1rem}html[data-world] .svg-icon-wrap{width:160px;height:160px;flex-basis:160px}.world-emblem{width:125px;height:125px}html[data-world] .btn{padding:.75rem 1rem}html[data-world] .slot-container{max-width:100%}}
@media(prefers-reduced-motion:reduce){html[data-world] *,html[data-world] *::before,html[data-world] *::after{animation:none!important;transition:none!important}.world-emblem svg{animation:none!important}}
html[data-world] header{display:grid;grid-template-columns:minmax(0,1fr) 200px;column-gap:2rem;max-width:1100px;margin:2rem auto;text-align:left;align-items:center}
html[data-world] header h1{grid-column:1;grid-row:1;margin:0 0 .5rem}
html[data-world] header .subtitle{grid-column:1;grid-row:2;line-height:1.6}
html[data-world] header .world-context{grid-column:1;grid-row:3;margin:1rem 0 0;padding:0}
html[data-world] header .world-emblem{grid-column:2;grid-row:1 / 4;width:200px;height:200px;margin:0}
html[data-world] footer .editorial-note{font-size:.9rem}
@media(max-width:600px){html[data-world] header{grid-template-columns:minmax(0,1fr) 90px;gap:.5rem 1rem;margin-block:1.5rem}html[data-world] header h1{font-size:clamp(1.7rem,6.5vw,2.4rem)}html[data-world] header .subtitle{font-size:.8rem;letter-spacing:.04em}html[data-world] header .world-context{grid-column:1 / 3;grid-row:3;font-size:1rem}html[data-world] header .world-emblem{grid-row:1 / 3;width:90px;height:90px}}
html[data-world] .shop-inline-notice a{color:var(--w-accent)}
html[data-world] .inter-advice{letter-spacing:normal;text-transform:none}
html[data-world=prisma] .card-front::before,html[data-world=prisma] .card-back::before{background:none;filter:none;opacity:1;border:1px solid var(--w-accent);animation:none}
html[data-world] .card-back-pattern{opacity:.85}
