:root{--bg:#0f0d0b;--bg2:#171310;--card:#1f1915;--line:#332a24;--text:#f6efe6;--muted:#b9ab9c;--accent:#ff8a3d;--accent2:#ffd08a;--danger:#ff6b6b;--ok:#8fd694;--radius:16px;--maxw:520px}
*{box-sizing:border-box}html{color-scheme:dark}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 "Avenir Next","Trebuchet MS",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;padding-bottom:env(safe-area-inset-bottom)}
.skip{position:absolute;left:-999px;top:0;background:var(--accent);color:#000;padding:8px 12px;z-index:10}.skip:focus{left:8px}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;max-width:var(--maxw);margin:0 auto}
.brand{color:var(--text);text-decoration:none;display:flex;align-items:center;flex:0 0 auto;min-height:44px;border-radius:4px}
.brand-logo{display:block;width:148px;height:auto}
.brand:focus-visible{outline:3px solid var(--accent2);outline-offset:4px}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.top-side{display:flex;align-items:center;gap:8px;min-width:0}
.badge{font-size:12px;color:var(--accent2);border:1px solid var(--line);background:var(--bg2);padding:4px 10px;border-radius:999px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
/* Account chip: looks like the badge, acts like a button. Hidden unless the server reports payments_enabled. */
.chip{font:inherit;font-size:12px;font-weight:700;line-height:inherit;color:var(--text);border-color:var(--accent);cursor:pointer;flex:0 0 auto;min-height:0;-webkit-appearance:none;appearance:none}
.chip:hover{background:#2b1c10}.chip.zero{color:var(--danger);border-color:var(--danger)}
.linkbtn{font:inherit;font-weight:700;background:none;border:0;padding:0;margin:0;color:var(--accent2);text-decoration:underline;text-underline-offset:3px;cursor:pointer;display:inline;line-height:inherit}
.banner{background:#3a2a12;color:var(--accent2);text-align:center;padding:8px 12px;font-size:14px}
.banner.notice{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap}.banner .dismiss{text-decoration:none;font-size:18px;color:var(--muted);padding:0 6px}
.main{max-width:var(--maxw);margin:0 auto;padding:0 16px 32px}
.view{display:flex;flex-direction:column;gap:16px}.view[hidden],[hidden]{display:none!important}.view.center{align-items:center;text-align:center;padding-top:48px}
.title{font-family:Georgia,"Times New Roman",serif;font-size:30px;line-height:1.1;margin:4px 0 0;font-weight:700;letter-spacing:-.2px}.title.small{font-size:22px}
.lead{color:var(--muted);margin:0}.h2{font-size:15px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 10px}
.meta{color:var(--muted);font-size:14px;margin:4px 0 0}
.stage{background:#000;border-radius:var(--radius);overflow:hidden;border:1px solid var(--line);box-shadow:0 20px 60px rgba(0,0,0,.5)}
.stage-video{display:block;width:100%;aspect-ratio:9/16;max-height:70vh;object-fit:contain;background:#000}
.caption{margin:0;padding:10px 14px;color:var(--accent2);font-size:14px;border-top:1px solid var(--line);min-height:20px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.dl{color:var(--text);font-weight:700;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.movie-controls{display:grid;gap:10px;padding:12px 14px;border-top:1px solid var(--line);background:var(--bg2)}.movie-controls .status:empty{display:none}.movie-controls .row .btn{min-width:0}.movie-controls .hint{font-size:13px}
.hero{display:grid;gap:8px}
.eyebrow{margin:0;color:var(--accent);font-size:11px;line-height:1.5;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.scenario-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.sc{background:var(--card);border:1px solid var(--line);border-radius:14px;overflow:hidden;display:flex;flex-direction:column}
.sc-media{aspect-ratio:3/4;background:#000}.sc-media img{width:100%;height:100%;object-fit:cover;display:block}
.sc-body{padding:10px;display:flex;flex-direction:column;gap:6px;flex:1}.sc-body h3{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:17px;line-height:1.15}.sc-body p{margin:0;color:var(--muted);font-size:13px;line-height:1.35;flex:1}.sc-btn{margin-top:4px;padding:10px;font-size:14px}
.stage-sm .stage-video{max-height:38svh}
.opt{border-top:1px solid var(--line);padding-top:10px}.opt summary{cursor:pointer;color:var(--muted);font-size:14px;list-style:none;display:flex;align-items:center;gap:6px;min-height:32px}.opt summary::before{content:"+";font-weight:700;color:var(--accent)}.opt[open] summary::before{content:"–"}.opt summary::-webkit-details-marker{display:none}.opt .field{margin-top:10px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:12px}
.featured-movie{border-color:#775034;background:linear-gradient(125deg,#2b1c10,var(--card))}
.featured-intro{display:flex;align-items:center;gap:16px;min-width:0}
.featured-intro img{width:72px;height:96px;object-fit:cover;border-radius:10px;flex:0 0 auto}
.featured-intro h2{font-family:Georgia,"Times New Roman",serif;font-size:25px;line-height:1.15;margin:5px 0 0;overflow-wrap:anywhere}
.featured-movie>.hint{max-width:62ch}
.field{display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--muted)}.field small{opacity:.7}
input{font:inherit;color:var(--text);background:var(--bg2);border:1px solid var(--line);border-radius:12px;padding:12px 14px;min-height:48px}
input:focus,textarea:focus,button:focus-visible,.btn:focus-visible,.choice:focus-visible{outline:3px solid var(--accent2);outline-offset:2px}
/* Live mode: typed prompt */
textarea{font:inherit;color:var(--text);background:var(--bg2);border:1px solid var(--line);border-radius:12px;padding:12px 14px;min-height:96px;width:100%;resize:vertical;line-height:1.45;display:block}
textarea::placeholder{color:var(--muted);opacity:.7}
textarea[disabled]{opacity:.55;cursor:not-allowed;resize:none}
.prompt-field label{cursor:text}
.counter{font-size:12px;color:var(--muted);text-align:right;font-variant-numeric:tabular-nums;opacity:.85}.counter.full{color:var(--accent2);opacity:1}
.generating{margin:0;font-size:14px;color:var(--accent2);display:flex;align-items:center;gap:8px;min-height:20px}
.generating::before{content:"";flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 0 rgba(255,138,61,.55);animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{0%{opacity:.45;transform:scale(.8);box-shadow:0 0 0 0 rgba(255,138,61,.55)}50%{opacity:1;transform:scale(1.05);box-shadow:0 0 0 6px rgba(255,138,61,0)}100%{opacity:.45;transform:scale(.8);box-shadow:0 0 0 0 rgba(255,138,61,0)}}
.btn{font:inherit;font-weight:700;min-height:48px;padding:12px 18px;border-radius:12px;border:1px solid var(--line);background:var(--bg2);color:var(--text);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn.primary{background:var(--accent);color:#1a0d00;border-color:transparent}.btn.ghost{background:transparent}
.btn[disabled]{opacity:.5;cursor:not-allowed}.btn:not([disabled]):active{transform:translateY(1px)}
.row{display:flex;gap:10px;flex-wrap:wrap}.row.center{justify-content:center}.row .btn{flex:1}
.hint{margin:0;color:var(--muted);font-size:14px}.hint.warn{color:var(--accent2)}
.status{margin:0;font-size:14px;min-height:20px;color:var(--muted)}.status.err{color:var(--danger)}.status.ok{color:var(--ok)}
.choices{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.choice{text-align:left;font:inherit;background:var(--bg2);color:var(--text);border:2px solid var(--line);border-radius:14px;padding:12px 14px;min-height:56px;cursor:pointer;display:flex;flex-direction:column;gap:2px}
.choice[aria-pressed="true"]{border-color:var(--accent);background:#2b1c10}
.choice[disabled]{opacity:.45;cursor:not-allowed}.choice .lbl{font-weight:700}.choice .sub{font-size:13px;color:var(--muted)}
.scenes{list-style:none;margin:0;padding:0;display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px}
.scene{flex:0 0 118px;scroll-snap-align:start}
.scene button{width:100%;font:inherit;color:var(--text);background:var(--card);border:2px solid var(--line);border-radius:12px;padding:0;overflow:hidden;cursor:pointer;text-align:left}
.scene button[aria-current="true"]{border-color:var(--accent)}
.scene img{display:block;width:100%;aspect-ratio:9/16;object-fit:cover;background:#000}
.scene .t{padding:6px 8px;font-size:12px;line-height:1.3}.scene .t b{display:block;color:var(--accent2)}
.scene.pending button{border-style:dashed}.scene.pending .ph{aspect-ratio:9/16;display:grid;place-items:center;color:var(--muted);font-size:12px}
.spinner{width:36px;height:36px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.foot{max-width:var(--maxw);margin:0 auto;padding:12px 16px 24px;color:var(--muted);font-size:12px;text-align:center}
/* Credit hint under the prompt (live mode, payments on) */
.credit-hint{font-size:13px}.credit-hint.warn{color:var(--accent2)}
/* Panels: sign-in and credits. Dark scrim, bottom sheet on phones, centred card from 520px up. */
.overlay{position:fixed;inset:0;z-index:20;background:rgba(6,4,2,.7);display:flex;align-items:flex-end;justify-content:center;padding:12px;padding-bottom:calc(12px + env(safe-area-inset-bottom));-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.panel{width:100%;max-width:420px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow:auto;box-shadow:0 30px 80px rgba(0,0,0,.6);animation:rise .22s ease-out}
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.panel-title{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:20px;line-height:1.2}
.close{font:inherit;font-size:22px;line-height:1;width:40px;height:40px;flex:0 0 auto;border-radius:10px;border:1px solid var(--line);background:var(--bg2);color:var(--muted);cursor:pointer;display:grid;place-items:center;padding:0}
.close:hover{color:var(--text)}
.stack{display:flex;flex-direction:column;gap:12px}.auth-form{display:flex;flex-direction:column;gap:12px}
input[aria-invalid="true"]{border-color:var(--danger)}
.balance{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:28px;font-weight:700;line-height:1.1;color:var(--accent2)}.balance.zero{color:var(--danger)}
.packs{display:grid;gap:10px}
.pack{width:100%;gap:6px}.pack .lbl{font-weight:700}.pack .price{color:var(--accent2);font-variant-numeric:tabular-nums}
body.modal-open{overflow:hidden}
@media (max-width:380px){.top{padding:12px}.badge{max-width:40vw;padding:4px 8px}.chip{max-width:none}}
@media (min-width:520px){.overlay{align-items:center;padding:24px}}
@media (min-width:720px){:root{--maxw:820px}.title{font-size:36px}.scenario-grid{grid-template-columns:repeat(3,1fr);gap:16px}.hero{max-width:640px}.stage-sm .stage-video{max-height:60vh}.stage-video{max-height:78vh}}
@media (prefers-reduced-motion:reduce){*{animation-duration:.001ms!important;transition:none!important}.spinner{border-top-color:var(--line)}.generating::before{animation:none;opacity:1;transform:none;box-shadow:none}.panel{animation:none}.overlay{-webkit-backdrop-filter:none;backdrop-filter:none}}

.footlink{color:var(--muted);text-decoration:underline;text-underline-offset:3px;margin-left:8px}
.legal h1{font-size:24px;margin:16px 0 8px}.legal h2{font-size:17px;margin:24px 0 8px;color:var(--accent2)}.legal p,.legal li{color:var(--text)}.legal ul{padding-left:20px}.legal code{background:var(--bg2);padding:1px 5px;border-radius:5px;font-size:14px}.legal a{color:var(--accent2)}
.lock .hint b{color:var(--accent2)}
.branch-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.branch-heading .h2{margin:0}.branch-heading .linkbtn{min-height:44px;text-align:left;font-size:13px}
.branch-subtitle{font:inherit;font-size:14px;color:var(--accent2);margin:4px 0 10px;font-weight:700}.branch-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.branch-card{display:grid;grid-template-columns:84px minmax(0,1fr);gap:12px;background:var(--bg2);border:1px solid var(--line);border-radius:12px;padding:10px;min-width:0}.branch-card.selected{border-color:var(--accent);background:#2b1c10}.branch-card>img{width:84px;aspect-ratio:9/16;object-fit:cover;border-radius:8px;background:#000}
.branch-body{display:grid;gap:8px;min-width:0}.branch-label{margin:0;line-height:1.4;overflow-wrap:anywhere}.branch-body .hint{font-size:12px;overflow-wrap:anywhere}.branch-body .btn{padding:8px 10px;min-height:44px;font-size:13px}.branch-vote[aria-pressed="true"]{color:var(--accent2);border-color:var(--accent)}
.scene.pending>.ph{aspect-ratio:9/16;border:1px dashed var(--line);border-radius:12px;display:grid;place-items:center;text-align:center;color:var(--accent2);font-size:13px;padding:8px}
.my-stories{margin-top:6px}.story-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}.story-list li{margin:0}.story-list button{width:100%;display:grid;grid-template-columns:44px 1fr;gap:10px;align-items:center;text-align:left;font:inherit;color:var(--text);background:var(--bg2);border:1px solid var(--line);border-radius:12px;padding:8px;cursor:pointer}.story-list img{width:44px;height:78px;object-fit:cover;border-radius:8px;background:#000}.story-list b{display:block;font-size:15px}.story-list span{color:var(--muted);font-size:13px}

/* Public creator identity: compact credits beside scenes, a larger monogram on the profile. */
.creator-link{display:inline-flex;align-items:center;gap:7px;max-width:100%;min-height:36px;color:var(--accent2);font-weight:700;text-decoration:underline;text-underline-offset:3px;vertical-align:middle;border-radius:5px}
.creator-link>span:last-child{overflow-wrap:anywhere;min-width:0}.creator-link:hover{color:var(--text)}
.creator-link:focus-visible,.profile-scene:focus-visible{outline:3px solid var(--accent2);outline-offset:3px}
.creator-avatar{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:25px;height:25px;border-radius:50%;border:1px solid #775034;background:#2b1c10;color:var(--accent2);font-family:Georgia,"Times New Roman",serif;font-size:14px;font-weight:700;line-height:1;text-decoration:none}
#roomCaption{overflow-wrap:anywhere;min-width:0}.branch-credit{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.scene-credit{font-size:11px;line-height:1.35;padding:3px 2px;overflow-wrap:anywhere}.scene-credit .creator-link{gap:5px;min-height:44px}.scene-credit .creator-avatar{width:20px;height:20px;font-size:12px}
.profile-head{display:flex;align-items:center;gap:16px;padding:18px 0 8px;min-width:0}.profile-head>div{min-width:0}.profile-head .title{overflow-wrap:anywhere;margin-top:4px}.profile-avatar{width:72px;height:72px;font-size:36px;border-color:var(--accent)}
.profile-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.profile-grid>li{min-width:0}
.profile-scene{display:flex;flex-direction:column;height:100%;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--text);text-decoration:none}.profile-scene:hover{border-color:var(--accent)}
.profile-scene>img{display:block;width:100%;aspect-ratio:9/12;object-fit:cover;background:#000}.profile-scene-body{display:flex;flex-direction:column;gap:6px;padding:12px;flex:1;overflow-wrap:anywhere}.profile-scene h3{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:18px;line-height:1.25}.profile-scene p{margin:0;color:var(--muted);font-size:13px}.profile-scene .profile-scene-meta{font-size:12px}.profile-watch{margin-top:auto;padding-top:8px;font-size:13px;font-weight:700;color:var(--accent2)}
.profile-form{padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.profile-form .h2{margin-bottom:0}.profile-form .row .btn{font-size:13px;padding:10px 12px;min-width:0}.profile-form input{min-width:0;width:100%}
@media (min-width:720px){.profile-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.profile-avatar{width:88px;height:88px;font-size:44px}}
@media (max-width:380px){.profile-head{gap:12px}.profile-avatar{width:60px;height:60px;font-size:30px}.profile-scene-body{padding:10px}.profile-scene h3{font-size:16px}.profile-form .row{flex-direction:column}}

/* Movie night (friend groups) */
.movie-night .steps { margin: .5rem 0 .75rem; padding-left: 1.25rem; display: grid; gap: .35rem; }
.movie-night .steps li { line-height: 1.4; }
.people { margin-top: .25rem; }
.people a { color: inherit; }
.whatnow { margin-top: .35rem; padding: .5rem .75rem; border-radius: .6rem; background: var(--bg2); border: 1px solid var(--line); line-height: 1.45; }
.sponsor { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.field.inline input[type=number] { -moz-appearance: textfield; }
.field.inline { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.field.inline input { width: 5rem; }
