/* Hallmark · genre: atmospheric · macrostructure: Ecosystem Index · theme: Mythspan · enrichment: existing campaign artwork · nav: N5 · footer: Ft5 · contrast: pass (40-41) · slop: pass (42-45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · mobile: pass (34, 49, 50-57) */
/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V5 */
@import url("/tokens.css");

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { background: var(--myth-ink-deep); color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; background: var(--myth-ink-deep); color: var(--myth-paper); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.62; }
body::selection { background: var(--myth-coral); color: var(--myth-ink-deep); }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--myth-focus); outline-offset: 4px; }
h1, h2, h3, h4, h5, h6 { min-width: 0; overflow-wrap: anywhere; }
button:disabled, input:disabled, select:disabled, textarea:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: 0.55; }
.skip-link { position: fixed; left: var(--space-md); top: -5rem; z-index: var(--z-tooltip); background: var(--myth-paper); color: var(--myth-ink); padding: var(--space-sm) var(--space-md); }
.skip-link:focus { top: var(--space-md); }

.site-nav-wrap { inset: max(var(--space-md), env(safe-area-inset-top)) 0 auto; padding-inline: max(var(--space-md), env(safe-area-inset-left)); pointer-events: none; position: fixed; z-index: var(--z-sticky); }
.site-nav { align-items: center; background: color-mix(in oklch, var(--myth-ink-deep) 82%, transparent); border: var(--rule-hair) solid var(--myth-line); border-radius: 999px; display: flex; gap: var(--space-lg); justify-content: space-between; margin-inline: auto; max-width: 72rem; min-height: 3.75rem; padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-lg); pointer-events: auto; backdrop-filter: blur(18px) saturate(120%); }
.brand { align-items: center; display: inline-flex; flex: 0 0 auto; gap: var(--space-sm); min-height: 44px; text-decoration: none; white-space: nowrap; font-weight: 700; }
.brand-mark { display: grid; height: 1.45rem; place-items: center; position: relative; width: 1.95rem; }
.brand-mark i { border: var(--rule-hair) solid var(--myth-coral); display: block; height: 1rem; position: absolute; transform: translateX(-0.28rem) rotate(45deg); width: 1rem; }
.brand-mark i:last-child { transform: translateX(0.38rem) rotate(45deg); }
.nav-links { align-items: center; display: flex; gap: clamp(var(--space-md), 2vw, var(--space-xl)); }
.nav-links a { color: var(--myth-paper-muted); font-size: 0.9rem; min-height: 44px; padding-block: var(--space-sm); text-decoration: none; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--myth-white); }
.nav-account, .button { align-items: center; background: var(--myth-coral); border: var(--rule-hair) solid var(--myth-coral); border-radius: 999px; color: var(--myth-ink-deep); cursor: pointer; display: inline-flex; font-weight: 700; gap: var(--space-sm); justify-content: center; min-height: 46px; padding: var(--space-sm) var(--space-lg); text-decoration: none; white-space: nowrap; transition: transform var(--dur-micro) var(--ease-out), opacity var(--dur-micro) var(--ease-out); }
.nav-account:hover, .button:hover { transform: translateY(-1px); }
.nav-account:active, .button:active { transform: none; }
.button.secondary { background: transparent; color: var(--myth-paper); }
.button.ghost { background: transparent; border-color: var(--myth-line); color: var(--myth-paper); }
.nav-toggle { display: none; background: transparent; border: 0; color: var(--myth-paper); min-height: 44px; min-width: 44px; padding: 0; }
.nav-toggle-icon { display: grid; gap: 0.28rem; width: 1.35rem; }
.nav-toggle-icon i { background: currentColor; display: block; height: 1px; transition: transform var(--dur-micro) var(--ease-out), opacity var(--dur-micro) var(--ease-out); width: 100%; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:first-child { transform: translateY(0.34rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:last-child { transform: translateY(-0.34rem) rotate(-45deg); }

.community-intro { display: grid; gap: var(--space-xl); grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.6fr); margin-inline: auto; max-width: 92rem; padding: var(--space-4xl) clamp(var(--space-lg), 6vw, var(--space-4xl)) var(--space-xl); }
.community-intro h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 6vw, 5.2rem); font-style: normal; font-weight: 400; letter-spacing: -0.045em; line-height: 0.98; margin: 0; max-width: 12ch; overflow-wrap: anywhere; text-wrap: balance; }
.community-intro p { align-self: end; color: var(--myth-paper-muted); font-size: var(--text-md); margin: 0; max-width: 42ch; }
.search-box { align-items: center; background: var(--myth-panel); display: grid; gap: var(--space-md); grid-template-columns: minmax(0, 1fr) minmax(10rem, auto) minmax(10rem, auto); padding: var(--space-md); }
.search-box label { color: var(--myth-paper-muted); display: grid; font-size: 0.86rem; font-weight: 700; gap: var(--space-xs); min-width: 0; }
.search-box input, .search-box select, .field input, .field select, .field textarea { background: var(--myth-ink-deep); border: var(--rule-hair) solid var(--myth-line); border-radius: var(--radius-sm); color: var(--myth-paper); min-height: 3.25rem; padding: var(--space-sm) var(--space-md); width: 100%; }
.search-box input::placeholder, .field input::placeholder, .field textarea::placeholder { color: color-mix(in oklch, var(--myth-paper-muted) 70%, transparent); }
.search-box input, .search-box select, .field input, .field select, .field textarea { outline: 2px solid transparent; outline-offset: 1px; }
.search-box input:hover, .search-box select:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--myth-apricot); }
.search-box input:active, .search-box select:active, .field input:active, .field select:active, .field textarea:active { border-color: var(--myth-cyan); }

