:root {
  color-scheme: dark;
  --navy-950: #020b18;
  --navy-900: #020f20;
  --navy-850: #07172b;
  --navy-800: #0c1d33;
  --ink: #faf8f3;
  --muted: #aeb9c9;
  --gold: #f3c67a;
  --gold-deep: #c99236;
  --blue: #2f6fe9;
  --line: rgba(243, 198, 122, 0.32);
  --rail-width: 242px;
  --content-width: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--navy-950);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; background: var(--navy-950); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--navy-950); color: var(--ink); letter-spacing: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; background: var(--gold); color: var(--navy-950); transform: translateY(-140%); }
.skip-link:focus { transform: translateY(0); }
.app-shell { width: 100%; max-width: 100%; min-height: 100vh; overflow-x: hidden; }
.app-rail { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--rail-width); display: flex; flex-direction: column; padding: 24px 18px; background: #031225; border-right: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { flex: 0 0 auto; }
.brand span { display: grid; line-height: 1.05; text-transform: uppercase; color: var(--gold); }
.brand strong { font-family: Georgia, serif; font-size: 19px; font-weight: 600; }
.brand small { margin-top: 3px; color: var(--ink); font-size: 10px; letter-spacing: 0.18em; }
.rail-nav { display: grid; gap: 4px; margin-top: 42px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px; color: var(--muted); border-left: 2px solid transparent; font-size: 14px; font-weight: 650; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); background: rgba(255,255,255,0.035); border-color: var(--gold); }
.nav-glyph { width: 20px; height: 20px; display: grid; flex: 0 0 auto; place-items: center; color: var(--gold); }
.nav-glyph svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail-refresh { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-top: auto; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--gold); font-weight: 750; cursor: pointer; }
.rail-refresh:hover { background: rgba(243,198,122,0.08); border-color: var(--gold); }
.rail-refresh svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail-refresh[aria-busy="true"] svg, .mobile-header [data-app-refresh][aria-busy="true"] svg { animation: spin 0.8s linear infinite; }
.rail-footer { display: grid; gap: 14px; margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.rail-footer button { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.rail-footer strong { color: var(--ink); }
.install-button { min-height: 42px; border: 1px solid var(--gold); background: transparent; color: var(--gold); font-weight: 750; cursor: pointer; }
.app-frame { width: auto; max-width: 100%; min-width: 0; min-height: 100vh; margin-left: var(--rail-width); overflow-x: hidden; }
.mobile-header, .bottom-nav { display: none; }
#app-main { width: 100%; max-width: calc(var(--content-width) + 64px); min-width: 0; margin: 0 auto; padding: 32px; overflow-x: clip; outline: none; }

.page-header { display: flex; min-width: 0; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.page-header > div, .section-heading > div, .hero-content { min-width: 0; }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
h1 { max-width: 780px; margin-bottom: 8px; font-family: Georgia, serif; font-size: 44px; font-weight: 500; line-height: 1.04; }
.page-header p { max-width: 690px; margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--gold); border-radius: 4px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.primary-button { background: var(--gold); color: var(--navy-950); }
.secondary-button { background: transparent; color: var(--gold); }
.primary-button:hover { background: #ffd992; }
.secondary-button:hover { background: rgba(243,198,122,0.08); }

.hero { position: relative; min-width: 0; min-height: 420px; display: flex; align-items: end; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--navy-800); }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; opacity: 0.76; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,11,24,0.96) 0%, rgba(2,11,24,0.62) 45%, rgba(2,11,24,0.12) 82%), linear-gradient(0deg, rgba(2,11,24,0.95), transparent 55%); }
.hero-content { position: relative; z-index: 1; width: min(620px, 72%); padding: 42px; }
.hero h1 { margin-bottom: 14px; color: var(--gold); }
.hero p { color: #e6e9ee; font-size: 16px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.section { min-width: 0; padding: 38px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.section-link { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.story-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.story-card { position: relative; min-height: 270px; display: flex; align-items: end; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--navy-800); }
.story-card img, .story-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-card.archive-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 18%, rgba(243,198,122,0.22), transparent 34%), linear-gradient(145deg, #11294b, #061224 68%); }
.story-card.archive-card:nth-child(3n+2)::before { background: radial-gradient(circle at 24% 24%, rgba(146,179,224,0.2), transparent 36%), linear-gradient(145deg, #172442, #07101f 68%); }
.story-card.archive-card:nth-child(3n)::before { background: radial-gradient(circle at 70% 34%, rgba(196,148,109,0.22), transparent 38%), linear-gradient(145deg, #2b1e2c, #08111f 72%); }
.story-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(2,11,24,0.98) 0%, rgba(2,11,24,0.12) 72%); }
.story-card-body { position: relative; z-index: 1; width: 100%; padding: 18px; }
.story-card h3 { margin: 5px 0 0; color: var(--gold); font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.story-meta { color: #d8deea; font-size: 12px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.story-topics { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-link { min-height: 154px; padding: 22px; border: 1px solid var(--line); border-radius: 5px; background: var(--navy-850); }
.feature-link:hover { border-color: var(--gold); }
.feature-link h3 { margin: 8px 0; color: var(--gold); font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.feature-link p { margin: 0; color: var(--muted); line-height: 1.5; }

.search-form { display: flex; gap: 10px; margin: 18px 0 28px; }
.search-form input { min-width: 0; flex: 1; min-height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--navy-850); color: var(--ink); outline: none; }
.search-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,198,122,0.1); }
.topic-row { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; }
.topic-chip:hover { color: var(--gold); border-color: var(--gold); }
.topic-chip span { margin-left: 7px; color: var(--gold); font-size: 11px; }
.topic-chip.is-active, .topic-chip[aria-pressed="true"] { border-color: var(--gold); background: rgba(243,198,122,0.12); color: var(--gold); }
.discovery-search { display: grid; gap: 10px; margin: 20px 0 10px; }
.discovery-search label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.discovery-search input, .discovery-search select { width: 100%; }
.library-search-bar { position: relative; }
.library-search-bar .search-query { display: block; }
.library-search-icon { position: absolute; z-index: 1; top: 50%; left: 18px; width: 21px; height: 21px; color: var(--gold); transform: translateY(-50%); pointer-events: none; }
.library-search-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }
.search-query input { min-height: 60px; padding-left: 52px; border-color: rgba(243,198,122,.28); border-radius: 6px; background: rgba(9,28,53,.72); font-size: 16px; }
.search-query input[aria-invalid="true"] { border-color: #ef8b8b; }
.library-tools { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: rgba(9,28,53,.32); }
.library-tools > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; color: var(--muted); cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.library-tools > summary::-webkit-details-marker { display: none; }
.library-tools > summary::after { content: "+"; margin-left: auto; color: var(--gold); font-size: 18px; font-weight: 400; line-height: 1; }
.library-tools[open] > summary::after { content: "−"; }
.library-tools > summary:hover { color: var(--ink); }
.library-filter-count { margin-left: auto; padding: 3px 7px; border-radius: 99px; background: rgba(243,198,122,.12); color: var(--gold); font-size: 10px; letter-spacing: .04em; }
.library-tools-panel { display: grid; gap: 18px; padding: 16px; border-top: 1px solid var(--line); }
.library-tools:not([open]) > .library-tools-panel { display: none; }
.discovery-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.library-topic-picker > p { margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.boolean-help { margin: 0; border: 1px solid var(--line); border-radius: 5px; background: rgba(9,28,53,.55); }
.boolean-help summary { padding: 13px 15px; color: var(--gold); cursor: pointer; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.boolean-help > p, .boolean-help > div { margin: 0; padding: 0 15px 13px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.boolean-help > div { display: flex; flex-wrap: wrap; gap: 7px; }
.boolean-help:not([open]) > :not(summary) { display: none; }
.boolean-help code { padding: 3px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--navy-900); color: #e9d6b0; font-size: 12px; }
.library-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.library-results-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.clear-library { border: 0; background: none; cursor: pointer; }
.discovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.library-result { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--navy-850); }
.library-result > .story-card { min-height: 245px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.library-result-detail { padding: 16px; }
.library-result-detail > p { min-height: 42px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.result-meta span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 99px; color: #d8deea; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.chapter-matches { display: grid; gap: 7px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.chapter-matches h4 { margin: 0 0 3px; color: var(--gold); font-family: Georgia, serif; font-size: 17px; font-weight: 500; }
.chapter-search-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; color: var(--ink); }
.chapter-search-result + .chapter-search-result { border-top: 1px solid rgba(255,255,255,.06); }
.chapter-search-result strong, .chapter-search-result small { display: block; }
.chapter-search-result strong { font-size: 13px; }
.chapter-search-result small { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.chapter-search-result > span:last-child { color: var(--gold); }
.search-error { margin-bottom: 14px; padding: 12px 14px; border: 1px solid rgba(239,139,139,.45); border-radius: 4px; background: rgba(239,139,139,.08); color: #ffd2d2; font-size: 13px; }
.search-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.search-suggestions button { min-height: 36px; padding: 0 12px; border: 1px solid var(--gold); border-radius: 99px; background: transparent; color: var(--gold); cursor: pointer; }

.status-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; border: 1px solid rgba(47,111,233,0.42); border-radius: 5px; background: rgba(47,111,233,0.08); }
.status-band strong { display: block; margin-bottom: 5px; color: var(--gold); }
.status-band p { margin: 0; color: var(--muted); }
.empty-state { padding: 42px 24px; border: 1px solid var(--line); border-radius: 5px; text-align: center; background: var(--navy-850); }
.empty-state h2 { font-family: Georgia, serif; font-weight: 500; }
.empty-state p { max-width: 560px; margin: 0 auto 20px; color: var(--muted); line-height: 1.6; }
.loading-view.compact { min-height: 320px; }
.reading-group { min-width: 0; padding: 26px 0 34px; border-bottom: 1px solid var(--line); }
.reading-count { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); font-weight: 800; }
.reading-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.reading-card { min-width: 0; display: grid; align-content: space-between; gap: 18px; min-height: 180px; padding: 20px; border: 1px solid var(--line); border-radius: 5px; background: var(--navy-850); }
.reading-card h3 { margin: 7px 0 0; color: var(--gold); font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.reading-track { height: 5px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.08); }
.reading-track span { display: block; height: 100%; background: var(--blue); }
.reading-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 12px; }
.reading-card-footer a { color: var(--gold); font-weight: 800; text-transform: uppercase; }
.account-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--line); }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; padding: 12px 18px; background: var(--navy-850); }
.account-row:is(button) { width: 100%; border: 0; color: inherit; text-align: left; cursor: pointer; }
.account-row:hover { background: var(--navy-800); }
.account-row span { color: var(--muted); font-size: 13px; }
.my-house-signed-out { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; padding: 32px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(14,47,90,.76), rgba(4,16,29,.94)); }
.my-house-signed-out h2 { margin: 8px 0 14px; color: var(--gold); font-family: Georgia, serif; font-size: clamp(28px, 4vw, 46px); font-weight: 500; }
.my-house-signed-out p, .my-house-signed-out li { color: var(--muted); line-height: 1.6; }
.my-house-signed-out ul { display: grid; gap: 10px; align-content: center; margin: 0; padding-left: 22px; }
.my-house-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-bottom: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.my-house-summary article { display: grid; gap: 5px; min-width: 0; padding: 20px; background: var(--navy-850); }
.my-house-summary span, .my-house-summary small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.my-house-summary strong { overflow: hidden; color: var(--gold); font-family: Georgia, serif; font-size: clamp(22px, 3vw, 34px); font-weight: 500; text-overflow: ellipsis; }
.my-house-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin: 28px 0; }
.my-house-panel { grid-column: span 4; min-width: 0; padding: 24px; border: 1px solid var(--line); background: linear-gradient(145deg, var(--navy-850), var(--navy-950)); }
.my-house-panel:first-child { grid-column: span 6; }
.my-house-panel:nth-child(2) { grid-column: span 3; }
.my-house-panel:nth-child(3) { grid-column: span 3; }
.my-house-panel h2 { margin: 8px 0 12px; color: var(--gold); font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.my-house-panel p:not(.eyebrow) { min-height: 66px; color: var(--muted); line-height: 1.55; }
.my-house-panel > div { display: flex; flex-wrap: wrap; gap: 8px; }
.my-house-settings { margin-top: 30px; }

.release-list, .calendar-timeline, .audio-list, .feed-list { display: grid; gap: 10px; }
.release-card { min-width: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 84px; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 5px; background: var(--navy-850); }
.release-card.is-wide-release { border-left-color: #c8943e; }
.release-card.is-shared-release { border-left-color: var(--gold); background: linear-gradient(90deg, rgba(47,111,233,.07), rgba(158,107,31,.07)); }
.release-card:hover { border-color: var(--gold); }
.release-card time { display: grid; place-items: center; min-height: 58px; border-radius: 4px; background: rgba(47,111,233,.18); color: var(--ink); text-transform: uppercase; }
.release-card time strong { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.release-card time span { color: var(--gold); font-family: Georgia, serif; font-size: 25px; line-height: 1; }
.release-card h3 { margin: 5px 0 0; color: var(--ink); font-size: 17px; }
.access-pill { justify-self: end; padding: 7px 10px; border: 1px solid rgba(47,111,233,.45); border-radius: 99px; color: #bcd0fa; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.access-pill.is-wide-release { border-color: rgba(200,148,62,.65); background: rgba(158,107,31,.16); color: #f6d695; }
.access-pill.is-shared-release { border-color: rgba(243,198,122,.55); background: linear-gradient(90deg, rgba(47,111,233,.16), rgba(158,107,31,.16)); color: #f1dcac; }
.calendar-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.calendar-view-controls { display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--navy-850); }
.calendar-view-controls button { min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-view-controls button:hover, .calendar-view-controls button.is-active { border-color: rgba(47,111,233,.6); background: rgba(47,111,233,.16); color: #c7d9ff; }
.calendar-view-controls button[data-calendar-view="wide"].is-active { border-color: rgba(200,148,62,.75); background: rgba(158,107,31,.18); color: #f6d695; }
.calendar-release-sections { min-width: 0; display: grid; gap: 36px; }
.calendar-release-section { min-width: 0; }
.calendar-release-section > header { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.calendar-release-section > header h2 { margin: 4px 0 0; color: var(--gold); font-family: Georgia, serif; font-size: clamp(24px, 4vw, 34px); font-weight: 500; }
.calendar-window-meta { display: grid; justify-items: end; gap: 5px; text-align: right; }
.calendar-window-meta strong { color: var(--ink); font-family: Georgia, serif; font-size: 16px; font-weight: 500; }
.calendar-window-meta span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-window-body { padding-top: 14px; }
.release-preview { width: min(100%, 980px); margin: 0 auto; }
.release-back { display: inline-flex; margin-bottom: 18px; color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.release-preview-hero { position: relative; min-height: min(720px, calc(100vh - 120px)); display: flex; align-items: end; overflow: hidden; border: 1px solid var(--gold); border-radius: 8px; background: var(--navy-850); box-shadow: 0 28px 80px rgba(0,0,0,.34); }
.release-preview-hero > img, .release-preview-hero > video, .release-art-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.release-preview-hero > img, .release-preview-hero > video { opacity: .7; }
.release-art-fallback { display: grid; place-items: center; background: radial-gradient(circle at 70% 20%, rgba(243,198,122,.22), transparent 35%), linear-gradient(145deg, #10294c, #020b18 70%); }
.release-art-fallback img { width: 130px; opacity: .26; }
.release-preview-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(2,11,24,.99) 3%, rgba(2,11,24,.82) 42%, rgba(2,11,24,.12) 78%), linear-gradient(90deg, rgba(2,11,24,.52), transparent 58%); }
.release-house-mark { position: absolute; top: 26px; left: 28px; z-index: 2; display: flex; align-items: center; gap: 11px; color: var(--gold); text-transform: uppercase; }
.release-house-mark img { width: 38px; height: 44px; }
.release-house-mark span { display: grid; line-height: 1; }
.release-house-mark strong { font-family: Georgia, serif; font-size: 18px; font-weight: 600; }
.release-house-mark small { margin-top: 4px; color: var(--ink); font-size: 9px; letter-spacing: .21em; }
.release-preview-copy { position: relative; z-index: 2; width: min(720px, 90%); padding: 52px; }
.release-preview-copy h1 { margin-bottom: 9px; color: var(--gold); font-size: clamp(42px, 7vw, 70px); }
.release-preview-copy h2 { max-width: 680px; margin-bottom: 18px; color: var(--ink); font-family: Georgia, serif; font-size: clamp(24px, 4vw, 38px); font-weight: 500; line-height: 1.12; }
.release-preview-copy > p:last-of-type { max-width: 620px; margin: 18px 0 0; color: #dce2ec; font-size: 15px; line-height: 1.65; }
.release-preview-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.release-preview-meta span { padding: 7px 10px; border: 1px solid rgba(243,198,122,.46); border-radius: 99px; color: var(--gold); }
.release-preview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.release-missing { max-width: 680px; margin: 9vh auto; padding: 52px; border: 1px solid var(--gold); border-radius: 8px; background: var(--navy-850); text-align: center; }
.release-missing > img { width: 72px; margin: 0 auto 18px; }
.release-missing h1 { margin-inline: auto; color: var(--gold); }
.release-missing > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.feed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.feed-card { min-width: 0; display: grid; grid-template-columns: minmax(150px, .38fr) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--navy-850); }
.feed-card.compact { grid-template-columns: 1fr; }
.feed-card > img, .feed-card > video { width: 100%; height: 100%; min-height: 210px; object-fit: cover; }
.feed-card > div { min-width: 0; padding: 20px; }
.feed-card h3 { margin: 5px 0 12px; color: var(--gold); font-size: 18px; }
.feed-card p:not(.story-meta) { color: var(--ink); line-height: 1.6; }
.feed-card footer { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.feed-card footer time { margin-left: auto; }
.feed-card.interactive { grid-template-columns: minmax(190px, .34fr) minmax(0, 1fr); }
.feed-card.interactive > div { padding: 24px; }
.note-body { white-space: pre-wrap; }
.note-actions { align-items: center; }
.note-action { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 9px; border: 1px solid transparent; border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; }
.note-action:hover, .note-action.is-active { border-color: var(--line); background: rgba(243,198,122,.08); color: var(--gold); }
.note-action:disabled { cursor: wait; opacity: .6; }
.note-action strong { min-width: 1ch; color: inherit; }
.note-delete:hover { border-color: rgba(225,101,101,.55); color: #ffb0b0; }
.note-comments { grid-column: 1 / -1; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.comments-list { display: grid; gap: 10px; }
.comments-status { margin: 0; color: var(--muted) !important; font-size: 13px; }
.comment-card { padding: 14px; border: 1px solid rgba(243,198,122,.18); border-radius: 4px; background: rgba(2,11,24,.5); }
.comment-card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--gold); font-size: 13px; }
.comment-card header time { color: var(--muted); font-size: 11px; }
.comment-card p { margin: 10px 0 0; white-space: pre-wrap; }
.comment-card footer { padding-top: 8px; border-top: 0; }
.comment-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 14px; }
.comment-composer textarea, .note-composer textarea { width: 100%; resize: vertical; padding: 13px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--navy-950); color: var(--ink); line-height: 1.5; outline: none; }
.comment-composer textarea:focus, .note-composer textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,198,122,.1); }
.comments-sign-in { margin-top: 14px; }
.note-composer { display: grid; gap: 14px; margin-bottom: 24px; padding: 22px; border: 1px solid var(--gold); border-radius: 6px; background: linear-gradient(145deg, rgba(12,29,51,.96), rgba(4,17,35,.96)); }
.note-composer label { color: var(--ink); font-family: Georgia, serif; font-size: 25px; }
.note-composer footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.composer-message { min-height: 1.4em; margin: 0; color: var(--gold); font-size: 13px; }
.is-error { color: #ffb0b0 !important; }
.notes-sign-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--navy-850); }
.notes-sign-in h2 { margin-bottom: 8px; font-family: Georgia, serif; font-weight: 500; }
.notes-sign-in p:last-child { margin: 0; color: var(--muted); }
.load-more-notes { display: flex; min-width: 190px; margin: 24px auto 0; }
.feed-end { margin: 24px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 38px 0 6px; }
.quick-grid a { min-height: 112px; display: grid; align-content: center; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: 5px; background: var(--navy-850); }
.quick-grid a:hover { border-color: var(--gold); }
.quick-grid span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.quick-grid strong { color: var(--gold); font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.bookshop-home-card { min-height: 126px; display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 20px; border: 1px solid var(--gold); border-radius: 6px; background: radial-gradient(circle at 90% 12%, rgba(243,198,122,.14), transparent 34%), linear-gradient(145deg, #0d2544, #061326); }
.bookshop-home-card:hover { background: radial-gradient(circle at 90% 12%, rgba(243,198,122,.2), transparent 38%), linear-gradient(145deg, #102b4f, #07162a); }
.bookshop-home-mark { display: grid; width: 70px; height: 82px; place-items: center; border: 1px solid var(--gold); background: var(--navy-950); color: var(--gold); font-family: Georgia, serif; font-size: 36px; box-shadow: 7px 7px 0 rgba(243,198,122,.13); }
.bookshop-home-card > span:nth-child(2) { display: grid; gap: 7px; }
.bookshop-home-card strong { color: var(--gold); font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.bookshop-home-card small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.bookshop-home-card > span:last-child { color: var(--gold); font-size: 24px; }

.bookshop-intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr); gap: 24px; margin-bottom: 28px; padding: 28px; border: 1px solid var(--gold); border-radius: 7px; background: radial-gradient(circle at 84% 15%, rgba(243,198,122,.16), transparent 31%), linear-gradient(135deg, #0a2442, #041326); }
.bookshop-intro h2 { margin-bottom: 10px; color: var(--gold); font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.bookshop-intro p:last-child { margin: 0; color: #d8deea; line-height: 1.65; }
.bookshop-promises { display: grid; align-content: center; gap: 9px; }
.bookshop-promises span { padding: 11px 13px; border: 1px solid rgba(243,198,122,.28); background: rgba(2,11,24,.4); color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.bookshop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 22px; }
.store-downloads, .store-order-history { display: grid; gap: 12px; margin: 0 0 28px; padding: 22px; border: 1px solid var(--gold); border-radius: 6px; background: linear-gradient(145deg, #0c2a4b, #061629); }
.store-downloads > header, .store-order-history > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.store-downloads > header h2, .store-order-history > header h2 { margin: 0; color: var(--gold); font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.store-downloads > header > span, .store-order-history > header > span { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.store-downloads > article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid var(--line); background: rgba(2, 11, 24, .45); }
.store-downloads > article > div { display: grid; gap: 5px; }
.store-downloads small, .store-order-history small { color: var(--muted); font-size: 11px; }
.store-order-history { margin-top: 28px; border-color: var(--line); background: var(--navy-850); }
.store-order-history > article { padding-top: 15px; border-top: 1px solid var(--line); }
.store-order-history > article > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.store-order-history .store-downloads { margin: 12px 0 0; padding: 15px; border-color: rgba(243,198,122,.35); }
.store-catalog > header, .store-cart > header, .store-admin-list > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.store-catalog > header h2, .store-cart > header h2, .store-admin-list > header h2 { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.store-product-grid { display: grid; gap: 14px; }
.store-product-card { min-width: 0; display: grid; grid-template-columns: 154px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--navy-850); }
.store-cover { min-height: 232px; background: #071426; }
.store-cover img, .store-detail-cover > img { width: 100%; height: 100%; object-fit: cover; }
.store-cover-placeholder { width: 100%; min-height: 100%; display: grid; align-content: space-between; justify-items: center; gap: 12px; padding: 18px 10px; border: 1px solid rgba(243,198,122,.45); background: radial-gradient(circle at 70% 18%, rgba(243,198,122,.17), transparent 30%), linear-gradient(150deg, #15365f, #050f1e 72%); color: var(--gold); text-align: center; }
.store-cover-placeholder > span { font-size: 8px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.store-cover-placeholder strong { font-family: Georgia, serif; font-size: 43px; font-weight: 500; }
.store-cover-placeholder small { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.store-product-copy { min-width: 0; display: grid; align-content: start; padding: 20px; }
.store-product-copy h3 { margin: 5px 0 10px; color: var(--gold); font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.store-product-copy > p:not(.story-meta) { display: -webkit-box; margin-bottom: 18px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.store-product-copy footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px 16px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.store-product-copy footer .secondary-button { grid-column: 1 / -1; }
.store-price { display: grid; justify-items: end; color: var(--gold); font-size: 17px; font-weight: 800; }
.store-price > span { display: inline-flex; align-items: baseline; gap: 7px; }
.store-price strong { color: var(--gold); font-size: 17px; }
.store-price del { color: var(--muted); font-size: 12px; font-weight: 600; text-decoration-thickness: 1px; }
.store-price small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.store-price.is-member small { color: var(--blue); }
.store-cart { position: sticky; top: 28px; padding: 20px; border: 1px solid var(--gold); border-radius: 6px; background: linear-gradient(155deg, #0a213d, #041224); box-shadow: 0 18px 44px rgba(0,0,0,.22); }
.store-cart > header .section-link { border: 0; background: transparent; cursor: pointer; }
.store-cart-empty { display: grid; justify-items: center; gap: 12px; padding: 32px 14px; border: 1px dashed rgba(243,198,122,.32); color: var(--muted); text-align: center; }
.store-cart-empty span { color: var(--gold); font-size: 29px; }
.store-cart-empty p { margin: 0; font-size: 13px; line-height: 1.55; }
.store-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.store-cart-line > div:first-child { display: grid; gap: 3px; }
.store-cart-line > div:first-child strong { font-size: 13px; }
.store-cart-line > div:first-child span { color: var(--muted); font-size: 11px; }
.store-cart-line > strong { grid-column: 2; color: var(--gold); font-size: 12px; text-align: right; }
.store-cart-quantity { display: flex; align-items: center; gap: 8px; }
.store-cart-quantity button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--gold); cursor: pointer; }
.store-cart-quantity span { min-width: 1.2em; color: var(--ink); text-align: center; }
.store-cart-total { display: grid; gap: 10px; padding-top: 17px; }
.store-cart-total p { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.store-cart-total p span, .store-cart-total small { color: var(--muted); font-size: 11px; }
.store-cart-total p strong { color: var(--gold); }
.store-cart-total .primary-button[aria-disabled="true"] { background: rgba(243,198,122,.14); color: var(--gold); }
.store-empty-shelf { min-height: 360px; display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr); align-items: center; gap: 30px; padding: 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--navy-850); }
.store-spines { height: 240px; display: flex; align-items: end; justify-content: center; gap: 7px; padding: 20px; border-bottom: 4px solid var(--gold-deep); }
.store-spines span { width: 28px; border: 1px solid var(--gold); background: linear-gradient(90deg, #0d315a, #174675, #0d315a); }
.store-spines span:nth-child(1) { height: 72%; }.store-spines span:nth-child(2) { width: 34px; height: 88%; }.store-spines span:nth-child(3) { height: 100%; }.store-spines span:nth-child(4) { width: 38px; height: 82%; }.store-spines span:nth-child(5) { height: 94%; }
.store-empty-shelf h2 { margin-bottom: 10px; color: var(--gold); font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.store-empty-shelf p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.store-smallprint { margin-bottom: 0; font-size: 12px; }
.store-product-detail { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); align-items: start; gap: 42px; width: min(100%, 980px); margin: 3vh auto 30px; }
.store-detail-cover { min-height: 520px; aspect-ratio: 2 / 3; box-shadow: 18px 18px 0 rgba(243,198,122,.11); }
.store-cover-placeholder.is-large { min-height: 520px; padding: 34px 18px; }
.store-cover-placeholder.is-large strong { font-size: 76px; }
.store-detail-copy { padding-top: 10px; }
.store-detail-copy h1 { margin: 15px 0; color: var(--gold); }
.store-description { color: #dce2ec; font-size: 16px; line-height: 1.72; }
.store-editions { display: grid; gap: 9px; margin-top: 28px; }
.store-editions h2 { margin-bottom: 4px; font-family: Georgia, serif; font-weight: 500; }
.store-editions article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 15px; border: 1px solid var(--line); background: var(--navy-850); }
.store-editions article > div:first-child { display: grid; gap: 4px; }
.store-editions article span { color: var(--muted); font-size: 11px; }
.store-detail-cart { width: min(100%, 980px); margin: 0 auto; }
.store-detail-cart .store-cart { position: static; }
.store-admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 22px; }
.store-admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 24px; border: 1px solid var(--gold); border-radius: 6px; background: var(--navy-850); }
.store-admin-heading, .store-admin-wide { grid-column: 1 / -1; }
.store-admin-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.store-admin-form label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.store-admin-form input, .store-admin-form select, .store-admin-form textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--navy-950); color: var(--ink); outline: none; }
.store-admin-form textarea { resize: vertical; line-height: 1.5; }
.store-admin-form input:focus, .store-admin-form select:focus, .store-admin-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,198,122,.1); }
.store-admin-form footer { display: flex; align-items: center; gap: 14px; }
.store-admin-form footer span { color: var(--muted); font-size: 12px; }
.store-admin-list { padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--navy-850); }
.store-admin-list > article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.store-admin-list > article > div { display: grid; gap: 3px; }
.store-admin-list > article span, .store-admin-list > p { color: var(--muted); font-size: 11px; }
.store-admin-list > article a { color: var(--gold); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.audio-row { width: 100%; min-width: 0; min-height: 74px; display: flex; align-items: center; gap: 15px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 5px; background: var(--navy-850); color: var(--ink); text-align: left; cursor: pointer; }
.audio-story { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: rgba(7, 27, 50, .7); }
.audio-story > header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 2px 5px; }
.audio-story > header h2 { margin: 0; font-size: clamp(19px, 2vw, 25px); }
.audio-story > header span { flex: 0 0 auto; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.audio-row:hover { border-color: var(--gold); }
.audio-row > span:last-child { min-width: 0; display: grid; gap: 4px; }
.audio-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-row small { color: var(--muted); }
.play-glyph { flex: 0 0 auto; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--gold); color: var(--navy-950); font-size: 13px; }
.notification-count { position: absolute; top: -4px; right: -4px; display: grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border: 2px solid var(--navy-850); border-radius: 99px; background: var(--blue); color: white; font-size: 10px; font-weight: 800; }
.notification-drawer { position: fixed; inset: 0 0 0 auto; z-index: 80; width: min(420px, 92vw); overflow-y: auto; padding: 22px; border-left: 1px solid var(--line); background: rgba(3,18,37,.99); box-shadow: -24px 0 60px rgba(0,0,0,.4); }
.notification-drawer[hidden], .audio-dock[hidden] { display: none !important; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.drawer-head h2 { margin: 0; color: var(--gold); font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.drawer-head button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 22px; cursor: pointer; }
.notification-item { display: grid; gap: 4px; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.notification-item strong { color: var(--gold); }
.notification-item span, .notification-item time { color: var(--muted); font-size: 13px; }
.audio-dock { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(760px, calc(100vw - var(--rail-width) - 40px)); display: grid; grid-template-columns: minmax(150px, .7fr) minmax(260px, 1fr) auto auto; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid var(--gold); border-radius: 5px; background: rgba(3,18,37,.98); box-shadow: 0 16px 48px rgba(0,0,0,.5); backdrop-filter: blur(16px); }
.audio-dock-copy { min-width: 0; display: grid; }
.audio-dock-copy .eyebrow { margin-bottom: 3px; font-size: 9px; }
.audio-dock-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-dock audio { width: 100%; height: 38px; }
.audio-dock select, .search-form select { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--navy-800); color: var(--ink); }

.reader-story, .reader-chapter { width: min(100%, 880px); margin: 0 auto; }
.reader-story-hero { position: relative; min-height: 330px; display: flex; align-items: end; overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--navy-850); }
.reader-story-hero > img, .reader-story-hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.reader-story-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(2,11,24,.98), rgba(2,11,24,.12)); }
.reader-story-hero > div { position: relative; z-index: 1; padding: 34px; }
.reader-story-hero h1 { color: var(--gold); }
.reader-story-hero p:last-child { margin: 0; color: var(--muted); }
.reader-chapter-list { display: grid; gap: 9px; padding: 0; list-style: none; }
.reader-chapter-list li > a { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 15px; min-height: 82px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 5px; background: var(--navy-850); }
.reader-chapter-list li > a:hover { border-color: var(--gold); }
.reader-chapter-list li.is-early-access > a { border-color: rgba(243,198,122,.42); background: linear-gradient(135deg, rgba(243,198,122,.09), var(--navy-850)); }
.reader-chapter-list li.is-early-access em { color: var(--gold); font-weight: 700; }
.reader-chapter-list strong, .reader-chapter-list small, .reader-chapter-list em { display: block; }
.reader-chapter-list strong { color: var(--ink); }
.reader-chapter-list small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.reader-chapter-list em { margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 13px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.reader-chapter-number { color: var(--gold); font-family: Georgia, serif; font-size: 21px; }
.reader-story-footer, .reader-chapter-footer, .reader-breadcrumb { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 0; color: var(--gold); font-size: 13px; font-weight: 750; }
.reader-breadcrumb { padding-top: 0; border-bottom: 1px solid var(--line); }
.reader-chapter-header { padding: 46px 0 28px; text-align: center; }
.reader-chapter-header h1 { margin-inline: auto; color: var(--gold); font-size: clamp(38px, 7vw, 62px); }
.reader-chapter-header > p:last-child { margin: 15px 0 0; color: var(--muted); font-size: 13px; }
.reader-feature-image { margin: 0 0 38px; }
.reader-feature-image img { width: 100%; max-height: 620px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.reader-feature-image figcaption { padding-top: 9px; color: var(--muted); font-size: 12px; text-align: center; }
.reader-content { color: #f1eee8; font-family: Georgia, "Times New Roman", serif; font-size: clamp(18px, 2.4vw, 21px); line-height: 1.85; }
.reader-content > * { max-width: 720px; margin-inline: auto; }
.reader-content p { margin-bottom: 1.45em; }
.reader-content h2, .reader-content h3 { margin-top: 2em; color: var(--gold); line-height: 1.22; }
.reader-content h2 { font-size: 1.7em; }
.reader-content h3 { font-size: 1.35em; }
.reader-content a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.reader-content figure, .reader-content .kg-width-wide, .reader-content .kg-width-full { max-width: 100%; margin-block: 2.2em; }
.reader-content img, .reader-content video { width: auto; max-height: 760px; margin-inline: auto; border-radius: 5px; }
.reader-content audio, .reader-content video { width: 100%; }
.reader-content blockquote { padding: 3px 0 3px 24px; border-left: 3px solid var(--gold); color: var(--muted); font-style: italic; }
.reader-content hr { margin-block: 3em; border: 0; border-top: 1px solid var(--line); }
.reader-content ul, .reader-content ol { padding-left: 1.4em; }
.reader-content figcaption { margin-top: 8px; color: var(--muted); font-family: Inter, sans-serif; font-size: 12px; text-align: center; }
.reader-chapter-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; margin-top: 46px; padding: 26px; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(135deg, rgba(47,111,233,.1), rgba(7,23,43,.92)); }
.reader-chapter-actions h2 { margin: 5px 0 7px; color: var(--gold); font-size: clamp(24px, 4vw, 34px); }
.reader-chapter-actions p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.reader-action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.reader-action { min-width: 112px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--navy-950); color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.reader-action svg { width: 19px; height: 19px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reader-action:hover, .reader-action.is-active { border-color: var(--gold); background: var(--gold); color: var(--navy-950); }
.reader-action.is-active svg { fill: var(--navy-950); stroke: var(--navy-950); }
.reader-action[data-reader-action="read"].is-active svg { fill: none; }
.reader-action:disabled { cursor: wait; opacity: .62; }
.reader-discussion { margin-top: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: rgba(4, 20, 40, .72); }
.reader-discussion-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: 28px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(47,111,233,.1), rgba(3,18,37,.9)); }
.reader-discussion-heading h2 { margin: 4px 0 7px; color: var(--gold); font-size: clamp(28px, 4vw, 38px); }
.reader-discussion-heading p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.reader-discussion-heading > span { color: var(--gold); font-size: 13px; font-weight: 800; white-space: nowrap; }
.reader-discussion-thread { padding: 10px 28px 0; }
.reader-discussion-status { margin: 0; padding: 26px 0; color: var(--muted); text-align: center; }
.reader-discussion-status.is-error { display: grid; justify-items: center; gap: 14px; }
.reader-discussion-status.is-error p { margin: 0; }
.reader-discussion-empty { padding: 28px 0; text-align: center; }
.reader-discussion-empty h3 { margin: 5px 0 7px; color: var(--gold); font-family: Georgia, serif; font-size: 25px; }
.reader-discussion-empty p:last-child { margin: 0; color: var(--muted); }
.ghost-comments-list { display: grid; }
.ghost-comment { padding: 22px 0; border-bottom: 1px solid rgba(243,198,122,.14); }
.ghost-comment:last-child { border-bottom: 0; }
.ghost-comment header { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; }
.ghost-comment header > img, .ghost-comment-avatar { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(243,198,122,.35); border-radius: 50%; background: var(--navy-800); color: var(--gold); font-family: Georgia, serif; object-fit: cover; }
.ghost-comment header strong, .ghost-comment header small { display: block; }
.ghost-comment header strong { color: var(--ink); font-size: 14px; }
.ghost-comment header small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.ghost-comment header em { padding: 3px 7px; border: 1px solid rgba(243,198,122,.32); border-radius: 999px; color: var(--gold); font-size: 9px; font-style: normal; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.ghost-comment header time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.ghost-comment-body { padding: 12px 0 0 49px; color: var(--ink); font-size: 15px; line-height: 1.62; }
.ghost-comment-body p { margin: 0 0 .7em; }
.ghost-comment-body p:last-child { margin-bottom: 0; }
.ghost-comment-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.ghost-comment footer { display: flex; align-items: center; gap: 14px; padding: 9px 0 0 49px; color: var(--muted); font-size: 12px; }
.ghost-comment footer button { padding: 0; border: 0; background: transparent; color: var(--gold); font-size: 12px; font-weight: 800; cursor: pointer; }
.ghost-comment-replies { margin: 14px 0 0 49px; padding-left: 18px; border-left: 1px solid rgba(243,198,122,.23); }
.ghost-comment-replies .ghost-comment { padding-block: 16px; }
.reader-comment-composer, .reader-reply-form { display: grid; gap: 10px; }
.reader-comment-composer { margin: 18px 28px 0; padding: 22px 0; border-top: 1px solid var(--line); }
.reader-comment-composer > label, .reader-reply-form > label { color: var(--gold); font-size: 13px; font-weight: 800; }
.reader-comment-composer textarea, .reader-reply-form textarea { width: 100%; resize: vertical; padding: 13px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--navy-950); color: var(--ink); line-height: 1.55; outline: none; }
.reader-comment-composer textarea:focus, .reader-reply-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,198,122,.1); }
.reader-comment-composer > div, .reader-reply-form > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reader-comment-composer > div > span { color: var(--muted); font-size: 12px; }
.reader-reply-form { margin: 14px 0 0 49px; padding: 15px; border: 1px solid rgba(243,198,122,.18); border-radius: 4px; background: rgba(2,11,24,.5); }
.reader-reply-form[hidden] { display: none; }
.reader-reply-form > div { justify-content: flex-end; }
.reader-reply-form .primary-button, .reader-reply-form .secondary-button { min-height: 38px; }
.reader-discussion-link { margin: 0; padding: 0 28px 24px; color: var(--gold); font-size: 12px; font-weight: 750; text-align: right; }
.reader-chapter-footer { margin-top: 46px; border-top: 1px solid var(--line); }
.reader-error { max-width: 680px; margin: 10vh auto; }

.loading-view { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.loading-mark { width: 38px; height: 38px; border: 2px solid rgba(243,198,122,0.2); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 60; max-width: 360px; padding: 13px 16px; border: 1px solid var(--gold); border-radius: 4px; background: var(--navy-800); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .app-rail { display: none; }
  .app-frame { width: 100%; max-width: 100vw; margin-left: 0; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .mobile-header { position: sticky; top: 0; z-index: 30; display: flex; width: 100%; max-width: 100vw; align-items: center; justify-content: space-between; min-height: 64px; padding: 8px 16px; overflow: hidden; background: rgba(3,18,37,0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
  .mobile-header-actions { display: flex; align-items: center; gap: 8px; }
  .icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--gold); }
  .mobile-header .icon-button { position: relative; }
  .mobile-header .icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-nav { position: fixed; inset: auto 0 0; z-index: 40; display: grid; width: 100%; max-width: 100vw; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); overflow: hidden; background: rgba(3,18,37,0.98); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
  .bottom-nav .nav-link { width: 100%; max-width: 100%; min-width: 0; min-height: 50px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 2px; overflow: hidden; border: 0; font-size: 10px; text-align: center; }
  .bottom-nav .nav-link > span:last-child { display: block; width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav .nav-link[aria-current="page"] { background: transparent; color: var(--gold); }
  .bottom-nav .nav-glyph, .bottom-nav .nav-glyph svg { width: 21px; height: 21px; }
  #app-main { padding: 22px 16px; }
  .page-header { align-items: start; }
  h1 { font-size: 37px; }
  .hero { min-height: 520px; }
  .hero-content { width: 82%; padding: 30px; }
  .story-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bookshop-layout, .store-admin-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .store-product-detail { gap: 28px; }
  .audio-dock { right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); grid-template-columns: minmax(0, 1fr) auto auto; }
  .audio-dock audio { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 620px) {
  #app-main { width: 100%; max-width: 100vw; min-width: 0; padding-inline: 16px; }
  .page-header { display: block; }
  .page-header > .primary-button, .page-header > .secondary-button { margin-top: 16px; }
  h1 { font-size: 34px; }
  .hero { width: 100%; max-width: 100%; min-height: 470px; }
  .hero-media { object-position: 58% center; }
  .hero::after { background: linear-gradient(0deg, rgba(2,11,24,0.98) 0%, rgba(2,11,24,0.3) 80%); }
  .hero-content { width: 100%; max-width: 100%; padding: 24px 20px; overflow: hidden; }
  .hero h1 { width: 100%; max-width: 100%; font-size: 29px; white-space: normal; overflow-wrap: normal; word-break: normal; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .section-heading { align-items: start; }
  .section-heading .section-link { flex: 0 0 104px; text-align: right; }
  .story-strip { width: 100%; min-width: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .story-card { flex: 0 0 min(78vw, 320px); min-width: 0; scroll-snap-align: start; }
  .bookshop-home-card { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 16px; }
  .bookshop-home-mark { width: 54px; height: 66px; font-size: 28px; }
  .bookshop-home-card strong { font-size: 22px; }
  .bookshop-intro, .bookshop-layout, .store-empty-shelf, .store-product-detail, .store-admin-layout { grid-template-columns: 1fr; }
  .store-downloads > article { align-items: stretch; flex-direction: column; }
  .store-downloads > article .primary-button { text-align: center; }
  .bookshop-intro { padding: 22px; }
  .store-cart { position: static; }
  .store-product-card { grid-template-columns: 112px minmax(0, 1fr); }
  .store-cover { min-height: 190px; }
  .store-product-copy { padding: 15px; }
  .store-product-copy h3 { font-size: 21px; }
  .store-empty-shelf { padding: 24px; }
  .store-spines { height: 190px; }
  .store-product-detail { margin-top: 0; }
  .store-detail-cover { width: min(78vw, 340px); min-height: 470px; margin: 0 auto; }
  .store-editions article { grid-template-columns: minmax(0, 1fr) auto; }
  .store-editions article .primary-button { grid-column: 1 / -1; }
  .store-admin-form { grid-template-columns: 1fr; padding: 18px; }
  .store-admin-heading, .store-admin-wide { grid-column: 1; }
  .feature-grid { grid-template-columns: 1fr; }
  .reading-grid { grid-template-columns: 1fr; }
  .search-form { display: grid; }
  .discovery-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discovery-grid { width: 100%; display: grid; grid-template-columns: 1fr; overflow: visible; scroll-snap-type: none; }
  .library-result > .story-card { width: 100%; min-height: 260px; }
  .status-band { display: block; }
  .status-band .primary-button { width: 100%; margin-top: 16px; }
  .account-row { align-items: start; flex-direction: column; gap: 4px; }
  .my-house-signed-out, .my-house-summary { grid-template-columns: 1fr; }
  .my-house-panel, .my-house-panel:first-child, .my-house-panel:nth-child(2), .my-house-panel:nth-child(3) { grid-column: 1 / -1; }
  .feed-grid, .quick-grid { grid-template-columns: 1fr; }
  .feed-card { grid-template-columns: 1fr; }
  .feed-card > img, .feed-card > video { max-height: 260px; }
  .feed-card.interactive { grid-template-columns: 1fr; }
  .feed-card.interactive > div { padding: 18px; }
  .note-actions { gap: 5px; }
  .note-action { padding-inline: 7px; }
  .note-action > span:nth-child(2) { display: none; }
  .comment-composer { grid-template-columns: 1fr; }
  .notes-sign-in { align-items: stretch; flex-direction: column; }
  .release-card { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .release-card .access-pill { grid-column: 2; justify-self: start; }
  .calendar-toolbar { align-items: stretch; flex-direction: column; }
  .calendar-view-controls { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-view-controls button { width: 100%; padding-inline: 8px; }
  .calendar-release-section > header { align-items: start; flex-direction: column; gap: 7px; }
  .calendar-window-meta { justify-items: start; text-align: left; }
  .calendar-window-body { padding-top: 14px; }
  .release-preview { margin-top: -4px; }
  .release-preview-hero { min-height: calc(100vh - 145px); }
  .release-preview-copy { width: 100%; padding: 120px 22px 28px; }
  .release-preview-copy h1 { font-size: 40px; }
  .release-preview-copy h2 { font-size: 25px; }
  .release-preview-actions { display: grid; }
  .release-house-mark { top: 20px; left: 20px; }
  .release-missing { margin-block: 5vh; padding: 36px 22px; }
  .audio-dock { grid-template-columns: minmax(0, 1fr) auto; }
  .audio-dock select { grid-row: 1; grid-column: 2; }
  .audio-dock .icon-button { position: absolute; top: -14px; right: -8px; width: 32px; height: 32px; background: var(--navy-800); }
  .reader-story-hero { min-height: 290px; }
  .reader-story-hero > div { padding: 24px 20px; }
  .reader-chapter-list li > a { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 13px 12px; }
  .reader-chapter-list em { display: none; }
  .reader-breadcrumb { align-items: flex-start; }
  .reader-chapter-header { padding-top: 34px; }
  .reader-chapter-header h1 { font-size: 38px; }
  .reader-content { font-size: 18px; line-height: 1.78; }
  .reader-chapter-footer { align-items: stretch; flex-direction: column; }
  .reader-chapter-actions { grid-template-columns: 1fr; padding: 20px; }
  .reader-action-buttons { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .reader-action { width: 100%; }
  .reader-discussion-heading { grid-template-columns: 1fr; align-items: start; gap: 10px; padding: 22px 18px; }
  .reader-discussion-thread { padding-inline: 18px; }
  .reader-comment-composer { margin-inline: 18px; }
  .reader-comment-composer > div { align-items: stretch; flex-direction: column; }
  .reader-comment-composer .primary-button { width: 100%; }
  .reader-discussion-link { padding-inline: 18px; text-align: left; }
  .ghost-comment header { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .ghost-comment header > img, .ghost-comment-avatar { width: 34px; height: 34px; }
  .ghost-comment header em { grid-column: 2; justify-self: start; }
  .ghost-comment header time { grid-column: 3; grid-row: 1; }
  .ghost-comment-body, .ghost-comment footer { padding-left: 45px; }
  .ghost-comment-replies { margin-left: 24px; padding-left: 12px; }
  .reader-reply-form { margin-left: 24px; }
  .reader-reply-form > div { align-items: stretch; flex-direction: column; }
  .reader-reply-form .primary-button, .reader-reply-form .secondary-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
