/* 게임(v3) 전용 스타일 — ds.css 의 토큰(색·서체·자막 변수)만 사용합니다. 새 색 추가 없음. */
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
[data-scene="cine"] { --bg: var(--burgundy-dark); --ink: var(--ivory); }
#canvas { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; overflow: hidden; z-index: 1; color: var(--ink); font-family: var(--font-body); word-break: keep-all; user-select: none; }
button { font-family: inherit; }
.layer { position: absolute; inset: 0; }

/* ---- 장면 배경 (이미지가 없으면 자리표시) ---- */
.bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { display: grid; place-items: start; padding: 96px 90px; box-sizing: border-box; }
#back::before, #back::after { content: none; }
#back.ph { background: linear-gradient(135deg, var(--paleblue), var(--paleblue-light)); }
#back.ph::before, #back.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(46,3,18,.14) 50%, transparent calc(50% + 1px)); }
#back.ph::after { transform: scaleX(-1); }
.ph .id { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: .08em; color: var(--burgundy-dark); background: var(--ivory); padding: 4px 16px; border-radius: 999px; }
.ph .ds { position: relative; z-index: 1; margin-top: 20px; max-width: 980px; font-size: 22px; line-height: 1.45; color: var(--burgundy-dark); background: rgba(250,244,239,.88); padding: 14px 22px; border-radius: 18px; }
.shade { background: linear-gradient(to top, rgba(46,3,18,.88) 0, rgba(46,3,18,.6) 28%, rgba(46,3,18,0) 55%); pointer-events: none; }
.scrim { background: rgba(70,14,33,.80); }

/* ---- HUD ---- */
.hud { position: absolute; left: 48px; right: 48px; top: 28px; display: flex; gap: 14px; align-items: center; font-size: 20px; color: var(--cap-ink); z-index: 6; pointer-events: none; }
.hud .who { font-weight: 700; background: var(--burgundy-dark); padding: 2px 16px; border-radius: 999px; }
.hud .dots { display: flex; gap: 8px; }
.hud .dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.35); }
.hud .dots i.on { background: var(--paleblue); }
.hud .cards { margin-left: auto; display: flex; gap: 8px; }
.hud .cards span { background: var(--burgundy); color: var(--ivory); padding: 2px 14px; border-radius: 12px; font-size: 20px; animation: pop .4s; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- 자막 / 대사 ---- */
.cap { position: absolute; left: 170px; right: 170px; bottom: var(--cap-bottom); text-align: center; z-index: 5; color: var(--cap-ink); text-shadow: 0 2px 16px rgba(0,0,0,.55); }
.cap .nm { display: block; font-size: 22px; letter-spacing: .1em; color: var(--tag-ink); margin-bottom: 12px; }
.cap .tx { white-space: pre-line; display: block; font-size: 34px; line-height: 1.32; text-wrap: pretty; min-height: 1.32em; }
.cap.nar .tx { opacity: .85; }
.cap.hook .tx { color: var(--paleblue-light); font-weight: 700; }
.cap.ai .tx { font-family: var(--font-mono); font-size: 30px; color: var(--paleblue-light); }
.hit { position: absolute; left: 0; right: 0; bottom: 44px; text-align: center; font-size: 22px; color: var(--paleblue-light); z-index: 5; opacity: 0; }
.hit.on { opacity: 1; animation: blink 1.1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.tap { position: absolute; inset: 0; z-index: 4; cursor: pointer; background: none; border: 0; }

/* ---- 선택 ---- */
.choice { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; padding: 96px 70px 50px; box-sizing: border-box; }
.choice .kick { font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; font-size: 22px; color: var(--paleblue); }
.choice .q { font-size: 42px; margin: 8px 0 6px; color: var(--ivory); }
.choice .hint { font-size: 22px; color: var(--paleblue); margin: 0 0 26px; }
.choice .opts { display: flex; gap: 24px; flex: 1; min-height: 0; align-items: flex-start; }
.opt { flex: 1; min-width: 0; text-align: left; cursor: pointer; background: var(--surface); color: var(--surface-ink); border: 3px solid var(--line); border-radius: 36px; padding: 28px 30px; display: flex; flex-direction: column; gap: 14px; position: relative; transition: transform .15s, background .15s; }
.choice .opt { background: color-mix(in srgb, var(--ivory) 94%, var(--burgundy-dark)); color: var(--burgundy-dark); border-color: transparent; }
.opt:hover, .opt:focus-visible { transform: translateY(-6px); background: var(--paleblue-light); }
.opt .lab { font-size: 28px; font-weight: 800; line-height: 1.25; padding-right: 36px; }
.opt .lab em { display: inline-block; font-style: normal; font-size: 20px; font-weight: 700; color: var(--ivory); background: var(--burgundy); border-radius: 999px; padding: 0 12px; margin-left: 10px; vertical-align: middle; letter-spacing: .06em; }
.opt .say { font-size: 22px; line-height: 1.4; font-weight: 600; }
.opt .sub { font-size: 22px; line-height: 1.4; color: var(--muted); }
.opt .gl { font-size: 24px; line-height: 1.4; }
.opt .gl b { display: block; font-size: 20px; letter-spacing: .08em; color: var(--muted); }
.opt .gl.lose { color: var(--burgundy); font-weight: 700; } .opt .gl.lose b { color: var(--burgundy); }
.opt .bd { align-self: flex-start; font-size: 20px; font-weight: 800; padding: 2px 14px; border-radius: 999px; }
.opt .bd.ok { background: var(--burgundy-dark); color: var(--ivory); } .opt .bd.weak { background: var(--ivory-dark); color: var(--burgundy-dark); }
.opt.push { margin-top: auto; }

/* ---- 인물 선택 (아이보리 장면) ---- */
.sel { position: absolute; inset: 0; padding: 70px 90px 60px; box-sizing: border-box; display: flex; flex-direction: column; text-align: center; }
.sel .brand { font-size: 28px; letter-spacing: .12em; }
.sel h1 { font-family: var(--font-display); font-size: 52px; line-height: 1.25; margin: 20px 0 6px; text-wrap: balance; }
.sel .lede { font-size: 24px; margin: 0 0 34px; }
.sel .opts { display: flex; gap: 28px; flex: 1; min-height: 0; margin-bottom: 18px; }
.sel .opt { background: var(--paleblue-light); text-align: center; align-items: center; justify-content: center; border: 3px solid var(--line); gap: 18px; }
.sel .opt:hover { background: var(--paleblue); }
.sel .kw { font-family: var(--font-display); font-weight: 700; letter-spacing: .16em; font-size: 24px; color: var(--burgundy); }
.sel .nm { font-size: 46px; font-weight: 800; }
.sel .pr { font-size: 24px; line-height: 1.4; }
.sel .done { font-size: 22px; font-weight: 700; color: var(--burgundy); min-height: 28px; }

/* ---- 엔딩 / 마지막 질문 (짙은 버건디 장면) ---- */
.endmark { position: absolute; left: 90px; top: 96px; z-index: 6; color: var(--ivory); }
.endmark .id { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: .1em; color: var(--paleblue); }
.endmark h2 { font-family: var(--font-display); font-size: 58px; margin: 6px 0 0; line-height: 1.1; text-shadow: 0 4px 24px rgba(0,0,0,.5); }
.dil { position: absolute; pointer-events: none; left: 170px; right: 170px; top: 250px; text-align: center; font-size: 36px; line-height: 1.4; font-weight: 700; color: var(--ivory); text-wrap: balance; z-index: 5; }
.final { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 140px; box-sizing: border-box; gap: 26px; color: var(--ivory); }
.final .big { font-size: 48px; line-height: 1.4; font-weight: 800; text-wrap: balance; opacity: 0; animation: rise 1.4s ease .2s forwards; }
.final .btns { display: flex; gap: 24px; margin-top: 16px; opacity: 0; animation: rise 1s ease 1.4s forwards; }
.final .dex { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; font-size: 22px; opacity: 0; animation: rise 1s ease 1.8s forwards; }
.final .dex span { border: 2px solid var(--paleblue); color: var(--paleblue); border-radius: 999px; padding: 2px 16px; }
.final .dex span.on { background: var(--paleblue); color: var(--burgundy-dark); font-weight: 700; }
.final .btn { color: var(--ivory); border-color: var(--ivory); }
.final .btn.primary { color: var(--burgundy-dark); background: var(--ivory); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .final .big, .final .btns, .final .dex { animation: none; opacity: 1; } .hit.on { animation: none; } }

.quiet .id, .quiet .ds { display: none; }

/* 클릭이 항상 tap 층으로 가도록 */
.cap, .hit, .hud, .endmark, .dil, .pos { pointer-events: none; }
.tap { position: absolute; inset: 0; z-index: 4; cursor: pointer; }
.cap.top { bottom: auto; top: 250px; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.shade.up { background: linear-gradient(to bottom, rgba(46,3,18,.9) 0, rgba(46,3,18,.65) 40%, rgba(46,3,18,0) 70%); }
.endmark { top: 80px; } .endmark .id { font-size: 22px; }
.opt .scope { font-size: 20px; color: var(--muted); border-top: 2px solid var(--line); padding-top: 10px; margin-top: auto; }
/* 입장 카드 */
.pos { position: absolute; inset: 0; padding: 150px 160px 0; box-sizing: border-box; color: var(--ivory); }
.pos .kick { font-family: var(--font-display); font-weight: 700; letter-spacing: .1em; font-size: 24px; color: var(--paleblue); }
.pos h2 { font-size: 44px; line-height: 1.35; margin: 14px 0 44px; font-weight: 700; text-wrap: balance; max-width: 1100px; }
.pos .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pos .rows div { background: color-mix(in srgb, var(--ivory) 10%, transparent); border-radius: 28px; padding: 24px 28px; font-size: 26px; line-height: 1.45; }
.pos b { display: block; font-size: 20px; letter-spacing: .08em; color: var(--paleblue); margin-bottom: 8px; }
.pos .pw { display: flex; align-items: center; gap: 18px; margin-top: 40px; font-size: 26px; }
.pos .pw b { margin: 0; }
.pos .dots { display: flex; gap: 10px; } .pos .dots i { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--paleblue); } .pos .dots i.on { background: var(--paleblue); }
.pos .pl { color: var(--paleblue); font-weight: 700; }
html, body { width: 100%; }

.ph.low { align-content: end; padding-top: 0; padding-bottom: 120px; }
.ph.low .id { align-self: end; }

/* 인물 카드: 프로필 이미지(투명 PNG 가능) */
.sel .opt { justify-content: flex-start; padding: 0 0 22px; overflow: hidden; gap: 8px; }
.sel .pf { width: 100%; height: 400px; flex: none; background: linear-gradient(160deg, var(--paleblue), var(--paleblue-light)); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; margin-bottom: 14px; }
.sel .pf img { height: 100%; width: auto; max-width: 100%; object-fit: cover; object-position: center top; display: block; }
.sel .nop { align-self: center; font-family: var(--font-display); letter-spacing: .2em; font-size: 22px; color: var(--burgundy-dark); opacity: .4; }
.sel .nm { font-size: 40px; } .sel .pr { font-size: 22px; padding: 0 24px; } .sel .kw { font-size: 20px; }
.sel h1 { font-size: 44px; margin: 14px 0 4px; } .sel .lede { font-size: 22px; margin: 0 0 22px; } .sel { padding-top: 48px; padding-bottom: 36px; }

.cap.right { left: 860px; right: 80px; }

#back { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
#back .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* 거울 / 프로필 카드 */
.frame { position: relative; flex: none; overflow: hidden; background: linear-gradient(160deg, var(--paleblue), var(--paleblue-light)); display: flex; align-items: flex-end; justify-content: center; }
.frame img { height: 100%; width: auto; max-width: 100%; object-fit: cover; object-position: center top; display: block; }
.frame .nop { align-self: center; font-family: var(--font-display); letter-spacing: .2em; font-size: 22px; color: var(--burgundy-dark); opacity: .4; }
.frame.mir { width: 440px; height: 600px; border-radius: 220px 220px 28px 28px; border: 12px solid var(--ivory-dark); box-shadow: 0 0 0 4px var(--burgundy), 0 30px 60px rgba(0,0,0,.45); }
.frame.mir::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.35) 0, rgba(255,255,255,0) 38%); pointer-events: none; }
.frame.sm { width: 300px; height: 380px; border-radius: 150px 150px 24px 24px; border: 8px solid var(--ivory-dark); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.mirror { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 90px; padding: 0 140px; box-sizing: border-box; pointer-events: none; }
.mirror .mt { max-width: 640px; color: var(--ivory); }
.mirror .mt p { font-size: 38px; line-height: 1.5; margin: 0 0 24px; font-weight: 600; text-wrap: balance; }
.pcard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -56%); z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none; color: var(--ivory); }
.pcard .pn { font-size: 40px; font-weight: 800; margin-top: 12px; }
.pcard .pr { font-size: 22px; letter-spacing: .12em; color: var(--burgundy-dark); background: var(--paleblue-light); padding: 2px 18px; border-radius: 999px; font-weight: 700; }
.choice .opts { align-items: center; }

/* ===================== v4 (시나리오 대본집) 추가 ===================== */
[data-scene="title"] { --bg: var(--burgundy-dark); --ink: var(--ivory); }