.feature-rail { overflow: hidden; padding-block: var(--space-xl) var(--space-3xl); }
.rail-head, .section-head { align-items: end; display: flex; gap: var(--space-lg); justify-content: space-between; margin-inline: auto; max-width: 92rem; padding-inline: clamp(var(--space-lg), 6vw, var(--space-4xl)); }
.rail-head h2, .section-head h2 { font-family: var(--font-display); font-size: clamp(2.35rem, 4.7vw, 4.5rem); font-style: normal; font-weight: 400; letter-spacing: -0.035em; line-height: 1; margin: 0; }
.rail-head p, .section-head p { color: var(--myth-paper-muted); margin: 0; max-width: 42ch; }
.carousel { cursor: grab; overflow-x: auto; padding-bottom: var(--space-md); scrollbar-width: none; touch-action: pan-y; user-select: none; }
.carousel[data-dragging="true"] { cursor: grabbing; }
.carousel::-webkit-scrollbar { display: none; }
.carousel-track { animation: carousel-drift 105s linear infinite; display: flex; width: max-content; will-change: transform; }
.carousel:hover .carousel-track { animation-play-state: paused; }
.carousel-set { display: flex; gap: var(--space-lg); padding-inline: clamp(var(--space-lg), 6vw, var(--space-4xl)) var(--space-lg); }
.feature-card { aspect-ratio: 16 / 10; border: var(--rule-hair) solid var(--myth-line); border-radius: var(--radius-md); flex: 0 0 clamp(18rem, 35vw, 34rem); overflow: hidden; position: relative; }
.feature-card a { display: block; height: 100%; position: relative; text-decoration: none; z-index: 2; }
.feature-card img { height: 100%; object-fit: cover; pointer-events: none; transition: transform var(--dur-long) var(--ease-out); -webkit-user-drag: none; width: 100%; }
.feature-card:hover img { transform: scale(1.025); }
.feature-card a::after { background: linear-gradient(0deg, var(--myth-shadow), transparent 75%); content: ""; inset: 0; pointer-events: none; position: absolute; }
.feature-card-copy { bottom: 0; display: grid; gap: 0.3rem; left: 0; padding: clamp(var(--space-md), 2.2vw, var(--space-lg)); pointer-events: none; position: absolute; right: 0; z-index: var(--z-raised); }
.feature-card-copy small, .story-meta { color: var(--myth-apricot); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.feature-card-copy small { font-size: 0.68rem; }
.feature-card-copy strong { font-family: var(--font-display); font-size: clamp(1.45rem, 2vw, 2rem); font-weight: 400; letter-spacing: -0.025em; line-height: 1.04; overflow-wrap: anywhere; }
.feature-card-copy span { color: var(--myth-paper-muted); display: -webkit-box; font-size: 0.86rem; line-height: 1.35; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
@keyframes carousel-drift { to { transform: translate3d(-50%, 0, 0); } }

.story-library { background: linear-gradient(180deg, var(--myth-ink), var(--myth-ink-deep)); padding: var(--space-3xl) clamp(var(--space-lg), 6vw, var(--space-4xl)) var(--space-4xl); }
.story-library .section-head { padding-inline: 0; }
.library-tools { margin: var(--space-xl) auto 0; max-width: 92rem; }
.result-count { color: var(--myth-apricot); white-space: nowrap; }
.story-grid { display: grid; gap: var(--space-lg); grid-template-columns: repeat(3, minmax(0, 1fr)); margin-inline: auto; margin-top: var(--space-2xl); max-width: 92rem; }
.story-card { background: color-mix(in oklch, var(--myth-panel) 74%, transparent); border: var(--rule-hair) solid var(--myth-line); border-radius: var(--radius-md); min-width: 0; overflow: hidden; position: relative; transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.story-card[hidden] { display: none; }
.story-card a { display: grid; height: 100%; text-decoration: none; }
.story-card-media { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.story-card-media img { height: 100%; object-fit: cover; transition: transform var(--dur-short) var(--ease-out); width: 100%; }
.story-card:hover { border-color: color-mix(in oklch, var(--myth-apricot) 70%, var(--myth-line)); transform: translateY(-2px); }
.story-card:hover img { transform: scale(1.018); }
.story-card-body { align-content: start; display: grid; gap: var(--space-sm); padding: var(--space-lg); }
.story-card h3 { font-family: var(--font-display); font-size: clamp(1.65rem, 2.5vw, 2.4rem); font-weight: 400; letter-spacing: -0.025em; line-height: 1.05; margin: 0; }
.story-card p { color: var(--myth-paper-muted); margin: 0; }
.story-stats { align-items: center; align-self: end; color: var(--myth-paper-muted); display: flex; flex-wrap: wrap; font-size: 0.86rem; gap: var(--space-md); margin-top: var(--space-sm); }
.stars { color: var(--myth-apricot); letter-spacing: 0.08em; }
.card-save { align-items: center; backdrop-filter: blur(14px); background: color-mix(in oklch, var(--myth-ink-deep) 78%, transparent); border: var(--rule-hair) solid color-mix(in oklch, var(--myth-paper) 38%, transparent); border-radius: 50%; color: var(--myth-paper); cursor: pointer; display: inline-flex; height: 2.75rem; justify-content: center; position: absolute; right: var(--space-md); top: var(--space-md); width: 2.75rem; z-index: 4; }
.card-save:hover, .card-save[aria-pressed="true"] { background: var(--myth-coral); border-color: var(--myth-coral); color: var(--myth-ink-deep); }
.bookmark-icon { height: 1.2rem; width: 1.2rem; }
.card-save[aria-pressed="true"] .bookmark-icon path, .story-save-button[aria-pressed="true"] .bookmark-icon path { fill: currentColor; }

.community-band { background: var(--myth-plum); display: grid; gap: var(--space-2xl); grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.72fr); padding: var(--space-3xl) clamp(var(--space-lg), 6vw, var(--space-4xl)); }
.community-band h2 { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4.8rem); font-style: normal; font-weight: 400; letter-spacing: -0.04em; line-height: 1; margin: 0; max-width: 12ch; }
.community-band-copy { align-self: end; }
.community-band-copy p { color: var(--myth-paper-muted); font-size: var(--text-md); max-width: 44ch; }
.action-row { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.discord-band { align-items: center; background: linear-gradient(90deg, color-mix(in oklch, var(--myth-ink-deep) 94%, transparent), color-mix(in oklch, var(--myth-ink-deep) 65%, transparent)), url('/adventures/nine-cities-at-war.jpg') center / cover; display: flex; gap: var(--space-2xl); justify-content: space-between; min-height: 25rem; padding: var(--space-3xl) clamp(var(--space-lg), 6vw, var(--space-4xl)); }
.discord-band-copy { align-items: start; display: grid; gap: var(--space-xl); grid-template-columns: auto minmax(0, 1fr); }
.discord-mark, .story-discord-icon { align-items: center; background: var(--myth-coral); border-radius: 50%; color: var(--myth-ink-deep); display: inline-flex; flex: 0 0 auto; height: 4.5rem; justify-content: center; width: 4.5rem; }
.discord-band h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4.6rem); font-weight: 400; letter-spacing: -0.04em; line-height: 1; margin: var(--space-xs) 0 var(--space-md); max-width: 14ch; }
.discord-band p { color: var(--myth-paper-muted); margin: 0; max-width: 52ch; }
.eyebrow { color: var(--myth-apricot) !important; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.site-footer { display: grid; gap: var(--space-2xl); padding: var(--space-3xl) clamp(var(--space-lg), 6vw, var(--space-4xl)) var(--space-xl); }
.footer-statement { font-family: var(--font-display); font-size: clamp(2.1rem, 5vw, 4.4rem); font-style: normal; letter-spacing: -0.035em; line-height: 1; margin: 0; max-width: 22ch; }
.footer-grid { border-top: var(--rule-hair) solid var(--myth-line); display: grid; gap: var(--space-2xl); grid-template-columns: minmax(14rem, 1.25fr) repeat(3, minmax(9rem, 0.55fr)); padding-top: var(--space-2xl); }
.footer-brand p { color: var(--myth-paper-muted); font-size: 0.9rem; max-width: 31ch; }
.footer-column { align-content: start; display: grid; gap: var(--space-sm); }
.footer-column h2 { color: var(--myth-apricot); font-size: 0.76rem; letter-spacing: 0.1em; margin: 0 0 var(--space-sm); text-transform: uppercase; }
.footer-column a { align-items: center; color: var(--myth-paper-muted); display: inline-flex; font-size: 0.9rem; gap: var(--space-sm); min-height: 2rem; text-decoration: none; width: fit-content; }
.footer-column a:hover { color: var(--myth-white); }
.social-icon { flex: 0 0 auto; height: 1.25rem; width: 1.25rem; }
.footer-bottom { border-top: var(--rule-hair) solid var(--myth-line); color: var(--myth-paper-muted); display: flex; flex-wrap: wrap; gap: var(--space-md); justify-content: space-between; padding-top: var(--space-lg); }

.story-hero { min-height: clamp(36rem, 82svh, 52rem); overflow: hidden; position: relative; }
.story-hero > img { height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.story-hero::after { background: linear-gradient(90deg, color-mix(in oklch, var(--myth-ink-deep) 96%, transparent), color-mix(in oklch, var(--myth-ink-deep) 18%, transparent)), linear-gradient(0deg, var(--myth-ink-deep), transparent 48%); content: ""; inset: 0; position: absolute; }
.story-hero-copy { display: flex; flex-direction: column; justify-content: flex-end; margin-inline: auto; min-height: clamp(36rem, 82svh, 52rem); max-width: 92rem; padding: 8rem clamp(var(--space-lg), 7vw, var(--space-4xl)) var(--space-3xl); position: relative; z-index: var(--z-raised); }
.story-hero h1 { font-family: var(--font-display); font-size: clamp(3rem, 7vw, 6rem); font-style: normal; font-weight: 400; letter-spacing: -0.045em; line-height: 0.94; margin: var(--space-sm) 0 var(--space-md); max-width: 12ch; overflow-wrap: anywhere; }
.story-hero-copy > p { color: var(--myth-paper-muted); font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.25; margin: 0; max-width: 42ch; }
.story-save-button { margin-top: var(--space-xl); width: fit-content; }
.story-layout { background: var(--myth-paper); color: var(--myth-ink); display: grid; gap: clamp(var(--space-2xl), 7vw, var(--space-4xl)); grid-template-columns: minmax(13rem, 0.38fr) minmax(0, 1fr); padding: var(--space-3xl) clamp(var(--space-lg), 7vw, var(--space-4xl)); }
.story-facts { align-self: start; position: sticky; top: 7rem; }
.story-facts dl { margin: 0; }
.story-facts dl > div { border-top: var(--rule-hair) solid var(--myth-line-dark); padding-block: var(--space-md); }
.story-facts dt { color: color-mix(in oklch, var(--myth-ink) 62%, var(--myth-paper)); font-size: 0.86rem; }
.story-facts dd { font-family: var(--font-display); font-size: var(--text-md); line-height: 1.25; margin: var(--space-xs) 0 0; }
.story-content { max-width: 50rem; }
.story-content h2, .discussion h2 { font-family: var(--font-display); font-size: clamp(2.25rem, 4vw, 3.8rem); font-style: normal; font-weight: 400; letter-spacing: -0.035em; line-height: 1; margin: var(--space-3xl) 0 var(--space-xl); }
.story-content h2:first-child { margin-top: 0; }
.story-content p { font-size: 1.08rem; max-width: 66ch; }
.beats { counter-reset: beat; list-style: none; margin: 0; padding: 0; }
.beats li { border-top: var(--rule-hair) solid var(--myth-line-dark); counter-increment: beat; display: grid; gap: var(--space-md); grid-template-columns: 2.4rem minmax(0, 1fr); padding-block: var(--space-lg); }
.beats li::before { color: var(--myth-plum-light); content: counter(beat, decimal-leading-zero); font-size: 0.82rem; font-weight: 700; }
.twist { background: var(--myth-ink); color: var(--myth-paper); padding: var(--space-3xl) clamp(var(--space-lg), 7vw, var(--space-4xl)); }
.twist-inner { display: grid; gap: var(--space-2xl); grid-template-columns: minmax(12rem, 0.38fr) minmax(0, 1fr); margin-inline: auto; max-width: 82rem; }
.twist h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4.7rem); font-style: normal; font-weight: 400; line-height: 1; margin: 0; }
.twist p { color: var(--myth-paper-muted); font-size: 1.08rem; max-width: 65ch; }
.rating-panel { background: var(--myth-plum); display: grid; gap: var(--space-xl); grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-2xl) clamp(var(--space-lg), 7vw, var(--space-4xl)); }
.rating-panel h2 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.6rem); font-style: normal; font-weight: 400; margin: 0; }
.rating-buttons { align-items: center; display: flex; gap: var(--space-xs); }
.rating-buttons button { background: transparent; border: 0; color: var(--myth-paper-muted); cursor: pointer; font-size: 2rem; min-height: 44px; min-width: 44px; }
.rating-buttons button:hover, .rating-buttons button[data-active="true"] { color: var(--myth-apricot); transform: translateY(-1px); }
.discussion { padding: var(--space-3xl) clamp(var(--space-lg), 7vw, var(--space-4xl)); }
.discussion-grid { display: grid; gap: var(--space-3xl); grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.45fr); margin-inline: auto; max-width: 82rem; }
.comment-list { display: grid; gap: 0; }
.comment { border-top: var(--rule-hair) solid var(--myth-line); display: grid; gap: var(--space-md); grid-template-columns: 2.8rem minmax(0, 1fr); padding-block: var(--space-lg); }
.comment-avatar { align-items: center; background: var(--myth-panel); border-radius: 50%; display: flex; font-size: 0.78rem; font-weight: 700; height: 2.8rem; justify-content: center; }
.comment header { align-items: baseline; display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.comment header span { color: var(--myth-paper-muted); font-size: 0.82rem; }
.comment p { color: var(--myth-paper-muted); margin: var(--space-xs) 0 0; }
.comment-sort { color: var(--myth-paper-muted); display: grid; font-size: 0.86rem; font-weight: 700; gap: var(--space-xs); margin: 0 0 var(--space-lg); max-width: 12rem; }
.comment-sort select { background: var(--myth-ink-deep); border: var(--rule-hair) solid var(--myth-line); border-radius: var(--radius-sm); color: var(--myth-paper); min-height: 3.25rem; padding: var(--space-sm) var(--space-md); width: 100%; }
.comment-actions { align-items: center; display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-sm); }
.comment-actions .button.ghost { font-size: 0.82rem; min-height: 36px; padding: var(--space-xs) var(--space-md); }
.comment-actions [data-comment-score] { font-weight: 700; min-width: 1.5ch; text-align: center; }
.comment-actions [aria-pressed="true"] { border-color: var(--myth-coral); color: var(--myth-apricot); }
.comment textarea { background: var(--myth-ink-deep); border: var(--rule-hair) solid var(--myth-line); border-radius: var(--radius-sm); color: var(--myth-paper); min-height: 6rem; padding: var(--space-sm) var(--space-md); width: 100%; }
.comment-form, .panel-form { background: var(--myth-panel); display: grid; gap: var(--space-lg); padding: var(--space-xl); }
.comment-form { align-self: start; position: sticky; top: 7rem; }
.field { display: grid; gap: var(--space-xs); }
.field span { font-size: 0.9rem; font-weight: 700; }
.field small { color: var(--myth-paper-muted); }
.field small, .form-status { min-height: 1lh; }
.field textarea { min-height: 8rem; resize: vertical; }
.form-status { color: var(--myth-cyan); min-height: 1.6em; }
.story-discord-card { align-items: center; background: var(--myth-ink); border-block: var(--rule-hair) solid var(--myth-line); display: grid; gap: var(--space-xl); grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--space-2xl) clamp(var(--space-lg), 7vw, var(--space-4xl)); }
.story-discord-card h2 { font-family: var(--font-display); font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 400; line-height: 1; margin: var(--space-xs) 0 var(--space-sm); }
.story-discord-card p { color: var(--myth-paper-muted); margin: 0; max-width: 54ch; }
.story-discord-icon { height: 3.5rem; width: 3.5rem; }
.play-card { background: var(--myth-paper); color: var(--myth-ink); display: grid; gap: var(--space-xl); grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-3xl) clamp(var(--space-lg), 7vw, var(--space-4xl)); }
.play-card h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4.6rem); font-style: normal; font-weight: 400; line-height: 1; margin: 0; max-width: 13ch; }
.play-card .button { align-self: center; }

