.chapter-page {
 --chapter-ink:#151310; --chapter-paper:#f4eddf; --chapter-gold:#e7bb7c;
 --chapter-muted:#c5b7a4; --chapter-line:#c6a47640;
 min-height:100dvh; background:radial-gradient(ellipse at 75% 0,#382d20 0,transparent 55%),var(--chapter-ink);
 color:var(--chapter-paper); font-family:'K Hada Sans',Arial,sans-serif; padding:0 24px 56px;
}
.chapter-page a,.chapter-page button {cursor:pointer}
.chapter-page a:focus-visible,.chapter-page button:focus-visible,.chapter-page input:focus-visible {outline:2px solid var(--chapter-gold);outline-offset:5px}
.chapter-header {max-width:1000px;margin:auto;min-height:88px;display:flex;align-items:center;justify-content:space-between;gap:24px;font-size:12px}
.chapter-header>a {min-height:44px;display:inline-flex;align-items:center;text-decoration:none}
.chapter-header>a:last-child {color:var(--chapter-muted)}
.chapter-brand {color:var(--chapter-gold);letter-spacing:.2em;font-size:15px}
.chapter-page-content {max-width:900px;margin:42px auto 0}
.chapter-eyebrow {font-size:10px;letter-spacing:.18em;color:var(--chapter-gold);margin:0 0 16px;line-height:1.6;overflow-wrap:anywhere}
.chapter-page h1 {font-family:'K Hada Story',Georgia,serif;font-size:clamp(38px,6vw,64px);font-weight:400;line-height:1.05;margin:0 0 18px}
.chapter-page h2 {font-family:'K Hada Story',Georgia,serif;font-size:32px;font-weight:400;line-height:1.1;margin:0 0 16px}
.chapter-intro {color:var(--chapter-muted);line-height:1.7;max-width:620px;margin-bottom:36px}
.chapter-primary {display:block;min-height:50px;background:var(--chapter-gold);color:var(--chapter-ink);border:1px solid var(--chapter-gold);border-radius:99px;padding:13px 18px;text-align:center;font:inherit;font-size:14px;text-decoration:none}
.chapter-primary:disabled {opacity:.65;cursor:wait}
.chapter-primary:hover:not(:disabled) {background:#f1cca0}
.chapter-secondary {display:block;width:fit-content;margin:22px auto;color:var(--chapter-gold);min-height:44px;padding:10px 0;text-decoration:underline;text-underline-offset:4px}

.chapter-review button,.chapter-conflicts button {display:inline-flex;align-items:center;color:var(--chapter-gold);min-height:44px;text-decoration:underline;text-underline-offset:4px}
.chapter-muted {color:#b8aa98;font-size:11px;line-height:1.7;margin:0}
.chapter-form {max-width:520px;margin:0 auto;padding-bottom:30px}
.chapter-form p {line-height:1.7;color:var(--chapter-muted)}
.chapter-form label {display:block;font-size:13px;margin:28px 0 10px}
.chapter-form input {display:block;width:100%;min-height:50px;box-sizing:border-box;border:1px solid #9f8d7277;border-radius:12px;background:#211e19;color:var(--chapter-paper);font:inherit;padding:12px}
.chapter-form .chapter-primary {width:100%;margin:22px 0}
.chapter-code-destination {overflow-wrap:anywhere}
.chapter-code-destination strong {font-weight:400;color:var(--chapter-paper)}
.chapter-form .chapter-code-input {font-size:30px;letter-spacing:.38em;text-align:center;padding:14px 10px 14px 20px;font-variant-numeric:tabular-nums}
.chapter-code-input+.chapter-muted {margin-top:12px}
.chapter-code-actions {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.chapter-code-actions button {min-height:44px;font:inherit;font-size:12px;color:var(--chapter-gold);text-decoration:underline;text-underline-offset:4px}
.chapter-code-actions button:disabled {text-decoration:none;color:var(--chapter-muted);cursor:default}
.chapter-form [role=alert],.chapter-page [role=alert] {color:#ffc4ac}
.chapter-page .khada-preorder {max-width:520px;margin:0 auto}
.chapter-review,.chapter-conflicts {max-width:600px;margin:30px auto;padding:22px;border:1px solid var(--chapter-line);border-radius:10px;line-height:1.7;font-size:14px}
.chapter-conflicts button {display:block;text-align:left}
.chapter-nav {position:fixed;z-index:20;left:16px;top:max(12px,env(safe-area-inset-top));font-family:'K Hada Sans',Arial,sans-serif;font-size:11px;color:#f1dfc1;border:1px solid #d9b57a66;border-radius:99px;background:#151310c9;min-height:44px;padding:12px 16px;text-decoration:none;display:inline-flex;align-items:center}
.chapter-handoff {margin-bottom:12px}
.chapter-handoff .episode-two-link {display:block}
.chapter-message {padding:30px 0}
.chapter-message button {color:var(--chapter-gold);min-height:44px}
@media(min-width:640px) {.chapter-nav {top:70px;left:40px}}
@media(max-width:639px) {
 body:has(#khada-dev-tools:not([hidden])) .chapter-nav {left:76px}
 body:has(#khada-dev-tools:not([hidden]) .khada-dev-arrows:not([hidden])) .chapter-nav {left:calc(max(12px, env(safe-area-inset-left)) + 156px)}
 body:has(#khada-dev-tools:not([hidden])) .episode-end-actions .episode-restart {padding-inline:10px}
 .chapter-page {padding:0 20px 36px}
 .chapter-header {min-height:70px}
 .chapter-page-content {margin-top:24px}
 .chapter-intro {margin-bottom:26px}
 .chapter-eyebrow {font-size:9px;margin-bottom:12px}
 .episode-shell>.chapter-nav~.episode-portrait .scene-caption {top:64px;left:16px;right:16px;max-width:100%;text-align:center}
 .chapter-form h1 {font-size:40px}
}

/* Chapter 2 unlock page: lead with the chapter's art and hook, not the form. */
.chapter-gate-art {position:relative;margin:0 0 28px;height:clamp(200px,34vw,320px);border-radius:16px;overflow:hidden;border:1px solid #ac8e633b;box-shadow:0 18px 45px #0005}
.chapter-gate-art img {width:100%;height:100%;object-fit:cover;object-position:center 8%;display:block}
.chapter-gate-art:after {content:'';position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,#151310d9 100%)}
.chapter-gate-hook {font-family:'K Hada Story',Georgia,serif;font-style:italic;font-size:22px;line-height:1.4;color:#f6d6a5;max-width:620px;margin:0 0 12px}
.chapter-page .khada-preorder .khada-preorder-teaser {display:none}
