:root {
  color-scheme: dark;
  --night: #080f1e;
  --panel: #0c1a2d;
  --ink: #f6f2ec;
  --pale: #ffe8af;
  --gold: #ffd071;
  --border: #b58748;
  --line: #ffffff35;
  --muted: #c3ccd8;
  --focus-gold: #ffdc83;
  --mast-height: 72px;
  --panel-padding: 12px;
  --section-gap: 14px;
  --button-height: 34px;
  --support-heading: clamp(24px,2.7vw,39px);
  --support-text: 16px;
  --support-control: 36px;
  --heading: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--night); color: var(--ink); font: 16px/1.3 'Trebuchet MS', Arial, sans-serif; }
h1, h2, h3, h4, p, ol, ul { margin: 0; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.08; }
h1, h2 { color: #fff0ce; }
h3 { color: var(--gold); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .58; }
img { display: block; max-width: 100%; object-fit: cover; }
hr { border: 0; border-top: 1px solid var(--line); margin: 8px 12px; }

.skip { position: absolute; padding: 10px; background: #112237; top: -6em; z-index: 5; }
.skip:focus { top: 0; }
.panel { border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(147deg,#17243adb,#091629e8 55%,#0b1b2eea); }
.gold, .outline, .subtle, .danger { display: inline-flex; align-items: center; justify-content: center; gap: .6em; border: 1px solid var(--border); border-radius: 9px; min-height: var(--button-height); padding: 5px 13px; font-weight: 700; text-align: center; }
.gold { color: #201405; border-color: #ffdf8e; background: linear-gradient(#ffe89e,#f7bb50 65%,#e6a032); }
.gold:hover { color: #201405; filter: brightness(1.07); }
.outline { color: var(--pale); background: linear-gradient(#172333,#0a1422); border-color: #e0ae55; }
.subtle { background: #253241; border-color: #596475; }
.danger { margin-left: auto; color: #ffa89c; border-color: #e95643; background: #391823; }
.wide { width: 100%; }
.required { color: #ff715b; }
.notice:not(:empty) { display: block; color: var(--pale); padding: 7px 0; }
label { display: block; }
input:not([type=checkbox]), textarea, select { display: block; width: 100%; color: var(--ink); background: #111e2e; border: 1px solid #687685; border-radius: 8px; min-height: 36px; padding: 7px 12px; }
textarea { resize: vertical; }
input[type=checkbox] { accent-color: #f7bb55; margin: 0; width: 17px; height: 17px; vertical-align: middle; }
progress { display: block; appearance: none; border: 0; width: 100%; height: 12px; overflow: hidden; border-radius: 25px; background: #293958; }
progress::-webkit-progress-bar { background: #293958; }
progress::-webkit-progress-value { border-radius: 25px; background: linear-gradient(#ffe08a,#f4aa42); }
progress::-moz-progress-bar { background: #f4bc5e; border-radius: 25px; }
.mast { min-height: var(--mast-height); padding: 4px 3.1%; display: flex; gap: 28px; align-items: center; border-bottom: 1px solid var(--border); background: linear-gradient(105deg,#071121,#111b31); }
.mast nav { display: flex; gap: clamp(10px,2.35vw,40px); align-items: center; margin-left: auto; }
.mast nav a { padding: 7px 6px; white-space: nowrap; }
.mast nav [aria-current="page"] { color: var(--pale); text-decoration: underline; text-underline-offset: .3em; }
.mast nav .active { padding: 8px 22px; border: 1px solid #c69b55; background: linear-gradient(#614627,#282431); border-radius: 15px; }
.brand { display: flex; align-items: center; gap: 17px; flex: none; font: bold 42px/.95 var(--heading); color: var(--gold); }
.brand img { width: 94px; height: 55px; object-fit: contain; }
.brand small, .mast-title small, .user-link small { display: block; }
.brand small { font-size: 20px; margin-top: 4px; }
.mast-title { border-left: 1px solid var(--border); padding-left: 32px; font: 30px/1.04 var(--heading); }
.mast-title small { font: 15px/1.25 'Trebuchet MS', Arial, sans-serif; margin-top: 5px; }
.mast-caption { font: italic 22px 'Trebuchet MS', Arial, sans-serif; }
.motto, .mast-title .motto { color: #ffe48e; text-transform: uppercase; font: bold 15px/1.3 'Trebuchet MS', Arial, sans-serif; letter-spacing: .42em; }
.user-link { margin-left: auto; flex: none; }
.home main {
  min-height: calc(100vh - var(--mast-height)); padding-bottom: 32px;
  background: linear-gradient(180deg,#101a2d28,#0a1327a8 72%,#0a1327),linear-gradient(90deg,#0c1528,#16254060 48%,#1e263a70),url('../img/review/world.webp') center / cover no-repeat;
}
.home-hero { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(270px,.89fr); gap: 9%; align-items: center; min-height: 392px; padding: 21px 11.2% 22px 24.5%; }
.welcome h1 { font-size: clamp(60px,7vw,122px); color: #fff5de; margin: 18px 0; text-shadow: 0 2px 5px #050915; }
.welcome h1 small { font-size: .54em; font-weight: 400; display: block; margin-left: 9%; }
.welcome h1::after { content: ''; display: block; margin-top: 9px; height: 2px; background: linear-gradient(90deg,transparent,#ffc65a,transparent); }
.welcome > p:last-child { font-size: clamp(17px,1.38vw,24px); max-width: 465px; margin-left: 5%; }
.welcome .motto { text-align: center; white-space: nowrap; }
.login { padding: 20px 23px 16px; border: 1px solid #f0be5e; border-radius: 27px; background: linear-gradient(145deg,#252337e1,#0c172bdc); }
.login h2 { text-align: center; font-size: 24px; color: #ffe6ad; margin: 0 0 var(--section-gap); }
.icon-field { display: flex; align-items: center; gap: 12px; border: 1px solid #a89a8c; border-radius: 12px; padding: 0 16px; margin-bottom: 10px; background: #091226a0; color: var(--gold); font-size: 23px; }
.icon-field input { border: 0; background: transparent; min-width: 0; font-size: 16px; min-height: 39px; color: var(--ink); padding: 8px 0; }
.icon-field input::placeholder { color: var(--ink); opacity: 1; }
.reveal { border: 0; background: transparent; padding: 3px; color: #ffda8e; }
.login-options { font-size: 14px; display: flex; justify-content: space-between; gap: 6px; margin: 12px 0 16px; }
.login-options a, .new-account a, .consent a { text-decoration: underline; color: #ffe381; font-weight: 700; }
.login .gold, .registration .gold { font-size: 17px; min-height: var(--support-control); border-radius: 10px; }
.new-account { text-align: center; margin-top: 16px; }
.new-account a { display: inline-block; margin: 7px 0 0 6px; font-size: 19px; }
.journey { margin: 0 2.9%; padding: 13px 3.2% 19px 1.8%; border-color: #dcaa4d; border-radius: 48px; display: grid; grid-template-columns: 19% 1fr; gap: 18px; align-items: center; background: linear-gradient(140deg,#142139f6,#0b1628ef); }
.journey h2 { font-size: 34px; }
.journey p { font-size: 21px; }
.journey ol { list-style: none; padding: 0; margin: 13px 0 17px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 20px; }
.journey li { position: relative; min-height: 114px; padding: 8px 5px; border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(#233048,#111c30); text-align: center; }
.journey li:not(:last-child)::after { position: absolute; content: '›'; top: 42%; right: -17px; font: bold 24px Arial; color: var(--gold); }
.journey li span { display: block; color: var(--gold); line-height: 1.25; font-size: 36px; }
.journey li small { display: block; margin: 5px auto 0; max-width: 102px; }
.journey-action { margin: 0 auto; display: flex; width: min(100%,390px); min-height: 37px; font-size: 19px; border-radius: 18px; }
.register { --mast-height: 85px; }
main.supporting-scene { min-height: calc(100vh - var(--mast-height)); padding: clamp(18px,2.5vw,32px) 20px 37px; background: radial-gradient(ellipse at 50% 36%,#17233d,#0a1426 72%); }
.registration { width: min(100%,708px); margin: auto; text-align: center; padding: 20px clamp(19px,5vw,68px) 21px; border-color: #edc477; border-radius: 23px; background: linear-gradient(175deg,#192235e8,#0c1728de 67%,#111d32e8); }
.registration h1 { font-size: var(--support-heading); margin: 0 0 8px; color: #fff0d6; }
.registration > p { font-size: var(--support-text); line-height: 1.48; }
.registration .lead { font-size: 19px; margin: 5px 0 8px; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 15px; color: var(--gold); font-size: 26px; margin: 7px 0 10px; }
.ornament::before,.ornament::after { content: ''; width: 34%; height: 2px; background: linear-gradient(90deg,transparent,var(--gold)); }
.ornament::after { transform: scaleX(-1); }
.registration .icon-field { margin-bottom: 10px; border-color: #b99155; }
.registration .icon-field input { min-height: var(--support-control); font-size: var(--support-text); padding-left: 4px; }
.consent { display: flex; align-items: center; gap: 8px; margin: 11px 0; text-align: left; }

.registration .new-account { margin-top: 12px; }
.registration .new-account a { font-size: inherit; }
.companion { max-width: 570px; }
.companion > a { display: inline-block; margin-top: 14px; color: var(--pale); text-decoration: underline; }
.recovery-card { max-width: 468px; padding-inline: clamp(19px,3vw,36px); }
.recovery-card h1 { font-size: clamp(24px,2.7vw,33px); }
.recovery-card form { margin: 14px 0 0; text-align: left; }
.recovery-card form > label { margin-bottom: 5px; font-size: 14px; }

.wizard { --gold: #ffd477; --mast-height: 58px; --banner-height: 141px; background: #071827; }
.wizard .mast { padding: 4px 2.1%; background: #08121e; border-color: #34465b; }
.wizard .brand { font-size: 30px; letter-spacing: .13em; font-weight: 400; gap: 14px; }
.wizard .brand img { width: 59px; height: 49px; }
.wizard .brand small { font-size: 15px; font-style: italic; letter-spacing: 0; text-align: center; color: var(--ink); }
.wizard .mast nav { margin: auto; gap: clamp(8px,1.1vw,19px); }
.wizard .mast nav .active { padding: 8px 15px; border-width: 0 0 2px; border-radius: 0; background: linear-gradient(transparent,#75592955); color: #fff3d5; }
.wizard-banner { min-height: var(--banner-height); padding-block: 6px; text-align: center; display: grid; align-content: center; justify-items: center; border-bottom: 1px solid #38506b; background: linear-gradient(#0a1a3340,#0e2135b0),url('../img/review/beat-7.webp') center 45% / 50% auto no-repeat,#152d48; }
.wizard-banner > span { font-size: 32px; font-weight: bold; color: var(--gold); line-height: 1; }
.wizard-banner h1 { font-size: clamp(29px,2.8vw,48px); font-style: italic; font-weight: 400; text-shadow: 0 2px 5px #050913; }
.wizard-banner p { font: italic 21px/1.28 var(--heading); margin-top: 5px; text-shadow: 0 2px 5px #050913; }
.wizard-grid { display: grid; grid-template-columns: 16.7% minmax(0,1fr) 16.5%; min-height: calc(100vh - var(--mast-height) - var(--banner-height)); }
.narrative-grid { grid-template-columns: 16.7% minmax(0,1fr); }
.wizard-rail, .story-glance { background: linear-gradient(145deg,#0a1520,#0a1626); padding: 15px 13px; }
.wizard-rail { border-right: 1px solid #344451; }
.wizard-rail h3,.story-glance h3 { padding: 3px 12px var(--panel-padding); color: var(--pale); font-size: 17px; }
.wizard-rail nav { border-top: 1px solid var(--line); padding-top: 11px; }
.wizard-rail nav a { display: block; padding: 9px 14px; border-left: 2px solid transparent; border-radius: 5px; }
.wizard-rail nav a.selected { border-color: var(--gold); background: linear-gradient(90deg,#6b532a,#392f22); }
.story-glance { border-left: 1px solid #344451; }
.story-name { font-weight: 700; background: #ffffff11; padding: 9px; display: flex; gap: 6px; align-items: center; justify-content: space-between; border-radius: 6px; }
.story-name span { font-weight: 400; border: 1px solid var(--border); color: var(--gold); border-radius: 20px; padding: 1px 7px; font-size: 13px; }
.story-meta { list-style: none; padding: 8px 10px 13px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.55; }
.glance-progress { display: flex; justify-content: space-between; gap: 6px; margin: 11px 0 8px; }
.story-glance ol { list-style: none; padding: 10px 0 0; }
.story-glance a { display: flex; align-items: center; gap: 10px; padding: 5px 10px; font-size: 15px; }
.story-glance a i { width: 22px; height: 22px; flex: none; font: bold 14px/20px Arial; text-align: center; border-radius: 50%; border: 1px solid #a7b4bf; }
.story-glance a.selected { border-radius: 5px; background: linear-gradient(90deg,#72562475,#29231a24); color: var(--pale); }
.story-glance a.selected i { background: var(--gold); border-color: var(--gold); color: #1b1308; }
.story-glance a.done i { background: #75d870; border-color: #75d870; color: #10241b; }
.wizard-main { min-width: 0; padding: 8px 2.65% 12px; background: linear-gradient(155deg,#0f2130,#081925); }
.stepper { --step-size: 34px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); padding: 2px 4% 12px; border-bottom: 1px solid var(--line); text-align: center; }
.stepper a { display: grid; justify-items: center; position: relative; gap: 3px; color: #e2e8ee; }
.stepper a:not(:first-child)::before { content: ''; width: calc(100% - var(--step-size)); height: 1px; position: absolute; top: calc(var(--step-size) / 2); left: calc(-50% + var(--step-size) / 2); background: #a8b3c1; }
.stepper a span { display: grid; place-items: center; width: var(--step-size); height: var(--step-size); font-size: 17px; border-radius: 50%; border: 2px solid #a8b3c1; background: #0b1b2c; }
.stepper .current { color: var(--gold); }
.stepper .current span { background: #ffc962; color: #16120b; border-color: #ffe1a0; box-shadow: 0 0 9px #eab15370; }
.stepper .complete:not(.current) span { border-color: #d7b45d; color: var(--gold); }
.wizard-content {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  row-gap: 18px;
  padding-block-start: 10px;
}
.step-title { display: flex; align-items: flex-start; gap: 13px; }
.step-title > span { color: var(--gold); font-size: 33px; line-height: 1; }
.step-title h2 { font-size: clamp(24px,1.8vw,32px); color: var(--gold); font-weight: 400; }
.step-title p { margin-top: 4px; }
.stage-columns { display: grid; grid-template-columns: minmax(0,2.05fr) minmax(0,1fr); gap: 24px; align-items: start; }
.fields { display: grid; gap: 6px; }
.fields .pair, .fields .triple { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 25px; }
.fields .triple { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.fields label { font-size: 14px; }
.fields input:not([type=checkbox]), .fields textarea, .fields select { margin-top: 2px; min-height: 34px; background: #162a3b; }
.fields textarea { min-height: 45px; }
.conceptual { gap: var(--section-gap); }
.conceptual input:not([type=checkbox]), .conceptual select { min-height: 37px; }
.conceptual textarea { min-height: 77px; }
.guidance { overflow: hidden; background: linear-gradient(135deg,#132030,#0d1a27); }
.guidance img { width: 100%; aspect-ratio: 2.18; }
.guidance > div { border-top: 1px solid var(--border); padding: var(--panel-padding) 15px 14px; }
.guidance h3, .support h3 { font-size: 18px; margin-bottom: 6px; }
.guidance ul, .narrative-guide ul, .assistant ul { padding-left: 20px; margin-top: 8px; }
.guidance li, .narrative-guide li { margin: 4px 0; }
li::marker { color: #ffc861; }
.tabs { display: flex; gap: 9px; }
.tabs button { flex: 1; border: 1px solid #495d72; border-radius: 7px; background: #172a3b; padding: 6px 5px; }
.tabs button[aria-pressed=true], .admin-rail [aria-pressed=true] { background: linear-gradient(#ffe7a1,#f2b549 72%,#e6a239); color: #180f05; border-color: #ffdd8e; }
.character-columns {
  grid-template-areas: "roles guidance" "editor guidance";
  grid-template-rows: max-content minmax(0, 1fr);
}
.character-columns > .character-roles { grid-area: roles; }
.character-columns > .character-roles + div { grid-area: editor; }
.character-columns > .guidance { grid-area: guidance; }
.character-form { padding: 8px 10px; gap: 4px; }
.character-form h3 { font-size: 17px; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.character-form input:not([type=checkbox]), .character-form select, .character-form textarea { min-height: 28px; padding: 4px 8px; font-size: 13px; }
.character-form textarea { height: 37px; }
[data-stage="3"] .stage-columns,[data-stage="4"] .stage-columns { grid-template-columns: minmax(0,2.55fr) minmax(0,1fr); gap: 16px; }
[data-stage="3"] .guidance img { aspect-ratio: 1.46; }
.support { padding: 5px 10px 8px; margin-top: 6px; }
.support > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.support button { background: #172b3c; border: 1px solid #677788; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 0 5px 0 0; overflow: hidden; }
.support button img { width: 60px; height: 43px; margin-right: auto; }
.support button small, .support button strong { display: block; text-align: left; }
.support button span { margin-right: auto; }
.support button strong { color: var(--gold); }
.story-arc { position: relative; min-height: 126px; padding: 8px 13px; background: linear-gradient(#07172eb0,#0a172c73),url('../img/review/workspace-right.webp') center 48% / cover; overflow: hidden; }
.story-arc h3 { font: bold 17px Arial; }
.story-arc svg { width: 97%; height: 79%; position: absolute; bottom: 4%; left: 1%; }
.story-arc path { fill: none; stroke: #ffe9a0; stroke-width: 2.5; filter: drop-shadow(0 0 3px #ff9e32); }
.story-arc ol { position: absolute; inset: 24px 1% 5px; display: grid; grid-template-columns: repeat(7,1fr); list-style: none; padding: 0; text-align: center; font-size: 12px; }
.story-arc li { align-self: end; display: grid; justify-items: center; gap: 3px; }
.story-arc li:nth-child(2),.story-arc li:nth-child(6) { transform: translateY(-14px); }
.story-arc li:nth-child(3),.story-arc li:nth-child(5) { transform: translateY(-34px); }
.story-arc li:nth-child(4) { transform: translateY(-53px); }
.story-arc i { width: 11px; height: 11px; background: #ffe8a1; border-radius: 50%; }
.plot-heading { font: bold 17px Arial; margin: 8px 0 6px; }
.beats { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.beats article { min-height: 139px; overflow: hidden; }
.beats img { width: 100%; aspect-ratio: 2; }
.beats strong { display: block; color: var(--gold); text-align: center; font-size: 14px; padding: 2px; line-height: 1.05; }
.beats p { font-size: 11px; padding: 5px 7px; }
.plot-fields { margin-top: 7px; }
.narrative-columns { display: grid; grid-template-columns: minmax(0,2.14fr) minmax(0,1fr); gap: 23px; align-items: start; }
.narrative-options { padding: 0 12px; }
.narrative-options label { display: grid; grid-template-columns: 51px minmax(0,1fr) 37%; align-items: center; min-height: 54px; gap: 12px; padding: 6px; border-bottom: 1px solid var(--line); }
.narrative-options label:last-child { border: 0; }
.narr-icon { font-size: 30px; color: var(--gold); }
.narrative-options strong, .style-panel h3,.narrative-guide h3 { font: bold 22px var(--heading); color: var(--gold); }
.narrative-options small { display: block; font-size: 15px; }
.narrative-options select { border-color: var(--border); }
.style-panel, .narrative-guide { padding: 9px 15px 13px; }
.style-panel { margin-top: 10px; }
.style-panel textarea { min-height: 77px; margin-top: 8px; }
.narrative-guide section { padding: 8px 10px; margin-top: var(--panel-padding); }
.wizard-footer { display: flex; flex-wrap: wrap; gap: 8px 13px; align-items: center; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 9px; }
.wizard-actions { display: flex; flex-wrap: wrap; margin-left: auto; gap: 8px; }
.wizard-footer .notice { width: 100%; }
.wizard-footer .notice:empty { display: none; }
.save-state { color: #a9ebae; font-size: 14px; }
.editor-tabs { margin-left: 4.3%; width: 50%; }
.editor-tabs button { border-radius: 9px 9px 0 0; }
.manuscript-area { padding: 8px; display: grid; grid-template-columns: minmax(150px,1fr) minmax(0,1.95fr) minmax(160px,1.2fr); gap: 7px; align-items: start; }
.editor-box { border: 1px solid #67798d; border-radius: 9px; min-width: 0; background: #0b1928; padding: 8px; font-size: 13px; }
.editor-box h4 { margin-bottom: 8px; font-size: 15px; }
.editor-box .outline { min-height: 27px; font-size: 12px; padding: 3px 8px; }
.editor-box details { margin-top: 6px; }
.editor-box summary { cursor: pointer; font-weight: 700; padding: 3px; }
.scene { display: block; text-align: left; margin-left: 13px; width: calc(100% - 13px); border: 1px solid transparent; border-radius: 6px; padding: 4px 5px; background: transparent; font-size: 12px; }
.scene[aria-pressed=true] { border-color: #dca544; background: #695024; }
.editor { padding: 0; }
.editor-title { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 8px 10px; }
.editor-title small { color: var(--gold); }
.editor-title h3 { font: bold 18px Arial; color: var(--ink); margin-top: 3px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 4px 8px; background: #142435; border-block: 1px solid var(--line); }
.toolbar select { width: auto; min-height: 24px; padding: 1px 4px; font-size: 12px; }
.toolbar button { background: transparent; border: 0; padding: 3px 5px; }
.prose { min-height: 218px; padding: 8px; font: 14px/1.48 var(--heading); }
.prose p { margin-bottom: 8px; }
.editor-status { display: flex; justify-content: space-between; padding: 5px 8px; border-top: 1px solid var(--line); }
.assistant section { border: 1px solid #3d5165; border-radius: 6px; margin-top: 6px; padding: 6px; }
.assistant section h4 { color: var(--gold); margin: 0; }
.assistant p { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.assistant-reference { border: 1px solid #3d5165; border-radius: 6px; }
.assistant-reference > summary { padding: 6px; color: var(--gold); }
.assistant-reference-content {
  max-block-size: 6rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  overflow-wrap: anywhere;
  padding: 0 8px 6px;
}
.assistant-reference-content:focus-visible { outline-offset: -2px; }
.assistant dl, .assistant dd { margin: 0; }
.assistant dt { margin-top: 6px; font-weight: 700; }
.assistant dd { overflow-wrap: anywhere; }
.assistant img { width: 32px; height: 32px; border-radius: 50%; }
.auxiliary { padding: 18px; }
.export-columns { display: grid; grid-template-columns: minmax(0,2.55fr) minmax(0,1fr); gap: 17px; align-items: start; }
.export-summary,.export-options { padding: 7px 9px; margin-bottom: 7px; }
.export-summary > h3,.export-options > h3 { font: bold 17px Arial; color: var(--ink); padding: 1px 4px 7px; border-bottom: 1px solid var(--border); }
.summary-cover { display: grid; grid-template-columns: 36% 1fr; gap: 18px; padding: 9px 4px; align-items: center; }
.summary-cover img { border: 1px solid var(--border); border-radius: 11px; }
.summary-cover h3 { font-size: 22px; margin-bottom: 4px; }
.summary-cover p { font-size: 14px; line-height: 1.4; }
.completion { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 6px 0 0; border-top: 1px solid var(--border); }
.completion span { background: #263c2d; font-size: 11px; border: 1px solid #739d53; border-radius: 15px; padding: 4px 6px; }
.export-options h3 small { float: right; font-size: 12px; font-weight: 400; }
.export-options > div { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin-top: 7px; }
.export-options label { position: relative; background: linear-gradient(#20324b,#0a1727); border: 1px solid #456079; border-radius: 11px; padding: 4px 6px 11px; cursor: pointer; }
.export-options label:has(:checked) { border-color: #f0bd63; background: linear-gradient(#3c362d,#101b29); }
.export-options input { position: absolute; right: 5px; top: 5px; }
.export-options label span { display: block; text-align: center; color: var(--gold); font: 30px/1.6 var(--heading); }
.export-options label strong { display: block; font-size: 13px; text-align: center; }
.export-options label small { display: block; line-height: 1.25; margin-top: 5px; }
.production { overflow: hidden; margin-bottom: 9px; }
.production img { width: 100%; aspect-ratio: 2.44; }
.production div { padding: 8px var(--panel-padding); }
.production h3 { font-size: 19px; }
.production p { margin: 8px 0 13px; }
.workspace main { min-height: calc(100vh - var(--mast-height)); padding-bottom: 34px; background: #080f1e; }
.workspace-hero { padding: 21px 18% 26px 23%; min-height: 247px; background: linear-gradient(90deg,#0a172c,#0a172cc4 45%,#0a172c87),url('../img/review/wizard-right.webp') center / cover; }
.workspace-hero h1 { color: #f5ce85; font-size: clamp(30px,2.9vw,46px); font-weight: 400; }
.workspace-hero > div > p { font-size: 20px; margin-top: 8px; }
.workspace-actions { display: grid; grid-template-columns: 1fr .95fr; gap: 36px; margin-top: 21px; }
.workspace-actions a { justify-content: space-between; min-height: 59px; border-radius: 17px; padding: 8px 15px; text-align: left; font-size: 20px; }
.workspace-actions a > span:first-child { font-size: 36px; }
.workspace-actions small { display: block; font-size: 13px; font-weight: 400; }
.library, .workspace-notifications { margin: 0 1.35%; padding: 13px 2% 19px; border-color: #d9a04b; border-radius: 24px; }
.workspace-notifications { margin-block: var(--section-gap); overflow-wrap: anywhere; }
.library-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 0 14px; border-bottom: 1px solid var(--border); }
.library h2, .workspace-notifications h2 { color: var(--pale); font-size: 27px; margin-bottom: 4px; }
.library-head p { font-size: 17px; }
.library-tools { display: grid; gap: 15px; grid-template-columns: minmax(130px,316px) minmax(100px,165px) auto; align-items: center; }
.library-tools input,.library-tools select { background: #101d31; border-color: var(--border); min-height: var(--support-control); }
.story-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding-top: var(--section-gap); gap: 17px; }
.story-card { padding: 7px 9px 14px; min-width: 0; border-color: #786347; border-radius: 16px; background: linear-gradient(#0c182a,#101e32); }
.story-card.featured { border-color: #ffd071; box-shadow: 0 0 12px #c782384d; }
.story-card-body { display: grid; grid-template-columns: 41% minmax(0,1fr); align-items: center; gap: 14px; min-height: 173px; }
.story-card img { width: 100%; height: 173px; border-radius: 10px; }
.story-card h3 { font-size: clamp(17px,1.34vw,24px); }
.story-card p { font-size: 14px; margin: 7px 0; }
.story-card .updated { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; color: #e3d7c8; }
.card-progress { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.story-card .wide { width: 85%; margin: var(--panel-padding) auto 0; display: flex; border-radius: 25px; min-height: var(--support-control); }
.library-actions { display: flex; flex-wrap: wrap; justify-content: center; margin: 24px 0 2px; }
.library-actions > * { padding: 6px 23px; border: 0; background: transparent; border-right: 1px solid var(--line); }
.library-actions > :last-child { border-right: 0; }
.no-stories { margin: 16px 0; }
.account { --mast-height: 82px; }
.account .mast { background: linear-gradient(90deg,#061226 43%,#0b193344 76%,#061226),url('../img/review/workspace-right.webp') 70% 40% / 46% auto no-repeat,#081327; }
.account .mast-title nav { gap: 12px; margin-top: 7px; font-size: 17px; }
.settings-shell { min-height: calc(100vh - var(--mast-height)); padding: 14px 3.4% 24px; background: linear-gradient(#111a33,#10172b); }
.settings-heading { margin: 0 0 19px 2%; }
.settings-heading h1 { font-size: clamp(24px,2.7vw,30px); }
.settings-heading p { font-size: 18px; margin: 8px 0 0 5%; }
.settings-grid { display: grid; grid-template-columns: 17% minmax(0,1fr); align-items: start; gap: 27px; }
.settings-nav { padding: 13px 10px; }
.settings-nav a { display: block; padding: 9px 14px; border-radius: 9px; margin-bottom: 4px; }
.settings-form { display: grid; gap: 8px; }
.settings-row { display: grid; grid-template-columns: 34% minmax(0,1fr); gap: 18px; align-items: center; min-height: 74px; padding: var(--panel-padding) 2.5%; border-radius: 17px; border-color: #dca655; }
.settings-row h2 { font-size: clamp(19px,1.6vw,28px); }
.settings-row p { font-size: 14px; padding-left: 3%; margin-top: 6px; }
.profile-fields { display: grid; grid-template-columns: 92px minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 13px; }
.profile-fields img { border: 1px solid var(--border); border-radius: 21px; width: 92px; height: 84px; }
.settings-row label { font-size: 14px; }
.settings-row input:not([type=checkbox]), .settings-row select { background: #0a1427; margin-top: 4px; border-color: #5d5760; }
.credential-fields { display: grid; grid-template-columns: minmax(0,1fr) 155px; gap: 5px 14px; align-items: center; }
.credential-fields label { display: grid; grid-template-columns: 115px minmax(0,1fr); align-items: center; position: relative; }
.credential-fields span { position: absolute; right: 9px; color: #77ea8a; padding: 5px 2px; background: #0a1427; }
.credential-fields input { padding-right: 68px; }
.credential-fields .outline { min-height: 32px; font-size: 13px; padding: 3px; }
.security-toggle { display: flex; align-items: center; justify-content: space-between; }
.security-toggle small { display: block; color: var(--muted); margin-top: 4px; }
input.switch { appearance: none; width: 55px; height: 30px; border-radius: 25px; background: #394558; cursor: pointer; }
input.switch::before { content: ''; display: block; margin: 4px; width: 22px; height: 22px; border-radius: 50%; background: #ddd; }
input.switch:checked { background: #a47833; }
input.switch:checked::before { margin-left: auto; }
.settings-row progress { height: 17px; }
.settings-actions { display: flex; justify-content: center; gap: 38px; margin: 10px 0; }
.settings-actions > * { min-width: 112px; min-height: var(--support-control); font: bold 17px var(--heading); }
.settings-actions .gold { min-width: 210px; }
.admin-shell { min-height: calc(100vh - var(--mast-height)); display: grid; grid-template-columns: 17.1% 1fr; background: #0b1729; }
.admin-rail { padding: 20px 15px; border-right: 1px solid #495267; background: linear-gradient(180deg,#0b1729 64%,#0d223585),url('../img/review/beat-6.webp') left bottom / auto 38% no-repeat; }
.admin-rail h2 { font: bold 21px Arial; padding-bottom: var(--panel-padding); border-bottom: 1px solid var(--border); }
.admin-rail nav { margin: 10px 0 18px; }
.admin-rail button { display: block; width: 100%; min-height: 39px; border: 1px solid transparent; border-radius: 11px; padding: 8px; background: transparent; text-align: left; font-size: 17px; }
.admin-rail h3 { font: bold 19px Arial; border-top: 1px solid var(--border); color: var(--pale); padding-top: 17px; }
.admin-rail ul { list-style: none; padding: 0; }
.admin-rail p,.admin-rail li { margin: 9px 8px; }
.healthy { color: #67e78a; }
.admin-content { min-width: 0; }
.admin-tabs { padding: 15px 2% 0; border-bottom: 1px solid var(--border); justify-content: start; }
.admin-tabs button { flex: 0 1 25%; min-height: var(--support-control); border-radius: 12px 12px 0 0; font-size: 17px; border-color: #776044; }
.admin-panel { padding: 13px 1.3% 17px 2.1%; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 17px; }
.admin-heading h1, .admin-panel > h1 { font-size: 26px; }
.admin-heading select { width: auto; border-color: var(--border); }
.metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.metrics article { display: flex; align-items: center; gap: 19px; padding: 10px 15px; min-height: 101px; }
.metrics article > span { color: var(--gold); font-size: 37px; }
.metrics strong { display: block; font-size: 33px; color: var(--pale); }
.metrics small span { color: var(--ink); }
.metrics progress { margin-top: 4px; }
.admin-middle, .admin-bottom { display: grid; gap: 16px; margin-top: var(--section-gap); }
.admin-middle { grid-template-columns: .83fr 1.06fr 1.02fr; }
.admin-bottom { grid-template-columns: 1.85fr 1fr; }
.admin-middle > *, .admin-bottom > * { padding: 8px 13px 10px; min-width: 0; }
.admin-panel h2 { color: var(--pale); font-size: 23px; }
.health ul { padding: 8px 0 0; list-style: none; }
.health li { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 5px 0; }
.health li span { border-radius: 15px; background: #237c37; padding: 3px 9px; font-size: 13px; }
.chart svg { display: block; width: 100%; min-height: 150px; }
.chart-grid { fill: none; stroke: #a0b2cf44; }
.chart-trend { fill: none; stroke: #ffc85b; stroke-width: 2.8; }
.chart-bar { fill: #eeba57; }
.chart text { fill: #f0e9da; font: 9px Arial; text-anchor: middle; }
.chart small { display: block; text-align: center; }
.admin-panel table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-panel th,.admin-panel td { padding: 6px 5px; border-bottom: 1px solid var(--line); text-align: left; }
.quick > div { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 12px 0; }
.quick button { min-height: var(--support-control); font-size: 13px; }
.admin-panel.auxiliary .panel { padding: var(--panel-padding); margin-top: var(--panel-padding); }
.admin-panel.auxiliary form { max-width: 540px; }
@media (max-width: 1350px) {
  .mast { gap: 18px; }
  .brand { font-size: 35px; }
  .brand img { width: 72px; }
  .mast-title { padding-left: 19px; }
  .home-hero { padding-left: 22%; padding-right: 6%; gap: 6%; }
  .metrics article { gap: 7px; padding: 9px; }
  .settings-row { grid-template-columns: 30% minmax(0,1fr); }
}
@media (max-width: 1050px) {
  .mast { flex-wrap: wrap; padding-block: 10px; }
  .mast nav { gap: 10px; }
  .home-hero { padding-left: 17%; padding-right: 4%; }
  .journey { grid-template-columns: 15% 1fr; border-radius: 26px; }
  .journey ol { gap: 10px; }
  .journey li::after { display: none; }
  .wizard-grid { grid-template-columns: 170px minmax(0,1fr); }
  .story-glance { grid-column: 2; }
  .workspace-hero { padding-left: 16%; }
  .story-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-row { grid-template-columns: 1fr; gap: 8px; }
  .admin-shell { grid-template-columns: 175px minmax(0,1fr); }
  .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-middle { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .mast, .wizard .mast { padding: 8px 12px; gap: 8px; }
  .mast nav, .wizard .mast nav { width: 100%; margin: 0; overflow-x: auto; gap: 8px; }
  .mast nav a { font-size: 13px; }
  .mast-title { border: 0; padding: 4px; font-size: 19px; }
  .brand, .wizard .brand { font-size: 26px; gap: 6px; }
  .brand img, .wizard .brand img { width: 46px; height: 41px; }
  .brand small, .wizard .brand small { font-size: 11px; }
  .user-link { margin-left: 0; font-size: 14px; }
  .desktop { display: none; }
  .home-hero { grid-template-columns: 1fr; gap: 18px; padding: 20px 5% 24px; }
  .welcome { padding: 22px 0 0 10%; text-align: center; text-shadow: 0 2px 3px #02050a; }
  .welcome h1 { font-size: clamp(51px,11vw,83px); margin: 12px 0; }
  .welcome > p:last-child { margin: auto; }
  .login { padding: 18px 16px; }
  .journey { grid-template-columns: 1fr; padding: 16px; }
  .journey-art { width: 180px; margin: auto; }
  .journey ol { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .journey h2 { font-size: 29px; }
  .journey p { font-size: 16px; }
  .journey li { min-height: 90px; }
  .register main { padding: 20px 12px; }
  .registration { padding: 20px 15px 26px; }
  .registration h1 { margin-inline: 0; }
  .registration > p { font-size: 15px; }
  .registration .lead { font-size: 17px; }
  .wizard-grid,.narrative-grid { display: block; }
  .wizard { --banner-height: 106px; }
  .wizard-banner p { font-size: 15px; }
  .wizard-rail { padding: 6px 8px; }
  .wizard-rail h3,.wizard-rail hr { display: none; }
  .wizard-rail nav { display: flex; overflow-x: auto; padding: 0; border: 0; }
  .wizard-rail nav a { flex: none; padding: 7px; font-size: 13px; }
  .wizard-main { padding: 8px 10px 18px; }
  .stepper { overflow-x: auto; grid-template-columns: repeat(7,minmax(79px,1fr)); padding: 4px 0 9px; font-size: 12px; }
  .stepper a span { font-size: 15px; }
  .stage-columns, [data-stage="3"] .stage-columns, [data-stage="4"] .stage-columns,.narrative-columns,.export-columns { grid-template-columns: 1fr; gap: 12px; }
  .character-columns { grid-template-areas: "roles" "editor" "guidance"; }
  .guidance { display: grid; grid-template-columns: 35% 1fr; }
  .guidance img { height: 100%; }
  .support > div, .export-options > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .beats { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .narrative-options label { grid-template-columns: 30px 1fr; gap: 5px; }
  .narrative-options select { grid-column: 2; }
  .manuscript-area { grid-template-columns: 1fr; }
  .editor-tabs { width: 100%; margin: 0; }
  .wizard-actions { margin-left: 0; }
  .workspace-hero { padding: 18px 4%; min-height: auto; }
  .workspace-actions { gap: 10px; }
  .workspace-actions a { padding: 8px; font-size: 16px; }
  .workspace-actions a > span:first-child { display: none; }
  .workspace-actions small { font-size: 11px; }
  .library-head { display: block; }
  .library-tools { margin-top: 10px; gap: 5px; grid-template-columns: minmax(0,1fr) auto; }
  .story-card-body { grid-template-columns: 1fr; min-height: 0; }
  .story-card img { height: 114px; }
  .library-actions > * { padding-inline: 9px; }
  .settings-grid, .admin-shell { display: block; }
  .settings-nav, .admin-rail { display: none; }
  .settings-shell { padding: 12px 9px; }

  .profile-fields { grid-template-columns: 60px minmax(0,1fr); }
  .profile-fields img { width: 60px; height: 65px; grid-row: span 2; }
  .credential-fields { grid-template-columns: minmax(0,1fr) auto; }
  .credential-fields label { display: block; }
  .credential-fields span { bottom: 7px; }
  .settings-actions { gap: 10px; }
  .settings-actions > *, .settings-actions .gold { min-width: 0; }
  .admin-tabs { padding-top: 8px; gap: 4px; }
  .admin-tabs button { flex: 1; font-size: 14px; min-height: 39px; }
  .admin-heading h1 { font-size: 25px; }
  .admin-heading { align-items: flex-start; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .admin-middle,.admin-bottom { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
.glyph { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; width: 1em; height: 1em; display: inline-block; flex: none; color: inherit; vertical-align: -.12em; }
.reveal .glyph { width: 19px; height: 19px; }
.wizard-banner > span { font-size: 34px; }
.journey li .glyph { width: 35px; height: 35px; }
.step-title .glyph { font-size: 32px; }
.admin-rail { background: linear-gradient(180deg,#0b1729 65%,transparent),url('../img/review/admin-edge.webp') left bottom / 100% auto no-repeat,#0b1729; }

@media (min-width: 1051px) {
  [data-stage="1"] .stage-columns { column-gap: 4.2%; }
  .admin-middle > .panel { min-height: 209px; }
  .admin-bottom > .panel { min-height: 181px; }
}
.tag-field { font-size: 14px; min-width: 0; }
.tag-input { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 4px 7px; border: 1px solid #687685; background: #162a3b; border-radius: 8px; min-height: 34px; margin-top: 2px; }
.tag-input .tag { max-width: 100%; border: 1px solid #6a7c8d; background: #2b4257; border-radius: 16px; padding: 1px 6px; font-size: 12px; }
.tag-input input:not([type=checkbox]) { width: 1.5em; flex: 1 0 1em; font-size: 13px; min-height: 20px; padding: 0 2px; margin: 0; border: 0; }
.conceptual .tag-input { min-height: 37px; }

/* Feather only the exposed artwork edges so the original subjects remain intact. */
.home main, .supporting-scene, .wizard-banner, .workspace-hero, .settings-shell {
  position: relative;
  isolation: isolate;
}
.home main::before, .home main::after,
.supporting-scene::before, .supporting-scene::after,
.wizard-banner::before, .wizard-banner::after,
.workspace-hero::before, .workspace-hero::after,
.settings-shell::before, .settings-shell::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block-start: 0;
  pointer-events: none;
  background: var(--edge-art) var(--edge-position, center top) / cover no-repeat;
}
.home main::before, .supporting-scene::before, .wizard-banner::before,
.workspace-hero::before, .settings-shell::before {
  inset-inline-start: 0;
  mask-image: linear-gradient(90deg,#000 75%,transparent), linear-gradient(#000 84%,transparent);
  mask-composite: intersect;
}
.home main::after, .supporting-scene::after, .wizard-banner::after,
.workspace-hero::after, .settings-shell::after {
  inset-inline-end: 0;
  mask-image: linear-gradient(270deg,#000 66%,transparent), linear-gradient(#000 81%,transparent);
  mask-composite: intersect;
}
.home main::before { --edge-art: url('../img/review/home-left.webp'); width: 26%; height: min(49vw,520px); }
.home main::after { --edge-art: url('../img/review/home-right.webp'); width: 14%; height: min(48vw,520px); }
.supporting-scene::before, .supporting-scene::after { width: min(33%,495px); height: 100%; max-height: 930px; }
.supporting-scene::before { --edge-art: url('../img/review/registration-left.webp'); --edge-position: left top; }
.supporting-scene::after { --edge-art: url('../img/review/registration-right.webp'); --edge-position: right top; }
.wizard-banner::before, .wizard-banner::after { width: 41%; height: 100%; }
.wizard-banner::before {
  --edge-art: url('../img/review/wizard-left.webp');
  --edge-position: left center;
  mask-image: linear-gradient(90deg,#000 70%,transparent);
}
.wizard-banner::after {
  --edge-art: url('../img/review/wizard-right.webp');
  --edge-position: right center;
  mask-image: linear-gradient(270deg,#000 70%,transparent);
}
.workspace-hero::before {
  --edge-art: url('../img/review/workspace-left.webp');
  --edge-position: left top;
  width: 26%; height: 100%;
}
.workspace-hero::after {
  --edge-art: url('../img/review/workspace-right.webp');
  --edge-position: right top;
  width: 26%; height: 100%;
}
.settings-shell::before {
  --edge-art: url('../img/review/settings-edge.webp');
  inset-block: auto 0;
  width: 11%; height: 78%;
  mask-image: linear-gradient(90deg,#000 60%,transparent), linear-gradient(transparent,#000 29%);
}
.settings-shell::after {
  --edge-art: url('../img/review/workspace-right.webp');
  --edge-position: right top;
  width: 49%; height: 51%;
  opacity: .65;
}
.journey-art {
  mask-image: radial-gradient(ellipse 72% 69% at 50% 50%,#000 55%,transparent 100%);
}

/* Use a single focus border for fields and a visible text treatment for links. */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: .25em;
  text-decoration-thickness: 2px;
}
button:focus-visible, :is(.gold,.outline,.subtle,.danger):focus-visible { border-color: var(--focus-gold); }
:is(input:not([type=checkbox]), textarea, select):focus,
.icon-field:focus-within, .tag-input:focus-within,
.editor:has(.prose:focus-visible) {
  border-color: var(--focus-gold);
  outline: none;
  box-shadow: none;
}
.icon-field input:focus, .tag-input input:focus, .prose:focus { outline: none; }
.reveal:focus-visible { background: #674c27; border-radius: 4px; }
.toolbar button:focus-visible, .tag:focus-visible { background: #674c27; }
input[type=checkbox]:focus-visible { outline: none; }
label:has(input[type=checkbox]:focus-visible) {
  color: var(--focus-gold);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.export-options label:focus-within { border-color: var(--focus-gold); }
input.switch { border: 1px solid transparent; }
input.switch:focus-visible { border-color: var(--focus-gold); }
@media (forced-colors: active) {
  :is(input:not([type=checkbox]), textarea, select):focus,
  .icon-field:focus-within, .tag-input:focus-within,
  .editor:has(.prose:focus-visible), .export-options label:focus-within,
  input.switch:focus-visible { border-color: Highlight; }
  label:has(input[type=checkbox]:focus-visible) { color: Highlight; }
}

/* Policy copy shares the portal masthead, palette, glass and control styles. */
.privacy main {
  min-height: calc(100vh - var(--mast-height));
  background: linear-gradient(180deg,#0a1426b8,#0a1426 830px),url('../img/hero-scenery.webp') center 15% / auto 940px no-repeat,#0a1426;
}
.policy-wrap { width: min(100%,1220px); margin: auto; padding: clamp(20px,3.2vw,42px) clamp(16px,4vw,42px) 39px; }
.policy-header { padding-bottom: var(--section-gap); border-bottom: 1px solid var(--border); }
.policy-header .eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .18em; }
.policy-header h1 { margin: 6px 0 10px; font-size: var(--support-heading); }
.policy-header h1 span, .policy-aside h2 span { color: var(--gold); }
.policy-header .policy-date { margin-top: 8px; color: var(--muted); font-size: 13px; }
.policy-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(240px,1fr); gap: 18px; align-items: start; margin-top: var(--section-gap); }
.policy-main, .policy-aside { padding: 0 19px; }
.policy-item { display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 12px; padding: var(--panel-padding) 0; }
.policy-item + .policy-item { border-top: 1px solid var(--line); }
.policy-icon { color: var(--gold); border: 1px solid var(--border); border-radius: 6px; text-align: center; font: 15px/29px var(--heading); align-self: start; }
.policy-item h2, .policy-aside h2 { color: var(--pale); font-size: 19px; margin-bottom: 6px; }
.policy-item p, .policy-aside p { line-height: 1.55; }
.policy-item p + p { margin-top: 8px; }
.policy-item a { color: var(--pale); text-decoration: underline; overflow-wrap: anywhere; }
.policy-item a:focus-visible { color: var(--focus-gold); }
.policy-aside { padding-block: var(--section-gap); }
.policy-aside svg { width: 23px; height: 23px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.6; }
.aside-top-icon { margin-bottom: 5px; }
.provider-card, .aside-note { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.provider-card { padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #07122572; }
.provider-mark { color: var(--gold); font-weight: 700; min-width: 18px; text-align: center; }
.provider-card small { display: block; color: var(--muted); margin-top: 2px; }
.aside-note { align-items: start; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.aside-button { margin-top: 14px; min-height: var(--support-control); }
@media (max-width: 760px) {
  .policy-grid { grid-template-columns: 1fr; }
  .supporting-scene::before, .supporting-scene::after { opacity: .68; width: 46%; }
  .home main::before, .home main::after { width: 37%; }
  .wizard-banner::before, .wizard-banner::after { width: 47%; }
  .workspace-hero::before, .workspace-hero::after { width: 37%; opacity: .65; }
}

:is(.wizard-content, .chapter-scenes):focus-visible {
  outline: 1px solid var(--focus-gold);
  outline-offset: -1px;
}

/* On a full desktop, keep the stage navigation and actions outside the scrolling content. */
@media (min-width: 1351px) and (min-height: 760px) {
  .wizard {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }
  .wizard > .mast, .wizard-banner { flex: none; }
  .wizard > main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }
  .wizard-grid {
    flex: 1;
    min-height: 0;
    grid-template-rows: minmax(0,1fr);
  }
  .wizard-main {
    display: grid;
    min-block-size: 0;
    grid-template-rows: max-content minmax(0,1fr) max-content;
  }
  .wizard-content, .wizard-rail, .story-glance { overflow: auto; }
  .wizard-content {
    min-block-size: 0;
    padding-inline: 3px;
    padding-block-end: 3px;
    scroll-padding-block: 8px;
  }
  .chapter-scenes { scroll-padding-block: 4px; }
  .chapter-scenes, .prose {
    max-height: clamp(18rem,35dvh,28rem);
    overflow: auto;
    overflow-wrap: anywhere;
  }
}

.portal-legal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  block-size: 100vh;
  block-size: 100dvh;
}
.portal-legal > main { min-block-size: 0; display: flex; padding-block-end: 0; }
.legal-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--section-gap);
  margin-block: 0;
  padding-block: clamp(12px, 2.5vh, 28px);
}
.legal-notice, .legal-return { inline-size: min(100%, 72ch); margin-inline: auto; }
.legal-notice {
  overflow-y: auto;
  overflow-wrap: anywhere;
  scrollbar-color: #cc9c53 #0b1928;
  scrollbar-gutter: stable;
  padding: clamp(1rem, 3vw, 2.5rem);
  line-height: 1.65;
}
.legal-notice:focus-visible { outline: 2px solid var(--focus-gold); outline-offset: 2px; }
.legal-notice h2 { margin-top: 1.6rem; }
.legal-notice > :first-child { margin-top: 0; }
.legal-notice ul { padding-inline-start: 1.5rem; }
.legal-return a { min-block-size: 44px; }

@media (max-height: 600px) {
  .portal-legal { block-size: auto; min-block-size: 100dvh; }
  .legal-layout { grid-template-rows: auto auto auto; }
  .legal-notice { max-block-size: clamp(10rem, 50dvh, 25rem); }
}
@media (forced-colors: active) {
  .legal-notice { scrollbar-color: auto; }
}
.recovery-card label { display: grid; gap: .3rem; text-align: left; }
.recovery-codes { list-style: none; padding: 0; }
.mfa-enrollment { display: grid; gap: 8px; margin-block-start: 8px; }
.mfa-enrollment p { font-size: 14px; line-height: 1.45; }
.mfa-qr {
  width: min(100%, 224px);
  aspect-ratio: 1;
  margin: 2px auto;
  background: #fff;
  border-radius: 4px;
  image-rendering: pixelated;
}
.mfa-key-controls { display: grid; gap: 8px; justify-items: center; }
.mfa-key-controls input {
  font: 600 clamp(11px, 3.5vw, 15px)/1.4 'DejaVu Sans Mono', ui-monospace, monospace;
  font-variant-ligatures: none;
  padding-inline: 4px;
  text-align: center;
}
.mfa-key-controls button, .mfa-cancel button { min-height: 44px; }
.recovery-card .mfa-cancel { margin-block-start: 8px; }
.sign-out { margin: 0; }
.account-notice { margin: .75rem 0; }

.policy-header a { color: var(--pale); text-decoration: underline; }

@media (max-width: 760px) {
  .home.accounts-enabled .home-hero { grid-template-columns: minmax(0,1fr); }
  .home.accounts-enabled .welcome .motto { white-space: normal; }
  .home.accounts-enabled .login-options { flex-wrap: wrap; }
}

/* Live workspace controls share the approved workspace and manuscript layouts. */
.workspace-actions form > button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 59px; border-radius: 17px; padding: 8px 15px; text-align: left; font-size: 20px; }
.workspace-actions form > button > span:first-child { font-size: 36px; }
[data-project-library] .story-card h3, [data-project-wizard] .story-name b, [data-project-wizard] .assistant { overflow-wrap: anywhere; }
[data-project-wizard] .story-name b { min-width: 0; }
[data-project-wizard] .story-name span { flex: none; white-space: nowrap; }
[data-project-library] .project-select { display: flex; align-items: center; gap: 6px; }
[data-project-library] .project-select input { width: auto; min-height: auto; }
[data-manuscript] .chapter-select { margin-top: 6px; font-weight: 700; }
[data-manuscript] .scene { overflow-wrap: anywhere; }
[data-manuscript] .toolbar:not([hidden]) { flex-wrap: wrap; align-items: end; }
[data-manuscript] .toolbar label { flex: 1 1 125px; min-width: 0; }
[data-manuscript] .toolbar input { width: 100%; }
[data-manuscript] .manuscript-prose { width: 100%; resize: vertical; }
[data-project-wizard] .save-state { overflow-wrap: anywhere; }
[data-project-wizard] .save-state[data-save-state="pending"] { color: var(--gold); }
[data-project-wizard] .save-state[data-save-state="error"] { color: #ffb3ad; }
@media (max-width: 650px) {
  .workspace-actions form > button { padding: 8px; font-size: 16px; }
  .workspace-actions form > button > span:first-child { display: none; }
}

/* Private story completion and document delivery */
.completion .incomplete { background: #142435; border-color: var(--line); }
.final-copy-status a { text-decoration: underline; }
.export-preview details { padding: 12px; margin-top: 10px; overflow-wrap: anywhere; }
.export-preview details > :not(summary) { margin: 10px 0; }
.export-preview pre, .export-preview details p { white-space: pre-wrap; overflow-wrap: anywhere; }
.export-preview pre { font: inherit; }
.scene-notes { display: block; padding: 6px 8px; }
.scene-notes textarea { display: block; width: 100%; margin-top: 4px; resize: vertical; }
[data-manuscript-order] button:disabled { opacity: .55; }
[data-manuscript] .assistant p { overflow-wrap: anywhere; }

.live-admin .admin-bottom { grid-template-columns: minmax(0, 1fr); }
.live-admin .admin-tabs { flex-wrap: wrap; }
.live-admin .admin-tabs button { flex: 1 1 auto; }
.security-event-scroll { max-height: 19rem; overflow: auto; overscroll-behavior: contain; }
.security-event-scroll th { position: sticky; top: 0; background: #101c2e; white-space: nowrap; }
.live-admin dl { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1rem; max-width: 36rem; }
.live-admin dd { text-align: end; margin: 0; }
.tutorial-library { display: grid; gap: 1rem; margin: 1.25rem 0; text-align: start; }
.tutorial-library .panel { padding: 0.75rem 1rem; }
.tutorial-library h2 { margin: 0 0 0.5rem; }
.tutorial-admin[open] summary { margin-bottom: 0.75rem; }
.tutorial-admin summary { color: var(--pale); cursor: pointer; }
.step-title.with-tutorial {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px clamp(7px, 1vw, 13px);
}
.step-title.with-tutorial > span { grid-row: 1 / span 2; align-self: start; }
.step-title.with-tutorial > p { grid-column: 2 / -1; margin: 0; }
.tutorial-trigger { justify-self: end; font-size: .875rem; min-height: 1.5rem; padding: 2px 8px; }
.manuscript-title-actions { display: flex; flex-direction: column; align-items: end; gap: 4px; }
.manuscript-title-actions .tutorial-unavailable { padding-inline-end: 0; }
.ai-generation-launcher {
  width: fit-content;
  height: 24px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}
.hero-with-tutorial { position: relative; padding-block-start: 44px; }
.hero-tutorial { position: absolute; inset-block-start: 8px; inset-inline-end: 3.1%; }
@media (max-width: 760px) {
  .hero-tutorial { inset-inline-end: 12px; }
}
.tutorial-unavailable { color: var(--pale); text-align: end; line-height: 1.08; }
.tutorial-unavailable small { color: var(--muted); font-size: .75rem; }
.tutorial-unavailable small::before { content: " · "; }
@media (max-width: 520px) {
  .tutorial-unavailable small { display: block; }
  .tutorial-unavailable small::before { content: none; }
}
.tutorial-dialog {
  color: var(--ink);
  inline-size: min(46rem, calc(100% - 1.5rem));
  max-block-size: calc(100dvh - 1.5rem);
  padding: clamp(.75rem, 2.5vw, 1.25rem);
  overflow: auto;
}
.tutorial-dialog::backdrop { background: #020714b8; }
.tutorial-dialog header { display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.tutorial-dialog h3 { overflow-wrap: anywhere; }
.tutorial-dialog p { margin-block: .75rem; }
.wizard-choice-dialog { inline-size: min(26rem, calc(100% - 1.5rem)); }
.wizard-choice-dialog label { display: block; margin-block: .75rem .25rem; }
.wizard-choice-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tutorial-player a { text-decoration: underline; }
.tutorial-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.tutorial-player iframe { display: block; width: 100%; min-height: 200px; aspect-ratio: 16 / 9; border: 0; }
.tutorial-status { color: var(--pale); margin: 0; }
.recovery-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
.recovery-copy-fallback { width: 100%; min-height: 9em; margin: 0.5rem 0; }

/* Keep workspace columns fluid as the sidebars give way on narrower screens. */
.wizard.accounts-enabled .wizard-content { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 880px) {
  .wizard.accounts-enabled :is(.stage-columns, .narrative-columns, .export-columns) {
    grid-template-columns: minmax(0, 1fr);
  }
  .wizard.accounts-enabled .character-columns { grid-template-areas: "roles" "editor" "guidance"; }
  .wizard.accounts-enabled .beats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wizard.accounts-enabled .story-glance ol {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  }
}

@media (max-width: 760px) {
  .mast nav, .wizard .mast nav { flex-wrap: wrap; overflow: visible; }
  .mast-title { min-inline-size: 0; max-inline-size: 100%; }
  .account .mast-title .motto { white-space: normal; letter-spacing: .25em; }
  .account .mast-title nav { gap: 4px 8px; }
  .wizard.accounts-enabled .character-roles .tabs { flex-wrap: wrap; }
  .wizard.accounts-enabled .character-roles .tabs button { flex: 1 1 6rem; }
  .wizard.accounts-enabled .support button { min-inline-size: 0; overflow-wrap: anywhere; }
  .wizard.accounts-enabled .support button img { max-inline-size: 42%; }
}

@media (max-width: 520px) {
  .wizard.accounts-enabled .fields :is(.pair, .triple) { grid-template-columns: minmax(0, 1fr); }
  .wizard.accounts-enabled .beats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace.accounts-enabled .library-tools { grid-template-columns: minmax(0, 1fr); }
  .workspace.accounts-enabled .story-cards { grid-template-columns: minmax(0, 1fr); }
  .account.accounts-enabled .credential-fields { grid-template-columns: minmax(0, 1fr); }
}

.catalog-shell { width: min(1180px, 94%); margin-inline: auto; padding: clamp(24px, 5vw, 64px) 0 24px; }
.catalog-shell > h1 { margin-block-end: 1.25rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 16px; }
.catalog-productions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.catalog-card { min-width: 0; max-width: 42rem; }
.catalog-card-body { display: grid; align-content: start; gap: .65rem; padding: clamp(12px, 2vw, 22px); overflow-wrap: anywhere; }
.catalog-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 11px 11px 0 0; }
.catalog-card video { display: block; width: 100%; aspect-ratio: 16/9; background: var(--night); }
.catalog-category, .catalog-card time { color: var(--pale); }
.catalog-category svg, .catalog-empty svg { width: 1.25em; height: 1.25em; vertical-align: middle; }
.catalog-description { white-space: pre-wrap; }
.catalog-resources {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.875rem), 13.75rem));
  gap: 12px;
}
.catalog-resources .catalog-card {
  position: relative;
  display: flex;
  min-height: 11rem;
}
.catalog-resources .catalog-card-body {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  width: 100%;
  padding: .625rem;
}
.catalog-resources .catalog-category {
  min-height: 1.5rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--gold);
  font-size: .8125rem;
  line-height: 1.5rem;
}
.catalog-resources .catalog-cover {
  position: absolute;
  inset-block-start: .625rem;
  inset-inline-end: .625rem;
  width: 2.625rem;
  height: 1.5rem;
  border-radius: 4px;
}
.catalog-resources .catalog-cover + .catalog-card-body .catalog-category {
  padding-inline-end: 3rem;
}
.catalog-resources .catalog-card-body > :is(h2, h3, .catalog-description) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-resources .catalog-card-body > :is(h2, h3) {
  color: var(--ink);
  font: 700 1rem/1.125 var(--heading);
  -webkit-line-clamp: 2;
}
.catalog-resources .catalog-description {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.2;
  -webkit-line-clamp: 3;
}
.catalog-resources .catalog-card-action {
  margin-block-start: auto;
  align-self: start;
}
.catalog-resources .catalog-card-action > .outline {
  min-height: 2rem;
  padding: 3px 10px;
  font-size: .875rem;
}
.catalog-tutorials { margin-block-start: 1.5rem; }
.catalog-tutorials > h2 { margin-block-end: .75rem; }
.catalog-empty { display: grid; justify-items: center; gap: .75rem; padding: clamp(24px, 7vw, 88px) 16px; text-align: center; }
.catalog-empty svg { color: var(--gold); font-size: 2.25rem; }
.catalog-footer { margin-block-start: 1.25rem; }
.catalog-footer a, .catalog-editor > a { text-decoration: underline; }
.catalog-editor { width: min(44rem, 94%); margin: 1.5rem auto; padding: clamp(12px, 3vw, 26px); }
.catalog-editor h1, .catalog-editor [role="alert"] { margin-block: .75rem; }
.catalog-editor [role="alert"] { color: #ffa89c; }
.catalog-editor :is(input, select, textarea) { max-width: 100%; }
.catalog-actions, .catalog-admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.catalog-admin-row { justify-content: space-between; padding: .75rem; overflow-wrap: anywhere; }
.catalog-actions .danger { margin-inline-start: 0; }

.publication-prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

/* Story publications use a fixed gallery track, including in single-card previews. */
.productions main.supporting-scene { padding-block-start: 14px; }
.productions-gallery { padding-block-start: 0; }
.productions-heading { text-align: center; margin-block-end: 22px; color: #fff0ce; }
.productions-heading h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
.productions-heading p { font: italic clamp(1.05rem, 2vw, 1.4rem)/1.3 var(--heading); }
.productions-ornament {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 34rem);
  margin: 2px auto;
  color: #efc475;
  font: 1.9rem/.55 var(--heading);
}
.productions-ornament::before, .productions-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #e2b66a);
}
.productions-ornament::after { transform: scaleX(-1); }

.story-gallery {
  --story-scale: .8;
  --story-width: calc(23.5rem * var(--story-scale));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, var(--story-width)));
  justify-content: center;
  gap: 14px;
}
.story-gallery:has(> :only-child) { grid-template-columns: minmax(0, var(--story-width)); }
.story-gallery + .catalog-grid { margin-block-start: 24px; }
.publication-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: calc(10px * var(--story-scale));
  padding: calc(15px * var(--story-scale)) calc(16px * var(--story-scale)) calc(20px * var(--story-scale));
  border: calc(1px * var(--story-scale)) solid #deaf64;
  border-radius: calc(19px * var(--story-scale));
  background: #0b1526f5;
  color: #f9efd9;
  overflow-wrap: anywhere;
  font-size: calc(1rem * var(--story-scale));
}
.publication-tile-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 15 / 17;
  object-fit: cover;
  object-position: center top;
  border: calc(1px * var(--story-scale)) solid #a27b46;
  border-radius: calc(14px * var(--story-scale));
}
.publication-tile-cover-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: calc(8px * var(--story-scale));
  color: var(--pale);
  background: #162238;
}
.publication-tile-cover-empty svg { width: calc(2rem * var(--story-scale)); height: calc(2rem * var(--story-scale)); }
.publication-tile-body { display: grid; gap: calc(10px * var(--story-scale)); padding-inline: calc(4px * var(--story-scale)); }
.publication-tile h2 { font-size: calc(clamp(1.4rem, 2vw, 1.75rem) * var(--story-scale)); }
.publication-tile-metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: calc(11px * var(--story-scale));
  row-gap: calc(6px * var(--story-scale));
  font-size: calc(.94rem * var(--story-scale));
}
.publication-tile-metadata:empty { display: none; }
.publication-tile-metadata > span { display: inline-flex; align-items: center; gap: calc(7px * var(--story-scale)); min-width: 0; }
.publication-tile-metadata > span + span { border-inline-start: calc(1px * var(--story-scale)) solid #947955; padding-inline-start: calc(11px * var(--story-scale)); }
.publication-tile-metadata .publication-tile-genre {
  padding: calc(5px * var(--story-scale)) calc(10px * var(--story-scale));
  border: calc(1px * var(--story-scale)) solid #b48a47;
  border-radius: calc(999px * var(--story-scale));
  background: linear-gradient(#4b3822, #251f1b);
}
.publication-tile-metadata svg, .publication-tile-actions svg { width: calc(1.15rem * var(--story-scale)); height: calc(1.15rem * var(--story-scale)); flex: none; }
.publication-tile-metadata svg { color: #efcd8e; }
.publication-tile-teaser {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.publication-tile-credit { color: #c9c0af; font-size: calc(.78rem * var(--story-scale)); }
.publication-tile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(10px * var(--story-scale));
  margin-top: auto;
  padding: calc(6px * var(--story-scale)) calc(4px * var(--story-scale)) 0;
}
.publication-tile-actions > * {
  border-width: calc(1px * var(--story-scale));
  border-radius: calc(9px * var(--story-scale));
  padding-block: calc(5px * var(--story-scale));
  min-height: calc(44px * var(--story-scale));
  padding-inline: calc(6px * var(--story-scale));
  font-size: calc(.88rem * var(--story-scale));
}
.publication-tile-actions button:disabled { opacity: .72; filter: none; }

@media (min-width: 1500px) {
  .story-gallery:has(> :nth-child(3)) { position: relative; inset-inline-start: min(3.25vw, 54px); }
}
@media (max-width: 1050px) {
  .story-gallery { grid-template-columns: repeat(2, minmax(0, var(--story-width))); }
}
@media (max-width: 690px) {
  .story-gallery {
    --story-scale: 1;
    grid-template-columns: minmax(0, var(--story-width));
  }
}
@media (max-width: 370px) {
  .publication-tile { padding-inline: 12px; }
  .publication-tile-actions { gap: 6px; }
  .publication-tile-actions > * { gap: 4px; }
}

.publication-saved-asset { overflow-wrap: anywhere; }
.publication-saved-cover {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 12rem);
  max-height: 9rem;
}
.publication-import-preview:empty { display: none; }

.publication-page main.supporting-scene {
  background: radial-gradient(ellipse at 50% 28%, #101c30, #091426 72%);
}
.publication-page .supporting-scene::before {
  mask-image: linear-gradient(90deg, #000 5%, #0007 32%, transparent 65%), linear-gradient(#000 55%, transparent);
}
.publication-page .supporting-scene::after {
  mask-image: linear-gradient(270deg, #000 44%, transparent 88%), linear-gradient(#000 55%, transparent);
}
.publication-detail-shell {
  width: min(100%, 83rem);
  margin-inline: auto;
  color: #f9efd9;
  font-family: var(--heading);
}
.publication-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.publication-detail-shell .glyph { width: 1.18em; height: 1.18em; flex: none; }
.publication-back .glyph, .publication-detail-meta .glyph, #publication-action-info .glyph { color: #efcd8e; }
.publication-detail {
  display: grid;
  grid-template-columns: minmax(0, 15.625rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 2.1vw, 30px);
  width: min(100%, 63rem);
  margin-inline: auto;
}
.publication-detail-cover {
  justify-self: center;
  width: auto;
  height: auto;
  max-height: 25rem;
  object-fit: contain;
  border: 1px solid #d4a64f;
  border-radius: 14px;
}
.publication-detail-body { min-width: 0; overflow-wrap: anywhere; }
.publication-detail h1 { font-size: clamp(1.85rem, 3.05vw, 2.75rem); color: #ffe7ac; }
.publication-detail .productions-ornament { margin: 5px 0 10px; }
.publication-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px clamp(12px, 1.9vw, 27px);
  align-items: center;
}
.publication-detail-meta > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.publication-formats > span {
  padding: 5px 12px;
  border: 1px solid #b98e4f;
  border-radius: 13px;
  background: linear-gradient(#192639, #0b1423);
}
.publication-formats > span:first-child:not(:only-child) { background: linear-gradient(#544026, #28211c); }
.publication-facts { margin-block: 11px 9px; }
.publication-facts > span + span { border-inline-start: 1px solid #957349; padding-inline-start: 16px; }
.publication-synopsis { max-width: 42rem; font-size: 1.125rem; line-height: 1.25; }
.publication-synopsis > p + p { margin-block-start: 8px; }
.publication-detail-controls { margin-block-start: 14px; max-width: 36rem; }
.publication-detail-actions {
  display: grid;
  grid-template-columns: 1.08fr 1fr .68fr;
  gap: 12px;
  padding-block-start: 12px;
  border-block-start: 1px solid #b98e4f;
}
.publication-detail-actions > * { min-height: 42px; padding-inline: 10px; font-size: 1.0625rem; }
.publication-detail-actions .outline { color: #f9efd9; font-weight: normal; }
.publication-detail-actions .outline:hover { color: var(--gold); border-color: var(--gold); }
.publication-detail-actions .gold:disabled {
  background: linear-gradient(#ffe29a, #c69137 83%);
  opacity: 1;
  filter: none;
}
#publication-action-info {
  display: flex;
  align-items: start;
  gap: 8px;
  margin-block-start: 8px;
  font-size: .9375rem;
  font-style: italic;
}
.publication-share-status:not(:empty) { margin-block: 8px; color: var(--pale); }

@media (max-width: 900px) {
  .publication-page .supporting-scene::before, .publication-page .supporting-scene::after { opacity: .45; }
  .publication-detail { grid-template-columns: minmax(0, 29%) minmax(0, 1fr); }
  .publication-synopsis { font-size: 1.0625rem; }
}
@media (max-width: 620px) {
  .publication-page .supporting-scene::before, .publication-page .supporting-scene::after { opacity: .32; }
  .publication-detail { grid-template-columns: minmax(0, 1fr); }
  .publication-detail-cover { max-width: min(63%, 14rem); max-height: 21rem; }
  .publication-back { margin-block-end: 10px; }
  .publication-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .publication-detail-actions > * { flex: 1 0 auto; min-height: 44px; }
  .publication-facts > span + span { border: 0; padding-inline-start: 0; }
}

body:has(.vault-dialog:modal) { overflow: hidden; }
.vault-dialog {
  position: fixed;
  inset: 0;
  width: 92vw;
  height: 92dvh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  color: var(--ink);
  overflow: hidden;
  background: linear-gradient(148deg, #17243bc9, #0a1323c7 62%, #142033c9);
  backdrop-filter: blur(9px);
  box-shadow: 0 18px 70px #02050dc9;
}
.vault-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.vault-dialog::backdrop { background: #050a1352; }
.vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(.85rem, 3vw, 3rem);
  background: #0b1427cf;
  border-bottom: 1px solid var(--border);
}
.vault-header p { margin-top: .25rem; color: var(--muted); overflow-wrap: anywhere; }
.vault-header a { flex-shrink: 0; }
.vault-body {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 1rem clamp(.85rem, 3vw, 3rem);
  overflow-wrap: anywhere;
}
.vault-body > * + *, .vault-structure > * + *, .vault-plan-review > * + * { margin-top: .75rem; }
.vault-dialog textarea, .vault-dialog select, .vault-dialog input:not([type=checkbox]) { background: #111e2e; }
.vault-dialog [role="alert"], .vault-notice { color: var(--pale); }
.vault-structure fieldset { margin-inline: 0; min-inline-size: 0; border: 1px solid var(--border); border-radius: 8px; }
.vault-structure legend { color: var(--gold); font: bold 1.2rem var(--heading); }
.vault-structure-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-block: .65rem; }
.vault-structure-fields input { margin-top: .3rem; }
.vault-plan-chapters, .vault-plan-chapters ol { padding-inline-start: 1.5rem; }
.vault-plan-chapters li + li { margin-top: .6rem; }
.vault-plan-chapters ol { margin-block: .4rem .8rem; }
.vault-target { color: var(--muted); padding-inline-start: .4rem; }
@media (max-width: 600px) {
  .vault-structure-fields { grid-template-columns: minmax(0, 1fr); }
  .vault-header h2 { font-size: 1.2rem; }
}

.vault-review-scene {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-block: .5rem;
  padding: .5rem .75rem;
}
.vault-review-scene summary { color: var(--gold); cursor: pointer; }
.vault-review-scene label { display: block; margin-block: .5rem .25rem; }
.vault-review-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-block: .75rem; }
.vault-manuscript-preview { max-block-size: 22rem; overflow: auto; }
.vault-manuscript-preview p { white-space: pre-wrap; overflow-wrap: anywhere; }

html:has(.enhancement-dialog:modal) { overflow: hidden; }
html.enhancement-scrollbar:has(.enhancement-dialog:modal) { scrollbar-gutter: stable; }
.enhancement-dialog {
  position: fixed;
  inset: 0;
  width: 85vw;
  height: 85vh;
  height: 85dvh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(148deg, #162238e8, #0a1322ea 62%, #142033e8);
}
.enhancement-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.enhancement-dialog::backdrop { background: #030813a8; backdrop-filter: blur(5px); }
.enhancement-header, .enhancement-footer {
  padding: .85rem clamp(.85rem, 3vw, 2.5rem);
  background: #0b142780;
}
.enhancement-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}
.enhancement-header p { margin-top: .25rem; color: var(--muted); overflow-wrap: anywhere; }
.enhancement-footer { border-top: 1px solid var(--border); }
.enhancement-footer nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.enhancement-footer [aria-current] { color: var(--ink); border-color: var(--line); background: #152236; }
.enhancement-body {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem clamp(.85rem, 3vw, 2.5rem);
  overflow-wrap: anywhere;
}
[data-enhancement-status]:not(:empty) { margin-bottom: .75rem; color: var(--pale); }
[data-enhancement-content] > * + * { margin-top: .75rem; }
.enhancement-services { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.enhancement-card { padding: 1rem; }
.enhancement-body h4 { color: var(--pale); font: bold 1.15rem var(--heading); }
.enhancement-body a[download] { text-decoration: underline; }
.enhancement-body audio { max-inline-size: 100%; }
.narration-progress { margin: .5rem 0 .75rem; }
[data-narration-updates] > * + * { margin-top: .75rem; }
[data-narration-voices] select { min-inline-size: 0; }
@media (max-width: 760px), (max-height: 520px) {
  .enhancement-dialog { width: calc(100vw - 1rem); height: calc(100dvh - 1rem); }
  .enhancement-header h2 { font-size: 1.25rem; }
  .enhancement-header, .enhancement-footer { padding-block: .65rem; }
}
#admin-8 code { overflow-wrap: anywhere; }

.illustration-session > * + *, .illustration-session summary + *, .illustration-style span { margin-top: .75rem; }
.illustration-styles, .illustration-candidates { display: grid; gap: .75rem; }
.illustration-styles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
.illustration-candidates { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.illustration-style { padding: .45rem; cursor: pointer; }
.illustration-style:has(input:checked) { outline: 2px solid var(--focus-gold); outline-offset: 2px; }
.illustration-style .illustration-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  margin: 0;
  background-image: url('../img/illustration/styles.webp');
  background-size: 300% 300%;
}
.illustration-swatch-oil, .illustration-swatch-anime, .illustration-swatch-fantasy { background-position-x: 50%; }
.illustration-swatch-pencil, .illustration-swatch-comic, .illustration-swatch-digital { background-position-x: 100%; }
.illustration-swatch-storybook, .illustration-swatch-anime, .illustration-swatch-comic { background-position-y: 50%; }
.illustration-swatch-photoreal, .illustration-swatch-fantasy, .illustration-swatch-digital { background-position-y: 100%; }
.illustration-style span { display: block; }
.illustration-style input { width: auto; display: inline; min-height: 0; vertical-align: middle; accent-color: var(--gold); }
.illustration-targets a, .illustration-session summary { text-decoration: underline; cursor: pointer; }
.illustration-targets [aria-current] { color: var(--gold); }
.illustration-candidates img { width: 100%; height: auto; border-radius: 6px; margin-bottom: .6rem; }
.illustration-candidates article:only-child { max-width: 24rem; }
.illustration-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
[data-illustration-selected] { border-color: var(--focus-gold); }
.illustration-selection-label, .illustration-target-status { color: var(--gold); }
.illustration-selection-label { display: inline-block; margin-inline-start: .5rem; }
.illustration-preview-link { display: block; margin-bottom: .6rem; }
.illustration-preview-link span { color: var(--pale); text-decoration: underline; }
.illustration-inspector {
  position: fixed;
  inset: 0;
  width: min(78vw, 72rem);
  height: 78dvh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  color: var(--ink);
  background: linear-gradient(148deg, #162238ed, #0a1322ed 62%, #142033ed);
}
.illustration-inspector[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.illustration-inspector::backdrop { background: #030813a8; backdrop-filter: blur(4px); }
.illustration-inspector-image {
  display: grid;
  align-content: safe center;
  overflow: auto;
  overscroll-behavior: contain;
  background: #090f19;
}
.illustration-inspector-image img { max-width: none; height: auto; margin-inline: auto; }
.illustration-preview-controls, .illustration-preview-controls > div { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.illustration-preview-controls { justify-content: space-between; }
.illustration-preview-controls output { min-width: 3.2ch; color: var(--pale); text-align: center; }
.illustration-book-canvas { display: grid; place-items: center; container-type: size; min-height: 0; margin: .45rem; }
.illustration-book {
  width: min(100cqw, 150cqh);
  aspect-ratio: 3 / 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: .4rem;
  background: #b48745;
}
.illustration-book-leaf {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  aspect-ratio: 3 / 4;
  min-width: 0;
  min-height: 0;
  padding: clamp(.45rem, 1.85vw, 1.45rem);
  background: #f4e9d2;
  color: #221b14;
}
.illustration-book-leaf:first-child { border-radius: .4rem 0 0 .4rem; border-right: 1px solid #c8ad83; }
.illustration-book-leaf:last-child { border-radius: 0 .4rem .4rem 0; }
.illustration-book-text { position: relative; container-type: size; min-height: 0; min-width: 0; }
.illustration-book-page { display: flow-root; font: clamp(.78rem, 1.2vw, 1.07rem)/1.35 var(--heading); overflow-wrap: anywhere; }
.illustration-book-page p { white-space: pre-wrap; }
.illustration-book-page p + p { margin-top: .55em; }
.illustration-book-measure { position: absolute; inset: 0 0 auto; visibility: hidden; pointer-events: none; }
.illustration-page-number { margin-top: .25rem; min-height: 1em; text-align: center; font: .78rem var(--heading); }
.illustration-opening-art {
  display: grid;
  place-items: center;
  margin: 0;
  width: 100%;
  height: 100cqh;
  background: #deccaa;
  font-size: .72rem;
  text-align: center;
}
.illustration-opening-art img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.illustration-opening-art.opening-half { height: calc(50cqh - .3rem); margin-bottom: .45rem; }
.illustration-opening-art.opening-quarter {
  float: left;
  width: calc(50% - .45rem);
  height: calc(50cqh - .3rem);
  margin: 0 .45rem .35rem 0;
}
@media (max-width: 760px), (max-height: 520px) {
  .illustration-inspector { width: calc(100vw - 1.5rem); height: calc(100dvh - 1.5rem); }
  .illustration-inspector .enhancement-header h2 { font-size: 1.15rem; }
  .illustration-preview-controls .outline { padding-inline: .5rem; font-size: .86rem; }
}

.enhancement-service-column { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.illustrated-edition-card { padding: .85rem; }
.illustrated-edition-card .story-card-body {
  grid-template-columns: minmax(72px, 35%) minmax(0, 1fr);
  min-height: 0;
}
.illustrated-edition-card img { width: 100%; height: auto; object-fit: contain; }
.illustrated-edition-card h4 { color: var(--pale); font: bold clamp(1rem, 1.7vw, 1.3rem) var(--heading); }
.illustrated-edition-designation, .illustration-gallery-caption p { color: var(--gold); }
.illustration-edition-gallery { display: grid; gap: 20px; }
.illustration-gallery-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.illustration-gallery-heading h3 { margin-bottom: 8px; }
.illustration-gallery-heading p + p { margin-top: 6px; }
.illustration-edition-status {
  color: #a5dfb0;
  background: #112b22;
  border: 1px solid #578664;
  border-radius: 1rem;
  padding: .25rem .65rem;
}
.illustration-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, 252px));
  justify-content: start;
  gap: 16px;
}
.illustration-gallery-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 10px;
  min-width: 0;
  border: 1px solid var(--border);
}
.illustration-gallery-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 8px;
  background: #090f19;
}
.illustration-gallery-caption p { font-size: .875rem; }
.illustration-gallery-caption h4 { margin-top: 4px; }
.illustration-gallery-actions { display: grid; gap: 8px; }
.illustration-gallery-actions a[download] { text-decoration: none; }

/* Story Concept artwork and the cover-generation dialog. */
[data-stage="1"] .concept-columns {
  grid-template-columns: minmax(0, .95fr) minmax(0, 2.2fr) minmax(0, .78fr);
  gap: clamp(.7rem, 1.6vw, 1.4rem);
}
.concept-cover { display: grid; gap: .75rem; padding: .75rem; }
.concept-cover h3 { color: var(--pale); }
.concept-cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 6px; }
.concept-cover button { width: 100%; }
.concept-columns .guidance { display: block; }
.concept-columns .guidance img { height: auto; aspect-ratio: auto; }
.concept-columns .guidance > div { padding: .8rem; }
.concept-columns .fields .pair { column-gap: .8rem; }
.concept-columns .fields :is(label, .tag-field) { min-width: 0; }
.story-card img.project-cover-art, .summary-cover img.project-cover-art {
  height: auto;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}
.cover-dialog-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.cover-editor { display: grid; align-content: start; gap: .65rem; }
.cover-editor textarea { min-height: 14rem; resize: vertical; }
.cover-allowance { display: block; margin-top: .4rem; color: var(--pale); font-size: 1.08rem; }
.cover-review { min-width: 0; }
.cover-review figure { margin: 0; text-align: center; }
.cover-review figure img {
  width: min(100%, 20rem, 36dvh);
  aspect-ratio: 3 / 4;
  object-fit: contain;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cover-review figcaption { margin: .5rem 0; }
.cover-options { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.cover-options button { display: grid; justify-items: center; min-width: 4.25rem; padding: .3rem; font-size: .84rem; }
.cover-options button[aria-pressed="true"] { border-color: var(--gold); color: var(--pale); }
.cover-options img { width: 2.5rem; aspect-ratio: 3 / 4; object-fit: contain; margin: auto auto .25rem; }
.cover-footer { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 1050px) {
  [data-stage="1"] .concept-columns { grid-template-columns: minmax(9rem, 30%) minmax(0, 1fr); }
  .concept-columns > .guidance { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  [data-stage="1"] .concept-columns, .cover-dialog-body { grid-template-columns: minmax(0, 1fr); }
  .concept-cover { justify-items: center; }
  .concept-cover img, .concept-cover button { max-width: 10rem; }
  .cover-review figure img { width: min(100%, 15rem); }
}

.enhancement-heading-with-cover { display: flex; align-items: center; gap: .6rem; }
.enhancement-heading-with-cover img { flex: none; width: 2rem; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 3px; }