.auth-shell, .form-shell, .legal-shell, .profile-shell, .profile-setup-shell { min-height: 100svh; padding: 8rem clamp(var(--space-lg), 6vw, var(--space-4xl)) var(--space-3xl); }
.auth-shell { align-items: center; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 0.52fr); }
.auth-art { align-content: end; background: linear-gradient(0deg, var(--myth-shadow), transparent), url('/adventures/atlantis-beneath-the-tide.jpg') center / cover; min-height: 36rem; padding: var(--space-2xl); }
.auth-art h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 5vw, 5rem); font-style: normal; font-weight: 400; line-height: 0.98; margin: 0; max-width: 11ch; }
.auth-panel { background: var(--myth-ink); padding: clamp(var(--space-lg), 5vw, var(--space-2xl)); }
.auth-panel h1, .form-shell h1, .legal-shell h1, .profile-shell h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4.7rem); font-style: normal; font-weight: 400; letter-spacing: -0.04em; line-height: 1; margin: 0 0 var(--space-md); }
.auth-panel > p, .form-intro, .legal-shell > p, .profile-shell > p { color: var(--myth-paper-muted); max-width: 58ch; }
.auth-actions { display: grid; gap: var(--space-sm); margin-block: var(--space-xl); }
.auth-divider { align-items: center; color: var(--myth-paper-muted); display: grid; gap: var(--space-sm); grid-template-columns: 1fr auto 1fr; }
.auth-divider::before, .auth-divider::after { background: var(--myth-line); content: ""; height: 1px; }
.legal-notice { color: var(--myth-paper-muted); font-size: 0.78rem; line-height: 1.5; margin: 0; }
.form-shell, .legal-shell, .profile-shell { margin-inline: auto; max-width: 74rem; }
.panel-form { margin-top: var(--space-2xl); }
.field-row { display: grid; gap: var(--space-lg); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.consent-field { align-items: start; background: color-mix(in oklch, var(--myth-ink-deep) 54%, transparent); border: var(--rule-hair) solid var(--myth-line); border-radius: var(--radius-sm); cursor: pointer; display: grid; font-size: 0.86rem; gap: var(--space-sm); grid-template-columns: auto minmax(0, 1fr); padding: var(--space-md); }
.consent-field:hover { border-color: var(--myth-apricot); }
.consent-field input { accent-color: var(--myth-coral); height: 1.2rem; margin: 0.18rem 0 0; width: 1.2rem; }
.otp { display: grid; gap: var(--space-sm); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.otp input { font-family: var(--font-display); font-size: var(--text-xl); min-width: 0; padding-inline: var(--space-xs); text-align: center; }
.profile-setup-shell { align-content: start; display: grid; gap: var(--space-2xl); grid-template-columns: minmax(16rem, 0.55fr) minmax(0, 1fr); margin-inline: auto; max-width: 84rem; }
.profile-setup-intro h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 400; letter-spacing: -0.04em; line-height: 0.96; margin: var(--space-sm) 0 var(--space-lg); max-width: 10ch; }
.profile-setup-intro > p:last-child { color: var(--myth-paper-muted); max-width: 42ch; }
.profile-setup-form { background: var(--myth-panel); display: grid; gap: var(--space-xl); padding: clamp(var(--space-lg), 4vw, var(--space-2xl)); }
.avatar-picker { border: 0; margin: 0; padding: 0; }
.avatar-picker legend { font-size: 0.9rem; font-weight: 700; margin-bottom: var(--space-md); }
.avatar-options { display: grid; gap: var(--space-md); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.avatar-choice { cursor: pointer; display: grid; gap: var(--space-xs); min-width: 0; position: relative; text-align: center; }
.avatar-choice input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.avatar-choice-art { aspect-ratio: 1; border: 2px solid transparent; border-radius: var(--radius-md); display: block; overflow: hidden; padding: 3px; transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.avatar-choice:hover .avatar-choice-art { transform: translateY(-2px); }
.avatar-choice:has(input:checked) .avatar-choice-art { border-color: var(--myth-coral); }
.avatar-choice:has(input:focus-visible) .avatar-choice-art { outline: 2px solid var(--myth-cyan); outline-offset: 2px; }
.avatar-choice > span:last-child { color: var(--myth-paper-muted); font-size: 0.72rem; }
.avatar-sprite { background-image: url('/avatars/mythspan-avatar-sheet.png'); background-repeat: no-repeat; background-size: 400% 300%; display: block; height: 100%; width: 100%; }
.avatar-0 { background-position: 0% 0%; } .avatar-1 { background-position: 33.333% 0%; } .avatar-2 { background-position: 66.667% 0%; } .avatar-3 { background-position: 100% 0%; }
.avatar-4 { background-position: 0% 50%; } .avatar-5 { background-position: 33.333% 50%; } .avatar-6 { background-position: 66.667% 50%; } .avatar-7 { background-position: 100% 50%; }
.avatar-8 { background-position: 0% 100%; } .avatar-9 { background-position: 33.333% 100%; } .avatar-10 { background-position: 66.667% 100%; } .avatar-11 { background-position: 100% 100%; }
.profile-grid { display: grid; gap: var(--space-2xl); grid-template-columns: minmax(15rem, 0.35fr) minmax(0, 1fr); margin-top: var(--space-2xl); }
.profile-card { background: var(--myth-panel); padding: var(--space-xl); }
.profile-avatar { background: var(--myth-plum); border: 3px solid var(--myth-coral); border-radius: 50%; height: 7rem; overflow: hidden; width: 7rem; }
.profile-card h2 { font-family: var(--font-display); font-size: var(--text-xl); font-style: normal; font-weight: 400; }
.profile-description { color: var(--myth-paper-muted); min-height: 1.6em; overflow-wrap: anywhere; }
.profile-edit { display: inline-block; margin-bottom: var(--space-lg); }
.saved-empty { background: var(--myth-panel); color: var(--myth-paper-muted); margin-top: var(--space-xl); padding: var(--space-xl); }
.admin-list { display: grid; gap: var(--space-xl); margin-top: var(--space-2xl); }
.admin-card { display: grid; gap: var(--space-md); }
.admin-card img { border-radius: var(--radius-sm); max-height: 18rem; object-fit: cover; width: 100%; }
.legal-shell { max-width: 58rem; }
.legal-updated { color: var(--myth-apricot) !important; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; margin-top: var(--space-lg); text-transform: uppercase; }
.legal-index { border-block: var(--rule-hair) solid var(--myth-line); display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin-block: var(--space-2xl); padding-block: var(--space-md); }
.legal-index a { color: var(--myth-paper-muted); font-size: 0.84rem; min-height: 2.75rem; padding-block: var(--space-sm); text-decoration: none; white-space: nowrap; }
.legal-index a:hover { color: var(--myth-white); }
.legal-shell section { border-top: var(--rule-hair) solid var(--myth-line); scroll-margin-top: 7rem; }
.legal-shell h2 { font-family: var(--font-display); font-size: var(--text-xl); font-style: normal; font-weight: 400; line-height: 1.08; margin: 0; padding-top: var(--space-2xl); }
.legal-shell p, .legal-shell li { color: var(--myth-paper-muted); }

[data-reveal] { opacity: 0; transform: translateY(8px); transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out); }
[data-reveal][data-visible="true"] { opacity: 1; transform: none; }

@media (max-width: 64rem) {
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discussion-grid { grid-template-columns: minmax(0, 1fr); }
  .comment-form { position: static; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 23rem; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 48rem) {
  .site-nav { border-radius: var(--radius-md); padding-inline: var(--space-md); }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-links { background: var(--myth-ink); border: var(--rule-hair) solid var(--myth-line); display: none; left: var(--space-md); padding: var(--space-md); position: absolute; right: var(--space-md); top: 4.5rem; }
  .nav-links[data-open="true"] { display: grid; }
  .nav-account { margin-left: auto; }
  .community-intro, .community-band, .story-layout, .twist-inner, .rating-panel, .story-discord-card, .play-card, .profile-grid, .profile-setup-shell { grid-template-columns: minmax(0, 1fr); }
  .community-intro { padding-top: calc(var(--space-4xl) - var(--space-lg)); }
  .search-box { grid-template-columns: minmax(0, 1fr); }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .discord-band { align-items: start; flex-direction: column; }
  .story-facts { position: static; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 34rem) {
  .nav-account { font-size: 0.82rem; padding-inline: var(--space-sm); }
  .brand { font-size: 0.92rem; }
  .community-intro h1 { font-size: clamp(2.75rem, 14vw, 4.3rem); }
  .rail-head, .section-head { align-items: start; flex-direction: column; }
  .feature-card { aspect-ratio: 16 / 10; flex-basis: calc(100vw - 2rem); }
  .feature-card-copy { padding: var(--space-md); }
  .feature-card-copy strong { font-size: clamp(1.35rem, 7vw, 1.7rem); }
  .feature-card-copy span { font-size: 0.8rem; -webkit-line-clamp: 2; }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story-card-body { padding: var(--space-lg); }
  .discord-band-copy { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .story-hero h1 { font-size: clamp(2.7rem, 14vw, 4.5rem); }
  .rating-buttons { flex-wrap: wrap; }
  .avatar-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 150ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 150ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .carousel-track { animation: none; }
}