/* 설정 층 (장면이 바뀌어도 유지): 톱니바퀴 + 설정창 */
#ui { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; z-index: 10; pointer-events: none; font-family: var(--font-body); word-break: keep-all; }
#gear { position: absolute; right: 40px; top: 24px; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ivory); filter: drop-shadow(0 1px 6px rgba(0,0,0,.55)); display: grid; place-items: center; cursor: pointer; pointer-events: auto; transition: transform .15s; }
#gear:hover, #gear:focus-visible { transform: rotate(30deg); outline: none; }
[data-scene="1"] #gear { color: var(--burgundy-dark); filter: none; }
#gear svg { width: 44px; height: 44px; }
[data-scene="title"] #gear { display: none; }
.setp { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(70,14,33,.76); pointer-events: auto; z-index: 3; }
.setp .card { width: 760px; box-sizing: border-box; background: var(--ivory); color: var(--burgundy-dark); border-radius: 40px; padding: 40px 52px 36px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.setp h3 { font-family: var(--font-display); font-size: 44px; margin: 0 0 26px; }
.srow { display: grid; grid-template-columns: 56px 1fr 72px; align-items: center; gap: 20px; padding: 16px 0; border-top: 2px solid var(--ivory-dark); }
.srow.one { grid-template-columns: 1fr; }
.smute { width: 56px; height: 56px; padding: 0; border: 0; background: none; color: var(--burgundy-dark); cursor: pointer; display: grid; place-items: center; } .smute svg { width: 40px; height: 40px; } .smute:hover { color: var(--burgundy); }
.snote { font-size: 16px; opacity: .6; margin-right: auto; align-self: center; }
.srow label { font-size: 24px; font-weight: 800; }
.srow output { font-size: 24px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.srow input[type=range] { width: 100%; height: 44px; accent-color: var(--burgundy); cursor: pointer; }
.sbtn { font-size: 24px; font-weight: 800; padding: 10px 26px; border-radius: 999px; border: 0; background: none; color: var(--burgundy-dark); cursor: pointer; }
.sbtn:hover, .sbtn:focus-visible { text-decoration: underline; text-underline-offset: 6px; outline: none; }
.sbtn.primary { background: var(--burgundy-dark); color: var(--ivory); }
.sbtn.primary:hover { background: var(--burgundy); text-decoration: none; }
.sbtn small { opacity: .6; font-size: 18px; }
.sfoot { display: flex; justify-content: flex-end; border-top: 2px solid var(--ivory-dark); padding-top: 22px; margin-top: 8px; }

/* 첫 화면 */
.title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 64px; gap: 14px; text-align: center; box-sizing: border-box; z-index: 5; }
.title .sub { font-size: 24px; letter-spacing: .14em; color: var(--paleblue-light); text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.title h1 { font-family: var(--font-display); font-weight: 700; font-size: 84px; line-height: 1.05; margin: 0; color: var(--ivory); text-shadow: 0 4px 30px rgba(0,0,0,.55); }
.title .btns { display: flex; gap: 48px; margin-top: 0; }
.tbtn { font-size: 46px; font-weight: 800; padding: 10px 28px; border: 0; background: none; color: var(--ivory); cursor: pointer; text-shadow: 0 3px 20px rgba(0,0,0,.6); }
.tbtn:hover, .tbtn:focus-visible { text-decoration: underline; text-underline-offset: 10px; text-decoration-thickness: 3px; outline: none; }

/* 길티 바이 디폴트 소개 팝업 */
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* 인물 카드: 역할 줄 */
.sel .rl { font-size: 22px; font-weight: 800; background: var(--burgundy-dark); color: var(--ivory); border-radius: 999px; padding: 2px 18px; }
.sel .opt { padding-left: 14px; padding-right: 14px; }
.sel .pr { padding: 0 14px; }
.opt .lab { font-size: 26px; }
.final .dex span.cnt { border-color: var(--ivory); color: var(--ivory); }
.cap.ai .tx { text-align: left; display: inline-block; max-width: 1180px; line-height: 1.5; }

.title .ttl { position: absolute; left: 64px; top: 52px; text-align: left; color: var(--ivory); text-shadow: 0 3px 24px rgba(0,0,0,.6); }
.title .ttl h1 { font-family: 'PP Frama', var(--font-display); font-weight: 400; font-size: 112px; line-height: 1; letter-spacing: -.01em; margin: 0; }
.title .ttl p { font-size: 30px; font-weight: 500; letter-spacing: .02em; margin: 22px 0 0; }

/* 인물 선택: 좌측 정렬, 고른 인물은 숨김 */
.sel, .sel h1 { text-align: left; }
.sel .opts { justify-content: flex-start; }
.sel .opt { flex: 0 0 calc((100% - 56px) / 3); text-align: left; align-items: flex-start; padding-left: 0; padding-right: 0; }
.sel .kw, .sel .nm, .sel .rl, .sel .pr { align-self: stretch; text-align: left; padding-left: 28px; padding-right: 28px; }
.sel .rl { align-self: flex-start; margin-left: 28px; padding-left: 18px; padding-right: 18px; }
.sel .done { display: none; }
.sel h1 { margin: 14px 0 36px; }

.final .more { font-size: 24px; color: var(--paleblue); opacity: 0; animation: rise 1s ease 1.2s forwards; text-align: center; }
@media (prefers-reduced-motion: reduce) { .final .more { animation: none; opacity: .9; } }

/* 첫 화면 버튼: 우측, 위(플레이·크게) 아래(설정) */
.title .btns { position: absolute; right: 96px; bottom: 90px; flex-direction: column; align-items: flex-end; gap: 6px; margin: 0; }
.title .tbtn { padding: 6px 0; text-align: right; font-size: 44px; }
.title .tbtn:first-child { font-size: 96px; line-height: 1.05; }
/* 첫 화면 버튼: 호버 시 글자 앞에 심볼 로고 */
.title .tbtn { position: relative; }
.title .tbtn::before { content: ''; position: absolute; right: 100%; top: 50%; margin-right: -.06em; height: .8em; aspect-ratio: 423 / 220; transform: translateY(-50%); background: currentColor; -webkit-mask: url(../shared/logo_symbol.svg) center / contain no-repeat; mask: url(../shared/logo_symbol.svg) center / contain no-repeat; opacity: 0; transition: opacity .15s; pointer-events: none; }
.title .tbtn:hover::before, .title .tbtn:focus-visible::before { opacity: 1; }
.title .tbtn:hover, .title .tbtn:focus-visible { text-decoration: none; }

/* 웹 방문자용 홈 버튼 (전시장 ?zone=1 에서는 만들어지지 않음) */
#home { position: absolute; right: 112px; top: 36px; font-size: 26px; line-height: 1; color: var(--ivory); text-decoration: none; filter: drop-shadow(0 1px 6px rgba(0,0,0,.55)); pointer-events: auto; padding: 8px 4px; }
#home:hover, #home:focus-visible { text-decoration: underline; outline: none; }
[data-scene="1"] #home { color: var(--burgundy-dark); filter: none; }
[data-scene="title"] #home { right: 40px; }

/* 장면 전환: 배경은 서서히 바뀌고(game.js), 그라디언트도 서서히 나타난다 */
#ghost { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
#ghost .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#back .layer.shade, #back .layer.scrim { animation: gfade .7s ease both; }
@keyframes gfade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #back .layer.shade, #back .layer.scrim { animation: none; } }

/* ---- v5: 좌측 위 인물 표시 · 좌측 정렬 대사(말한 사람 사진) · 자리표시 제거 ---- */
.hud { gap: 14px; }
.hud .av, .cap .av { flex: none; display: block; border-radius: 50%; overflow: hidden; background: var(--paleblue-light); border: 4px solid var(--ivory); box-sizing: border-box; }
.hud .av { width: 64px; height: 64px; }
.hud .av img, .cap .av img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.cap { left: 96px; right: 360px; text-align: left; display: flex; align-items: flex-start; gap: 28px; }
.cap .av { width: 96px; height: 96px; }
.cap .body { flex: 1; min-width: 0; }
.cap .nm:empty { display: none; }
.cap.right { left: 760px; right: 80px; }
.cap.ai .tx { display: block; max-width: none; }

/* ---- v6: 좌측 위 인물(타원, 이름은 아래) · 말하는 사람 타원 사진 · 인물 선택 = 버건디 페인트 벽 + 거울 액자 ---- */
.hud { right: auto; flex-direction: column; align-items: flex-start; gap: 10px; }
.hud .av { width: 66px; height: 94px; border: 0; }
.cap .av { width: 92px; height: 128px; border: 0; }

[data-scene="1"] #gear { color: var(--ivory); }
/* 인물 선택: 버건디 벽(media/burgandy wall.png) · 가운데 정렬 · 긴 타원 거울(연하늘 가는 선 하나) */
.wall { position: absolute; inset: 0; background: #AB073D url("media/burgandy%20wall.png") center / cover no-repeat; }
.sel { color: var(--ivory); padding: 44px 90px 30px; text-align: center; align-items: center; }
.sel h1 { font-size: 42px; margin: 6px 0 30px; text-align: center; }
.sel .opts { justify-content: center; gap: 90px; flex: none; margin: 0; align-items: flex-start; }
.sel .opts .opt { flex: none; width: 320px; background: none; border: 0; border-radius: 0; padding: 0; overflow: visible; gap: 0; color: var(--ivory); text-align: center; align-items: center; transition: transform .25s ease; }
.sel .opts .opt:hover, .sel .opts .opt:focus-visible { background: none; transform: translateY(-8px); outline: none; }
.sel .top { display: block; height: 64px; padding: 0 0 16px; text-align: center; }
.sel .top .rl { display: inline; margin: 0; padding: 0; background: none; color: var(--ivory); font-size: 38px; font-weight: 800; line-height: 1.2; border-radius: 0; }
.sel .mirror { position: relative; width: 300px; height: 460px; border-radius: 50%; border: 3px solid var(--paleblue); box-sizing: border-box; overflow: hidden; background: var(--paleblue-light); box-shadow: none; }
.sel .mirror .pf { position: absolute; inset: 0; width: auto; height: auto; margin: 0; background: none; display: flex; align-items: center; justify-content: center; }
.sel .mirror .pf img { height: 100%; width: 100%; object-fit: cover; object-position: center top; filter: none; }
.sel .mirror::before, .sel .mirror::after { content: none; }
.sel .opts .opt .pr { align-self: stretch; padding: 22px 0 0; font-size: 22px; line-height: 1.5; text-align: center; color: var(--ivory); opacity: 0; transition: opacity .25s ease; min-height: 120px; }
.sel .opts .opt:hover .pr, .sel .opts .opt:focus-visible .pr { opacity: 1; }
@media (hover: none) { .sel .opts .opt .pr { opacity: 1; } }

/* v7: 하단 그라데이션을 낮추고 대사 글자를 키움 */
.shade { background: linear-gradient(to top, rgba(46,3,18,.88) 0, rgba(46,3,18,.55) 17%, rgba(46,3,18,0) 38%); }
.shade.up { background: linear-gradient(to bottom, rgba(46,3,18,.9) 0, rgba(46,3,18,.65) 40%, rgba(46,3,18,0) 70%); }
.cap { right: 200px; }
.cap .tx { font-size: 38px; }
.cap .nm { font-size: 24px; }
.cap.ai .tx { font-size: 32px; }

/* v8: 인물 선택 = 다크 버건디 단색 배경, 역할 키워드는 거울 아래 */
.wall { background: #460E21; }
.sel .top { height: auto; padding: 22px 0 0; }
.sel .opts .opt .pr { padding-top: 14px; min-height: 110px; }

/* v9: 선택지 = 하단 자막 자리, 세로 목록, 배경 없음. 호버하면 심볼 로고가 앞에 나오고 버건디로 */
.scrim.dim { background: rgba(70,14,33,.62); }
.choice { inset: auto; left: 96px; right: 200px; bottom: var(--cap-bottom); padding: 0; display: block; z-index: 7; }
.choice .q { font-size: 30px; font-weight: 600; margin: 0 0 18px; color: var(--ivory); text-shadow: 0 2px 16px rgba(0,0,0,.55); }
.choice .opts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: none; }
.choice .opts .opt { display: flex; align-items: center; gap: 18px; width: auto; max-width: 100%; background: none; border: 0; border-radius: 0; padding: 8px 0; color: var(--ivory); text-align: left; cursor: pointer; transform: none; box-shadow: none; text-shadow: 0 2px 16px rgba(0,0,0,.55); }
.choice .opts .opt:hover, .choice .opts .opt:focus-visible { background: none; transform: none; outline: none; color: var(--burgundy); text-shadow: none; }
.choice .opt .lg { flex: none; width: 60px; height: 31px; background: var(--burgundy); opacity: 0; -webkit-mask: url("../shared/logo_symbol.svg") center / contain no-repeat; mask: url("../shared/logo_symbol.svg") center / contain no-repeat; transition: opacity .15s ease; }
.choice .opt:hover .lg, .choice .opt:focus-visible .lg { opacity: 1; }
.choice .opt .say { font-size: 34px; line-height: 1.35; font-weight: 600; }
.choice .opts .opt { flex: none; flex-direction: row; min-height: 0; margin: 0; height: auto; justify-content: flex-start; }
.choice .opts .opt.push { margin-top: 0; }

/* v11: 인물 선택 전체를 아래로 — 소개 글 영역의 끝이 자막 끝선(아래에서 116px)에 오도록 */
.sel { justify-content: flex-end; padding-top: 0; padding-bottom: 116px; }
.sel h1 { margin: 0 0 30px; }
.sel { padding-bottom: 196px; }
.sel .opts .opt { position: relative; }
.sel .opts .opt .pr { position: absolute; left: 0; right: 0; top: 100%; min-height: 0; padding-top: 12px; }

/* v12: 인물 선택(질문과 사진 간격, 이름 작게) · 선택지 작게 · 마지막 화면 · 자리 비움 안내 */
.sel { justify-content: flex-start; padding-top: 48px; padding-bottom: 196px; }
.sel h1 { margin: 0 0 auto; }
.sel .mirror { width: 280px; height: 430px; }
.sel .opts .opt { width: 300px; }
.sel .top { padding-top: 18px; }
.sel .top .rl { font-size: 26px; font-weight: 700; }
.sel .opts .opt .pr { font-size: 20px; }

.choice .q { font-size: 22px; font-weight: 500; margin: 0 0 12px; color: var(--ivory-dark); }
.choice .opt .say { font-size: 28px; line-height: 1.4; }
.choice .opt .lg { width: 48px; height: 25px; }

.final .big { font-size: 52px; }
.final .more { font-size: 26px; }
.final .btns { gap: 28px; }
.final .btn.primary { color: var(--burgundy-dark); background: var(--ivory); border-color: var(--ivory); }
.final .lower { margin-top: 70px; opacity: 0; animation: rise 1s ease 1.6s forwards; }
.final .btn.ghost { background: none; border: 0; color: var(--paleblue); font-size: 22px; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; padding: 8px 14px; }
.final .btn.ghost:hover { color: var(--ivory); }
@media (prefers-reduced-motion: reduce) { .final .lower { animation: none; opacity: 1; } }

.idle { position: fixed; inset: 0; z-index: 40; background: rgba(70,14,33,.82); cursor: pointer; }
.idlein { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--ivory); text-align: center; font-family: var(--font-body); }
.idlein .it { font-size: 54px; font-weight: 800; }
.idlein .in { font-family: var(--font-display); font-size: 150px; font-weight: 700; line-height: 1; color: var(--ivory); }
.idlein .ih { font-size: 24px; color: var(--paleblue); }

/* v13: 설정 딤은 화면 전체를 덮는다 */
.setp { background: none; }
.setdim { position: fixed; inset: 0; z-index: 9; background: rgba(70,14,33,.76); }

/* v15: 인물 선택 질문과 프로필 전체를 더 아래로 */
.sel { padding-top: 104px; padding-bottom: 140px; }

/* v16: 인물 소개 문구는 입력한 줄바꿈 그대로 */
.sel .opts .opt .pr { white-space: pre-line; }


/* v17: 부드러운 전환 — 그라데이션·딤은 고정 층의 투명도만 바뀌고, 인물 사진은 컷이 바뀌어도 유지, 새 화면은 살짝 페이드 인 */
#fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#fx .layer { opacity: 0; transition: opacity .6s ease; }
#fx[data-shade="dn"] .shade:not(.up), #fx[data-shade="up"] .shade.up, #fx[data-scrim="1"] .scrim { opacity: 1; }
#hudl { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; pointer-events: none; z-index: 6; opacity: 0; transition: opacity .4s ease; }
#hudl.on { opacity: 1; }
#hudl .av { position: absolute; left: 48px; top: 28px; width: 66px; height: 94px; border: 0; border-radius: 50%; overflow: hidden; background: var(--paleblue-light); display: block; }
#hudl .av img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
@keyframes uin { from { opacity: 0; } to { opacity: 1; } }
.cap.first { animation: uin .25s ease both; }
.choice, .sel { animation: uin .35s ease both; }
.setdim { animation: uin .25s ease both; }
.idle { animation: uin .4s ease both; }
@media (prefers-reduced-motion: reduce) { .cap.first, .choice, .sel, .setdim, .idle { animation: none; } #fx .layer, #hudl { transition: none; } }

/* v18 마지막 화면: 처음으로 버튼을 맨 아래로 */
.final { justify-content: center; }
.final .lower { position: absolute; left: 0; right: 0; bottom: 56px; margin: 0; display: flex; justify-content: center; }

/* v19 말하는 사람 프로필: 대사 줄 수와 상관없이 같은 자리에 고정 */
.cav { position: absolute; left: 96px; bottom: var(--cap-bottom); width: 92px; height: 128px; border-radius: 50%; overflow: hidden; background: var(--paleblue-light); z-index: 5; pointer-events: none; }
.cav img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.cav.right { left: 760px; } .cav.top { bottom: auto; top: 250px; }
.cap.hasav { padding-left: 120px; box-sizing: border-box; }

/* v20 이미지 없는 컷(자리표시)도 이전 그림 위로 서서히 덮이게 */
#back.ph.fadein { animation: fadein .7s ease both; }

/* v21 선택지 호버: 글자와 심볼 로고를 pale blue 로 */
.choice .opts .opt:hover, .choice .opts .opt:focus-visible { color: var(--paleblue); }
.choice .opt .lg { background: var(--paleblue); }

/* v22 엔딩 번호(Ending N): 밝은 배경에서도 보이도록 버건디 */
.endmark .id { color: var(--burgundy); }

/* v23 로딩 화면 */
[data-scene="load"] { --bg: var(--burgundy-dark); --ink: var(--ivory); }
.loading { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.loading .ltip { position: absolute; left: 96px; right: 200px; bottom: 112px; }
.loading .lh { font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; font-size: 22px; color: var(--paleblue); margin-bottom: 14px; }
.loading .lt { margin: 0; max-width: 1100px; font-size: 30px; line-height: 1.5; font-weight: 500; color: var(--ivory); white-space: pre-line; text-wrap: pretty; min-height: 3em; transition: opacity .35s ease; text-shadow: 0 2px 16px rgba(0,0,0,.55); }
.loading .lbar { position: absolute; left: 96px; right: 200px; bottom: 64px; height: 4px; background: var(--burgundy); border-radius: 2px; overflow: hidden; }
.loading .lbar i { display: block; height: 100%; width: 0; background: var(--paleblue); border-radius: 2px; transition: width .4s ease; }

/* v24 로딩 제목 */
.loading .lh.big { font-family: inherit; font-weight: 800; letter-spacing: -.01em; font-size: 54px; line-height: 1.25; color: var(--ivory); margin-bottom: 20px; white-space: pre-line; text-shadow: 0 2px 20px rgba(0,0,0,.5); }

/* v24 AI 대사: 한글·영문·숫자를 한 서체(Pretendard)로 통일. 크기·행간은 그대로 */
.cap.ai .tx { font-family: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important; word-spacing: normal !important; font-variant-numeric: normal; }

/* v25 로딩: 로딩바를 제목 위로, 제목은 조금 작게 */
.loading .ltip { bottom: 64px; }
.loading .lbar { position: static; left: auto; right: auto; bottom: auto; margin-bottom: 26px; }
.loading .lh.big { font-size: 40px; margin-bottom: 16px; }

/* v25 하단 그라데이션 높이를 아주 살짝 높임 (17%/38% → 20%/43%) */
.shade { background: linear-gradient(to top, rgba(46,3,18,.88) 0, rgba(46,3,18,.55) 20%, rgba(46,3,18,0) 43%); }

/* v26 로딩바: 화면 가로 끝까지, 채워지는 건 JS가 매 프레임 부드럽게 */
.loading .lbar { margin-left: -96px; margin-right: -200px; border-radius: 0; }
.loading .lbar i { border-radius: 0; transition: none; }

/* v27 로딩 화면: 로딩바와 같은 속도로 화면이 아래에서부터 버건디로 차오른다 */
.loading .lfill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--burgundy); }
.loading .ltip { z-index: 1; }
.loading .lbar { background: var(--burgundy-dark); }

/* v28 로딩 화면: 아래에 가로 꽉 찬 박스. 제목·안내 글이 박스 안에 있고, 박스 바탕이 로딩 진행에 맞춰 왼쪽→오른쪽으로 버건디로 찬다 (화면 전체 채우기는 취소) */
.loading .lfill { display: none; }
.loading .ltip { left: 0; right: 0; bottom: 0; z-index: 1; padding: 44px 96px 52px; background: var(--burgundy-dark); overflow: hidden; }
.loading .lbar { position: absolute; left: 0; right: 0; top: 0; bottom: 0; height: auto; margin: 0; background: none; border-radius: 0; z-index: 0; overflow: hidden; }
.loading .lbar i { height: 100%; background: var(--burgundy); border-radius: 0; }
.loading .ltip .lh, .loading .ltip .lt { position: relative; z-index: 1; max-width: 1304px; }

/* v29 로딩 화면: 글은 아래쪽에 그대로, 로딩바는 화면 맨 아래에 가로 꽉 차게(버건디로 찬다), 퍼센트는 우측에 작게 */
.loading .lfill { display: none; }
.loading .ltip { left: 96px; right: 200px; bottom: 76px; padding: 0; background: none; overflow: visible; z-index: 1; }
.loading .lbar { position: absolute; left: 0; right: 0; top: auto; bottom: 0; height: 16px; margin: 0; background: var(--burgundy-dark); border-radius: 0; z-index: 1; overflow: hidden; }
.loading .lbar i { display: block; height: 100%; width: 0; background: var(--burgundy); border-radius: 0; transition: none; }
.loading .lpct { position: absolute; right: 40px; bottom: 32px; z-index: 1; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .08em; color: var(--ivory); text-shadow: 0 2px 10px rgba(0,0,0,.6); }

/* v30 자막을 전반적으로 아래로 (116 → 80), 다음 표시는 글 끝의 ▶ 삼각형 */
.cap, .cav { --cap-bottom: calc(80 * var(--u)); }
.hit.nx { position: static; display: inline-block; width: 0; height: 0; margin: 0 0 0 .5em; padding: 0; font-size: inherit; vertical-align: baseline; border-style: solid; border-width: .26em 0 .26em .44em; border-color: transparent transparent transparent var(--paleblue-light); background: none; text-shadow: none; }

/* v31 ▶ 깜빡임을 더 천천히 (1.1s → 2s) */
.hit.on.nx { animation-duration: 2s; }

/* v32 선택지도 자막과 같은 높이로 (116 → 80) */
.choice { --cap-bottom: calc(80 * var(--u)); }

/* v33 첫 화면 플레이/설정 버튼을 아래로 (bottom 90 → 50) */
.title .btns { bottom: 50px; }

/* v34 프로필 사진도 대사·이름과 같은 순간·같은 페이드로 */
.cav.first { animation: uin .25s ease both; }

/* v35 로딩이 끝나면 클릭해서 다음으로 */
.loading .ltap { position: absolute; inset: 0; z-index: 3; pointer-events: auto; cursor: pointer; }
.loading .lgo { position: absolute; right: 40px; bottom: 32px; z-index: 1; font-weight: 700; font-size: 22px; letter-spacing: .04em; color: var(--ivory); text-shadow: 0 2px 10px rgba(0,0,0,.6); animation: blink 2s ease-in-out infinite; }
.loading .lgo i { display: inline-block; width: 0; height: 0; margin-left: .5em; border-style: solid; border-width: .26em 0 .26em .44em; border-color: transparent transparent transparent var(--ivory); }

/* v36 선택지 첫 번째는 처음부터 호버된 모양 */
.choice .opts .opt.pre { background: none; transform: none; outline: none; color: var(--paleblue); text-shadow: none; }
.choice .opt.pre .lg { opacity: 1; }

/* v37 마지막 낱말 + ▶ 는 줄바꿈하지 않음 */
.cap .tx .nw { white-space: nowrap; }


/* v37 서체 SUIT (게임 전체; 첫 화면 영문 제목만 PP Frama) · 글자 크기·그라데이션 축소 · 인물 선택 = 첫 클릭 소개, 두 번째 클릭 시작 */
@font-face { font-family: 'SUIT'; font-weight: 100 900; font-style: normal; font-display: block; src: url('../shared/fonts/SUIT/SUIT-Variable.woff2') format('woff2-variations'), url('../shared/fonts/SUIT/SUIT-Variable.woff2') format('woff2'); }
:root { --font-body: 'SUIT', 'Pretendard Variable', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif; --font-display: 'SUIT', 'Pretendard Variable', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif; }
.cap.ai .tx { font-family: 'SUIT', 'Pretendard Variable', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important; }
.title .ttl h1 { font-family: 'PP Frama', 'SUIT', sans-serif; }
.cap .tx { font-size: 30px; line-height: 1.38; }
.cap .nm { font-size: 19px; margin-bottom: 10px; }
.cap.ai .tx { font-size: 26px; }
.hit { font-size: 18px; }
.choice .q { font-size: 18px; margin-bottom: 10px; }
.choice .opt .say { font-size: 23px; }
.choice .opt .lg { width: 42px; height: 22px; }
.choice .kick, .pos .kick { font-size: 18px; }
.endmark .id { font-size: 20px; } .endmark h2 { font-size: 46px; }
.dil { font-size: 30px; }
.final .big { font-size: 40px; } .final .more { font-size: 20px; }
.loading .lh.big { font-size: 34px; } .loading .lt { font-size: 24px; } .loading .lgo { font-size: 18px; }
.shade { background: linear-gradient(to top, rgba(46,3,18,.85) 0, rgba(46,3,18,.5) 9%, rgba(46,3,18,0) 24%); }
.shade.up { background: linear-gradient(to bottom, rgba(46,3,18,.85) 0, rgba(46,3,18,.55) 18%, rgba(46,3,18,0) 40%); }

.sel { padding: 40px 90px 0; justify-content: flex-start; }
.sel h1 { font-size: 32px; margin: 0 0 26px; }
.sel .opts { gap: 80px; }
.sel .opts .opt { width: 270px; }
.sel .mirror { width: 256px; height: 392px; transition: border-color .2s ease, border-width .2s ease; }
.sel .top { padding-top: 14px; }
.sel .top .rl { font-size: 20px; font-weight: 600; }
.sel .opts .opt .pr { display: none; }
.sel .opts .opt { transition: transform .25s ease, opacity .25s ease; }
.sel .opts.has .opt:not(.on) { opacity: .45; }
.sel .opts.has .opt:not(.on):hover { opacity: .8; }
.sel .opt.on .mirror { border-color: var(--ivory); border-width: 4px; }
.sel .opt.on .top .rl { color: var(--paleblue); font-weight: 800; }
.sel .info { position: absolute; left: 90px; right: 90px; bottom: 40px; height: 218px; box-sizing: border-box; display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1fr) 190px; gap: 36px; align-items: start; padding-top: 24px; border-top: 2px solid var(--paleblue); text-align: left; color: var(--ivory); }
.sel .info.hint { display: block; text-align: center; padding-top: 60px; font-size: 18px; color: var(--paleblue); }
.sel .info.hint p { margin: 0; }
.sel .info .i-id { display: grid; gap: 4px; }
.sel .info .i-kw { font-weight: 700; letter-spacing: .16em; font-size: 14px; color: var(--paleblue); }
.sel .info h2 { margin: 0; font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.sel .info .i-rl { font-size: 18px; font-weight: 600; color: var(--paleblue-light); }
.sel .info .i-c b { display: block; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--paleblue); margin-bottom: 4px; }
.sel .info .i-c p { margin: 0 0 14px; font-size: 17px; line-height: 1.55; font-weight: 500; text-wrap: pretty; }
.sel .info .i-go { align-self: end; justify-self: end; }
.sel .info .i-go button { font-family: inherit; font-size: 18px; font-weight: 800; color: var(--burgundy-dark); background: var(--ivory); border: 0; border-radius: 999px; padding: 12px 26px; cursor: pointer; pointer-events: auto; }
.sel .info .i-go button:hover { background: var(--paleblue-light); }
.sel .info.on { animation: fadein .3s ease both; }


/* v38 인물 소개(목표·고려할 것) · 확대 연출 · 선택지 게임 UI · 마지막 화면 엔딩 실루엣 */
.sel .info { grid-template-columns: 230px minmax(0, 1.1fr) minmax(0, 1fr) 190px; }
.sel .info .i-c ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sel .info .i-c li { font-size: 17px; line-height: 1.4; font-weight: 500; padding-left: 16px; position: relative; }
.sel .info .i-c li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--paleblue); }
.sel .info .i-go { display: grid; gap: 10px; justify-items: end; }
.sel .info .i-go span { font-size: 15px; font-weight: 700; letter-spacing: .06em; color: var(--paleblue); }
.sel .grow { position: absolute; z-index: 20; overflow: hidden; border-radius: 50%; border: 4px solid var(--ivory); box-sizing: border-box; background: var(--burgundy-dark); transition: left .9s cubic-bezier(.65,0,.35,1), top .9s cubic-bezier(.65,0,.35,1), width .9s cubic-bezier(.65,0,.35,1), height .9s cubic-bezier(.65,0,.35,1), border-radius .9s cubic-bezier(.65,0,.35,1), border-width .9s ease; }
.sel .grow img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.sel .grow.on { border-radius: 0; border-width: 0; }
.sel.leaving h1, .sel.leaving .info, .sel.leaving .opts { transition: opacity .35s ease; }
.sel.leaving h1, .sel.leaving .info { opacity: 0; }
.sel.leaving .opts .opt { opacity: 0; }
.sel.leaving .opts .opt.on { opacity: 0; }

