:root {
  --ink: #55112f;
  --berry: #8e1749;
  --hot: #f13f83;
  --pink: #ff86ad;
  --blush: #ffd0dd;
  --paper: #fff8f3;
  --cream: #fff2dc;
  --shadow: #5a1536;
  --line: 3px solid var(--ink);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #ffc1d4; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Songti SC", "STSong", Georgia, serif;
  background:
    radial-gradient(circle at 14% 15%, rgba(255,255,255,.8) 0 2px, transparent 3px),
    radial-gradient(circle at 87% 29%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    linear-gradient(145deg, #ffe2e9 0%, #ffc0d3 45%, #ffaac7 100%);
  overflow-x: hidden;
}
button, textarea, input { font: inherit; }
button { color: inherit; }
button:focus-visible, textarea:focus-visible, input:focus-visible, label:has(input:focus-visible) { outline: 4px solid #fff; outline-offset: 3px; }
.is-hidden { display: none !important; }

.sky-noise { position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
.pixel-cloud { position: fixed; width: 140px; height: 44px; background: rgba(255,255,255,.55); filter: drop-shadow(8px 8px 0 rgba(156,39,83,.12)); clip-path: polygon(0 50%, 12% 50%, 12% 25%, 27% 25%, 27% 0, 58% 0, 58% 25%, 78% 25%, 78% 50%, 100% 50%, 100% 100%, 0 100%); z-index: 0; }
.cloud-one { left: -35px; top: 18%; }
.cloud-two { right: -42px; bottom: 14%; transform: scale(.8); }
.floating-hearts i { position: fixed; z-index: 0; font-style: normal; color: rgba(153, 18, 72, .35); animation: float 8s ease-in-out infinite; }
.floating-hearts i:nth-child(1) { left: 5%; top: 8%; }
.floating-hearts i:nth-child(2) { left: 91%; top: 13%; animation-delay: -2s; }
.floating-hearts i:nth-child(3) { left: 9%; top: 79%; animation-delay: -5s; }
.floating-hearts i:nth-child(4) { left: 83%; top: 76%; animation-delay: -3s; }
.floating-hearts i:nth-child(5) { left: 47%; top: 5%; animation-delay: -6s; font-size: 11px; }
.floating-hearts i:nth-child(6) { left: 68%; top: 88%; animation-delay: -1s; font-size: 12px; }
@keyframes float { 50% { transform: translateY(-14px) rotate(8deg); opacity: .8; } }

.login-view { position: relative; z-index: 2; min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.login-card { position: relative; width: min(420px, 100%); padding: 48px 42px 42px; background: var(--paper); border: var(--line); box-shadow: 13px 13px 0 var(--ink); transform: rotate(-.6deg); }
.login-card::before { content: ""; position: absolute; inset: 10px; border: 1px dashed rgba(85,17,47,.25); pointer-events: none; }
.login-ticket { position: absolute; top: -14px; left: 28px; padding: 7px 13px; color: var(--paper); background: var(--ink); font: 800 9px ui-monospace, monospace; letter-spacing: 1.4px; transform: rotate(-2deg); }
.login-mark { position: absolute; top: 34px; right: 35px; display: grid; place-items: center; width: 50px; height: 45px; color: #fff; background: var(--hot); border: var(--line); box-shadow: 4px 4px 0 var(--ink); font-size: 24px; transform: rotate(5deg); }
.login-card h1 { margin: 17px 0 15px; font-size: clamp(43px, 10vw, 60px); line-height: 1.02; letter-spacing: -.07em; }
.login-copy { max-width: 300px; margin: 0 0 26px; line-height: 1.7; font-size: 13px; }
.login-field { display: block; margin-top: 15px; }
.login-field span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 900; }
.login-field input { width: 100%; padding: 12px 14px; color: var(--ink); border: 2px solid var(--ink); background: #fffdf9; }
.login-card .primary-button { width: 100%; margin-top: 22px; }
.login-error { margin: 12px 0 -7px; color: #b20c46; font-size: 12px; font-weight: 800; }
.app-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 32px)); min-height: 100vh; margin: auto; padding: 24px 0 46px; }
.brand-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 58px; }
.brand { grid-column: 2; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; transform: rotate(-2deg); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 38px; color: #fff; background: var(--hot); border: var(--line); box-shadow: 4px 4px 0 var(--ink); font-size: 22px; }
.brand b { display: block; font-family: "Kaiti SC", "STKaiti", cursive; font-size: 25px; line-height: 20px; }
.brand small { display: block; text-align: center; font-size: 10px; letter-spacing: 7px; }
.icon-button { justify-self: start; border: var(--line); background: var(--blush); width: 44px; height: 40px; box-shadow: 4px 4px 0 var(--ink); font-weight: 900; font-size: 22px; cursor: pointer; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 15px; }
.history-button, .logout-button { padding: 7px 10px; border: 2px solid var(--ink); background: rgba(255,255,255,.42); box-shadow: 3px 3px 0 var(--ink); font-size: 11px; font-weight: 900; cursor: pointer; }
.logout-button { background: var(--paper); }
.episode-chip { display: flex; align-items: baseline; gap: 5px; font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: 1px; }
.episode-chip b { font-size: 20px; }

.view { min-height: calc(100vh - 130px); animation: enter .55s cubic-bezier(.2,.9,.2,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } }
.create-view { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(430px, 1fr); align-items: center; gap: clamp(40px, 8vw, 120px); padding: 48px 5%; }
.eyebrow { font: 800 11px/1.4 ui-monospace, monospace; letter-spacing: 2.2px; text-transform: uppercase; }
.hero-copy { position: relative; align-self: center; }
.hero-copy::before { content: "♥"; position: absolute; left: -45px; top: 80px; font-size: 25px; transform: rotate(-20deg); color: var(--hot); }
.hero-copy h1 { margin: 22px 0; font-size: clamp(48px, 6.3vw, 88px); line-height: 1.08; letter-spacing: -.07em; font-weight: 900; text-shadow: 3px 3px 0 rgba(255,255,255,.7); }
.hero-copy h1 span { position: relative; color: var(--hot); font-family: "Kaiti SC", "STKaiti", cursive; font-size: 1.13em; letter-spacing: -.04em; }
.hero-copy h1 span::after { content: ""; position: absolute; left: -4px; right: -5px; bottom: 4px; height: 7px; background: var(--ink); clip-path: polygon(0 40%, 100% 0, 98% 80%, 3% 100%); opacity: .18; }
.lead { max-width: 480px; font-size: 17px; line-height: 2; font-weight: 500; }
.story-card { position: relative; background: var(--paper); border: var(--line); padding: clamp(25px, 4vw, 46px); box-shadow: 12px 12px 0 rgba(87,17,48,.88); transform: rotate(1deg); }
.story-card::before { content: ""; position: absolute; inset: 9px; border: 1px dashed rgba(85,17,47,.25); pointer-events: none; }
.tape { position: absolute; width: 95px; height: 28px; top: -17px; background: rgba(255, 236, 185, .82); border: 1px solid rgba(123, 78, 67, .12); z-index: 2; }
.tape-left { left: 13%; transform: rotate(-6deg); }.tape-right { right: 11%; transform: rotate(7deg); }
.card-index { margin: 0 0 18px; font: 700 10px ui-monospace, monospace; letter-spacing: 2px; }
.upload-zone { display: block; position: relative; aspect-ratio: 16 / 10; background: #ffe1e9; border: 2px dashed var(--berry); overflow: hidden; cursor: pointer; }
.upload-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-zone img { width: 100%; height: 100%; object-fit: cover; display: none; }
.upload-zone.has-image img { display: block; }
.upload-zone.has-image .upload-placeholder { display: none; }
.upload-placeholder { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; padding: 20px; }
.pixel-camera { display: grid; place-items: center; width: 55px; height: 45px; border: var(--line); background: #fff; box-shadow: 5px 5px 0 var(--ink); font-size: 25px; }
.upload-placeholder b { margin-top: 7px; font-size: 16px; }.upload-placeholder small { font-size: 11px; opacity: .65; }
.replace-photo { position: absolute; right: 8px; bottom: 8px; display: none; padding: 5px 10px; color: #fff; background: rgba(85,17,47,.82); font-size: 11px; }
.upload-zone.has-image .replace-photo { display: block; }
.story-field { display: block; position: relative; margin-top: 24px; }
.story-field > span { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 900; }
.story-field textarea { width: 100%; resize: vertical; min-height: 115px; padding: 14px 16px 28px; color: var(--ink); border: 2px solid var(--ink); background: #fffdf9; line-height: 1.7; }
.story-field textarea::placeholder { color: #b48698; }
.story-field small { position: absolute; right: 10px; bottom: 8px; font: 10px ui-monospace, monospace; }
.duration-setting { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; padding: 0; border: 0; }
.duration-setting legend { margin-bottom: 8px; font-size: 13px; font-weight: 900; }
.duration-setting label { cursor: pointer; }
.duration-setting input { position: absolute; opacity: 0; }
.duration-setting label > span { min-height: 54px; display: flex; flex-direction: column; justify-content: center; padding: 8px 13px; border: 2px solid var(--ink); background: #fff; transition: .15s; }
.duration-setting label > span b { font-size: 14px; }.duration-setting label > span small { margin-top: 2px; font-size: 10px; opacity: .65; }
.duration-setting input:checked + span { color: #fff; background: var(--hot); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.safety-note { margin: 13px 0 18px; font-size: 11px; opacity: .72; }.safety-note span { color: var(--hot); font-size: 17px; }
.primary-button, .secondary-button, .resume-button { border: var(--line); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.primary-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 19px; color: #fff; background: var(--hot); box-shadow: 6px 6px 0 var(--ink); font-weight: 900; }
.primary-button:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }.primary-button:active { transform: translate(5px,5px); box-shadow: 1px 1px 0 var(--ink); }
.primary-button:disabled { filter: grayscale(.6); cursor: wait; }
.resume-button { width: 100%; margin-top: 17px; padding: 10px 13px; background: transparent; border-width: 0 0 2px; display: flex; justify-content: space-between; font-weight: 700; }

.history-view { padding: 60px 5%; }
.history-heading { max-width: 660px; margin-bottom: 32px; }
.history-heading h1 { margin: 7px 0 12px; font-size: clamp(40px, 6vw, 68px); }
.history-heading > p:last-child { line-height: 1.8; }
.history-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.history-card { overflow: hidden; background: var(--paper); border: var(--line); box-shadow: 8px 8px 0 var(--ink); }
.history-card-media { position: relative; aspect-ratio: 16/9; overflow: hidden; border-bottom: var(--line); background: var(--blush); }
.history-card-media img { width: 100%; height: 100%; object-fit: cover; }
.history-card-media span { position: absolute; right: 8px; bottom: 8px; padding: 4px 8px; color: #fff; background: var(--ink); font: 700 10px ui-monospace, monospace; }
.history-card-body { padding: 18px; }
.history-card-body h2 { margin: 0 0 7px; font-size: 20px; }
.history-card-body p { min-height: 48px; margin: 0; overflow: hidden; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.history-card-meta { margin-top: 12px; font: 10px ui-monospace, monospace; opacity: .65; }
.history-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.history-card-actions button { min-height: 42px; border: 2px solid var(--ink); background: #fff; font-weight: 900; cursor: pointer; }
.history-card-actions button:first-child { color: #fff; background: var(--hot); }
.history-empty { padding: 70px 20px; border: 2px dashed var(--berry); text-align: center; background: rgba(255,248,243,.5); }
.history-empty span { font-size: 45px; }

.loading-view { display: grid; place-items: center; padding: 35px 0; }
.loading-frame { position: relative; width: min(920px, 100%); min-height: min(660px, calc(100vh - 150px)); border: var(--line); overflow: hidden; box-shadow: 12px 12px 0 var(--ink); background: #d987a6; }
.loading-backdrop { position: absolute; inset: -25px; width: calc(100% + 50px); height: calc(100% + 50px); object-fit: cover; filter: blur(14px) saturate(.75); transform: scale(1.08); }
.loading-wash { position: absolute; inset: 0; background: linear-gradient(rgba(255,182,207,.82), rgba(255,231,224,.94)), repeating-linear-gradient(0deg, transparent 0 5px, rgba(85,17,47,.04) 6px); }
.loading-content { position: relative; min-height: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; }
.heart-loader { position: relative; width: 105px; height: 92px; display: grid; place-items: center; margin-bottom: 25px; }
.heart-loader span { position: relative; z-index: 2; width: 64px; height: 54px; display: grid; place-items: center; border: var(--line); background: var(--pink); box-shadow: 6px 6px 0 var(--ink); font-size: 28px; animation: heartbeat 1.2s infinite; }
.heart-loader i { position: absolute; inset: 0; border: 2px solid var(--hot); opacity: 0; animation: ripple 2.1s infinite; }.heart-loader i:nth-of-type(2) { animation-delay: .7s; }.heart-loader i:nth-of-type(3) { animation-delay: 1.4s; }
@keyframes heartbeat { 50% { transform: scale(1.08); } } @keyframes ripple { from { opacity: .7; transform: scale(.55); } to { opacity: 0; transform: scale(1.35); } }
.loading-kicker { font: 800 10px ui-monospace, monospace; letter-spacing: 3px; }
.loading-content h2 { margin: 8px 0 10px; font-size: clamp(28px, 4vw, 46px); }.loading-content > p:not(.loading-kicker) { margin: 0; opacity: .75; }
.phase-list { display: flex; list-style: none; padding: 0; margin: 38px 0 25px; gap: 0; }
.phase-list li { position: relative; width: 120px; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 11px ui-monospace, monospace; opacity: .4; }
.phase-list li:not(:last-child)::after { content: ""; position: absolute; left: calc(50% + 10px); top: 7px; width: calc(100% - 20px); height: 2px; background: var(--ink); }
.phase-list i { position: relative; z-index: 1; width: 16px; height: 16px; border: 2px solid var(--ink); background: var(--blush); transform: rotate(45deg); }
.phase-list li.active, .phase-list li.done { opacity: 1; font-weight: 800; }.phase-list li.active i { background: var(--hot); animation: heartbeat 1s infinite; }.phase-list li.done i { background: var(--berry); }
.text-button { padding: 8px; border: 0; border-bottom: 1px solid currentColor; background: transparent; cursor: pointer; font-size: 12px; }

.player-view { display: grid; place-items: center; padding: 20px 0; }
.cinema-window { width: min(1060px, 100%); border: var(--line); background: #fff3e7; box-shadow: 13px 13px 0 var(--ink); }
.window-chrome { height: 45px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 15px; border-bottom: var(--line); font: 700 10px ui-monospace, monospace; letter-spacing: 1px; }
.window-dots { display: flex; gap: 7px; }.window-dots i { width: 11px; height: 11px; border: 2px solid var(--ink); background: var(--pink); }.window-dots i:nth-child(2){ background: var(--cream); }.window-dots i:nth-child(3){ background: #fff; }
.signal { justify-self: end; color: var(--hot); }
.video-stage { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--ink); }
.video-stage.is-prefetching .choice-panel::before { content: "正在为两个选择实时生成下一幕…"; position: absolute; right: clamp(20px, 4vw, 46px); top: clamp(20px, 4vw, 46px); padding: 6px 9px; color: #fff; border: 1px solid rgba(255,255,255,.7); background: rgba(40,3,20,.62); font: 700 9px ui-monospace, monospace; letter-spacing: 1px; }
.video-stage video, .poster-frame { width: 100%; height: 100%; object-fit: cover; display: block; }
.candidate-video { position: absolute; inset: 0; z-index: 1; }
.poster-frame { position: absolute; inset: 0; z-index: 2; }
.vignette, .play-button, .choice-panel { z-index: 3; }
.vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 100px rgba(45,3,23,.46); background: linear-gradient(transparent 45%, rgba(30,0,14,.55)); }
.play-button { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); border: var(--line); background: var(--pink); box-shadow: 6px 6px 0 var(--ink); padding: 13px 20px; font-weight: 900; cursor: pointer; }
.play-button span { margin-right: 8px; }
.choice-panel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(20px, 4vw, 46px); color: #fff; background: linear-gradient(transparent 12%, rgba(46,3,22,.25) 43%, rgba(43,3,21,.93)); animation: choiceIn .5s ease both; }
.choice-button[data-status="planning"]::after { content: "规划"; }
.choice-button[data-status="submitting"]::after { content: "提交"; }
.choice-button[data-status="generating"]::after { content: "生成"; }
.choice-button[data-status="downloading"]::after { content: "下载"; }
.choice-button[data-status="preloading"]::after { content: "预载"; }
.choice-button[data-status="failed"]::after { content: "失败"; }
.choice-button[data-status="ready"]::after { content: "即播"; color: #16834f; }
.choice-button::after { justify-self: end; font: 800 8px ui-monospace, monospace; letter-spacing: 1px; opacity: .72; }
@keyframes choiceIn { from { opacity: 0; transform: translateY(12px); } }
.scene-caption { max-width: 620px; margin-bottom: 19px; text-shadow: 0 2px 6px #000; }.scene-caption span { font: 800 10px ui-monospace, monospace; letter-spacing: 3px; color: #ffc2d6; }.scene-caption h2 { margin: 6px 0; font-size: clamp(23px, 4vw, 42px); }.scene-caption p { margin: 0; font-size: clamp(12px, 1.8vw, 15px); line-height: 1.7; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice-button { min-height: 66px; display: grid; grid-template-columns: 35px 1fr 25px; align-items: center; text-align: left; padding: 8px 15px; border: 2px solid #fff; background: rgba(255,197,217,.94); color: var(--ink); box-shadow: 5px 5px 0 #fff; cursor: pointer; transition: .18s; }
.choice-button:hover:not(:disabled) { background: #fff; transform: translateY(-4px); }.choice-button small { font: 900 18px ui-monospace, monospace; }.choice-button span { font-weight: 900; }.choice-button b { font-size: 20px; }
.choice-button:disabled { cursor: wait; opacity: .65; filter: grayscale(.35); box-shadow: 3px 3px 0 rgba(255,255,255,.65); }
.choice-button.is-loading b { width: 19px; height: 19px; border: 3px solid rgba(85,17,47,.24); border-top-color: var(--berry); border-radius: 50%; animation: choiceLoading .8s linear infinite; }
@keyframes choiceLoading { to { transform: rotate(360deg); } }
.choice-button.is-ready b { color: #16834f; }.choice-button.is-ready b::before { content: "READY "; font: 800 8px ui-monospace, monospace; }
.custom-button { align-self: center; margin-top: 19px; padding: 8px 14px; color: #fff; background: transparent; border: 0; border-bottom: 1px solid #fff; cursor: pointer; }
.player-footer { min-height: 53px; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 15px; padding: 9px 16px; font-size: 11px; }
.player-footer button { border: 0; background: transparent; cursor: pointer; font-weight: 700; }.player-footer button:last-child { justify-self: end; }
.story-progress { display: flex; align-items: center; gap: 9px; font: 700 10px ui-monospace, monospace; }.story-progress i { width: 55px; height: 2px; background: var(--hot); }

.error-view { display: grid; place-items: center; }
.error-card { position: relative; width: min(530px, 100%); padding: 55px 45px 45px; background: var(--paper); border: var(--line); box-shadow: 10px 10px 0 var(--ink); text-align: center; }
.broken-heart { display: grid; place-items: center; width: 70px; height: 60px; margin: 0 auto 22px; border: var(--line); background: #d9a6b5; color: #fff; font-size: 30px; transform: rotate(-4deg); }
.error-card > p:first-of-type { font: 800 10px ui-monospace, monospace; letter-spacing: 3px; }.error-card h2 { font-size: 30px; margin: 12px 0; }.error-card > p { line-height: 1.8; }
.error-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 30px; }.secondary-button { min-height: 54px; background: #fff; font-weight: 800; }

.custom-dialog { width: min(590px, calc(100% - 28px)); padding: 0; color: var(--ink); background: transparent; border: 0; overflow: visible; }
.custom-dialog::backdrop { background: rgba(64,5,31,.68); backdrop-filter: blur(8px); }
.custom-dialog form { position: relative; padding: 40px; background: var(--paper); border: var(--line); box-shadow: 10px 10px 0 var(--ink); }
.dialog-close { position: absolute; right: 14px; top: 13px; width: 33px; height: 33px; border: 2px solid var(--ink); background: var(--blush); font-size: 24px; cursor: pointer; }.custom-dialog h2 { margin: 7px 0; font-size: 30px; }.custom-dialog form > p:not(.eyebrow) { font-size: 13px; opacity: .76; }
.custom-dialog label { display: block; position: relative; margin: 25px 0; }.custom-dialog textarea { width: 100%; padding: 15px 15px 28px; resize: none; border: 2px solid var(--ink); color: var(--ink); }.custom-dialog label small { position: absolute; right: 9px; bottom: 8px; }
.dialog-actions { display: grid; grid-template-columns: .65fr 1fr; gap: 14px; }.dialog-safety { display: block; margin-top: 15px; text-align: center; opacity: .58; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 25px; transform: translate(-50%, 20px); padding: 10px 16px; color: #fff; background: var(--ink); border: 2px solid #fff; box-shadow: 4px 4px 0 var(--hot); opacity: 0; pointer-events: none; transition: .25s; font-size: 12px; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .app-shell { width: min(100% - 20px, 620px); padding-top: 10px; }
  .brand-bar { display: flex; align-items: center; gap: 8px; min-height: 52px; }
  .brand { grid-column: auto; flex: 0 0 auto; margin-right: auto; }
  .brand-mark { width: 35px; height: 32px; font-size: 18px; }.brand b { font-size: 21px; }
  .create-view { grid-template-columns: 1fr; gap: 26px; padding: 28px 4px; }
  .hero-copy { text-align: center; }.hero-copy h1 { font-size: clamp(44px, 13vw, 67px); margin: 16px 0; }.lead { margin-inline: auto; font-size: 14px; line-height: 1.8; }
  .story-card { transform: none; padding: 28px 22px; box-shadow: 7px 7px 0 var(--ink); }
  .phase-list li { width: 77px; font-size: 9px; }.loading-frame { min-height: calc(100vh - 95px); box-shadow: 7px 7px 0 var(--ink); }
  .player-view { min-height: auto; padding-top: 14px; }.cinema-window { box-shadow: 7px 7px 0 var(--ink); }.video-stage { aspect-ratio: 9/14; }
  .choice-panel { padding: 20px 14px 25px; }.choice-grid { grid-template-columns: 1fr; gap: 11px; }.choice-button { min-height: 57px; box-shadow: 3px 3px 0 #fff; }
  .scene-caption { margin-bottom: 13px; }.scene-caption h2 { font-size: 25px; }.scene-caption p { font-size: 12px; }
  .window-chrome { grid-template-columns: auto 1fr auto; gap: 12px; }.window-chrome > span:nth-child(2) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .history-view { padding: 32px 4px; }.history-list { grid-template-columns: 1fr; }
  .header-actions { flex: 0 0 auto; gap: 6px; }
  .history-button, .logout-button { flex: 0 0 auto; padding: 6px; font-size: 10px; white-space: nowrap; }
  .episode-chip { flex: 0 0 auto; white-space: nowrap; }
  .player-footer { grid-template-columns: 1fr 1fr; }.story-progress { display: none; }
  .custom-dialog form { padding: 34px 22px 25px; }.dialog-actions, .error-actions { grid-template-columns: 1fr; }
}

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