* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: 'Trebuchet MS', system-ui, sans-serif; color: #f9eee3; background: #241a32; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 5% 0%, #453052 0, transparent 61%); font-size: 1rem; line-height: 1.55; }
[hidden] { display: none !important; }
.shell { max-width: 1210px; margin: auto; padding: 1.5rem clamp(1rem, 4vw, 3rem) 4rem; }
.masthead { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #a283a650; padding-bottom: 1.1rem; }
.brand { font-weight: 800; letter-spacing: .012em; display: flex; align-items: center; gap: .6rem; }
.mark { border-radius: 16px; background: #ffdba3; color: #41264c; padding: .2rem .55rem; }
.heading { margin: 2.2rem 0 1.4rem; }
h1, h2 { font-family: Georgia, serif; font-weight: 600; line-height: 1.05; }
h1 { font-size: clamp(2.65rem, 7vw, 5rem); margin: 0 0 .35rem; letter-spacing: -.065em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); margin: .2rem 0 .65rem; letter-spacing: -.035em; }
p { margin: 0 0 .75rem; }
.heading p, .scene-number, .status { color: #d9c5df; }
.layout { display: grid; grid-template-columns: 1.22fr 1fr; gap: clamp(1rem, 3vw, 2.1rem); align-items: start; }
.visual { border-radius: 30px; overflow: hidden; background: #382644; box-shadow: 0 16px 40px #190f2350; }
.sceneworld { aspect-ratio: 1.5; position: relative; background: #664a79; }
.sceneworld img, .sceneworld canvas { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.verse { position: absolute; bottom: 1rem; left: 1rem; border-radius: 1rem; background: #241a32ed; padding: .34rem .65rem; font-size: .875rem; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); padding: .55rem; gap: .25rem; }
.steps button { font-size: .875rem; padding: .55rem .22rem; }
button, input { font: inherit; }
button { border: 0; border-radius: 14px; padding: .6rem .85rem; min-height: 44px; cursor: pointer; font-weight: 700; }
button:disabled { opacity: .6; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid #fed9a8; outline-offset: 3px; }
.primary { background: #ffdbab; color: #30213b; }
.quiet, .steps button, .text-button { background: #ffffff12; color: #f9eee3; }
.steps button[aria-current="step"] { background: #e7cabf; color: #32243d; }
.story { padding: clamp(.95rem, 2.5vw, 1.6rem); background: #39294a; border: 1px solid #6d5476; border-radius: 27px; }
.scene-number { font-size: .875rem; margin-bottom: .35rem; }
.scene-body { min-height: 6.4rem; }
.controls, .ask { display: flex; gap: .45rem; flex-wrap: wrap; }
.conversation { border-top: 1px solid #9d86a766; padding-top: .9rem; margin-top: .95rem; }
.prompt { color: #fbd8ab; font-weight: 700; }
input { color: #fbf1eb; background: #261936; border: 1px solid #967fa5; border-radius: 12px; min-height: 44px; padding: .5rem .65rem; }
.ask input { flex: 1; min-width: 8rem; }
input::placeholder { color: #cdb9d1; }
.status { font-size: .9rem; margin-top: .45rem; margin-bottom: 0; }
.answer { background: #2c203d; border-radius: 14px; padding: .75rem; margin: .65rem 0 0; }
dialog { color: #f9eee3; background: #39294a; border: 1px solid #967fa5; padding: 1.3rem; border-radius: 20px; max-width: min(29rem, calc(100% - 2rem)); }
dialog::backdrop { background: #13091acc; }
dialog label:not(.check) { display: block; }
dialog input[type=password] { width: 100%; }
.check { display: flex; align-items: center; gap: .6rem; margin: .45rem 0 .75rem; }
.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; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } .scene-body { min-height: 0; } .heading { margin-top: 1.55rem; } }