.choice.game { left: 96px; right: 96px; bottom: 64px; }
.choice.game .cg-hd { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; color: var(--ivory); text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.choice.game .cg-step { font-size: 17px; font-weight: 700; letter-spacing: .08em; }
.choice.game .cg-step b { font-size: 22px; }
.choice.game .cg-pips { display: flex; gap: 6px; }
.choice.game .cg-pips i { width: 34px; height: 6px; border-radius: 3px; background: var(--paleblue); opacity: .35; }
.choice.game .cg-pips i.on { opacity: 1; }
.choice.game .cg-note { margin-left: auto; font-size: 15px; font-weight: 500; color: var(--paleblue-light); }
.choice.game .q { font-size: 28px; font-weight: 700; line-height: 1.35; margin: 0 0 22px; color: var(--ivory); max-width: 1100px; text-wrap: balance; }
.choice.game .opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.choice.game .opts .opt { position: relative; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 14px; min-height: 190px; padding: 22px 24px 20px; background: var(--ivory); color: var(--burgundy-dark); border: 0; border-radius: 22px; text-shadow: none; text-align: left; cursor: pointer; transform: none; transition: transform .22s ease, background .22s ease, color .22s ease, opacity .35s ease; }
.choice.game .opts .opt .no { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--burgundy-dark); color: var(--ivory); display: grid; place-items: center; font-size: 18px; font-weight: 800; transition: background .22s ease, color .22s ease; }
.choice.game .opts .opt .say { font-size: 20px; line-height: 1.5; font-weight: 600; }
.choice.game .opts .opt .go { margin-top: auto; align-self: flex-end; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; letter-spacing: .04em; opacity: 0; transform: translateX(-6px); transition: opacity .22s ease, transform .22s ease; }
.choice.game .opts .opt .go i { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.choice.game .opts .opt:hover, .choice.game .opts .opt:focus-visible { transform: translateY(-12px); background: var(--burgundy); color: var(--ivory); outline: none; }
.choice.game .opts .opt:hover .no, .choice.game .opts .opt:focus-visible .no { background: var(--ivory); color: var(--burgundy); }
.choice.game .opts .opt:hover .go, .choice.game .opts .opt:focus-visible .go { opacity: 1; transform: none; }
.choice.game .opts.picked .opt:not(.chosen) { opacity: 0; transform: translateY(18px); pointer-events: none; }
.choice.game .opts.picked .opt.chosen { background: var(--burgundy); color: var(--ivory); transform: translateY(-12px) scale(1.02); }
.choice.game .opts.picked .opt.chosen .no { background: var(--ivory); color: var(--burgundy); }

.final .sil { display: flex; gap: 14px; justify-content: center; opacity: 0; animation: rise 1s ease 1.4s forwards; }
.final .sil .tile { position: relative; width: 170px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--burgundy-dark); border: 2px solid var(--paleblue); box-sizing: border-box; }
.final .sil .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) blur(8px) brightness(.6); transform: scale(1.25); }
.final .sil .tile.seen { border-color: var(--ivory); }
.final .sil .tile.seen img { filter: none; transform: none; }
.final .sil .tile span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 700; color: var(--paleblue); }
@media (prefers-reduced-motion: reduce) { .final .sil { animation: none; opacity: 1; } .sel .grow { transition: none; } }


/* v39 차분한 톤: 테두리 최소화 · 인물 선택 단순화 · 선택지 느리게 · 하단 그라데이션 채도·명도 낮춤 */
.shade { background: linear-gradient(to top, rgba(24,12,16,.78) 0, rgba(24,12,16,.42) 9%, rgba(24,12,16,0) 24%); }
.shade.up { background: linear-gradient(to bottom, rgba(24,12,16,.78) 0, rgba(24,12,16,.45) 18%, rgba(24,12,16,0) 40%); }

.sel .mirror { border: 0; width: 250px; height: 380px; transition: transform .5s ease, opacity .5s ease; }
.sel .opts { gap: 90px; }
.sel .opts .opt { width: 270px; }
.sel .opts .opt:hover, .sel .opts .opt:focus-visible { transform: translateY(-6px); transition: transform .5s ease, opacity .5s ease; }
.sel .opt.on .mirror { border: 0; transform: scale(1.04); }
.sel .opts.has .opt:not(.on) { opacity: .4; }
.sel .top { padding-top: 16px; }
.sel .top .rl { font-size: 19px; font-weight: 500; color: var(--paleblue-light); }
.sel .opt.on .top .rl { color: var(--ivory); font-weight: 600; }
.sel .info { left: 0; right: 0; bottom: 48px; height: 190px; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; border: 0; text-align: center; }
.sel .info.hint { padding-top: 70px; }
.sel .info .i-kw { font-size: 13px; letter-spacing: .24em; color: var(--paleblue); }
.sel .info h2 { margin: 6px 0 0; font-size: 36px; font-weight: 700; letter-spacing: -.02em; }
.sel .info .i-rl { margin-top: 2px; font-size: 16px; font-weight: 500; color: var(--paleblue-light); }
.sel .info .i-pr { margin: 14px 0 0; max-width: 620px; font-size: 18px; line-height: 1.55; font-weight: 400; color: var(--ivory); }
.sel .info .i-hint { margin-top: 18px; font-size: 14px; letter-spacing: .08em; color: var(--paleblue); animation: blink 3.2s ease-in-out infinite; }
.sel .info.hint .i-hint { margin: 0; font-size: 17px; animation: none; }
.sel .info.on { animation: fadein .6s ease both; }
.sel.leaving h1, .sel.leaving .info, .sel.leaving .opts { opacity: 0; transition: opacity .6s ease; }
.sel.leaving .opts .opt, .sel.leaving .opts .opt.on { opacity: 0; transition: opacity .6s ease; }

.choice.game .opts .opt { transition: transform .5s ease, background .5s ease, color .5s ease, opacity .7s ease; }
.choice.game .opts .opt:hover, .choice.game .opts .opt:focus-visible { transform: translateY(-6px); background: var(--paleblue-light); color: var(--burgundy-dark); }
.choice.game .opts.picked .opt:not(.chosen) { opacity: 0; transform: none; }
.choice.game .opts.picked .opt.chosen { background: var(--paleblue-light); color: var(--burgundy-dark); transform: translateY(-6px); }
.choice.game .cg-pips i { transition: opacity .5s ease; }

.final .sil .tile { border: 0; }
.final .sil .tile.seen { box-shadow: none; }
.final .btns { gap: 20px; }


