:root { color-scheme:light; --paper:#e5dfcf; --ink:#303d2b; --sub:#59634e; --line:#a4aa93; }
* { box-sizing:border-box; }
html,body { margin:0; width:100%; height:100%; }
body { background:var(--paper); color:var(--ink); font-family:Arial,"Apple SD Gothic Neo","Malgun Gothic",sans-serif; }
button,input { font:inherit; }
button { touch-action:manipulation; }
[hidden] { display:none!important; }
.experience { position:relative; width:100%; height:100svh; min-height:580px; isolation:isolate; overflow:hidden; }
#scene { position:absolute; inset:0; z-index:-2; }
#scene canvas { display:block; width:100%; height:100%; }
.veil { position:absolute; inset:0; z-index:-1; pointer-events:none; background:linear-gradient(90deg,rgba(236,231,216,.94),rgba(236,231,216,.82) 20%,rgba(236,231,216,.15) 44%,transparent 61%); transition:opacity .8s; }
.topbar { position:absolute; inset:clamp(24px,4vw,54px) clamp(24px,5vw,80px) auto; display:flex; align-items:center; justify-content:space-between; }
.brand { display:flex; align-items:center; gap:10px; font-size:18px; font-weight:500; letter-spacing:.02em; }
.brand-mark { display:grid; place-items:center; width:32px; height:32px; border:1px solid #697355; border-radius:50%; color:#526142; font-family:serif; font-size:16px; }
.edition { display:flex; align-items:center; gap:12px; color:var(--sub); font-size:11px; letter-spacing:.04em; }
.edition-rule { width:24px; height:1px; background:var(--line); }
.intro { position:absolute; left:clamp(28px,7vw,112px); top:48%; transform:translateY(-40%); width:min(34vw,430px); }
h1 { font-family:"Noto Serif KR","AppleMyungjo",serif; margin:0; font-size:clamp(36px,4.3vw,65px); font-weight:400; line-height:1.35; letter-spacing:-.065em; word-break:keep-all; overflow-wrap:break-word; }
.intro p { margin:20px 0 25px; color:var(--sub); font-size:14px; line-height:1.9; word-break:keep-all; }
.primary-button { display:flex; justify-content:space-between; align-items:center; min-width:208px; min-height:50px; gap:28px; border:1px solid #46573b; padding:15px 19px; background:#46573b; color:#f8f3e5; cursor:pointer; transition:background .25s; }
.primary-button:hover { background:#34442c; }
.primary-button span:first-child { font-size:13px; }
.primary-button span:last-child { font-size:19px; }
.replay-button { display:block; min-height:44px; border:0; background:none; padding:10px 0; color:#46573b; font-size:12px; text-decoration:underline; text-underline-offset:5px; cursor:pointer; }
button:focus-visible,summary:focus-visible,input:focus-visible { outline:2px solid #526142; outline-offset:5px; }
.action-status { min-height:1.5em; margin:12px 0 0!important; font-size:11px!important; color:var(--sub); }
.footer { position:absolute; right:clamp(24px,5vw,80px); bottom:max(20px,env(safe-area-inset-bottom)); display:flex; align-items:center; gap:8px; }
.sound-button,.sound-settings summary { display:flex; align-items:center; gap:7px; min-height:44px; padding:10px 8px; border:0; background:none; color:var(--sub); font-size:11px; cursor:pointer; }
.sound-icon { font-size:18px; }
.sound-settings { position:relative; }
.sound-settings summary { list-style:none; }
.sound-settings summary::-webkit-details-marker { display:none; }
.sound-options { position:absolute; bottom:52px; right:0; width:210px; padding:18px; background:#f4efdf; border:1px solid #bfc3aa; box-shadow:0 8px 30px #26321b13; font-size:12px; }
.sound-options label { display:flex; align-items:center; gap:10px; min-height:40px; }
.sound-options input { accent-color:#46573b; width:18px; height:18px; }
.tea-info { position:absolute; left:clamp(24px,5vw,80px); bottom:max(20px,env(safe-area-inset-bottom)); max-width:290px; font-size:11px; color:var(--sub); }
.tea-info summary { min-height:44px; padding:14px 0; cursor:pointer; }
.tea-info p { position:absolute; bottom:46px; width:290px; margin:0; padding:16px; background:#f4efdf; border:1px solid #bfc3aa; line-height:1.8; }
.tea-info a { color:inherit; }
.fallback { position:absolute; inset:auto 20px 90px; padding:18px; background:#f8f1e8; border:1px solid #c4b7a4; font-size:14px; }
.is-acting .veil { opacity:.65; }
@media(max-width:720px) {
 .experience { height:100svh; min-height:600px; }
 .topbar { top:max(20px,env(safe-area-inset-top)); left:24px; right:24px; }
 .edition { font-size:10px; gap:8px; }
 .edition-label { display:none; }
 /* The same 3D room fills the whole screen; no separate lower background. */
 .veil { background:linear-gradient(180deg,rgba(229,223,207,.88),transparent 17%,transparent 37%,rgba(229,223,207,.12) 48%,rgba(229,223,207,.83) 65%,rgba(229,223,207,.98) 84%); }
 .is-acting .veil { opacity:1; }
 .intro { top:auto; bottom:calc(92px + env(safe-area-inset-bottom)); left:26px; right:26px; width:auto; transform:none; }
 h1 { font-size:clamp(30px,8vw,39px); line-height:1.22; letter-spacing:-.06em; }
 h1 br { display:initial; }
 .intro p { font-size:13px; line-height:1.8; margin:13px 0 18px; }
 .primary-button { width:100%; min-height:52px; }
 .replay-button { min-height:44px; margin:4px 0 0; }
 .action-status { margin-top:10px!important; }
 .footer { right:18px; bottom:max(12px,env(safe-area-inset-bottom)); }
 .tea-info { left:26px; bottom:max(12px,env(safe-area-inset-bottom)); }
 .tea-info p { width:min(290px,calc(100vw - 52px)); }
 .sound-options { width:205px; }
}
@media(max-width:720px) and (max-height:700px) {
 .experience { min-height:540px; }
 .intro { bottom:72px; }
 h1 { font-size:29px; }
 .intro p { margin:9px 0 12px; font-size:12px; }
 .primary-button { min-height:48px; padding:12px 16px; }
 .veil { background:linear-gradient(180deg,rgba(229,223,207,.88),transparent 17%,transparent 32%,rgba(229,223,207,.80) 59%,var(--paper) 85%); }
}
@media(min-width:721px) and (max-height:600px) {
 .experience { min-height:430px; }
 .intro { top:48%; }
 h1 { font-size:34px; }
 .intro p { margin:12px 0; font-size:12px; }
 .topbar { top:18px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition-duration:.01ms!important; animation-duration:.01ms!important; } }

.title-line { display:block; }
.actions { min-height:126px; }
@media(max-width:720px) { .actions { min-height:140px; } .intro { bottom:calc(65px + env(safe-area-inset-bottom)); } }
