/* The movie becomes a scrollable playground only after its final dissolve. */
#screen[data-kind=closing]{height:auto;min-height:100dvh;overflow:visible}
#screen[data-kind=closing]>#stage,#screen[data-kind=closing]>.shade,#screen[data-kind=closing]>#captionArea,#screen[data-kind=closing]>#progress,#screen[data-kind=closing]>#storyProgress{display:none!important}
#afterMovie{padding:115px max(6vw,20px) 70px;max-width:1440px;margin:auto}
#tryIt{border-bottom:1px solid #b7d79424;padding-bottom:64px}
.try-heading{max-width:650px;margin-bottom:32px}.try-heading h2{font-size:clamp(42px,6vw,76px);font-weight:500;line-height:1;letter-spacing:-.055em;margin:12px 0 16px}.try-heading>p:last-child{color:#adb9a3;line-height:1.6;font-size:15px}
.try-label{font-size:12px;font-weight:600;letter-spacing:.025em;color:#cbd7c2;margin-bottom:12px;display:block}
#tryCharacters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;max-width:600px;margin-bottom:28px}
.try-character{padding:7px;border-radius:13px;background:#171c13;border:1px solid #35442c;display:flex;flex-direction:column;gap:9px;align-items:center;font-size:12px;line-height:1.25}
.try-character[aria-pressed=true]{border-color:#c0ef87;background:#25341b;box-shadow:0 0 0 1px #c0ef87}
.try-face{display:block;position:relative;aspect-ratio:1;width:100%;overflow:hidden;border-radius:8px;background:#283022}.try-face img{position:absolute;height:auto;max-width:none}
.try-character span{padding:0}.try-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.92fr);gap:32px;align-items:start}
#tryPlayer{position:sticky;top:20px;min-width:0;scroll-margin-top:16px;border:1px solid #52664155;border-radius:18px;overflow:hidden;background:#161c11}
/* Keep the WebGL surface stable while mobile browser bars expand/collapse.
   svh still follows real window/orientation changes; vh is the legacy fallback.
   Do not use dvh here: resizing an iframe clears its avatar drawing buffer. */
#tryViewport{height:min(63vh,580px);height:min(63svh,580px);min-height:220px;position:relative;background:#10130e}
#tryViewport iframe{position:absolute;inset:0;border:0;width:100%;height:100%;pointer-events:none}
#tryViewport[data-loading=true] iframe{visibility:hidden}
#tryPoster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 28%;filter:brightness(.65)}
#tryLoading{position:absolute;inset:0;display:grid;place-items:center;padding:30px;text-align:center;color:#e0e9d9;background:#10130e55;font-size:14px;line-height:1.5}
.try-player-bar{display:flex;align-items:center;gap:14px;min-height:67px;padding:12px 16px}.try-player-bar>div{min-width:0;flex:1}.try-player-bar strong{font-size:14px;font-weight:500}.try-player-bar p{font-size:11px;color:#acbda0;margin-top:5px}
.try-player-bar button{min-height:44px;padding:10px 20px;border-radius:25px;background:#c0ef87;color:#192214;border-color:#c0ef87;font-size:13px;font-weight:600;min-width:78px}
.try-controls{min-width:0}.try-field{border:0;padding:0;margin:0 0 24px;min-width:0}.try-field legend{padding:0}
.try-options{display:flex;flex-wrap:wrap;gap:8px}.try-options button{font-size:12px;border-radius:22px;padding:10px 15px;min-height:44px;background:#171e13;border-color:#405332}
.try-options button[aria-pressed=true]{border-color:#c0ef87;color:#d8f4b6;background:#2b3b1e}
#trySamples{display:grid;gap:8px;grid-template-columns:1fr}
#trySamples[data-kind=words]{grid-template-columns:repeat(2,minmax(0,1fr))}
.try-sample{border-radius:10px;padding:13px 16px;min-height:48px;text-align:left;line-height:1.45;font-size:13px;background:#151b11;border-color:#35452b;color:#c9d5c0;overflow-wrap:anywhere}
.try-sample[aria-pressed=true]{border-color:#c0ef87;background:#26351b;color:#f1f8e8;box-shadow:inset 3px 0 #c0ef87}
#tryPlaySelection{width:100%;min-height:48px;border-radius:9px;background:#c0ef87;border-color:#c0ef87;color:#192214;font-weight:600;font-size:14px}
#tryStatus{font-size:12px;line-height:1.5;color:#aaba9d;min-height:36px;margin:12px 0 0}#tryStatus[data-error=true]{color:#f9b3a3}#tryRetry{margin-top:9px;padding:9px 14px;font-size:12px}
.try-custom{border:1px solid #b5d39425;border-radius:15px;background:#171e13;margin-top:32px;padding:24px}
.try-custom-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.try-custom-head h3{font-size:19px;font-weight:500;letter-spacing:-.02em;margin:0}.try-badge{font-size:9px;letter-spacing:.1em;color:#bed2a7;border:1px solid #5b714644;border-radius:20px;padding:6px 10px;white-space:nowrap}
#tryCustomLabel{font-size:13px;display:block;margin-bottom:12px}#tryCustomText{display:block;width:100%;border:1px solid #526444;background:#10170c;color:#eff5e9;border-radius:8px;font-size:15px;line-height:1.5;padding:14px;min-height:95px;resize:vertical}
.try-custom-meta{display:flex;gap:12px;justify-content:space-between;font-size:11px;color:#9fae92;line-height:1.5;margin:9px 0 16px}
#tryCustomSubmit{min-height:44px;border-radius:8px;font-size:12px;padding:10px 16px;background:transparent;border-color:#729652;color:#e4f4d4}
#tryCustomResult{font-size:12px;line-height:1.5;color:#c1cfb5;margin-top:14px}#tryCustomResult:empty{display:none}.try-custom-note{font-size:11px;color:#91a281;line-height:1.5;margin-top:13px}
#screen[data-kind=closing] #ending{position:static;padding:74px 0 0;max-width:1100px}
#screen[data-kind=closing] #ending h2{font-size:clamp(60px,10vw,150px)}#screen[data-kind=closing] #waitlist{padding:16px 28px}
@media(max-width:800px){
 #afterMovie{padding:104px 6vw 50px}.try-heading{margin-bottom:25px}.try-heading>p:last-child{font-size:13px}#tryCharacters{gap:7px;margin-bottom:23px}.try-character{padding:5px;gap:7px;font-size:10px;border-radius:10px}.try-face{border-radius:6px}
 .try-workspace{grid-template-columns:1fr;gap:27px}#tryPlayer{position:relative;top:auto;scroll-margin-top:12px}#tryViewport{height:58vh;height:58svh;min-height:190px;max-height:500px}.try-player-bar{min-height:62px;padding:10px 13px}.try-player-bar p{font-size:10px}
 .try-options{gap:7px}.try-options button{padding:9px 13px}.try-field{margin-bottom:22px}.try-custom{padding:19px;margin-top:24px}.try-custom-head{align-items:flex-start;gap:8px}.try-custom-head h3{font-size:17px}.try-badge{font-size:8px;padding:5px 8px}
 #screen[data-kind=closing] #ending{padding-top:54px}#screen[data-kind=closing] #ending h2{font-size:18vw}#screen[data-kind=closing] #ending>p{font-size:20px;max-width:none}
}
@media(max-height:500px) and (min-aspect-ratio:6/5){#tryViewport{height:55vh;height:55svh;min-height:120px}.try-player-bar{min-height:54px}#tryPlayer{top:10px}}
/* Keep iPhone Safari from auto-zooming when the text field receives focus. */
#tryCustomText{font-size:16px}