/* v40 인물 선택: 어느 순간에 멈춰도 균형 잡히게 가운데 정렬 · 첫 클릭 = 역할, 두 번째 클릭 = 이름 / 선택 후 피드백 */
.sel { justify-content: center; padding: 0 90px; }
.sel h1 { margin: 0 0 38px; }
.sel .info { position: static; width: 100%; height: 150px; flex: none; margin-top: 18px; justify-content: flex-start; }
.sel .info.hint { padding-top: 56px; }
.sel .info h2 { font-size: 34px; }
.sel .info.name h2 { font-size: 46px; animation: fadein 1s ease both; }
.sel .info.name .i-rl { animation: fadein 1.2s ease both; }
.sel .opts .opt .top { height: auto; }
.sel .opts .opt .top .rl { font-size: 18px; }
.choice.game .cg-fb { position: absolute; left: 0; right: 0; bottom: 64px; height: 190px; display: grid; place-items: center; font-size: 24px; font-weight: 500; letter-spacing: .04em; color: var(--ivory); opacity: 0; pointer-events: none; }
.choice.game.fb .cg-fb { animation: fbpass 2.4s ease both; }
@keyframes fbpass { 0% { opacity: 0; } 30% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
.choice.game .cg-fb { bottom: 0; }
.choice.game { }
@media (prefers-reduced-motion: reduce) { .choice.game.fb .cg-fb { animation: none; opacity: 1; } }

.choice.game.fb .opts .opt.chosen { animation: chosefade 1.7s ease both; }
@keyframes chosefade { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
.choice.game.fb .cg-fb { animation-delay: .9s; animation-duration: 1.7s; }


/* v41 인물 선택: 화면을 채우는 세 개의 세로 패널 (어느 순간에 멈춰도 한 장의 그림이 되도록) */
.sel.cs { padding: 34px 36px 36px; justify-content: flex-start; align-items: stretch; text-align: center; }
.sel.cs h1 { font-size: 28px; line-height: 1.35; margin: 0 0 24px; text-align: center; flex: none; }
.cs-row { flex: 1; min-height: 0; display: flex; gap: 14px; }
.cs-card { position: relative; flex: 1 1 0; min-width: 0; padding: 0; border: 0; border-radius: 22px; overflow: hidden; background: var(--burgundy); cursor: pointer; text-align: left; color: var(--ivory); font: inherit; transition: flex-grow .9s cubic-bezier(.4,0,.2,1); outline: none; }
.cs-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; display: block; transition: filter .9s ease, transform 1.2s ease; }
.cs-card:hover img { transform: scale(1.02); }
.cs-row.has .cs-card { flex-grow: 1; }
.cs-row.has .cs-card.on { flex-grow: 2.3; }
.cs-row.has .cs-card:not(.on) img { filter: brightness(.55) saturate(.65); }
.cs-sh { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(to top, rgba(24,12,16,.72) 0, rgba(24,12,16,.38) 40%, rgba(24,12,16,0) 100%); pointer-events: none; }
.cs-tx { position: absolute; left: 34px; right: 34px; bottom: 32px; display: flex; flex-direction: column; align-items: flex-start; }
.cs-kw { font-size: 13px; font-weight: 700; letter-spacing: .26em; color: var(--paleblue-light); opacity: 0; transition: opacity .6s ease; }
.cs-rl { margin-top: 4px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.cs-nm { display: none; margin-top: 2px; font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.cs-pr { max-width: 420px; max-height: 0; overflow: hidden; opacity: 0; margin: 0; font-size: 17px; line-height: 1.55; font-weight: 400; transition: max-height .8s ease, opacity .8s ease .15s, margin .8s ease; }
.cs-hint { max-height: 0; overflow: hidden; opacity: 0; font-size: 14px; letter-spacing: .06em; color: var(--paleblue-light); transition: max-height .8s ease, opacity .8s ease .3s, margin .8s ease; }
.cs-card.on .cs-kw { opacity: 1; }
.cs-card.on .cs-pr { max-height: 90px; opacity: 1; margin-top: 12px; }
.cs-card.on .cs-hint { max-height: 24px; opacity: .85; margin-top: 14px; }
.cs-card.named .cs-nm { display: block; animation: fadein 1.1s ease both; }
.cs-card.named .cs-rl { font-size: 20px; font-weight: 500; order: 2; margin-top: 6px; }
.cs-card.named .cs-pr, .cs-card.named .cs-hint { max-height: 0; opacity: 0; margin: 0; }
.cs-card.named .cs-kw { order: 0; }
.cs-card.named .cs-nm { order: 1; }
.sel.cs.leaving h1, .sel.cs.leaving .cs-row { opacity: 0; transition: opacity .6s ease; }
@media (prefers-reduced-motion: reduce) { .cs-card, .cs-card img, .cs-pr, .cs-hint { transition: none; } }


/* v41 인물 선택: 한 줄 질문 · 아치형 액자 · 같은 높이로 나란히 */
.sel h1 { font-size: 40px; font-weight: 600; margin: 0 0 44px; letter-spacing: -.02em; }
.sel .opts { gap: 120px; align-items: flex-start; }
.sel .opts .opt { width: 270px; }
.sel .mirror { width: 270px; height: 410px; border-radius: 135px 135px 14px 14px; }
.sel .mirror .pf img { object-position: center 14%; }
.sel .top { padding-top: 20px; }
.sel .top .rl { font-size: 22px; letter-spacing: .02em; }
.sel .info { height: 140px; margin-top: 14px; }
.sel .info.hint { padding-top: 40px; }
.sel .info h2 { font-size: 38px; }
.sel .info.name h2 { font-size: 48px; }
.sel .opts .opt:hover, .sel .opts .opt:focus-visible { transform: none; }
.sel .opts .opt:hover .mirror, .sel .opts .opt:focus-visible .mirror { transform: scale(1.02); }


/* v42 이전 버튼 · 선택지 카드를 작고 낮게 */
#prevbtn { position: absolute; left: 40px; bottom: 28px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 0; background: none; color: var(--ivory); font-size: 16px; font-weight: 500; letter-spacing: .04em; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .5s ease; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
#prevbtn.on { opacity: .7; pointer-events: auto; }
#prevbtn.on:hover, #prevbtn.on:focus-visible { opacity: 1; outline: none; }
#prevbtn i { width: 0; height: 0; border-style: solid; border-width: 6px 9px 6px 0; border-color: transparent currentColor transparent transparent; }
[data-scene="title"] #prevbtn, [data-scene="1"] #prevbtn { display: none; }

.choice.game { bottom: 72px; }
.choice.game .q { font-size: 24px; margin: 0 0 14px; }
.choice.game .opts { gap: 16px; }
.choice.game .opts .opt { min-height: 0; padding: 18px 22px; gap: 0; border-radius: 14px; }
.choice.game .opts .opt .say { font-size: 19px; line-height: 1.55; }
.choice.game .cg-fb { height: 130px; }


/* v43 이전 · 다음을 한 쌍으로 */
#prevbtn { display: flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; pointer-events: none; opacity: 0; }
#prevbtn.on { opacity: 1; pointer-events: none; }
#prevbtn button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 0; background: none; color: var(--ivory); font-size: 16px; font-weight: 500; letter-spacing: .04em; cursor: pointer; opacity: .65; transition: opacity .4s ease; text-shadow: 0 1px 8px rgba(0,0,0,.5); pointer-events: auto; }
#prevbtn button:hover, #prevbtn button:focus-visible { opacity: 1; outline: none; }
#prevbtn.nob .pv { visibility: hidden; pointer-events: none; }
#prevbtn .pv i { width: 0; height: 0; border-style: solid; border-width: 6px 9px 6px 0; border-color: transparent currentColor transparent transparent; }
#prevbtn .nx2 i { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent currentColor; }


/* v44 선택지: 배경 딤 없이 하단 그라데이션만 (선택지 영역까지 조금 더 올라옴) */
#fx[data-tall="1"] .shade:not(.up) { background: linear-gradient(to top, rgba(24,12,16,.82) 0, rgba(24,12,16,.5) 18%, rgba(24,12,16,0) 40%); }

/* v45 인물 선택: 배경 없이 사진 3장이 화면을 꽉 채움 · 제목 크게 (위쪽 그라데이션 위) */
.sel.cs { padding: 0; }
.sel.cs::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 240px; background: linear-gradient(to bottom, rgba(24,12,16,.72) 0, rgba(24,12,16,.36) 50%, rgba(24,12,16,0) 100%); z-index: 2; pointer-events: none; }
.sel.cs h1 { position: absolute; left: 0; right: 0; top: 44px; margin: 0; z-index: 3; font-size: 48px; font-weight: 600; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.sel.cs .cs-row { gap: 0; }
.sel.cs .cs-card { border-radius: 0; }
.sel.cs .cs-tx { bottom: 48px; }
.sel.cs.leaving::before { opacity: 0; transition: opacity .6s ease; }
.sel.cs h1 { top: 24px; font-size: 44px; line-height: 1.2; }
.sel.cs::before { height: 200px; }

/* v46 이전은 왼쪽 아래 끝, 다음은 오른쪽 아래 끝 */
#prevbtn { left: 32px; right: 32px; bottom: 24px; justify-content: space-between; }
#prevbtn.nob .pv { visibility: hidden; }


/* v48 대사는 빠르게 페이드인 · "이 선택은 기억될 것입니다."는 자막 자리(왼쪽 아래)에 */
.cap .body { animation: capin .38s ease-out both; }
@keyframes capin { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.choice.game .cg-fb { display: block; left: 0; right: 0; bottom: 8px; height: auto; text-align: left; font-size: 30px; font-weight: 400; letter-spacing: 0; line-height: 1.38; }
@media (prefers-reduced-motion: reduce) { .cap .body { animation: none; } }
.choice.game .cg-hd, .choice.game .q { transition: opacity .6s ease; }
.choice.game.fb .cg-hd, .choice.game.fb .q { opacity: 0; }

/* v49 다음 표시는 오른쪽 아래 "다음" 버튼 하나로 (글 끝 삼각형 제거) · 이전/다음 같은 위계 */
.hit.nx { display: none !important; }
#prevbtn button { opacity: .85; font-size: 17px; }
#prevbtn button:hover, #prevbtn button:focus-visible { opacity: 1; }

/* v50 선택하면 선택 UI가 바로 걷히고 문구만 슥 */
.choice.game .opts .opt { transition: transform .4s ease, background .4s ease, color .4s ease, opacity .4s ease; }
.choice.game .opts.picked .opt:not(.chosen) { opacity: 0; }
.choice.game.fb .opts .opt.chosen { animation: chosefade .5s ease both; }
@keyframes chosefade { from { opacity: 1; } to { opacity: 0; } }
.choice.game .cg-hd, .choice.game .q { transition: opacity .4s ease; }
.choice.game.fb .cg-fb { animation: fbpass 2.1s ease .45s both; }
@keyframes fbpass { 0% { opacity: 0; transform: translateX(-8px); } 22% { opacity: 1; transform: none; } 78% { opacity: 1; } 100% { opacity: 0; } }

/* v52 설정 아이콘: 작게, 직선·면 */
#gear { width: 40px; height: 40px; right: 44px; top: 28px; }
#gear svg { width: 28px; height: 28px; }
#gear:hover, #gear:focus-visible { transform: rotate(30deg); outline: none; }

/* v53 인물 카드 글: 예전처럼 위로 접히며 이름이 뜨되, 모든 움직임이 한 박자(같은 시간·같은 곡선)로 이어지게 */
.sel.cs .cs-kw { order: 0; }
.sel.cs .cs-nm { order: 1; display: block; max-height: 0; opacity: 0; overflow: hidden; margin: 0; line-height: 1.15; font-size: 56px; animation: none;
  transition: max-height .9s cubic-bezier(.4,0,.2,1), opacity .5s ease, margin .9s cubic-bezier(.4,0,.2,1); }
.sel.cs .cs-rl { order: 2; transition: font-size .9s cubic-bezier(.4,0,.2,1), margin .9s cubic-bezier(.4,0,.2,1); }
.sel.cs .cs-pr { order: 3; max-height: 0; overflow: hidden; opacity: 0; margin-top: 0;
  transition: max-height .9s cubic-bezier(.4,0,.2,1), opacity .45s ease, margin .9s cubic-bezier(.4,0,.2,1); }
.sel.cs .cs-hint { order: 4; max-height: 0; overflow: hidden; opacity: 0; margin-top: 0;
  transition: max-height .9s cubic-bezier(.4,0,.2,1), opacity .45s ease, margin .9s cubic-bezier(.4,0,.2,1); }
.sel.cs .cs-card.on .cs-pr { max-height: 50px; margin-top: 12px; opacity: 1; transition-delay: 0s, .25s, 0s; }
.sel.cs .cs-card.on .cs-hint { max-height: 20px; margin-top: 10px; opacity: .85; transition-delay: 0s, .4s, 0s; }
.sel.cs .cs-card.named .cs-rl { font-size: 20px; order: 2; }
.sel.cs .cs-card.named .cs-nm { display: block; max-height: 66px; opacity: 1; margin-bottom: 6px; transition-delay: 0s, .35s, 0s; animation: none; }
.sel.cs .cs-card.named .cs-kw { opacity: 0; }
.sel.cs .cs-card.named .cs-pr, .sel.cs .cs-card.named .cs-hint { max-height: 0; margin-top: 0; opacity: 0; transition-delay: 0s; }

/* v54 선택지 호버: 로고 심볼을 카드 우측 아래에 살며시 */
.choice.game .opts .opt .mk { position: absolute; right: 20px; bottom: 18px; width: 48px; height: 25px; background: currentColor; opacity: 0; transform: translateY(4px); -webkit-mask: url("../shared/logo_symbol.svg") center / contain no-repeat; mask: url("../shared/logo_symbol.svg") center / contain no-repeat; transition: opacity .35s ease, transform .35s ease; pointer-events: none; }
.choice.game .opts .opt:hover .mk, .choice.game .opts .opt:focus-visible .mk { opacity: .9; transform: none; }
.choice.game .opts.picked .opt:not(.chosen) .mk { opacity: 0; }

/* v55 역할 글자는 줄어들지 않고 자리만 내려간다 */
.sel.cs .cs-card.named .cs-rl { font-size: 30px; }

/* v56 대사 뒤 그라데이션: 진하기만 올림 (색은 그대로, 범위는 아주 조금만) */
.shade { background: linear-gradient(to top, rgba(24,12,16,.92) 0, rgba(24,12,16,.68) 11%, rgba(24,12,16,.3) 22%, rgba(24,12,16,0) 32%); }
.shade.up { background: linear-gradient(to bottom, rgba(24,12,16,.9) 0, rgba(24,12,16,.62) 14%, rgba(24,12,16,.28) 26%, rgba(24,12,16,0) 40%); }

/* v57 엔딩 버튼: 더 작게, 여백도 타이트하게 */
.final .btns { gap: 10px; margin-top: 4px; }
.final .btn, .final .btn.primary { font-size: 16px; font-weight: 600; line-height: 1.2; padding: 9px 22px; min-height: 0; min-width: 0; height: auto; border-radius: 999px; }
.final { gap: 18px; }

/* v58 인물 카드 호버 확대 없음 / 설정창: 글자 작게, 구분선 없이 */
.cs-card:hover img { transform: none; }
.setp .card { width: 560px; padding: 30px 38px 26px; border-radius: 28px; }
.setp h3 { font-size: 28px; margin: 0 0 14px; }
.srow { grid-template-columns: 40px 1fr 52px; gap: 14px; padding: 10px 0; border-top: 0; }
.srow.one { grid-template-columns: 1fr; padding: 4px 0; }
.smute { width: 40px; height: 40px; } .smute svg { width: 28px; height: 28px; }
.srow output { font-size: 16px; font-weight: 700; }
.srow input[type=range] { height: 32px; }
.sbtn { font-size: 17px; font-weight: 600; padding: 8px 0; }
.sbtn.primary { padding: 8px 22px; font-size: 16px; }
.sfoot { border-top: 0; padding-top: 14px; margin-top: 6px; align-items: center; }
.snote { font-size: 14px; }

/* v59 처음 안내 화면 */
.guide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; color: var(--ivory); z-index: 5; transition: opacity .55s ease; }
.guide.out { opacity: 0; }
.guide p { margin: 0; opacity: 0; animation: fadein 1.3s ease both; }
.guide .g1 { font-size: 34px; font-weight: 600; line-height: 1.5; animation-delay: .4s; }
.guide .g2 { font-size: 34px; font-weight: 600; line-height: 1.5; animation-delay: 1.9s; }
.guide .g3 { font-size: 20px; opacity: 0; color: var(--paleblue-light); margin-top: 22px; animation-delay: 3.5s; }
.guide .g4 { position: absolute; bottom: 56px; font-size: 14px; letter-spacing: .06em; opacity: 0; animation: fadein 1s ease 5.2s both; color: var(--paleblue); }
.guide .tap { background: none; border: 0; cursor: pointer; }

/* v59 라운드 값 줄이기 */
.setp .card { border-radius: 12px; }
.choice.game .opts .opt { border-radius: 10px; }
.cs-card { border-radius: 0; }
.final .sil .tile { border-radius: 6px; }
.final .btn, .final .btn.primary, .btn, .sbtn, .sbtn.primary { border-radius: 8px; }
.ph .id, .ph .ds { border-radius: 8px; }
.sel .info .i-go button { border-radius: 8px; }
.hud .cards span { border-radius: 6px; }
.guide { background: var(--burgundy-dark); }

/* v60 사용자 지정 커서 (기본 커서 숨김) */
html.nocur, html.nocur * { cursor: none !important; }
#cur { position: fixed; left: 0; top: 0; z-index: 99999; pointer-events: none; opacity: 0; width: var(--cur-w, 32px); height: var(--cur-h, 32px); margin-left: calc(var(--cur-x, 0px) * -1); margin-top: calc(var(--cur-y, 0px) * -1); background: no-repeat center / contain; transition: opacity .2s ease; will-change: transform; }
#cur.on { opacity: 1; }
#cur.dot { width: 12px; height: 12px; --cur-x: 6px; --cur-y: 6px; border-radius: 50%; background: var(--ivory); box-shadow: 0 0 0 1px rgba(70,14,33,.35); transition: opacity .2s ease, width .2s ease, height .2s ease; }
#cur.dot.hov { width: 20px; height: 20px; margin-left: -10px; margin-top: -10px; background: rgba(250,244,239,.85); }

/* 인물을 고르기 전에만 호버 확대 (고른 뒤에는 정지) */
.cs-row:not(.has) .cs-card:hover img { transform: scale(1.04); }
.cs-row.has .cs-card:hover img { transform: none; }

/* v60 독백: 대사와 구분 — 사진·이름 없이, 가운데에서 더 가볍고 느리게 */
.cap.mono { left: 170px; right: 170px; padding-left: 0; text-align: center; display: block; }
.cap.mono .tx { display: block; text-align: center; max-width: none; font-weight: 300; letter-spacing: .08em; color: var(--paleblue-light); opacity: .92; font-size: 30px; }
.cap.mono .body { animation: capin .9s ease-out both; }

/* v61 선택지: 세로로 쌓아 오른쪽에 모음 */
.choice.game { display: flex; flex-direction: column; align-items: flex-end; }
.choice.game .cg-hd, .choice.game .q, .choice.game .opts { width: 600px; max-width: 100%; box-sizing: border-box; }
.choice.game .q { font-size: 24px; margin: 0 0 16px; max-width: 600px; text-wrap: pretty; }
.choice.game .opts { display: flex; flex-direction: column; gap: 10px; }
.choice.game .opts .opt { min-height: 0; padding: 16px 22px; width: 100%; }
.choice.game .opts .opt .say { font-size: 18px; line-height: 1.5; padding-right: 54px; }
.choice.game .opts .opt:hover, .choice.game .opts .opt:focus-visible { transform: translateX(-8px); }
.choice.game .opts.picked .opt.chosen { transform: translateX(-8px); }
.choice.game .opts .opt .mk { right: 18px; top: 50%; bottom: auto; margin-top: -15px; width: 36px; height: 24px; transform: none; }
.choice.game .cg-fb { align-self: stretch; }
.choice.game .cg-hd, .choice.game .q, .choice.game .opts { width: 840px; }
.choice.game .q { max-width: 840px; }
.choice.game .opts .opt .say { font-size: 17px; padding-right: 46px; }

/* v62 안내 문구: 행간 줄이기 + 누르면 한 번에 전부 */
.guide { gap: 6px; }
.guide .g1, .guide .g2 { line-height: 1.3; }
.guide .g3 { margin-top: 16px; line-height: 1.3; }
.guide.all p, .guide.all .g4 { animation: none; opacity: 1; }

/* v63 선택지: 질문·선택 표시는 왼쪽, 선택지는 오른쪽 2/5 폭, 반투명 흰색 */
.choice.game { display: grid; grid-template-columns: minmax(0, 1fr) 640px; grid-template-rows: 1fr auto auto; column-gap: 56px; align-items: end; }
.choice.game .cg-hd { grid-column: 1; grid-row: 2; width: auto; align-self: end; }
.choice.game .q { grid-column: 1; grid-row: 3; width: auto; max-width: 640px; margin: 0; font-size: 30px; align-self: end; }
.choice.game .opts { grid-column: 2; grid-row: 1 / 4; width: 640px; gap: 10px; }
.choice.game .opts .opt { min-height: 74px; justify-content: center; padding: 14px 22px; background: rgba(250,244,239,.14); color: var(--ivory); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.choice.game .opts .opt .say { font-size: 16px; line-height: 1.5; padding-right: 40px; }
.choice.game .opts .opt:hover, .choice.game .opts .opt:focus-visible { background: rgba(250,244,239,.28); color: var(--ivory); transform: translateX(-8px); }
.choice.game .opts.picked .opt.chosen { background: rgba(250,244,239,.28); color: var(--ivory); transform: translateX(-8px); }
.choice.game .opts .opt .mk { right: 16px; }
.choice.game .cg-fb { grid-column: 1 / -1; }

/* v64 좌 → 우로 부드럽게 열리는 등장 (대사·선택지·안내문 공통) */
@keyframes wipein {
  from { opacity: 0; -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to   { opacity: 1; -webkit-mask-position: 0 0; mask-position: 0 0; }
}
.cap .body, .cap.mono .body, .choice.game .cg-hd, .choice.game .q, .choice.game .opts .opt, .guide p, .final .big {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 40%, transparent 60%); mask-image: linear-gradient(90deg, #000 0, #000 40%, transparent 60%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.cap .body { animation: wipein .7s ease-out backwards; }
.cap.mono .body { animation: wipein 1s ease-out backwards; }
.choice.game .cg-hd { animation: wipein .6s ease-out backwards; }
.choice.game .q { animation: wipein .7s ease-out .1s backwards; }
.choice.game .opts .opt { animation: wipein .7s ease-out backwards; }
.choice.game .opts .opt:nth-child(1) { animation-delay: .15s; }
.choice.game .opts .opt:nth-child(2) { animation-delay: .27s; }
.choice.game .opts .opt:nth-child(3) { animation-delay: .39s; }
.guide .g1 { animation: wipein 1.4s ease .4s both; }
.guide .g2 { animation: wipein 1.4s ease 1.9s both; }
.guide .g3 { animation: wipein 1.2s ease 3.5s both; }
.guide.all p { animation: none; opacity: 1; -webkit-mask-image: none; mask-image: none; }
.final .big { animation: wipein 1.4s ease .2s both; }
@media (prefers-reduced-motion: reduce) { .cap .body, .choice.game .cg-hd, .choice.game .q, .choice.game .opts .opt, .guide p, .final .big { animation: none; opacity: 1; -webkit-mask-image: none; mask-image: none; } }

/* v65 이전·다음을 함께 오른쪽 아래에 */
#prevbtn { left: auto; right: 32px; justify-content: flex-end; gap: 6px; }

/* v66 선택지 여백 줄이기 / 라운드 거의 없음 */
.choice.game .opts { gap: 6px; }
.choice.game .opts .opt { min-height: 0; padding: 9px 20px; }
.choice.game .opts .opt .say { line-height: 1.45; }
.choice.game .opts .opt, .setp .card, .cs-card, .final .sil .tile, .final .btn, .final .btn.primary, .btn, .sbtn, .sbtn.primary,
.ph .id, .ph .ds, .sel .info .i-go button, .hud .cards span, .hud .who, .opt, .opt .lab em, .opt .bd, .pos .rows div, .pcard .pr,
.final .dex span, .sel .rl, .choice.game .cg-pips i, .guide .tap { border-radius: 2px; }

/* v67 "이 선택은 기억될 것입니다."와 같은 등장: 투명에서 올라오며 왼쪽에서 살짝 밀려 들어옴 (마스크 방식 대체) */
@keyframes slidein { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.cap .body, .cap.mono .body, .choice.game .cg-hd, .choice.game .q, .choice.game .opts .opt, .guide p, .final .big {
  -webkit-mask-image: none; mask-image: none; }
.cap .body { animation: slidein .5s ease-out backwards; }
.cap.mono .body { animation: slidein .9s ease-out backwards; }
.choice.game .cg-hd { animation: slidein .5s ease-out backwards; }
.choice.game .q { animation: slidein .6s ease-out .1s backwards; }
.choice.game .opts .opt { animation: slidein .6s ease-out backwards; }
.guide .g1 { animation: slidein 1.1s ease .4s both; }
.guide .g2 { animation: slidein 1.1s ease 1.9s both; }
.guide .g3 { animation: slidein 1s ease 3.5s both; }
.guide.all p { animation: none; opacity: 1; transform: none; }
.final .big { animation: slidein 1.2s ease .2s both; }

/* v68 한 명을 골라도 다른 인물 위에서는 호버 확대 유지 (고른 인물 자신만 정지) */
.cs-row.has .cs-card:not(.on):hover img { transform: scale(1.04); }
.cs-row.has .cs-card.on:hover img { transform: none; }

/* v69 마지막 선택 → 엔딩: 안내 문구 없이 화면이 가라앉았다가 엔딩으로 밝아짐 */
#bo { position: fixed; inset: 0; z-index: 8; background: var(--burgundy-dark); opacity: 0; transition: opacity 1.1s ease; pointer-events: none; }
#bo.on { opacity: 1; }
.choice.game.end .cg-hd, .choice.game.end .q { opacity: 0; }
.choice.game.end .opts .opt:not(.chosen) { opacity: 0; }

/* v70 영문 키워드: 자간 넓히지 않고 보통 글자처럼 */
.cs-kw, .sel.cs .cs-kw { letter-spacing: 0; font-size: 15px; font-weight: 600; text-transform: none; }

/* v71 인물 선택: 안 고른 인물은 흑백·더 어둡게 / 글자 잘 보이게 / 오른쪽에 Play */
.cs-row.has .cs-card:not(.on) img { filter: grayscale(1) brightness(.34); }
.cs-sh { height: 72%; background: linear-gradient(to top, rgba(24,12,16,.9) 0, rgba(24,12,16,.62) 38%, rgba(24,12,16,0) 100%); }
.sel.cs .cs-tx { text-shadow: 0 1px 14px rgba(0,0,0,.55); }
.sel.cs .cs-pr { font-size: 18px; color: var(--ivory); }
.sel.cs .cs-hint { display: none; }
.cs-play { position: absolute; right: 40px; bottom: 132px; z-index: 2; padding: 11px 30px; border-radius: 2px; background: var(--ivory); color: var(--burgundy-dark); font-size: 17px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; opacity: 0; transform: translateX(-8px); pointer-events: none; cursor: pointer; transition: opacity .6s ease .25s, transform .6s ease .25s, background .25s ease; text-shadow: none; }
.cs-card.on .cs-play { opacity: 1; transform: none; pointer-events: auto; }
.cs-card.on .cs-play:hover, .cs-card.on .cs-play:focus-visible { background: var(--paleblue-light); outline: none; }
.cs-card.named .cs-play { opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.cs-play { bottom: 52px; }
.sel.cs .cs-pr { max-width: 560px; }
.sel.cs .cs-card.on .cs-pr { max-height: 60px; }

/* v72 인물 사이 이음선 없애기: 카드 모서리 각지게, 1px 겹치고, 틈 뒤는 어두운 색 */
.sel.cs .cs-row { background: rgb(24,12,16); gap: 0; }
.sel.cs .cs-card { border-radius: 0; margin-right: -1px; background: rgb(24,12,16); }
.sel.cs .cs-card:last-child { margin-right: 0; }

/* v74 원래 순서(키워드 · 이름 · 역할 · 설명)로 되돌림 */
.cs-play { bottom: 46px; }

/* v75 Play 누른 뒤: 설명 자리를 완전히 접어 이름·역할이 맨 아래 줄에 오게, 이름-역할 간격 좁힘 / 설명 더 길게 / 로딩 중엔 이전·다음 숨김 */
.sel.cs .cs-card.named .cs-pr { max-height: 0; margin: 0; opacity: 0; }
.sel.cs .cs-card.named .cs-nm { margin-bottom: 0; line-height: 1.05; max-height: 60px; }
.sel.cs .cs-card.named .cs-rl { margin-top: 2px; }
.sel.cs .cs-card.on .cs-pr { max-height: 110px; }
.sel.cs .cs-pr { font-size: 17px; line-height: 1.6; max-width: 600px; }
.cs-play { bottom: 46px; }
[data-scene="load"] #prevbtn { display: none; }
.sel.cs .cs-card.on.named .cs-pr { max-height: 0; margin: 0; opacity: 0; }

/* v76 엔딩: 제목과 안내문을 붙이고, 다시 하기 / 처음으로는 맨 아래 */
.final { gap: 22px; }
.final .more { margin-top: -14px; }
.final .btns { position: absolute; left: 0; right: 0; bottom: 44px; margin: 0; justify-content: center; }

/* v77 엔딩 제목 카드 (이미지와 이름이 먼저) · 진엔딩 · 엔딩 화면 Tip */
.endmark.intro { left: 0; right: 0; top: auto; bottom: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 6; transition: opacity .9s ease; }
.endmark.intro.out { opacity: 0; }
.endmark.intro .id, .endmark.intro h2 { animation: slidein 1.1s ease .2s backwards; }
.endmark.intro h2 { animation-delay: .6s; font-size: 64px; margin-top: 10px; }
.endmark.intro .id { color: var(--paleblue-light); font-size: 22px; letter-spacing: .02em; font-weight: 600; }
.endmark.intro.tru .id { color: var(--ivory); font-size: 26px; }
.endmark.intro.tru h2 { font-size: 72px; text-shadow: 0 0 40px rgba(250,244,239,.35), 0 4px 24px rgba(0,0,0,.55); animation-duration: 1.6s; animation-delay: .9s; }
.final .sil .tile.tru { margin-left: 18px; }
.final .sil .tile.tru:not(.seen) span { color: var(--ivory); }
.final .tip { max-width: 760px; font-size: 18px; line-height: 1.6; color: var(--paleblue-light); opacity: 0; animation: slidein 1s ease 2.2s forwards; }
.final .tip b { display: inline-block; margin-right: 8px; font-weight: 700; color: var(--ivory); }
[data-title="1"] #prevbtn { display: none; }
/* v78 타자기 · 진엔딩 안내/전환 · 선택 화면 인트로 */
.cap .tx .th { opacity: 0; }
.final .more .tnote { display: inline-block; margin-top: 8px; font-style: normal; color: var(--ivory); opacity: .9; }
.trbloom { position: absolute; inset: 0; z-index: 6; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, rgba(236,213,179,.55) 0%, rgba(236,213,179,.22) 38%, rgba(24,12,16,0) 72%); opacity: 0; animation: trbloom 5.8s ease both; }
@keyframes trbloom { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }
.sel.cs .cs-gd { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; transition: opacity 1.4s ease; cursor: pointer; }
.sel.cs .cs-gd p { margin: 0; font-size: 34px; line-height: 1.5; color: var(--ivory); opacity: 0; animation: slidein 1.2s ease forwards; }
.sel.cs .cs-gd p:nth-child(2) { animation-delay: 1.6s; font-size: 26px; color: var(--paleblue-light); }
.sel.cs.intro h1, .sel.cs.intro .cs-row { opacity: 0; pointer-events: none; }
.sel.cs.intro.ready .cs-gd { opacity: 0; pointer-events: none; }
.sel.cs.intro.ready h1, .sel.cs.intro.ready .cs-row { opacity: 1; transition: opacity 1.6s ease .5s; }
/* v79 대사 가운데 정렬(프로필 없음) · 타자기와 겹치는 입장 모션 제거 */
.cap, .cap.right, .cap.top, .cap.mono { left: 170px; right: 170px; padding-left: 0; display: block; text-align: center; }
.cap .body, .cap.mono .body { animation: none !important; opacity: 1; }
.cap .tx, .cap.ai .tx, .cap.nar .tx { display: block; text-align: center; max-width: none; margin: 0 auto; }
.cap .nm { text-align: center; }
/* 인물 선택: 질문 → 카드가 한 장씩 올라옴 → 고른 인물이 화면 전체로 */
.sel.cs h1, .sel.cs.intro h1 { top: 96px; }
.sel.cs::before { height: 280px; }
.sel.cs.intro h1, .sel.cs.intro .cs-row { opacity: 0; pointer-events: none; }
.sel.cs .cs-gd.fade { opacity: 0; pointer-events: none; }
.sel.cs .cs-gd p { animation: slidein 1.4s ease .3s forwards; font-size: 36px; color: var(--ivory); }
@keyframes cardin { from { opacity: 0; transform: translateY(54px) scale(.97); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes csh { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.sel.cs.stag h1 { animation: csh 1.1s ease .1s backwards; }
.sel.cs.stag .cs-card { animation: cardin 1.2s cubic-bezier(.2,.7,.2,1) backwards; }
.sel.cs.stag .cs-card:nth-child(1) { animation-delay: .8s; }
.sel.cs.stag .cs-card:nth-child(2) { animation-delay: 1.25s; }
.sel.cs.stag .cs-card:nth-child(3) { animation-delay: 1.7s; }
.sel.cs.solo h1 { opacity: 0; transition: opacity .5s ease; }
.sel.cs.solo .cs-row.has .cs-card:not(.on) { flex-grow: 0; opacity: 0; transition: flex-grow 1.1s cubic-bezier(.4,0,.2,1), opacity .6s ease; }
.sel.cs.solo .cs-row.has .cs-card.on { flex-grow: 12; }
.sel.cs.solo .cs-card.on img { filter: none; transform: scale(1.03); }
.cs-card.going .cs-play { opacity: 0; pointer-events: none; }
.sel.cs.solo .cs-card.on.named .cs-nm { font-size: 84px; max-height: 96px; }
/* 진엔딩 안내 묶음 */
.final .truinfo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: -4px; opacity: 0; animation: slidein 1s ease 2s forwards; }
.final .truinfo .tnote { font-size: 20px; color: var(--ivory); }
.final .truinfo .tip { opacity: 1; animation: none; }
.final .truinfo .rate { font-size: 16px; color: var(--paleblue); opacity: 0; transition: opacity 1s ease; }
.final .truinfo .rate.on { opacity: .9; }
.final .truinfo .rate:empty { display: none; }
/* 진엔딩 제목은 하늘색 */
.endmark.intro.tru .id, .endmark.intro.tru h2 { color: var(--paleblue); text-shadow: 0 0 36px rgba(24,12,16,.7), 0 4px 24px rgba(24,12,16,.6); }
.cap .tx .ln { min-height: 1.38em; }
/* v80 인물 선택 등장: 가운데 인물이 아래에서 열리듯 올라오고, 양옆이 이어서 열린다. 사진은 서서히 줌아웃 */
@keyframes cwipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes czoom { from { transform: scale(1.32); } to { transform: scale(1); } }
@keyframes ctx { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes ctitle { from { opacity: 0; letter-spacing: .22em; } to { opacity: 1; letter-spacing: -.02em; } }
.sel.cs.stag h1 { animation: ctitle 1.8s cubic-bezier(.2,.7,.2,1) .1s backwards; }
.sel.cs.stag .cs-card { animation: cwipe 1.5s cubic-bezier(.75,0,.2,1) backwards; }
.sel.cs.stag .cs-card:nth-child(2) { animation-delay: .8s; }
.sel.cs.stag .cs-card:nth-child(1), .sel.cs.stag .cs-card:nth-child(3) { animation-delay: 1.45s; }
.sel.cs.stag .cs-card img { animation: czoom 2.6s cubic-bezier(.2,.7,.2,1) backwards; }
.sel.cs.stag .cs-card:nth-child(2) img { animation-delay: .8s; }
.sel.cs.stag .cs-card:nth-child(1) img, .sel.cs.stag .cs-card:nth-child(3) img { animation-delay: 1.45s; }
.sel.cs.stag .cs-card .cs-tx { animation: ctx 1s ease backwards; }
.sel.cs.stag .cs-card:nth-child(2) .cs-tx { animation-delay: 1.9s; }
.sel.cs.stag .cs-card:nth-child(1) .cs-tx, .sel.cs.stag .cs-card:nth-child(3) .cs-tx { animation-delay: 2.55s; }
/* v81 이전/다음 가운데 · 엔딩 Tip 박스와 도달률 박스 */
#prevbtn { left: 0; right: 0; justify-content: center; gap: 28px; }
.final .truinfo { flex-direction: row; align-items: stretch; justify-content: center; gap: 16px; margin-top: 6px; }
.final .truinfo .tip { display: flex; align-items: center; max-width: 620px; padding: 16px 24px; background: rgba(250,244,239,.12); border-radius: 2px; font-size: 18px; text-align: left; }
.final .truinfo .tip b { margin-right: 12px; flex: none; }
.final .truinfo .rate { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 4px; min-width: 230px; padding: 14px 24px; background: rgba(188,216,221,.16); border-radius: 2px; opacity: 1; }
.final .truinfo .rate.on { display: flex; }
.final .truinfo .rate b { font-size: 46px; line-height: 1; font-weight: 700; color: var(--paleblue); letter-spacing: -.02em; }
.final .truinfo .rate span { font-size: 15px; line-height: 1.4; color: var(--ivory); max-width: 190px; text-align: center; }
/* v82 이전/다음: 눈에 덜 띄는 작은 화살표(눌리는 영역은 넉넉히) · 인물 선택 배경/제목 영역 */
#prevbtn { gap: 36px; bottom: 14px; }
#prevbtn button { font-size: 0; gap: 0; padding: 14px 26px; opacity: .28; transition: opacity .25s ease; }
#prevbtn:hover button { opacity: .45; }
#prevbtn button:hover, #prevbtn button:focus-visible { opacity: .95; }
#prevbtn .pv i { border-width: 5px 8px 5px 0; }
#prevbtn .nx2 i { border-width: 5px 0 5px 8px; }
.sel.cs { background: #460E21; }
.sel.cs::before { display: none; }
.sel.cs .cs-row { background: #460E21; margin-top: 200px; transition: margin-top 1.1s cubic-bezier(.4,0,.2,1), opacity .6s ease; }
.sel.cs .cs-card { background: #460E21; }
.sel.cs h1, .sel.cs.intro h1 { top: 74px; }
.sel.cs.solo .cs-row { margin-top: 0; }
/* v83 말머리(한 줄)가 가운데에서 위로 흘러 제목과 이어짐 · 선택 후 이름은 모든 인물이 같은 자리에서 */
.sel.cs .cs-kk { position: absolute; left: 0; right: 0; top: 34px; z-index: 4; text-align: center; font-size: 20px; letter-spacing: .03em; color: var(--paleblue-light); opacity: .72; pointer-events: none;
  transition: top 1.6s cubic-bezier(.65,0,.25,1), font-size 1.6s cubic-bezier(.65,0,.25,1), opacity 1.6s ease, color 1.6s ease; animation: kkin 1.4s ease .2s backwards; }
@keyframes kkin { from { opacity: 0; } }
.sel.cs.intro .cs-kk { top: calc(50% - 24px); font-size: 40px; opacity: 1; color: var(--ivory); }
.sel.cs.intro { cursor: pointer; }
.sel.cs h1, .sel.cs.intro h1 { top: 84px; }
.sel.cs.solo .cs-kk, .sel.cs.leaving .cs-kk { opacity: 0; transition: opacity .5s ease; }
.sel.cs.solo .cs-card.on .cs-tx { opacity: 0; transition: opacity .3s ease; animation: none; }
.sel.cs.solo .cs-card.on.named .cs-tx { left: 48px; right: 48px; bottom: 56px; opacity: 1; transition: opacity 1s ease .1s; }
/* v84 첫 등장: 말머리가 올라가는 동안 카드는 아직 숨어 있다가 질문 뒤에 열린다 */
.sel.cs.stag.flow h1 { animation-delay: 1s; }
.sel.cs.stag.flow .cs-card:nth-child(2) { animation-delay: 1.8s; }
.sel.cs.stag.flow .cs-card:nth-child(1), .sel.cs.stag.flow .cs-card:nth-child(3) { animation-delay: 2.45s; }
.sel.cs.stag.flow .cs-card:nth-child(2) img { animation-delay: 1.8s; }
.sel.cs.stag.flow .cs-card:nth-child(1) img, .sel.cs.stag.flow .cs-card:nth-child(3) img { animation-delay: 2.45s; }
.sel.cs.stag.flow .cs-card:nth-child(2) .cs-tx { animation-delay: 2.9s; }
.sel.cs.stag.flow .cs-card:nth-child(1) .cs-tx, .sel.cs.stag.flow .cs-card:nth-child(3) .cs-tx { animation-delay: 3.55s; }
/* v85 말머리는 제자리에서 번지듯 사라지고 질문이 이어진다 · 선택한 인물은 원본 비율 그대로(확대 없음, 화질 유지) */
.sel.cs .cs-kk, .sel.cs.intro .cs-kk { top: calc(50% - 24px); font-size: 40px; color: var(--ivory); opacity: 1; filter: none; transition: opacity 1.5s ease, filter 1.5s ease; }
.sel.cs:not(.intro) .cs-kk { opacity: 0; filter: blur(7px); }
.sel.cs.stag.flow h1 { animation-delay: 1.5s; }
.sel.cs.stag.flow .cs-card:nth-child(2) { animation-delay: 2.2s; }
.sel.cs.stag.flow .cs-card:nth-child(1), .sel.cs.stag.flow .cs-card:nth-child(3) { animation-delay: 2.85s; }
.sel.cs.stag.flow .cs-card:nth-child(2) img { animation-delay: 2.2s; }
.sel.cs.stag.flow .cs-card:nth-child(1) img, .sel.cs.stag.flow .cs-card:nth-child(3) img { animation-delay: 2.85s; }
.sel.cs.stag.flow .cs-card:nth-child(2) .cs-tx { animation-delay: 3.3s; }
.sel.cs.stag.flow .cs-card:nth-child(1) .cs-tx, .sel.cs.stag.flow .cs-card:nth-child(3) .cs-tx { animation-delay: 3.95s; }
.sel.cs.solo .cs-row { justify-content: center; }
.sel.cs.solo .cs-row.has .cs-card { transition: flex-grow 1.1s cubic-bezier(.4,0,.2,1), flex-basis 1.1s cubic-bezier(.4,0,.2,1), opacity .6s ease; }
.sel.cs.solo .cs-row.has .cs-card.on { flex: 0 0 675px; }
.sel.cs.solo .cs-card.on img { transform: none; }
.sel.cs.solo .cs-card.on .cs-tx, .sel.cs.solo .cs-card.on.named .cs-tx { left: 44px; right: 24px; }
/* 기록(테스트) */
#logbtn { position: absolute; left: 24px; bottom: 14px; display: none; padding: 14px 18px; border: 0; background: none; color: var(--ivory); font: inherit; font-size: 15px; letter-spacing: .06em; opacity: .3; cursor: pointer; pointer-events: auto; transition: opacity .25s ease; }
#logbtn:hover, #logbtn:focus-visible { opacity: .95; outline: none; }
[data-scene="cine"] #logbtn { display: block; }
[data-title="1"] #logbtn { display: none; }
.logp { position: absolute; inset: 0; z-index: 30; display: flex; justify-content: center; align-items: center; background: rgba(24,12,16,.82); backdrop-filter: blur(6px); pointer-events: auto; }
.lg-box { width: 900px; max-height: 740px; display: flex; flex-direction: column; gap: 18px; padding: 0 12px; }
.lg-hd { display: flex; justify-content: space-between; align-items: center; color: var(--ivory); font-size: 22px; }
.lg-x, .rt-x { padding: 8px 14px; border: 0; background: rgba(250,244,239,.12); color: var(--ivory); font: inherit; font-size: 14px; border-radius: 2px; cursor: pointer; }
.lg-x:hover, .rt-x:hover { background: rgba(250,244,239,.22); }
.lg-list { overflow-y: auto; max-height: 640px; padding-right: 14px; scrollbar-width: thin; }
.lg-i { margin: 0 0 20px; }
.lg-i .w { font-size: 14px; letter-spacing: .08em; color: var(--paleblue); margin-bottom: 4px; }
.lg-i .t { font-size: 22px; line-height: 1.5; color: var(--ivory); white-space: pre-line; }
.lg-i.mono .t { color: var(--paleblue-light); opacity: .85; letter-spacing: .04em; }
.lg-i.pick .t { color: var(--paleblue-light); }
.lg-i.pick .w { color: var(--ivory); }
/* v86 카드 1→2→3 순서 등장 · 선택 후 배경과 자연스러운 이동 · 이전/다음 글자 · 엔딩 박스 glass */
.sel.cs.stag .cs-card:nth-child(1), .sel.cs.stag .cs-card:nth-child(1) img { animation-delay: .8s; }
.sel.cs.stag .cs-card:nth-child(2), .sel.cs.stag .cs-card:nth-child(2) img { animation-delay: 1.3s; }
.sel.cs.stag .cs-card:nth-child(3), .sel.cs.stag .cs-card:nth-child(3) img { animation-delay: 1.8s; }
.sel.cs.stag .cs-card:nth-child(1) .cs-tx { animation-delay: 1.9s; }
.sel.cs.stag .cs-card:nth-child(2) .cs-tx { animation-delay: 2.4s; }
.sel.cs.stag .cs-card:nth-child(3) .cs-tx { animation-delay: 2.9s; }
.sel.cs.stag.flow .cs-card:nth-child(1), .sel.cs.stag.flow .cs-card:nth-child(1) img { animation-delay: 2.2s; }
.sel.cs.stag.flow .cs-card:nth-child(2), .sel.cs.stag.flow .cs-card:nth-child(2) img { animation-delay: 2.7s; }
.sel.cs.stag.flow .cs-card:nth-child(3), .sel.cs.stag.flow .cs-card:nth-child(3) img { animation-delay: 3.2s; }
.sel.cs.stag.flow .cs-card:nth-child(1) .cs-tx { animation-delay: 3.3s; }
.sel.cs.stag.flow .cs-card:nth-child(2) .cs-tx { animation-delay: 3.8s; }
.sel.cs.stag.flow .cs-card:nth-child(3) .cs-tx { animation-delay: 4.3s; }
/* 선택 후: 다른 카드가 먼저 흐려지고 → 고른 카드가 가운데로 모이며 → 뒤에 같은 인물의 흐린 배경이 깔린다 */
.cs-bd { position: absolute; inset: 0; z-index: 0; opacity: 0; overflow: hidden; pointer-events: none; transition: opacity 1.6s ease .7s; }
.cs-bd img { width: 100%; height: 100%; object-fit: cover; filter: blur(40px) brightness(.42) saturate(1.15); transform: scale(1.25); }
.sel.cs.solo .cs-bd { opacity: 1; }
.sel.cs .cs-row { position: relative; z-index: 1; }
.sel.cs.solo .cs-row { background: transparent; }
.sel.cs.solo .cs-card { background: transparent; }
.sel.cs.solo .cs-row.has .cs-card:not(.on) { transition: opacity .5s ease, flex-grow 1.2s cubic-bezier(.45,0,.2,1) .45s; }
.sel.cs.solo .cs-row.has .cs-card.on { transition: flex-basis 1.3s cubic-bezier(.45,0,.2,1) .45s, flex-grow 1.3s cubic-bezier(.45,0,.2,1) .45s; }
.sel.cs.solo .cs-row { transition: margin-top 1.3s cubic-bezier(.45,0,.2,1) .45s; }
.sel.cs.solo .cs-card.on { box-shadow: 0 0 80px rgba(0,0,0,.45); }
/* 이전/다음: 작은 글자와 함께 */
#prevbtn button { font-size: 13px; gap: 7px; letter-spacing: .06em; padding: 14px 22px; }
/* 엔딩 박스: 유리처럼(배경 블러), 윗줄과 같은 폭 */
.final .truinfo { width: 924px; margin-left: auto; margin-right: auto; }
.final .truinfo .tip { flex: 1; max-width: none; background: rgba(250,244,239,.1); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); box-shadow: inset 0 0 0 1px rgba(250,244,239,.07); }
.final .truinfo .rate { background: rgba(188,216,221,.14); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); box-shadow: inset 0 0 0 1px rgba(188,216,221,.1); }
/* v87 이전 버튼 없음: 우측 아래에 [기록 · 다음] */
#prevbtn { left: auto; right: 24px; justify-content: flex-end; }
#prevbtn .pv { display: none; }
#logbtn { left: auto; right: 24px; transition: right .3s ease, opacity .25s ease; }
#prevbtn.on ~ #logbtn { right: 104px; }
/* v88 기록 창: 고정 헤더 · 넓은 간격 · 직접 만든 스크롤바 · 헤더 아래 그라데이션 */
.lg-box { width: 880px; height: 760px; max-height: none; gap: 0; padding: 0; }
.lg-hd { flex: none; padding: 0 0 22px; border-bottom: 1px solid rgba(250,244,239,.1); }
.lg-wrap { position: relative; flex: 1; min-height: 0; }
.lg-list { position: absolute; inset: 0; max-height: none; overflow-y: scroll; scrollbar-width: none; padding: 44px 36px 56px 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 52px, #000 calc(100% - 44px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 52px, #000 calc(100% - 44px), transparent 100%); }
.lg-list::-webkit-scrollbar { display: none; }
.lg-i { margin: 0 0 40px; }
.lg-bar { position: absolute; right: 0; top: 24px; bottom: 24px; width: 6px; background: rgba(250,244,239,.07); border-radius: 2px; transition: opacity .3s ease; cursor: pointer; }
.lg-bar i { position: absolute; left: 0; right: 0; top: 0; background: rgba(250,244,239,.34); border-radius: 2px; cursor: grab; transition: background .2s ease; }
.lg-bar i:hover, .lg-bar i.drag { background: rgba(250,244,239,.62); }
/* v89 기록/다음 버튼을 더 잘 보이게 · 다음은 '화면을 눌러' 임을 알림 */
#prevbtn button, #logbtn { opacity: .62; font-size: 15px; }
#prevbtn:hover button { opacity: .75; }
#prevbtn button:hover, #prevbtn button:focus-visible, #logbtn:hover, #logbtn:focus-visible { opacity: 1; }
#prevbtn .nx2 i { animation: nxp 2.6s ease-in-out infinite; }
@keyframes nxp { 0%, 100% { transform: translateX(0); opacity: .55; } 50% { transform: translateX(4px); opacity: 1; } }
#prevbtn.on ~ #logbtn { right: 190px; }
/* v90 선택 후: 한 번의 움직임 — 다른 카드는 흐려지고, 고른 카드는 그 자리에서 가운데로 미끄러짐. 뒤에는 이 인물의 첫 장면 */
.sel.cs.solo .cs-row.has .cs-card:not(.on) { flex-grow: 1; opacity: 0; transition: opacity 1.1s ease; }
.sel.cs.solo .cs-row.has .cs-card.on { flex: 2.3 1 0; transform: translateX(var(--dx, 0px)); transition: transform 1.4s cubic-bezier(.45,0,.2,1); box-shadow: 0 0 90px rgba(0,0,0,.5); }
.sel.cs.solo .cs-row { transition: margin-top 1.4s cubic-bezier(.45,0,.2,1); }
.cs-bd { transition: opacity 1.4s ease; }
.cs-bd img { filter: brightness(.38) saturate(.95); transform: none; }
.cs-bd:not(.scn) img { filter: blur(40px) brightness(.42) saturate(1.15); transform: scale(1.25); }
.sel.cs.solo .cs-row.has .cs-card.on .cs-tx { transition: opacity .3s ease; }
/* v91 선택 후 자연스럽게: 글씨는 카드와 함께 움직이며 이름만 서서히 나타나고, 사진 양끝은 뒤 장면 속으로 번지듯 녹아든다 */
@property --ed { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.sel.cs .cs-card.on img { --ed: 0%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%); }
.sel.cs.solo .cs-card.on img { --ed: 22%; transition: --ed 1.4s cubic-bezier(.45,0,.2,1), filter .9s ease; }
.sel.cs.solo .cs-row.has .cs-card.on { box-shadow: none; }
.sel.cs.solo .cs-card.on .cs-tx, .sel.cs.solo .cs-card.on.named .cs-tx { left: 34px; right: 34px; bottom: 48px; opacity: 1; transition: none; animation: none; }
.sel.cs.solo .cs-card.on .cs-kw, .sel.cs.solo .cs-card.on .cs-pr { transition: opacity .6s ease, max-height 1s ease; }
.sel.cs.solo .cs-card.on.named .cs-nm { font-size: 72px; max-height: 84px; transition: opacity 1.1s ease, max-height 1.1s ease; }
.cs-bd img { filter: blur(5px) brightness(.36) saturate(.95); transform: scale(1.04); }
.cs-bd:not(.scn) img { filter: blur(40px) brightness(.42) saturate(1.15); transform: scale(1.25); }
.sel.cs .cs-card.on .cs-sh { --ed: 0%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%); }
.sel.cs.solo .cs-card.on .cs-sh { --ed: 22%; transition: --ed 1.4s cubic-bezier(.45,0,.2,1); }
/* v92 커서: 움직이는 속도에 따라 크기가 달라짐(핫스팟 기준) · 선택지: 글이 짧아지면 폭도 맞춰 줄어듦 */
#cur { scale: var(--cs, 1); transform-origin: var(--cur-x, 0px) var(--cur-y, 0px); }
#cur.dot.hov { transform-origin: 50% 50%; }
.choice.game { grid-template-columns: minmax(0, 1fr) auto; }
.choice.game .opts { width: max-content; min-width: 380px; max-width: 640px; }
/* v93 선택 후 배경은 은은하게: 장면을 더 흐리고 어둡게, 버건디가 비치도록 */
.sel.cs.solo .cs-bd { opacity: .5; }
.cs-bd img { filter: blur(16px) brightness(.3) saturate(.65); transform: scale(1.1); }
.cs-bd:not(.scn) img { filter: blur(40px) brightness(.4) saturate(.9); transform: scale(1.25); }
#cur { scale: none; }
/* v94 커서: 브라우저가 직접 그리는 커서(지연 없음). 점 모양 기본값, play/cursor.svg·cursor-hover.svg 가 있으면 그 그림을 씀 */
html.nocur, html.nocur * { cursor: var(--cn, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='6' fill='%23FAF4EF' fill-opacity='1' stroke='%23460E21' stroke-opacity='.35'/%3E%3C/svg%3E")) var(--cnx, 16) var(--cny, 16), auto !important; }
html.nocur button, html.nocur .tap, html.nocur .opt, html.nocur .cs-card, html.nocur #gear, html.nocur input, html.nocur a, html.nocur [role="button"], html.nocur button *, html.nocur .opt *, html.nocur .cs-card * { cursor: var(--ch, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='10' fill='%23FAF4EF' fill-opacity='0.85' stroke='%23460E21' stroke-opacity='.35'/%3E%3C/svg%3E")) var(--chx, 16) var(--chy, 16), pointer !important; }
#cur { display: none !important; }

/* v95 만화식 컷 페이지 */
#back.pmode { background: radial-gradient(120% 90% at 50% 40%, #5a1a30, #2b0c18); }
#back.pmode .bgimg { opacity: 0 !important; }
#canvas .pnl { position: absolute; inset: 0; pointer-events: none; }
#canvas .pnl .pnc { position: absolute; overflow: hidden; background: #1a0a10; transition: left 1.3s cubic-bezier(.65,0,.25,1), top 1.3s cubic-bezier(.65,0,.25,1), width 1.3s cubic-bezier(.65,0,.25,1), height 1.3s cubic-bezier(.65,0,.25,1), opacity 1s ease, filter .9s ease; }
#canvas .pnl .pnc .bd { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; transition: transform 6.5s cubic-bezier(.2,.6,.2,1); }
#canvas .pnl .pnc.dim { filter: brightness(.55) saturate(.85); }
@media (prefers-reduced-motion: reduce) { #canvas .pnl .pnc, #canvas .pnl .pnc .bd { transition: none; } }
.setp .tkrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.setp .tkrow span { margin-right: 4px; opacity: .8; font-size: 14px; }
.setp .tkb { font: inherit; font-size: 13px; padding: 5px 12px; border: 0; border-radius: 999px; background: rgba(70,14,33,.08); color: #460E21; cursor: pointer; }
.setp .tkb.on { background: #460E21; color: #FAF4EF; }

/* v96 컷 안 자막 (pageCap) */
#canvas .pnl .pnc .cap.incap { left: 0; right: 0; bottom: 0; padding: 90px 36px 30px; background: linear-gradient(to bottom, rgba(24,12,16,0), rgba(24,12,16,.66)); z-index: 2; box-sizing: border-box; }
#canvas .pnl .pnc .cap.incap .tx { font-size: 30px; }
#canvas .pnl .pnc .cap.incap.ai .tx { font-size: 27px; }
#canvas .pnl .pnc .cap.incap .nm { font-size: 18px; margin-bottom: 8px; }

/* v97 빈 칸(미리 짜 둔 페이지) */
#canvas .pnl .pnc.empty { background: rgba(24,12,16,.5); }
#canvas .pnl .pnc .bd { transition: transform 6.5s cubic-bezier(.2,.6,.2,1), clip-path 1.2s cubic-bezier(.65,0,.25,1), opacity 1s ease; }

/* v98 자막 위치 지정 */
.cap.placed { transform: none; box-sizing: border-box; }
#canvas .pnl .pnc .cap.incap.placed { background: none; padding: 10px 14px; }
.cap.placed.top { top: auto; }
body .cap.editable { pointer-events: auto; cursor: move; outline: 1px dashed rgba(213,237,241,.55); outline-offset: 6px; z-index: 9; }
.cap.editable .rz { position: absolute; right: -10px; top: 50%; width: 10px; height: 44px; margin-top: -22px; border-radius: 5px; background: rgba(213,237,241,.8); cursor: ew-resize; }
.capbadge { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 99; padding: 8px 18px; border-radius: 999px; background: rgba(24,12,16,.78); color: #D5EDF1; font: 13px/1.4 system-ui, sans-serif; pointer-events: none; }
body.capedit #canvas .pnl { z-index: 6; }

/* v99 페이지가 바뀔 때 서서히 사라짐 + 더 느린 곡선 */
#canvas .pnl.leaving { z-index: 3; transition: opacity 1.5s ease; }
#canvas .pnl .pnc { transition: left 1s cubic-bezier(.4,.05,.2,1), top 1s cubic-bezier(.4,.05,.2,1), width 1s cubic-bezier(.4,.05,.2,1), height 1s cubic-bezier(.4,.05,.2,1), opacity 1.2s ease, filter 1s ease; box-shadow: 0 18px 50px rgba(0,0,0,.28); }

/* v100 자막 상자 (capBox): 그림은 위쪽 영역, 자막은 아래 가운데 상자에 */
.cap.box { left: 50%; right: auto; width: 1120px; transform: translateX(-50%); bottom: 64px; box-sizing: border-box; padding: 24px 48px 26px; border-radius: 16px; background: rgba(24,12,16,.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); text-shadow: none; }
.cap.box .tx { font-size: 32px; }
.cap.box.ai .tx { font-size: 29px; }
.cap.box.placed { transform: none; }

/* v101 윗면적은 전체 뷰: 그림이 가장자리까지 차고, 컷 사이는 얇은 틈만 */
#canvas .pnl .pnc { box-shadow: none; }
#canvas .pnl.leaving { transition: opacity .5s ease; }

/* v102 쿵: 화면이 한 번 흔들린다 */
#canvas.shake { animation: thudshake .65s cubic-bezier(.2,.7,.3,1); }
@keyframes thudshake { 0% { translate: 0 0; } 10% { translate: -9px 6px; } 25% { translate: 7px -5px; } 42% { translate: -5px 3px; } 62% { translate: 3px -2px; } 100% { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { #canvas.shake { animation: none; } }

/* v103 본문 텍스트(자막·나레이션)는 모두 왼쪽 정렬 */
.cap, .cap .body, .cap .tx, .cap .tx .ln, .cap .nm, .cap.ai .tx, .dil { text-align: left; }
.cap .body { display: block; }
.cap.box { text-align: left; }

/* v104 자막은 항상 같은 왼쪽 선에서 시작 (위치 지정한 것만 예외) */
.cap:not(.placed):not(.incap), .cap.right:not(.placed), .cap.top:not(.placed), .cap.mono:not(.placed), .cap.hasav:not(.placed) { left: 170px; right: 170px; padding-left: 0; text-align: left; }
.cap .tx, .cap.ai .tx, .cap.nar .tx, .cap.mono .tx, .cap .nm { margin: 0; text-align: left; }
.cap.box:not(.placed) { left: 170px; right: auto; width: 1120px; transform: none; }

/* v105 고른 카드가 움직이는 동안은 글자를 숨기고, 자리 잡은 뒤 이름·역할이 제자리에서 서서히 */
.sel.cs.solo .cs-card.on:not(.named) .cs-tx { opacity: 0; transition: opacity .3s ease; }
.sel.cs.solo .cs-card.on.named .cs-tx { opacity: 1; transition: opacity 1.1s ease; }

/* v106 화자 이름과 대사 사이 간격 */
.cap .nm { margin-bottom: 10px; }
#canvas .pnl .pnc .cap.incap .nm { margin-bottom: 8px; }

/* v107 이름이 나타나는 모션: 아래에서 살짝 떠오르며 흐림이 걷히고, 역할이 뒤따른다 */
@keyframes nmin { from { opacity: 0; transform: translateY(22px); filter: blur(7px); } to { opacity: 1; transform: none; filter: blur(0); } }
.sel.cs.solo .cs-card.on.named .cs-tx { transition: none; animation: none; }
.sel.cs.solo .cs-card.on.named .cs-nm { animation: nmin 1.5s cubic-bezier(.2,.7,.2,1) both; }
.sel.cs.solo .cs-card.on.named .cs-rl { animation: nmin 1.3s cubic-bezier(.2,.7,.2,1) .45s both; }

/* v108 */
/* 1) '누구를 위한 책임이었나요?' — 왼쪽→오른쪽 대신, 글자 간격이 모이며 아래에서 떠오른다 */
@keyframes bigin { from { opacity: 0; transform: translateY(20px) scale(.97); letter-spacing: .08em; filter: blur(4px); } to { opacity: 1; transform: none; letter-spacing: 0; filter: blur(0); } }
.final .big { -webkit-mask-image: none; mask-image: none; animation: bigin 1.8s cubic-bezier(.2,.7,.2,1) .2s both; }
/* 2) True Ending 이름: 뿌옇게 번져 있다가 또렷해진다 (일반 엔딩은 그대로) */
@keyframes trblur { 0% { opacity: 0; filter: blur(22px); letter-spacing: .14em; } 55% { opacity: .85; } 100% { opacity: 1; filter: blur(0); letter-spacing: 0; } }
.endmark.intro.tru .id { animation: trblur 2.4s ease .2s backwards; }
.endmark.intro.tru h2 { animation: trblur 2.8s ease .9s backwards; }
/* 3) Tip: 둘째 줄부터 첫 줄 글자 시작에 맞추고, 단어 단위로 줄바꿈 */
.final .tip, .final .truinfo .tip { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 22px; align-items: start; text-align: left; line-height: 1.75; padding: 22px 30px; word-break: keep-all; overflow-wrap: normal; text-wrap: pretty; }
.final .tip b, .final .truinfo .tip b { margin: 0; display: block; }
.final .tip span { display: block; }
/* 4) 오프닝에는 아래 그라데이션 없음 */
[data-op="1"] #fx .shade, #back.pmode ~ #fx .shade { display: none; }
[data-op="1"] #canvas .pnl .pnc .cap.incap { background: none; padding: 10px 36px 30px; }
/* 5) 대사 밑 그라데이션: 색을 훨씬 옅게, 대신 뒤 배경이 흐려지는 유리 느낌 */
#fx .shade:not(.up), #fx[data-tall="1"] .shade:not(.up) { background: linear-gradient(to top, rgba(24,12,16,.34) 0, rgba(24,12,16,.16) 14%, rgba(24,12,16,0) 32%); -webkit-backdrop-filter: blur(16px) saturate(1.08); backdrop-filter: blur(16px) saturate(1.08); -webkit-mask-image: linear-gradient(to top, #000 0, #000 12%, transparent 32%); mask-image: linear-gradient(to top, #000 0, #000 12%, transparent 32%); }
#fx .shade.up { background: linear-gradient(to bottom, rgba(24,12,16,.34) 0, rgba(24,12,16,.16) 18%, rgba(24,12,16,0) 40%); -webkit-backdrop-filter: blur(16px) saturate(1.08); backdrop-filter: blur(16px) saturate(1.08); -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 16%, transparent 40%); mask-image: linear-gradient(to bottom, #000 0, #000 16%, transparent 40%); }

/* v109 */
/* 대사 밑 유리 그라데이션을 더 죽인다 */
#fx .shade:not(.up), #fx[data-tall="1"] .shade:not(.up) { background: linear-gradient(to top, rgba(24,12,16,.2) 0, rgba(24,12,16,.09) 14%, rgba(24,12,16,0) 26%); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); -webkit-mask-image: linear-gradient(to top, #000 0, #000 8%, transparent 26%); mask-image: linear-gradient(to top, #000 0, #000 8%, transparent 26%); }
#fx .shade.up { background: linear-gradient(to bottom, rgba(24,12,16,.2) 0, rgba(24,12,16,.09) 18%, rgba(24,12,16,0) 32%); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 10%, transparent 32%); mask-image: linear-gradient(to bottom, #000 0, #000 10%, transparent 32%); }
/* 너비 0으로 접힌 컷은 그림자도 남기지 않는다 */
#canvas .pnl .pnc[style*="width: 0px"] { box-shadow: none; }
/* 캐릭터를 고른 뒤: 이름·역할은 카드 가운데 아래에 타이틀처럼 천천히 맺힌다 */
@keyframes nmin2 { from { opacity: 0; transform: translateY(14px); filter: blur(10px); letter-spacing: .08em; } to { opacity: 1; transform: none; filter: blur(0); letter-spacing: -.03em; } }
@keyframes rlin2 { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sel.cs.solo .cs-card.on.named .cs-tx { left: 0; right: 0; bottom: 70px; align-items: center; text-align: center; }
.sel.cs.solo .cs-card.on.named .cs-nm { text-align: center; animation: nmin2 1.9s cubic-bezier(.22,.7,.2,1) both; }
.sel.cs.solo .cs-card.on.named .cs-rl { text-align: center; margin-top: 8px; animation: rlin2 1.4s ease .8s both; }

/* v110 선택지 화면에서는 기록 버튼을 왼쪽 아래로 */
body:has(.choice.game) #logbtn, body:has(.choice.game) #prevbtn.on ~ #logbtn { left: 24px; right: auto; }

/* v111 캐릭터를 고른 뒤: 키워드·설명은 보이지 않고 이름과 역할만 */
.sel.cs.solo .cs-card.on .cs-kw, .sel.cs.solo .cs-card.on .cs-pr, .sel.cs.solo .cs-card.on .cs-hint { opacity: 0; transition: opacity .1s ease; }
.sel.cs.solo .cs-card.on.named .cs-kw, .sel.cs.solo .cs-card.on.named .cs-pr, .sel.cs.solo .cs-card.on.named .cs-hint { display: none; }
/* v111 좌측 위 프로필 → 프로필 모달 */
#hudl .hudclick { pointer-events: auto; cursor: pointer; transition: transform .2s ease, filter .2s ease; }
#hudl .hudclick:hover { transform: scale(1.06); filter: brightness(1.08); }
.logp.prof .pf-box { display: flex; align-items: stretch; gap: 0; width: 860px; border-radius: 22px; overflow: hidden; background: var(--burgundy-dark); box-shadow: 0 30px 90px rgba(0,0,0,.5); animation: rise .5s ease both; }
.logp.prof .pf-im { flex: none; width: 360px; height: 480px; background: var(--burgundy); }
.logp.prof .pf-im img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; display: block; }
.logp.prof .pf-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 40px 44px; color: var(--ivory); text-align: left; }
.logp.prof .pf-kw { font-size: 15px; font-weight: 600; color: var(--paleblue-light); opacity: .8; }
.logp.prof .pf-rl { margin-top: 6px; font-size: 24px; font-weight: 500; }
.logp.prof .pf-nm { margin-top: 2px; font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.logp.prof p { margin: 18px 0 26px; font-size: 19px; line-height: 1.7; word-break: keep-all; text-wrap: pretty; color: rgba(250,244,239,.88); }

/* v112 프로필 모달: 유리(배경 블러) 카드, 높이는 내용에 맞춤, 글은 위에서부터, 닫기는 오른쪽 아래 */
.logp.prof .pf-box { height: auto; background: rgba(24,12,16,.42); -webkit-backdrop-filter: blur(26px) saturate(1.15); backdrop-filter: blur(26px) saturate(1.15); box-shadow: inset 0 0 0 1px rgba(250,244,239,.12), 0 30px 90px rgba(0,0,0,.4); }
.logp.prof .pf-im { position: relative; height: auto; min-height: 360px; background: none; }
.logp.prof .pf-im img { position: absolute; inset: 0; }
.logp.prof .pf-tx { justify-content: flex-start; }
.logp.prof p { margin: 18px 0 28px; }
.logp.prof .lg-x { align-self: flex-end; margin-top: auto; }

/* v113 하단(대사 밑) 그라데이션을 조금 더 어둡게 */
#fx .shade:not(.up), #fx[data-tall="1"] .shade:not(.up) { background: linear-gradient(to top, rgba(24,12,16,.36) 0, rgba(24,12,16,.18) 14%, rgba(24,12,16,0) 28%); -webkit-mask-image: linear-gradient(to top, #000 0, #000 9%, transparent 28%); mask-image: linear-gradient(to top, #000 0, #000 9%, transparent 28%); }

/* v114 엔딩 글자 버벅임 수정: 글자 간격(letter-spacing) 애니메이션은 프레임마다 레이아웃을 다시 계산해 끊긴다 → 투명도·이동·확대·흐림만 쓴다 */
@keyframes trblur { 0% { opacity: 0; transform: scale(1.06); filter: blur(18px); } 55% { opacity: .85; } 100% { opacity: 1; transform: none; filter: blur(0); } }
@keyframes bigin { from { opacity: 0; transform: translateY(20px) scale(.97); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes nmin2 { from { opacity: 0; transform: translateY(14px) scale(1.04); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes nmin { from { opacity: 0; transform: translateY(22px); filter: blur(7px); } to { opacity: 1; transform: none; filter: blur(0); } }
.endmark.intro .id, .endmark.intro h2, .final .big { will-change: opacity, transform, filter; backface-visibility: hidden; }

/* v115 프로필 모달: 배경을 덜 어둡게, 글 위계 정리 (키워드 → 이름 → 역할 → 구분선 → 소개) */
.logp.prof { background: rgba(24,12,16,.34); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.logp.prof .pf-box { background: rgba(250,244,239,.14); -webkit-backdrop-filter: blur(28px) saturate(1.2); backdrop-filter: blur(28px) saturate(1.2); box-shadow: inset 0 0 0 1px rgba(250,244,239,.22), 0 24px 70px rgba(0,0,0,.28); }
.logp.prof .pf-kw { font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--paleblue-light); opacity: .85; }
.logp.prof .pf-nm { margin-top: 14px; font-size: 64px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.logp.prof .pf-rl { margin-top: 10px; font-size: 22px; font-weight: 500; color: var(--paleblue-light); }
.logp.prof .pf-ln { display: block; width: 100%; height: 1px; margin: 26px 0 0; background: rgba(250,244,239,.22); }
.logp.prof p { margin: 22px 0 28px; font-size: 18px; line-height: 1.75; color: rgba(250,244,239,.82); }

/* v116 선택지 화면: 하단 그라데이션을 더 넓고 진하게 */
#fx[data-tall="1"] .shade:not(.up) { background: linear-gradient(to top, rgba(24,12,16,.66) 0, rgba(24,12,16,.42) 18%, rgba(24,12,16,.16) 36%, rgba(24,12,16,0) 50%); -webkit-mask-image: linear-gradient(to top, #000 0, #000 20%, transparent 50%); mask-image: linear-gradient(to top, #000 0, #000 20%, transparent 50%); }

/* v117 선택지 화면 */
.choice.game .cg-step { font-size: 14px; letter-spacing: .06em; }
.choice.game .cg-step b { font-size: 17px; }
body:has(.choice.game) #logbtn { opacity: 1; font-size: 17px; font-weight: 600; padding: 10px 20px; border-radius: 999px; background: rgba(250,244,239,.16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(250,244,239,.28); bottom: 22px; left: 28px; }
body:has(.choice.game) #logbtn:hover, body:has(.choice.game) #logbtn:focus-visible { background: rgba(250,244,239,.28); }
/* v117 마지막 엔딩 화면: 글·버튼이 모두 같은 모션(아래에서 떠오르며 흐림이 걷힘)으로, 간격만 두고 차례로 */
.final .big { animation: bigin 1.5s cubic-bezier(.2,.7,.2,1) .2s both; }
.final .more { animation: bigin 1.5s cubic-bezier(.2,.7,.2,1) .55s both; }
.final .sil { animation: bigin 1.5s cubic-bezier(.2,.7,.2,1) .9s both; }
.final .truinfo { animation: bigin 1.5s cubic-bezier(.2,.7,.2,1) 1.25s both; }
.final .dex { animation: bigin 1.5s cubic-bezier(.2,.7,.2,1) 1.25s both; }
.final .btns { animation: bigin 1.5s cubic-bezier(.2,.7,.2,1) 1.6s both; }
.final .lower { animation: bigin 1.5s cubic-bezier(.2,.7,.2,1) 1.9s both; }
.final .tip { animation: none; opacity: 1; }
.final .truinfo .rate.on { animation: bigin 1.3s cubic-bezier(.2,.7,.2,1) .2s both; }
.final .truinfo .rate b, .final .truinfo .rate span { animation: none; }

/* v118 엔딩: 왼쪽→오른쪽으로 들어오는 모션 없이, 아래에서 떠오르며 흐림이 걷히는 모션으로 통일 */
.endmark.intro:not(.tru) .id { animation: bigin 1.3s cubic-bezier(.2,.7,.2,1) .2s both; }
.endmark.intro:not(.tru) h2 { animation: bigin 1.5s cubic-bezier(.2,.7,.2,1) .6s both; }
[data-scene="turn"] .cap .body, [data-scene="turn"] .cap.mono .body { -webkit-mask-image: none; mask-image: none; animation: bigin .9s cubic-bezier(.2,.7,.2,1) both; }

/* v119 선택지 화면: 기록 버튼을 본문 왼쪽 줄(96px)에 맞춘다 */
body:has(.choice.game) #logbtn, body:has(.choice.game) #prevbtn.on ~ #logbtn { left: 96px; right: auto; bottom: 22px; }

/* v120 선택지 화면 기록 버튼: 알약 배경 없이 글자만, 글자 크기만 키움 */
body:has(.choice.game) #logbtn { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border-radius: 0; padding: 10px 0; opacity: .62; font-size: 20px; font-weight: 500; }
body:has(.choice.game) #logbtn:hover, body:has(.choice.game) #logbtn:focus-visible { background: none; opacity: 1; }

/* v121 엔딩 전개 중에는 기록 버튼을 숨긴다 */
[data-scene="turn"] #logbtn { display: none; }
/* v121 선택지 화면: 기록 버튼의 아래 여백을 선택지(64px)와 같게, 질문 묶음은 그 위로 */
body:has(.choice.game) #logbtn, body:has(.choice.game) #prevbtn.on ~ #logbtn { bottom: 64px; padding: 0; line-height: 1; }
body:has(.choice.game) .choice.game .q { margin-bottom: 78px; }
/* v121 선택지 돼지 심볼: 카드 세로 가운데에 정확히 */
.choice.game .opts .opt .mk { top: 50%; bottom: auto; margin-top: -12px; width: 46px; height: 24px; transform: none; }

/* v122 True Ending 이름: 팔레트의 버건디 악센트를 밝게 푼 분홍 (버건디 + 아이보리 혼합) */
.endmark.intro.tru .id, .endmark.intro.tru h2 { color: color-mix(in srgb, var(--burgundy) 62%, var(--ivory)); text-shadow: 0 0 36px rgba(24,12,16,.55), 0 3px 18px rgba(24,12,16,.5); }

/* v123 '이 선택은 기억될 것입니다' 안내가 뜨는 동안·마지막 선택 직후에는 기록 버튼을 숨긴다 */
body:has(.choice.game.fb) #logbtn, body:has(.choice.game.end) #logbtn { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
[data-nolog="1"] #logbtn { display: none !important; }

/* v124 오프닝: 화자·자막과 위 이미지 사이 간격을 넓힌다 (자막을 36px 아래로) */
[data-op="1"] .cap:not(.placed):not(.incap) { --cap-bottom: calc(44 * var(--u)); bottom: calc(44 * var(--u)); }

/* v125 True Ending 색 번짐: 파란색(팔레트의 페일블루)이 가운데에서 슝— 하고 빠르게 퍼졌다 가라앉는다 */
@keyframes trspread { from { transform: scale(.04); } to { transform: scale(2.6); } }
@keyframes trfade { 0% { opacity: 0; } 10% { opacity: 1; } 45% { opacity: .75; } 100% { opacity: 0; } }
.trbloom { background: radial-gradient(circle at 50% 55%, rgba(213,237,241,.85) 0%, rgba(188,216,221,.55) 26%, rgba(188,216,221,.2) 48%, rgba(188,216,221,0) 66%); transform-origin: 50% 55%; opacity: 0; animation: trspread 1.5s cubic-bezier(.08,.85,.2,1) both, trfade 3.6s ease both; }

/* v126 True Ending 빛: 확 밝아지지 않고, 아이보리 빛이 가운데 광원에서 천천히 번져 나간다 */
@keyframes trspread { 0% { transform: scale(.25); } 100% { transform: scale(2.3); } }
@keyframes trfade { 0% { opacity: 0; } 28% { opacity: .62; } 60% { opacity: .4; } 100% { opacity: 0; } }
.trbloom { background: radial-gradient(circle at 50% 55%, rgba(250,244,239,.62) 0%, rgba(250,244,239,.32) 18%, rgba(236,213,179,.14) 40%, rgba(236,213,179,0) 66%); transform-origin: 50% 55%; opacity: 0; animation: trspread 5s cubic-bezier(.2,.5,.3,1) both, trfade 5.2s ease-in-out both; }

/* v127 True Ending: 빛은 처음의 따뜻한 번짐으로 되돌리고, 글자는 어두운 페일블루(--paleblue)로 */
.trbloom { background: radial-gradient(ellipse at 50% 55%, rgba(236,213,179,.55) 0%, rgba(236,213,179,.22) 38%, rgba(24,12,16,0) 72%); transform: none; transform-origin: 50% 50%; opacity: 0; animation: trbloom 5.8s ease both; }
.endmark.intro.tru .id, .endmark.intro.tru h2 { color: var(--paleblue); text-shadow: 0 0 36px rgba(24,12,16,.7), 0 4px 24px rgba(24,12,16,.6); }

/* v128 True Ending 빛: 따뜻한 번짐 위로 빛 물결이 촤악— 퍼져 나가고, 번짐은 일렁인다 */
@keyframes trsway { 0%, 100% { transform: scale(1) translateY(0); } 50% { transform: scale(1.08) translateY(-6px); } }
@keyframes trring { 0% { transform: scale(.04); opacity: 0; } 10% { opacity: .95; } 100% { transform: scale(1.25); opacity: 0; } }
.trbloom { animation: trbloom 5.8s ease both, trsway 2.4s ease-in-out infinite; transform-origin: 50% 55%; }
.trbloom::before, .trbloom::after { content: ""; position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; border-radius: 50%; transform: scale(.04); opacity: 0; transform-origin: 50% 52%; background: radial-gradient(circle, rgba(250,244,239,0) 36%, rgba(250,244,239,.6) 45%, rgba(236,213,179,.34) 52%, rgba(236,213,179,0) 62%); animation: trring 2.1s cubic-bezier(.1,.8,.22,1) both; }
.trbloom::after { animation-delay: .4s; animation-duration: 2.5s; background: radial-gradient(circle, rgba(250,244,239,0) 40%, rgba(250,244,239,.4) 48%, rgba(236,213,179,.22) 54%, rgba(236,213,179,0) 64%); }

/* v129 오프닝: 컷이 화면 전체(900px)를 쓰고, 대사·나레이션은 말하는 컷 안의 유리 텍스트 상자에 */
[data-op="1"] #canvas .pnl .pnc .cap.incap { left: 22px; right: 22px; bottom: 22px; width: auto; padding: 18px 26px 20px; background: rgba(24,12,16,.5); -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(250,244,239,.14); text-align: left; box-sizing: border-box; --cap-bottom: 22px; }
[data-op="1"] #canvas .pnl .pnc .cap.incap .tx { font-size: 26px; line-height: 1.45; }
[data-op="1"] #canvas .pnl .pnc .cap.incap .nm { font-size: 16px; margin-bottom: 8px; }

/* v130 오프닝에는 기록 버튼을 두지 않는다 */
[data-op="1"] #logbtn { display: none !important; }

/* v131 오프닝 말풍선: 유리가 아니라 꽉 찬 색, 글자 길이에 딱 맞는 크기. 다음 대사·다음 컷으로 넘어가도 컷 안에 남는다 (만화처럼) */
[data-op="1"] #canvas .pnl .pnc .pcs { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; z-index: 2; pointer-events: none; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap { position: static; left: auto; right: auto; bottom: auto; top: auto; width: fit-content; max-width: 100%; padding: 12px 18px 14px; background: var(--ivory); color: var(--burgundy-dark); border-radius: 3px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: none; transform: none; box-sizing: border-box; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap .body { -webkit-mask-image: none; mask-image: none; animation: bigin .5s cubic-bezier(.2,.7,.2,1) both; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap .tx { font-size: 24px; line-height: 1.45; text-shadow: none; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap .nm { font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--burgundy); margin-bottom: 6px; text-shadow: none; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap .hit { color: var(--burgundy); }
/* v131 True Ending 빛 물결을 더 은은하게 */
@keyframes trsway { 0%, 100% { transform: scale(1) translateY(0); } 50% { transform: scale(1.04) translateY(-3px); } }
@keyframes trring { 0% { transform: scale(.04); opacity: 0; } 14% { opacity: .5; } 100% { transform: scale(1.25); opacity: 0; } }
.trbloom::before { background: radial-gradient(circle, rgba(250,244,239,0) 36%, rgba(250,244,239,.32) 45%, rgba(236,213,179,.18) 52%, rgba(236,213,179,0) 62%); }
.trbloom::after { background: radial-gradient(circle, rgba(250,244,239,0) 40%, rgba(250,244,239,.22) 48%, rgba(236,213,179,.12) 54%, rgba(236,213,179,0) 64%); }
[data-op="1"] #canvas .pnl .pnc .pcs .cap .tx, [data-op="1"] #canvas .pnl .pnc .pcs .cap.nar .tx, [data-op="1"] #canvas .pnl .pnc .pcs .cap.ai .tx, [data-op="1"] #canvas .pnl .pnc .pcs .cap.hook .tx, [data-op="1"] #canvas .pnl .pnc .pcs .cap.mono .tx { color: var(--burgundy-dark); opacity: 1; font-weight: 600; letter-spacing: 0; }

/* v132 오프닝 말풍선: 상자를 맞붙이고 폭이 다른 모서리에 오목한 곡선(메타볼 느낌) / 다음 컷에서 앞 말풍선은 사라짐 */
[data-op="1"] #canvas .pnl .pnc .pcs { gap: 0; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap { position: relative; overflow: visible; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.jf-up::before,
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.jf-down::after { content: ""; position: absolute; left: 100%; width: 14px; height: 14px; pointer-events: none; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.jf-up::before { top: 0; background: radial-gradient(circle at 100% 100%, transparent 13.5px, var(--ivory) 14px); }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.jf-down::after { bottom: 0; background: radial-gradient(circle at 100% 0, transparent 13.5px, var(--ivory) 14px); }
[data-op="1"] #canvas .pnl .pnc .pcs-old { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-start; opacity: 0; transition: opacity .4s; pointer-events: none; }

/* v133 오프닝 말풍선: 컷마다 하나의 고정 규격 통사각 블록(이음새·곡선·모서리 둥글기 없음). 대사는 미리 잡힌 칸 안에서 타이핑된다 */
[data-op="1"] #canvas .pnl .pnc .pcs { gap: 0; background: var(--ivory); border-radius: 0; padding: 14px 20px; box-sizing: border-box; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap { background: none; border-radius: 0; padding: 0 0 10px; width: 100%; max-width: none; box-sizing: border-box; overflow: visible; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap:last-child { padding-bottom: 0; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.pre { visibility: hidden; }

/* v134 오프닝 블록: 가장 긴 대사에 폭을 맞추고, 줄(화자 종류)마다 색을 달리한다. 색은 팔레트에서 color-mix로 만든 값 */
[data-op="1"] #canvas .pnl .pnc .pcs { background: none; padding: 0; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap { padding: 12px 20px 14px; background: var(--ivory); }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap:last-child { padding-bottom: 14px; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.nar { background: color-mix(in srgb, var(--ivory) 72%, var(--paleblue)); }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.ai { background: var(--burgundy-dark); }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.ai .tx, [data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.ai .tx .nw { color: var(--ivory); }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.ai .nm { color: var(--paleblue); }

/* v135 오프닝 블록: 행간·줄 사이 간격을 좁힌다 */
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap { padding: 9px 20px 10px; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap:last-child { padding-bottom: 10px; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap .tx { line-height: 1.3; }
[data-op="1"] #canvas .pnl .pnc .pcs .cap .nm { margin-bottom: 3px; }

/* v136 오프닝: 한 컷의 대사 상자들은 같은 폭, 상자 사이에 간격 */
[data-op="1"] #canvas .pnl .pnc .pcs { gap: 8px; }

/* v137 컷 등장은 슬라이드만(transform), 그림 안의 줌·패닝은 길고 느리게 */
#canvas .pnl .pnc { transition: left 1s cubic-bezier(.4,.05,.2,1), top 1s cubic-bezier(.4,.05,.2,1), width 1s cubic-bezier(.4,.05,.2,1), height 1s cubic-bezier(.4,.05,.2,1), transform 1s cubic-bezier(.4,.05,.2,1), opacity 1.2s ease, filter 1s ease; }
#canvas .pnl .pnc .bd { transition: transform 10s cubic-bezier(.25,.5,.3,1), clip-path 1.2s cubic-bezier(.65,0,.25,1), opacity 1s ease; }

/* v138 선택지: 뜬 직후 잠깐은 눌리지 않는다(잠금) */
.choice .opts.lock { pointer-events: none; }

/* v139 오프닝 AI 대사 상자: 페일블루 바탕 + 진한 버건디 글씨 */
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.ai { background: var(--paleblue); }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.ai .tx, [data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.ai .tx .nw { color: var(--burgundy-dark); }
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.ai .nm { color: var(--burgundy); }
/* 나레이션은 AI와 구분되도록 아이보리에 가깝게 */
[data-op="1"] #canvas .pnl .pnc .pcs .cap.incap.nar { background: color-mix(in srgb, var(--ivory) 88%, var(--paleblue)); }

/* v140 오프닝: 타이핑 중 줄 칸(.ln)의 최소 높이가 줄 높이보다 커서, 다 쓴 뒤 행간이 줄어들던 문제 → 줄 높이와 같게 */
[data-op="1"] #canvas .pnl .pnc .pcs .cap .tx .ln { min-height: 0; line-height: 1.3; }

/* v141 이미지·글자 선택/드래그 금지 */
html, body, #canvas, #canvas * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, .bgimg, .bd, .pnc { -webkit-user-drag: none; user-drag: none; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }

/* v142 인물 설명: 줄바꿈이 들어가도 잘리지 않게 높이 여유 */
.sel.cs .cs-card.on .cs-pr { max-height: 140px; }

/* v144 프로필 모달: 선 제거 + 위계 정리 (키워드 작게 → 이름 크게 → 역할 → 설명). 설명은 이름 묶음에서 충분히 떨어뜨림 */
.logp.prof .pf-ln { display: none; }
.logp.prof .pf-tx { padding: 44px 48px 36px; }
.logp.prof .pf-kw { font-size: 13px; font-weight: 600; letter-spacing: .18em; opacity: .7; }
.logp.prof .pf-nm { margin-top: 22px; font-size: 60px; font-weight: 700; line-height: 1.05; color: var(--ivory); }
.logp.prof .pf-rl { margin-top: 12px; font-size: 20px; font-weight: 500; letter-spacing: .01em; color: var(--paleblue-light); }
.logp.prof p { margin: 40px 0 32px; font-size: 17px; line-height: 1.75; color: rgba(250,244,239,.78); }

/* v144 선택지: 돼지 심볼과 글자 사이 간격을 넓힘 */
.choice.game .opts .opt .say { padding-right: 96px; }

/* v145 선택지 글자↔돼지 심볼 간격을 다시 줄임 (심볼 왼쪽 끝 기준 약 18px) */
.choice.game .opts .opt .say { padding-right: 80px; }

/* v146 마지막 화면 렉 해소: 큰 묶음(.sil/.truinfo/.btns 등)에는 filter(blur) 애니메이션을 쓰지 않고 투명도·이동만 쓴다.
   (흐림 애니메이션이 블러 이미지·backdrop-filter 위에서 매 프레임 다시 그려지던 것이 원인) 제목만 흐림이 걷히는 모션 유지 */
@keyframes finin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.final .more { animation: finin 1.2s cubic-bezier(.2,.7,.2,1) .55s both; }
.final .sil { animation: finin 1.2s cubic-bezier(.2,.7,.2,1) .9s both; }
.final .truinfo { animation: finin 1.2s cubic-bezier(.2,.7,.2,1) 1.25s both; }
.final .dex { animation: finin 1.2s cubic-bezier(.2,.7,.2,1) 1.25s both; }
.final .btns { animation: finin 1.2s cubic-bezier(.2,.7,.2,1) 1.6s both; }
.final .lower { animation: finin 1.2s cubic-bezier(.2,.7,.2,1) 1.9s both; }
.final .truinfo .rate.on { animation: finin 1s cubic-bezier(.2,.7,.2,1) 0s both; }
.final .truinfo .tip { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(250,244,239,.14); }
.final .truinfo .rate { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(188,216,221,.18); }
.final .more, .final .sil, .final .truinfo, .final .btns, .final .lower { will-change: opacity, transform; }
.final .sil .tile { transform: translateZ(0); contain: paint; }
.final .sil .tile img { will-change: transform; }

/* v146 엔딩 타일: 호버하면 엔딩 제목이 보인다 (못 본 엔딩 포함) */
.final .sil .tile .tn { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 10px; font-style: normal; font-size: 14px; font-weight: 700; line-height: 1.35; text-align: center; word-break: keep-all; color: var(--ivory); background: rgba(24,12,16,.6); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.final .sil .tile:hover .tn { opacity: 1; }
.final .sil .tile:hover > span { opacity: 0; }
.final .sil .tile > span { transition: opacity .25s ease; }

/* v147 글자 아래 그라데이션: 중성 어둠 대신 버건디 색이 들어가게, 조금 더 진하고 높게 (색은 팔레트 --burgundy / --burgundy-dark 혼합) */
#fx .shade:not(.up), #fx[data-tall="1"] .shade:not(.up) { background: linear-gradient(to top, color-mix(in srgb, var(--burgundy) 62%, #180c10) 0, color-mix(in srgb, var(--burgundy) 48%, transparent) 16%, color-mix(in srgb, var(--burgundy) 20%, transparent) 30%, transparent 44%); -webkit-mask-image: linear-gradient(to top, #000 0, #000 16%, transparent 44%); mask-image: linear-gradient(to top, #000 0, #000 16%, transparent 44%); }

/* v147 아이템 연출: 화면 딤 + 아이템 + 옆 설명 */
.itm { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; transition: opacity .55s ease; }
.itm.out { opacity: 0; }
.itm-dim { position: absolute; inset: 0; background: rgba(24,12,16,.78); animation: fadein .8s ease both; }
.itm-in { position: relative; display: flex; align-items: center; gap: 64px; }
.itm-pic { width: 300px; flex: none; animation: itmpop 1s cubic-bezier(.2,.8,.2,1) .5s both; }
.itm-pic svg, .itm-pic img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 28px rgba(0,0,0,.45)); }
.itm-pic .i1 { fill: var(--ivory); } .itm-pic .i2 { fill: var(--paleblue-light); } .itm-pic .i3 { fill: none; stroke: var(--burgundy); stroke-width: 3; }
.itm-pic .i4 { fill: var(--burgundy); font-size: 32px; font-weight: 700; } .itm-pic .i5 { fill: color-mix(in srgb, var(--ivory) 84%, var(--burgundy)); } .itm-pic .i6 { fill: none; stroke: var(--burgundy); stroke-width: 2; stroke-linejoin: round; opacity: .55; }
.itm-tx { max-width: 420px; color: var(--ivory); text-align: left; animation: finin 1s cubic-bezier(.2,.7,.2,1) 1.1s both; }
.itm-k { font-size: 14px; font-weight: 600; letter-spacing: .18em; color: var(--paleblue); opacity: .85; }
.itm-nm { margin-top: 12px; font-size: 44px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.itm-tx p { margin: 22px 0 0; font-size: 19px; line-height: 1.75; word-break: keep-all; text-wrap: pretty; color: rgba(250,244,239,.82); }
@keyframes itmpop { from { opacity: 0; transform: translateY(18px) scale(.86); } to { opacity: 1; transform: none; } }

/* v148 건너뛰기: 다시 하는 사람을 위해 왼쪽 아래(오프닝·인물 도입 구간에서만) */
#skipbtn { position: absolute; left: 40px; bottom: 28px; display: none; padding: 8px 12px; border: 0; background: none; color: var(--ivory); font: inherit; font-size: 16px; letter-spacing: .04em; opacity: .62; cursor: pointer; z-index: 30; transition: opacity .25s ease; }
#skipbtn.on { display: block; }
#skipbtn:hover, #skipbtn:focus-visible { opacity: 1; outline: none; }
/* 아이템 봉투: 분홍 대신 아이보리 계열로 */
.itm-pic .i5 { fill: color-mix(in srgb, var(--ivory) 86%, var(--paleblue)); }
#skipbtn.on { pointer-events: auto; }

/* v149 글자 아래 그라데이션: 채도 없는 검정, 직전(v147)보다 옅게 */
#fx .shade:not(.up), #fx[data-tall="1"] .shade:not(.up) { background: linear-gradient(to top, rgba(0,0,0,.5) 0, rgba(0,0,0,.3) 14%, rgba(0,0,0,.1) 30%, rgba(0,0,0,0) 42%); -webkit-mask-image: linear-gradient(to top, #000 0, #000 14%, transparent 42%); mask-image: linear-gradient(to top, #000 0, #000 14%, transparent 42%); }

/* v150 빨리 감기 표시: 오프닝에서 꾹 누르는 동안 아래 가운데에 작게 */
.ffbadge { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: none; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(24,12,16,.55); color: var(--ivory); font-size: 15px; letter-spacing: .06em; pointer-events: none; z-index: 31; }
.ffbadge.on { display: inline-flex; }
.ffbadge i { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; margin-left: -3px; }

/* v151 인물 선택: 옆 카드를 고르면 가운데로 옮겨 가는 동안 나머지 두 카드와 겹쳐 보이던 것을 정리.
   나머지는 먼저 빠르게 사라지고(0.4초), 고른 카드는 그다음(0.35초 뒤)에 가운데로 움직이며 맨 위 층에 둔다 */
.sel.cs.solo .cs-row.has .cs-card:not(.on) { opacity: 0; transition: opacity .4s ease; pointer-events: none; z-index: 0; }
.sel.cs.solo .cs-row.has .cs-card.on { position: relative; z-index: 2; transition: transform 1.4s cubic-bezier(.45,0,.2,1) .35s; }

/* v152 선택지 화면(data-tall)만 그라데이션을 더 높게: 같은 검정, 화면 아래 약 62%까지 */
#fx[data-tall="1"] .shade:not(.up) { background: linear-gradient(to top, rgba(0,0,0,.6) 0, rgba(0,0,0,.44) 22%, rgba(0,0,0,.2) 44%, rgba(0,0,0,0) 62%); -webkit-mask-image: linear-gradient(to top, #000 0, #000 22%, transparent 62%); mask-image: linear-gradient(to top, #000 0, #000 22%, transparent 62%); }

/* v153 건너뛰기: 기록 버튼 바로 왼쪽에, 기록보다 더 희미하게 */
#skipbtn { left: auto; right: 100px; bottom: 14px; padding: 14px 18px; font-size: 15px; opacity: .3; transition: right .3s ease, opacity .25s ease; }
#prevbtn.on ~ #skipbtn { right: 266px; }
#skipbtn:hover, #skipbtn:focus-visible { opacity: .85; }

/* v154 빨리 감는 중: 힌트 옆 삼각형 셋이 차례로 켜지며 흐른다 */
#prevbtn .nx2 i.x { display: none; margin-left: -3px; }
[data-op="1"] #prevbtn .nx2.ff i.x { display: inline-block; }
[data-op="1"] #prevbtn .nx2.ff i { animation: ffrun .72s ease-in-out infinite; }
#prevbtn .nx2.ff i:nth-of-type(1) { animation-delay: 0s; }
#prevbtn .nx2.ff i:nth-of-type(2) { animation-delay: .12s; }
#prevbtn .nx2.ff i:nth-of-type(3) { animation-delay: .24s; }
@keyframes ffrun { 0%, 100% { transform: translateX(0); opacity: .25; } 40% { transform: translateX(3px); opacity: 1; } }

/* v155 대사 화면(선택지 아님)의 그라데이션 높이를 낮춤: 화면 아래 약 32%까지. 선택지(data-tall)는 v152 그대로 */
#fx:not([data-tall="1"]) .shade:not(.up) { background: linear-gradient(to top, rgba(0,0,0,.54) 0, rgba(0,0,0,.29) 9%, rgba(0,0,0,.1) 18%, rgba(0,0,0,0) 25%); -webkit-mask-image: linear-gradient(to top, #000 0, #000 9%, transparent 25%); mask-image: linear-gradient(to top, #000 0, #000 9%, transparent 25%); }

/* v156 Tip 행간 1.75 → 1.4 (한글 기준) */
.final .tip, .final .truinfo .tip { line-height: 1.4; }

/* v157 말한 사람 사진(왼쪽)과 자막이 겹치지 않게: 사진 오른쪽 끝(188px)에서 24px 띄움 */
.cap.hasav:not(.placed):not(.incap) { left: 212px; }

/* v158 모바일: 동적 뷰포트 높이, 당겨서 새로고침/더블탭 확대 방지, 세로일 때 '가로로 돌려 주세요' 안내 */
html, body { height: 100%; height: 100dvh; overscroll-behavior: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; background: #180c10; }
/* 세로로 든 폰에서도 가로로 보이게: 페이지 전체(body)를 시계 방향 90° 회전. fixed 요소도 body 안에서 함께 돈다 */
html.fakeland, html.fakeland body { overflow: hidden; }
html.fakeland body { position: fixed; left: 0; top: 0; width: 100vh; height: 100vw; width: 100dvh; height: 100dvw; transform-origin: 0 0; transform: translateX(100vw) rotate(90deg); transform: translateX(100dvw) rotate(90deg); }

/* v159 건너뛰기와 '대화 기록' 사이 간격을 넓힘 (기록 버튼이 '대화 기록'으로 길어짐) */
#skipbtn { right: 150px; }
#prevbtn.on ~ #skipbtn { right: 310px; }

/* v160 3D 서류 봉투(테스트): 봉투가 왼쪽에 크게, 설명이 오른쪽에 */
.itm.m3 .itm-pic { width: 560px; height: 560px; animation: finin .9s ease .3s both; }
.itm-3d { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; pointer-events: auto; }
.itm-3d:active { cursor: grabbing; }
.itm.m3 { pointer-events: auto; }
.itm-h { margin-top: 26px; font-size: 15px; line-height: 1.6; letter-spacing: .02em; color: rgba(250,244,239,.55); }

/* v161 True Ending 색 정리: 아이보리-베이지-페일블루가 섞여 어색해서, 빛과 글자를 아이보리 한 색으로 통일.
   (빛은 아이보리의 투명도만 달리하고, 글자 뒤 그림자는 기존 어두운 배경색) */
.trbloom { background: radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--ivory) 52%, transparent) 0%, color-mix(in srgb, var(--ivory) 22%, transparent) 30%, color-mix(in srgb, var(--ivory) 7%, transparent) 54%, transparent 74%); }
.trbloom::before { background: radial-gradient(circle, transparent 36%, color-mix(in srgb, var(--ivory) 30%, transparent) 45%, color-mix(in srgb, var(--ivory) 9%, transparent) 53%, transparent 62%); }
.trbloom::after { background: radial-gradient(circle, transparent 40%, color-mix(in srgb, var(--ivory) 20%, transparent) 48%, color-mix(in srgb, var(--ivory) 6%, transparent) 55%, transparent 64%); }
.endmark.intro.tru .id, .endmark.intro.tru h2 { color: var(--ivory); text-shadow: 0 0 40px rgba(24,12,16,.55), 0 4px 24px rgba(24,12,16,.5); }

/* v162 마지막 화면 실루엣 간격 통일: 진엔딩 칸만 왼쪽 여백이 18px 더 있어 간격이 달랐음 → 모두 같은 14px */
.final .sil { gap: 14px; }
.final .sil .tile, .final .sil .tile.tru { margin: 0; flex: none; }

/* v163 3D 책상(편지봉투 + 서류봉투): 화면 전체를 쓰는 인터랙션. 봉투 바깥은 어두운 딤 위에 그대로 비친다 */
.itm.desk { pointer-events: auto; }
.itm-desk { position: absolute; inset: 0; display: block; touch-action: none; z-index: 1; }
.itm-dh { position: absolute; left: 0; right: 0; top: 34px; text-align: center; font-size: 17px; line-height: 1.6; color: rgba(250,244,239,.62); pointer-events: none; z-index: 2; animation: finin 1s ease .9s both; }

/* v164 프로필 사진: 받아지기 전엔 투명(배경색이 번쩍이지 않게), 다 받아지면 부드럽게 나타남 */
#hudl .av, .cav, .cap .av { background: transparent; }
#hudl .av:not(.ld), .cav:not(.ld), .cap .av:not(.ld) { opacity: 0; }
#hudl .av.ld, .cav.ld, .cap .av.ld { opacity: 1; transition: opacity .3s ease, transform .2s ease, filter .2s ease; }

/* v165 큰 이름 글자의 시각적 왼쪽 정렬: 큰 한글(서·연 등)은 획이 비스듬해서 잉크 끝은 맞아도 눈에는 안쪽으로 들어가 보인다.
   작은 글자(JUSTICE·역할·소개)의 왼쪽 선에 맞도록 이름만 글자 크기에 비례해 왼쪽으로 당김 (0.04em) */
.logp.prof .pf-nm { margin-left: -.04em; }
.sel.cs .cs-card .cs-nm { margin-left: -.035em; }
.sel.cs.solo .cs-card.on.named .cs-nm { margin-left: 0; }

/* v166 인물 선택 첫 화면: 첫 줄 아래에 엔딩 안내 한 줄(작게, 조금 늦게) */
.sel.cs .cs-kk, .sel.cs.intro .cs-kk { top: calc(50% - 56px); }
.sel.cs .cs-kk .k2 { display: block; margin-top: 20px; font-size: 24px; font-weight: 400; letter-spacing: .02em; color: var(--paleblue-light); opacity: 0; animation: fadein 1.3s ease 1.6s both; }

/* v167 프로필 창: JUSTICE / 이름 / 역할 세 줄의 위계가 애매해서 역할(유족 등)은 빼고, 소개글에 이미 들어 있으므로 JUSTICE · 이름 · 소개 순으로 */
.logp.prof .pf-rl { display: none; }
.logp.prof p { margin-top: 28px; }

/* v168 인물 선택 첫 화면: 두 줄의 위계를 똑같이 (크기·색·굵기 동일), 두 줄이 가운데에 오도록 위치 조정 */
.sel.cs .cs-kk .k2 { font-size: 40px; font-weight: inherit; letter-spacing: inherit; color: inherit; margin-top: 12px; }
.sel.cs .cs-kk, .sel.cs.intro .cs-kk { top: calc(50% - 64px); }


/* v169: 인물 카드 위쪽은 사진이 배경으로 서서히 사라진다 (사진만 마스크 → 아래 그라데이션·글자는 그대로) */
.cs-card { background: transparent; }
.cs-card img { -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.55) 14%, #000 34%); mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.55) 14%, #000 34%); }

/* v170: 카드를 위로 더 키우고(행 위 여백 200→150px), 사라지는 구간도 더 길게 (14/34% → 24/58%) */
.sel.cs .cs-row { margin-top: 150px; }
.cs-card img { -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.5) 24%, #000 58%); mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.5) 24%, #000 58%); }

/* v171: 사라지는 구간을 짧게 (24/58% → 8/20%) — 얼굴이 가려지지 않도록 */
.cs-card img { -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.5) 8%, #000 20%); mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.5) 8%, #000 20%); }

/* v172: 카드가 아래에서 올라오며 열릴 때 가장자리를 칼같이 자르지 않고, 위쪽이 서서히 나타나게 (clip-path → 부드러운 마스크).
   마스크 띠 폭(카드 높이의 약 0.66배)은 제가 정한 값 */
@keyframes cwipe { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 0 100%; mask-position: 0 100%; } }
.sel.cs.stag .cs-card { -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 33%, #000 55%, #000 100%); mask-image: linear-gradient(to bottom, transparent 0, transparent 33%, #000 55%, #000 100%); -webkit-mask-size: 100% 300%; mask-size: 100% 300%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 0 100%; mask-position: 0 100%; }

/* v173: 고른 인물(.on)은 좌우 가장자리 마스크가 따로 있어서 위쪽 페이드가 덮여 사라졌다 → 두 마스크를 겹쳐(교집합) 둘 다 적용.
   또 고른 뒤에는 카드 위 여백을 다시 200px로 (150px이면 너무 높음) */
.sel.cs .cs-card.on img { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%), linear-gradient(to bottom, transparent 0, rgba(0,0,0,.5) 8%, #000 20%); mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%), linear-gradient(to bottom, transparent 0, rgba(0,0,0,.5) 8%, #000 20%); -webkit-mask-composite: source-in; mask-composite: intersect; }
.sel.cs.solo .cs-row { margin-top: 200px; }

/* v174: 고른 인물(.on)은 위쪽 페이드 없이 — 좌우 가장자리 마스크만 (v173의 세로 마스크 취소) */
.sel.cs .cs-card.on img { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%); -webkit-mask-composite: source-over; mask-composite: add; }

/* v175: 고른 인물만 위 여백을 더 늘려 높이를 낮춤 (200 → 250px). 목록 상태(150px)는 그대로 */
.sel.cs.solo .cs-row { margin-top: 250px; }

/* v176: 고른 뒤 위 제목은 더 빨리 사라지고(.5s → .2s), 카드는 더 아래로 (250 → 300px) */
.sel.cs.solo h1 { transition: opacity .2s ease; }
.sel.cs.solo .cs-row { margin-top: 300px; }

/* v177: 인물 선택 제목을 위로 (top 96 → 66px) */
.sel.cs h1, .sel.cs.intro h1 { top: 66px; }

/* v178: 고른 뒤 카드 위 여백을 원래대로 0 (화면 전체로 열림). v144~v176에서 200→250→300으로 눌러 둔 값이 이름이 나올 때 사진을 아래로 밀고 있었음 */
.sel.cs.solo .cs-row { margin-top: 0; }

/* v179: 3D 서류 — 캔버스는 왼쪽 66%, 다 열리면 우측에 설명 (서연 아이템처럼). 안내 문구도 캔버스 중앙 기준 */
.itm-desk { right: 34%; }
.itm-dh { right: 34%; }
.itm.desk .itm-dtx { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); width: 30%; max-width: 420px; z-index: 2; opacity: 0; animation: none; transition: opacity 1.1s ease; pointer-events: none; }
.itm.desk.opened .itm-dtx { opacity: 1; }
.itm-real { margin-top: 26px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--ivory) 22%, transparent); font-size: 16px; line-height: 1.6; color: rgba(250,244,239,.62); word-break: keep-all; }

/* v180: 설정 — 카드 대신 딤 위에 큰 글씨 메뉴 (계속하기 / 처음 화면으로 / 소리 / 타자 소리 / 언어). 크기·간격은 제가 정한 값 */
.setp { background: none; }
.setp .card { width: 520px; max-width: 86vw; padding: 0; background: none; box-shadow: none; border-radius: 0; color: var(--ivory); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.setp .sbtn.big { font-size: 56px; font-weight: 800; line-height: 1.15; padding: 6px 20px; border-radius: 0; background: none; color: var(--ivory); text-shadow: 0 3px 20px rgba(0,0,0,.45); }
.setp .sbtn.big:hover, .setp .sbtn.big:focus-visible { text-decoration: underline; text-underline-offset: 10px; text-decoration-thickness: 3px; background: none; outline: none; }
.setp .srow { width: 100%; box-sizing: border-box; border-top: 0; padding: 10px 0; color: var(--ivory); }
.setp .srow:first-of-type { margin-top: 0; }
.setp .card > .srow:nth-of-type(1) { margin-top: 26px; }
.setp .smute { color: var(--ivory); } .setp .smute:hover { color: var(--paleblue-light, var(--ivory)); }
.setp .srow input[type=range] { accent-color: var(--ivory); }
.setp .srow output { color: var(--ivory); opacity: .8; }
.setp .tkrow { justify-content: center; }
.setp .tkrow span { font-size: 16px; opacity: .7; margin-right: 8px; }
.setp .tkb { font-size: 15px; padding: 6px 14px; background: color-mix(in srgb, var(--ivory) 14%, transparent); color: var(--ivory); }
.setp .tkb.on { background: var(--ivory); color: var(--burgundy-dark); }
.setp .sfoot { border-top: 0; padding-top: 18px; margin-top: 4px; justify-content: center; }
.setp .snote { margin: 0; color: var(--ivory); opacity: .5; font-size: 14px; }

/* v181: 3D 서류 — 처음엔 가운데, 눌러 다 열리면 왼쪽으로 옮겨 가고 우측에 설명 */
.itm-desk { right: 0; transition: transform 1.3s cubic-bezier(.45,0,.2,1); }
.itm.desk.opened .itm-desk { transform: translateX(-17%); }
.itm-dh { right: 0; transition: opacity .6s ease; }
.itm.desk.started .itm-dh { opacity: 0; animation: none; }
.itm.desk .itm-dtx { transition: opacity 1.2s ease .5s; }
.itm-glint { position: absolute; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%; pointer-events: none; opacity: 0; z-index: 3; mix-blend-mode: screen; background: radial-gradient(circle, color-mix(in srgb, var(--ivory) 52%, transparent) 0, color-mix(in srgb, var(--ivory) 16%, transparent) 30%, transparent 62%); }
.itm-glint.on { animation: gbd-glint 2.8s ease-in-out infinite; }
@keyframes gbd-glint { 0%, 100% { opacity: 0; transform: scale(.82); } 50% { opacity: .8; transform: scale(1.06); } }

/* ============ v182 ============ */
/* 설정: 딤 + 배경 블러, 좌측 정렬 메뉴. 닫기는 작게, 제목이 크게. 슬라이더·드롭다운은 직접 만든 컴포넌트 (크기·간격은 제가 정한 값) */
.setdim { background: rgba(70,14,33,.58); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.setp .card { width: 460px; max-width: 88vw; padding: 0; background: none; box-shadow: none; border-radius: 0; color: var(--ivory); text-align: left; display: block; }
.setp .sh { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.setp .sh h2 { margin: 0; font-family: var(--font-display); font-size: 68px; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.setp .sx { font: inherit; font-size: 15px; padding: 7px 16px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ivory) 14%, transparent); color: var(--ivory); cursor: pointer; transition: background .2s ease; }
.setp .sx:hover, .setp .sx:focus-visible { background: color-mix(in srgb, var(--ivory) 26%, transparent); outline: none; }
.setp .sr { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 14px; padding: 14px 0; }
.setp .sl { font-size: 16px; opacity: .65; }
.setp .sc { display: flex; align-items: center; gap: 14px; min-width: 0; }
.setp .smute { width: 32px; height: 32px; padding: 0; border: 0; background: none; color: var(--ivory); cursor: pointer; display: grid; place-items: center; flex: none; opacity: .85; }
.setp .smute svg { width: 26px; height: 26px; } .setp .smute:hover { opacity: 1; }
.setp .vol { position: relative; flex: 1; height: 32px; cursor: pointer; touch-action: none; transition: opacity .2s ease; }
.setp .vt { position: absolute; left: 7px; right: 7px; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: rgba(250,244,239,.16); }
.setp .vf { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: rgba(250,244,239,.62); }
.setp .vh { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ivory); box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: transform .15s ease; }
.setp .vol:hover .vh, .setp .vol.drag .vh { transform: scale(1.18); }
.setp output { width: 34px; text-align: right; font-size: 15px; opacity: .7; font-variant-numeric: tabular-nums; flex: none; }
.setp .dd { position: relative; flex: 1; }
.setp .ddb { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; font: inherit; font-size: 16px; padding: 10px 14px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--ivory) 12%, transparent); color: var(--ivory); cursor: pointer; transition: background .2s ease; }
.setp .ddb:hover, .setp .ddb:focus-visible { background: color-mix(in srgb, var(--ivory) 20%, transparent); outline: none; }
.setp .ddb svg { width: 12px; height: 8px; flex: none; opacity: .8; transition: transform .25s ease; }
.setp .dd.open .ddb svg { transform: rotate(180deg); }
.setp .ddl { position: absolute; left: 0; right: 0; top: calc(100% + 6px); padding: 6px; border-radius: 12px; background: color-mix(in srgb, var(--burgundy-dark) 88%, var(--ivory)); box-shadow: 0 16px 40px rgba(0,0,0,.4); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 5; }
.setp .dd.open .ddl { opacity: 1; transform: none; pointer-events: auto; }
.setp .ddl button { display: flex; width: 100%; align-items: center; justify-content: space-between; font: inherit; font-size: 16px; text-align: left; padding: 10px 10px; border: 0; border-radius: 8px; background: none; color: var(--ivory); cursor: pointer; }
.setp .ddl button:hover, .setp .ddl button:focus-visible { background: color-mix(in srgb, var(--ivory) 14%, transparent); outline: none; }
.setp .ddl button.on::after { content: ''; width: 6px; height: 11px; margin-right: 4px; border: solid var(--ivory); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.setp .shome { font: inherit; font-size: 16px; padding: 10px 0; border: 0; background: none; color: var(--ivory); cursor: pointer; opacity: .85; text-align: left; }
.setp .shome:hover, .setp .shome:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 5px; outline: none; }
.setp .sfoot { display: block; border: 0; padding: 20px 0 0; margin: 0; }
.setp .snote { margin: 0; font-size: 13px; opacity: .45; }

/* 캐릭터 선택: 고르고 가운데로 옮겨 가는 동안만 위끝을 부드럽게 (움직일 때 가장자리 선이 도드라져 보임) → 다 도착하면 0 */
@property --fade { syntax: '<percentage>'; inherits: false; initial-value: 20%; }
@keyframes gbd-fade { 0% { --fade: 0%; } 35% { --fade: 24%; } 100% { --fade: 0%; } }
.cs-card img { -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.5) calc(var(--fade) * .4), #000 var(--fade)); mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.5) calc(var(--fade) * .4), #000 var(--fade)); }
.sel.cs.solo .cs-card.on img { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--ed), #000 calc(100% - var(--ed)), transparent 100%); -webkit-mask-composite: source-over; mask-composite: add; animation: none; }

/* 다시하기: 인물 선택 등장 모션을 빠르게 */
.sel.cs.stag.fast h1 { animation: ctitle .9s cubic-bezier(.2,.7,.2,1) .05s backwards; }
.sel.cs.stag.fast .cs-card { animation: cwipe .8s cubic-bezier(.75,0,.2,1) backwards; }
.sel.cs.stag.fast .cs-card:nth-child(2) { animation-delay: .3s; }
.sel.cs.stag.fast .cs-card:nth-child(1), .sel.cs.stag.fast .cs-card:nth-child(3) { animation-delay: .6s; }
.sel.cs.stag.fast .cs-card img { animation: czoom 1.3s cubic-bezier(.2,.7,.2,1) backwards; }
.sel.cs.stag.fast .cs-card:nth-child(2) img { animation-delay: .3s; }
.sel.cs.stag.fast .cs-card:nth-child(1) img, .sel.cs.stag.fast .cs-card:nth-child(3) img { animation-delay: .6s; }

/* 아이템 화면: 뒤 대사는 내려가고 배경은 블러. 봉투는 조금 아래, 안내는 봉투 가까이 */
.itm-dim { -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
body:has(.itm) .cap, body:has(.itm) .pcs { opacity: 0 !important; transition: opacity .35s ease; }
.itm-dh { top: 118px; }
.itm-real { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 16px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ivory) 10%, transparent); font-size: 15px; line-height: 1.5; color: rgba(250,244,239,.8); }
.itm-real svg { width: 20px; height: 20px; flex: none; opacity: .85; }
/* 인장: 번쩍임 대신 인장 테두리만 은은하게 숨 쉬고, 바깥으로 얇은 파문이 번진다 */
.itm-glint { background: none; mix-blend-mode: normal; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ivory) 70%, transparent), 0 0 16px 1px color-mix(in srgb, var(--ivory) 34%, transparent), inset 0 0 12px color-mix(in srgb, var(--ivory) 18%, transparent); }
.itm-glint::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ivory) 55%, transparent); opacity: 0; }
.itm-glint.on { animation: gbd-ring 2.8s ease-in-out infinite; }
.itm-glint.on::after { animation: gbd-rip 2.8s ease-out infinite; }
@keyframes gbd-ring { 0%, 100% { opacity: .1; transform: scale(1); } 50% { opacity: .8; transform: scale(1.035); } }
@keyframes gbd-rip { 0% { opacity: .45; transform: scale(1); } 100% { opacity: 0; transform: scale(1.65); } }

.setp .sh { align-items: center; }

/* v183: 설정 닫기는 우측 아래 / 다시하기는 이전 순서(왼→오) 그대로 빠르게 */
.setp .sfoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 26px; }
.sel.cs.stag.fast .cs-card:nth-child(1), .sel.cs.stag.fast .cs-card:nth-child(1) img { animation-delay: .3s; }
.sel.cs.stag.fast .cs-card:nth-child(2), .sel.cs.stag.fast .cs-card:nth-child(2) img { animation-delay: .5s; }
.sel.cs.stag.fast .cs-card:nth-child(3), .sel.cs.stag.fast .cs-card:nth-child(3) img { animation-delay: .7s; }
.sel.cs.stag.fast .cs-card .cs-tx { animation-duration: .6s; }
.sel.cs.stag.fast .cs-card:nth-child(1) .cs-tx { animation-delay: .7s; }
.sel.cs.stag.fast .cs-card:nth-child(2) .cs-tx { animation-delay: .9s; }
.sel.cs.stag.fast .cs-card:nth-child(3) .cs-tx { animation-delay: 1.1s; }

/* 서류 봉투를 열기 전에는 '다음으로'가 눌리지 않는다 */
[data-itemlock] #prevbtn .nx2 { opacity: .35; pointer-events: none; }

/* v184: 건너뛰기·대화 기록이 미끄러지며 뛰어다니지 않게 — 위치 전환(right) 애니메이션을 없애고, 오른쪽부터 차례로(다음 → 대화 기록 → 건너뛰기) 서서히 나타나게 */
#logbtn { transition: opacity .25s ease !important; }
#skipbtn { transition: opacity .25s ease !important; }
@keyframes gbd-bfade { from { opacity: 0; } }
#logbtn { animation: gbd-bfade .35s ease .12s backwards; }
#skipbtn.on { animation: gbd-bfade .35s ease .3s backwards; }

/* v185: 열린 뒤 서류와 설명글을 둘 다 조금 더 왼쪽으로 (시각 균형) */
.itm.desk .itm-dtx { right: 12%; }
.itm.desk.opened .itm-desk { transform: translateX(-22%); }

/* v186: 설정 아래줄(안내 · 처음 화면으로 · 계속하기) / 아이템 열기 전 '다음으로' 숨김 / 아이템이 사라지는 동안만 자막 숨김 / 선택 화면 가장자리 비네트 */
.setp .sfoot { display: flex; align-items: center; gap: 14px; }
.setp .sfoot .snote { margin-right: auto; }
.setp .shome { padding: 7px 4px; font-size: 14px; opacity: .55; }
.setp .shome:hover, .setp .shome:focus-visible { opacity: .95; }
[data-itemlock] #prevbtn .nx2 { opacity: 0 !important; visibility: hidden; }
body:has(.itm:not(.out)) .cap, body:has(.itm:not(.out)) .pcs { opacity: 0 !important; transition: opacity .35s ease; }
body:has(.itm.out) .cap { opacity: 1; }
.wall::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 78% 74% at 50% 50%, transparent 32%, color-mix(in srgb, var(--burgundy-dark) 46%, transparent) 70%, color-mix(in srgb, var(--burgundy-dark) 88%, transparent) 100%); animation: gbd-vig 7s ease-in-out infinite; }
@keyframes gbd-vig { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }

/* v187: 서류가 열리면 화면을 크게 키워 서류만 크게 읽히고 봉투 아래쪽은 잘려 나간다 / 설명글은 조금 위로 */
.itm.desk.opened .itm-desk { transform: translateX(-22%) scale(1.45); transform-origin: 50% 47.5%; }
.itm.desk .itm-dtx { top: 36%; }

/* v188: 열린 서류를 조금 더 아래로 (편지는 다시 뺐다) */
.itm.desk.opened .itm-desk { transform: translateX(-22%) translateY(3.5%) scale(1.45); }

/* v189: 설정을 열면 화면 속 애니메이션도 멈춘다 (설정 창·딤은 제외) */
html[data-paused] #canvas *, html[data-paused] #back *, html[data-paused] #ghost *, html[data-paused] #fx *, html[data-paused] #hudl * { animation-play-state: paused !important; }

/* v190: 서류를 열어야 하는 동안에는 건너뛰기·대화 기록도 숨긴다 */
[data-itemlock] #logbtn, [data-itemlock] #skipbtn { opacity: 0 !important; visibility: hidden; pointer-events: none !important; }

/* v191: 열린 서류를 아주 조금만 작게, 조금 더 아래로 (1.45 → 1.40배, 3.5% → 5%) */
.itm.desk.opened .itm-desk { transform: translateX(-22%) translateY(5%) scale(1.4); }

/* v192: 봉투가 애매하게 잘리지 않도록 — 봉투 전체가 화면 안에 들어오는 크기로 (1.4 → 1.1배), 아래 끝을 화면 끝에 맞춤 */
.itm.desk.opened .itm-desk { transform: translateX(-22%) scale(1.1); transform-origin: 50% 69.4%; }
/* v193: 아이템 설명은 타자 없이 왼쪽에서 오른쪽으로 부드럽게 페이드인 */
@keyframes itxin { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.itm-tx { animation: itxin 1.1s cubic-bezier(.2,.7,.2,1) 1.1s both; }
.itm.desk .itm-dtx { transform: translate(-24px, -50%); transition: opacity 1.2s ease .5s, transform 1.3s cubic-bezier(.2,.7,.2,1) .5s; }
.itm.desk.opened .itm-dtx { transform: translate(0, -50%); }
/* v194: 서류 봉투가 '후웅~' 소리에 맞춰 아래에서 살짝 떠오르며 들어온다 (끝난 뒤 transform은 원래 규칙으로 복귀) */
@keyframes deskin { 0% { opacity: 0; transform: translateY(13%) scale(.96); filter: blur(3px); } 55% { opacity: 1; filter: blur(0); } 100% { opacity: 1; transform: none; filter: blur(0); } }
.itm.desk .itm-desk { animation: deskin 1.9s cubic-bezier(.12,.7,.2,1) .1s backwards; }
