/* theater 전용 모양 (2026-11-11 styles.css에서 그대로 옮김: 이 기능만 고칠 때 공통 파일을 안 건드리게) */
/* ↓ 2026-11-11 2차: styles.css에 남아 있던 이 기능 규칙(원래 순서 그대로, 이 파일의 다른 규칙보다 앞) */
/* 🎭 만약에 극장 */
.th-wrap{max-width:980px}
.th-card-wrap{max-width:900px;margin:0 auto;padding-top:16px!important}
.th-stage{position:relative;width:min(100%,calc(46vh * 16 / 9));aspect-ratio:16/9;margin:8px auto;border-radius:18px;overflow:hidden;background:#333;box-shadow:inset 0 0 0 6px #b71c1c}
.th-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.th-hero{position:absolute;left:37%;bottom:6%;width:26%;aspect-ratio:1;transform-origin:50% 90%}
.th-hero img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 6px 6px #0006)}
.th-hero.enter{animation:thEnter .8s ease-out}
.th-hero.act-jump{animation:thJump .9s ease-in-out 2}
.th-hero.act-spin{animation:thSpin .9s ease-in-out 2}
.th-hero.act-fly{animation:thFly 2.4s ease-in-out}
.th-hero.act-grow{animation:thGrow 2.4s ease-in-out}
.th-hero.act-shrink{animation:thShrink 2.4s ease-in-out}
.th-hero.act-dance{animation:thDance .5s ease-in-out 5}
.th-hero.act-shake{animation:thShake .12s linear 14}
.th-sentence{text-align:center;font-size:clamp(18px,3.8vw,28px);font-weight:900;line-height:1.7;margin:6px 0}
.th-chunk{display:inline-block;padding:2px 10px!important;border-radius:12px!important;border:3px solid transparent!important;font:inherit;min-height:0!important;cursor:pointer;margin:2px}
.th-chunk.red{background:#ffebee!important;color:#b71c1c;border-color:#ef9a9a!important}
.th-chunk.yellow{background:#fff8e1!important;color:#8d6e00;border-color:#ffd54f!important}
.th-chunk.green{background:#e8f5e9!important;color:#1b5e20;border-color:#a5d6a7!important}
.th-book ul{list-style:none;padding:0;margin:0;display:grid;gap:6px}
.th-book li{display:flex;align-items:center;justify-content:space-between;gap:8px}
.th-book small{color:var(--muted)}
/* 🎭 만약에 극장 v2 */
.tv-left{font-weight:900;color:#6a1b9a}
.tv-stories{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px;margin:12px 0 18px}
.tv-story{display:flex;flex-direction:column;gap:6px;padding:10px;border:2px solid var(--line,#dbe3ea);border-radius:20px;background:#fff;text-align:left;cursor:pointer;box-shadow:0 6px 16px #263b4f12}
.tv-story small{color:#6a1b9a;font-weight:800;letter-spacing:.5px}
.tv-story.today{border-color:#ba68c8;background:#fbf5ff}
.tv-story:disabled{opacity:.55;cursor:default}
.tv-cover{position:relative;display:block;width:100%;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#cfe8ff}
.tv-cover-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.tv-cover-hero{position:absolute;left:50%;bottom:4%;width:34%;transform:translateX(-50%);display:flex;justify-content:center}
.tv-cover-hero img,.tv-cover-hero .tv-svg{width:100%;filter:drop-shadow(0 4px 6px #0005)}
.tv-svg{display:block;width:100%}
.tv-svg svg{display:block;width:100%;height:100%}
.tv-book{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.tv-book-row{display:grid;grid-template-columns:120px 1fr;gap:10px;align-items:center}
.tv-book-row>div{display:flex;flex-direction:column;gap:4px}
.tv-book-row span{display:flex;flex-wrap:wrap;gap:6px}
.tv-old summary{cursor:pointer;margin-top:10px;font-weight:800}
.tv-card{max-width:1000px}
.tv-stage{position:relative;width:100%;aspect-ratio:16/9;border-radius:18px;overflow:hidden;background:#cfe8ff;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.tv-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.tv-tint{position:absolute;inset:0;pointer-events:none;transition:background 1.2s;z-index:1}
.tv-tint.t-night{background:rgba(12,20,60,.55)}
.tv-tint.t-bright{background:radial-gradient(circle at 43% 25%,rgba(255,250,200,.85),rgba(255,236,150,.55) 45%,rgba(255,220,120,.35))}
.tv-tint.t-dim{background:rgba(20,16,50,.55)}
.tv-tint.t-sunny{background:linear-gradient(rgba(255,240,180,.35),rgba(255,255,255,0))}
.tv-layer,.tv-fx,.tv-task{position:absolute;inset:0}
.tv-layer{z-index:2;pointer-events:none}
.tv-fx{z-index:3;pointer-events:none;overflow:hidden}
.tv-task{z-index:4;pointer-events:none}
.tv-actor{position:absolute;transform:translate(-50%,-100%);transition-property:left,top,width,opacity;transition-timing-function:ease-in-out}
.tv-actor.tv-target{pointer-events:auto;cursor:pointer;filter:drop-shadow(0 0 10px #ffe14d) drop-shadow(0 0 4px #ffb300)}
.tv-face{transition:transform .6s;position:relative}
.tv-face>img,.tv-face>.tv-svg{display:block;width:100%;height:auto}
.tv-face img{filter:drop-shadow(0 4px 4px rgba(0,0,0,.25))}
.tv-st{position:absolute;transform:translate(-50%,-100%)}
.tv-st img{display:block;width:100%}
.a-spin .tv-face{animation:tv-spin 1.6s linear infinite}
.a-spinfast .tv-face{animation:tv-spin .35s linear infinite}
.a-spinslow .tv-face{animation:tv-spin 3.5s linear infinite}
/* 효과 */
.fx-pop{position:absolute;top:-8%;width:3.2%;animation:fx-fall 2.6s linear infinite}
.fx-pop svg{width:100%;display:block}
.fx-wind{position:absolute;height:3px;width:18%;border-radius:3px;background:linear-gradient(90deg,transparent,#fff,transparent);opacity:.85}
.fx-wind.l{animation:fx-wl 1.4s linear infinite}
.fx-wind.r{animation:fx-wr 1.4s linear infinite}
.fx-wind.u,.fx-wind.d{width:3px;height:18%;background:linear-gradient(transparent,#fff,transparent)}
.fx-wind.u{animation:fx-wu 1.4s linear infinite}
.fx-wind.d{animation:fx-wd 1.4s linear infinite}
.fx-z{position:absolute;font:900 2rem/1 system-ui;color:#fff;text-shadow:0 2px 6px #3949ab;animation:fx-z 2.4s ease-out infinite;opacity:0}
.fx-note{position:absolute;top:40%;width:5%;animation:fx-note 2.4s ease-out infinite;opacity:0}
.fx-note svg{width:100%}
.fx-star{position:absolute;width:6px;height:6px;border-radius:50%;background:#fff59d;box-shadow:0 0 10px 4px #fff59d;animation:fx-tw 1.6s ease-in-out infinite}
.fx-spark{position:absolute;width:5%;animation:fx-spark 1.2s ease-out both}
.fx-spark svg{width:100%}
.fx-conf{position:absolute;top:-4%;width:1.4%;aspect-ratio:.6;border-radius:2px;animation:fx-fall 2.2s linear infinite}
.fx-rays{position:absolute;left:43%;top:20%;width:60%;aspect-ratio:1;transform:translate(-50%,-50%);background:repeating-conic-gradient(rgba(255,240,150,.45) 0 8deg,transparent 8deg 20deg);border-radius:50%;animation:tv-spin 18s linear infinite}
.fx-shade{position:absolute;left:18%;right:28%;top:58%;bottom:8%;background:radial-gradient(ellipse at 50% 40%,rgba(10,40,10,.45),transparent 70%)}
.fx-zoom{position:absolute;left:0;width:35%;height:3px;background:linear-gradient(90deg,transparent,#fff);animation:fx-wr .6s linear infinite}
/* 직접 해 보기 */
.tv-it{position:absolute;transform:translate(-50%,-100%);padding:0;border:0;background:none;cursor:pointer;pointer-events:auto;transition:left .6s,top .6s,width .6s,opacity .6s;touch-action:none}
.tv-it img,.tv-it .tv-svg{display:block;width:100%;pointer-events:none}
.tasking .tv-spot,.tasking .tv-found,.tasking .tv-dial{animation:tv-hint 1.6s ease-in-out infinite}
.tv-drag.sel,.tv-found.sel{filter:drop-shadow(0 0 0 #1e88e5) drop-shadow(0 0 8px #1e88e5);animation:none;transform:translate(-50%,-110%)}
.tv-drag.in{cursor:default}
.tv-slot{position:absolute;transform:translate(-50%,-100%);border:3px dashed #fff;border-radius:10px;background:rgba(255,255,255,.28);box-shadow:0 0 0 2px rgba(0,0,0,.25);pointer-events:auto;cursor:pointer;animation:tv-hint 1.6s ease-in-out infinite}
.tv-slot.full{opacity:0}
.tv-spot.wig{animation:tv-shake .4s 1}
.tv-found{animation:tv-pop .6s}
.tv-num{position:absolute;left:50%;top:10%;transform:translateX(-50%);width:1.8em;height:1.8em;border-radius:50%;background:#ffd23f;color:#14324d;font:900 1rem/1.8em system-ui;text-align:center;box-shadow:0 2px 4px #0006}
.tv-seqt.wig{animation:tv-shake .4s 1}
.tv-arrow{position:absolute;left:50%;top:-6%;font-size:2.2rem;color:#fff;text-shadow:0 2px 6px #000;transition:transform .4s;margin-left:-.5em}
.tv-dial{width:7%}
.tv-counter{position:absolute;right:2%;top:3%;background:#fff;border-radius:14px;padding:4px 12px;font-weight:900;color:#14324d;box-shadow:0 2px 8px #0003}
.tv-oar{position:absolute;left:50%;bottom:3%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:8px 18px;border:0;border-radius:999px;background:#fff;box-shadow:0 4px 14px #0004;pointer-events:auto;cursor:pointer;font-size:1.1rem}
.tv-oar .tv-svg{width:56px}
.tv-oar:active{transform:translateX(-50%) scale(.95)}
.tv-ghost{position:fixed;z-index:99;pointer-events:none;transform:translate(-50%,-70%);padding:0;border:0;background:none;opacity:.9}
.tv-ghost img,.tv-ghost .tv-svg{width:100%;display:block}
.tv-cap{display:flex;align-items:center;gap:10px;margin:10px 0 0;min-height:56px}
.tv-next{min-width:120px;min-height:52px;font-size:1.1rem}
.tv-ask{margin:8px 0 6px;text-align:center;font-weight:900;color:#6a1b9a}
.tv-pick{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tv-choice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px;border:3px solid #ce93d8;border-radius:20px;background:#fff;cursor:pointer;min-height:150px}
.tv-choice.on{background:#f3e5f5;border-color:#8e24aa;transform:scale(1.03)}
.tv-endcard{margin-top:10px;padding:14px;border-radius:20px;background:#fff8e1;border:2px solid #ffe082}
.tv-endtitle{margin:0 0 8px;font-size:1.2rem;text-align:center}
.tv-seq{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;counter-reset:s}
.tv-seq li{background:#fff;border-radius:14px;padding:8px 10px;font-weight:700;position:relative;line-height:1.35}
.tv-seq li small{display:block;color:#ef6c00;font-weight:900}
.tv-found{margin:8px 0 0;text-align:center;font-weight:900;color:#6a1b9a}
p.tv-found{animation:none}
@media (max-width:600px){.tv-choice{min-height:120px}.tv-arrow{font-size:1.5rem}}
@media (prefers-reduced-motion:reduce){.tv-anim,.tv-anim .tv-face,.fx-pop,.fx-wind,.fx-conf,.fx-rays,.fx-zoom,.tasking .tv-it,.tv-slot{animation:none!important}}
/* 누르는 순간(:active) 위치가 튀면 손가락을 뗄 때 다른 곳이 눌려요 → 원래 자리 유지 */
.tv-it:active:not(:disabled){transform:translate(-50%,-100%)}
.tv-found.sel:active{transform:translate(-50%,-110%)}
.tv-oar:active:not(:disabled){transform:translateX(-50%) scale(.96)}
.tv-it.in,.tv-it.gone,.tv-it:disabled,.tv-slot.full{pointer-events:none}
.tv-it{display:block;line-height:0;font-size:0}
/* 전체 버튼 기본값(최소 높이 52px·휴대폰 가로 100%)이 장면 속 물건 크기를 바꾸지 않게 */
.tv-it{min-height:0;min-width:0;margin:0;border-radius:0}
@media (max-width:600px){.tv-choice{width:auto}}
.tv-bg[hidden]{display:none}
.tv-stk{position:relative;display:block;width:100%}
.tv-stk .tv-st{position:absolute;transform:translate(-50%,-100%);display:block}
.tv-it{transform:translate(-50%,-100%) rotate(var(--r,0deg))}
.tv-it:active:not(:disabled){transform:translate(-50%,-100%) rotate(var(--r,0deg))}
.tv-lab{position:absolute;left:50%;bottom:100%;transform:translateX(-50%);margin-bottom:2px;background:#fff;color:#14324d;border-radius:8px;padding:1px 6px;font:800 .72rem/1.3 system-ui;white-space:nowrap;box-shadow:0 1px 3px #0003;pointer-events:none}
.tv-slot.wait{opacity:.35;animation:none}
.tv-it.wig{animation:tv-wig .4s 1}
.tv-slot.wig{animation:tv-wig .4s 1;border-color:#ff7043}
.tv-oars{position:absolute;left:50%;bottom:3%;transform:translateX(-50%);display:flex;gap:10px;align-items:center;pointer-events:none}
.tv-oars .tv-oar{position:static;transform:none;pointer-events:auto}
.tv-oarn{background:#fff;border-radius:999px;padding:6px 12px;color:#ef6c00;letter-spacing:2px;box-shadow:0 2px 8px #0003}
.tv-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 4px}
.tv-tab{flex:1 1 140px;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:2px solid #ce93d8;background:#fff;color:#4a148c;border-radius:16px;font-weight:900;padding:6px 10px}
@media (max-width:600px){.tv-tab{flex:1 1 30%;width:auto;margin:0}}
/* ↑ 2차로 옮긴 규칙 끝 */
.th-hero.act-rainbow img{animation:thRainbow 1.8s linear 2}
.th-book li button{text-align:left;flex:1;min-height:48px}
@media(prefers-reduced-motion:reduce){.th-hero,.th-hero img{animation-duration:.01s!important;animation-iteration-count:1!important}}
.tv-story b{font-size:1.08rem;color:#14324d}
.tv-story i{font-style:normal;font-size:.85rem;color:#2e7d32;font-weight:800}
.tv-book-row button{min-height:40px}
.tv-anim{transform-origin:50% 100%}
.tv-it::after{content:"";position:absolute;inset:-6px}
.tasking .tv-drag:not(.in),.tasking .tv-tapt:not(.gone),.tasking .tv-seqt:not(.ok){animation:tv-hint 1.6s ease-in-out infinite}
.tv-slot::after{content:'';position:absolute;inset:-14px}
.tv-seqt.ok .tv-num{background:#66bb6a;color:#fff}
.tv-oar span{color:#ef6c00;letter-spacing:2px}
.tv-cap p{flex:1;margin:0;font-size:1.25rem;font-weight:900;color:#14324d;line-height:1.4}
.tv-choice img,.tv-choice .tv-svg{width:auto;height:84px;max-width:120px;object-fit:contain}
.tv-choice .tv-svg svg{height:84px;width:auto;max-width:120px}
.tv-choice b{font-size:1.1rem;color:#4a148c;word-break:keep-all;text-align:center}
.tv-endtitle span{white-space:nowrap}
.tv-seq li+li::before{content:'➜';position:absolute;left:-11px;top:40%;color:#ef6c00}
@media (max-width:600px){.tv-cap p{font-size:1.02rem}.tv-seq{grid-template-columns:1fr}.tv-seq li+li::before{display:none}.tv-choice img,.tv-choice .tv-svg svg{height:64px}.tv-book-row{grid-template-columns:90px 1fr}}
.tv-drag.sel:active:not(:disabled){transform:translate(-50%,-110%)}
.tv-slot::after{inset:-8px}
/* 🎭 극장 36편: CSS 배경(마을길·공연 무대), 묶음 탭, 겹친 그림, 그림자·희미함 */
.tv-stage[data-scene="town"],.tv-cover.scene-town{background:linear-gradient(#bfe6ff 0 46%,#9fd7a8 46% 60%,#7cc46f 60% 78%,#8a929a 78% 100%)}
.tv-stage[data-scene="town"]::before,.tv-cover.scene-town::before{content:'';position:absolute;left:0;right:0;top:88.5%;height:1.2%;background:repeating-linear-gradient(90deg,#fff 0 6%,transparent 6% 11%);opacity:.85;z-index:1}
.tv-stage[data-scene="town"]::after,.tv-cover.scene-town::after{content:'';position:absolute;left:0;right:0;top:77%;height:1.6%;background:#c7cdd2;z-index:1}
.tv-stage[data-scene="stage"],.tv-cover.scene-stage{background:radial-gradient(ellipse at 50% 20%,#ffe9a8 0,#f6c86b 30%,transparent 55%),linear-gradient(#5b2a6e 0 66%,#b07a43 66% 100%)}
.tv-stage[data-scene="stage"]::before,.tv-cover.scene-stage::before{content:'';position:absolute;inset:0 0 34% 0;background:linear-gradient(90deg,#b71c1c 0 9%,transparent 9% 91%,#b71c1c 91%),repeating-linear-gradient(90deg,rgba(0,0,0,.18) 0 1.2%,transparent 1.2% 3%);clip-path:polygon(0 0,100% 0,100% 100%,91% 100%,91% 12%,9% 12%,9% 100%,0 100%);z-index:1}
.tv-stage[data-scene="stage"]::after,.tv-cover.scene-stage::after{content:'';position:absolute;left:0;right:0;top:66%;bottom:0;background:repeating-linear-gradient(90deg,rgba(0,0,0,.12) 0 .4%,transparent .4% 8%);z-index:1}
.tv-cover.scene-town::before,.tv-cover.scene-town::after,.tv-cover.scene-stage::before,.tv-cover.scene-stage::after{z-index:0}
.tv-stk .tv-st>img,.tv-stk .tv-st>.tv-svg,.tv-stk .tv-st>.tv-stk{display:block;width:100%}
.tv-actor.tv-dark .tv-face{filter:brightness(0) opacity(.42) blur(.5px)}
.tv-actor.tv-faint .tv-face{opacity:.35;filter:grayscale(.6)}
.tv-slot .tv-lab{bottom:auto;top:100%;margin:2px 0 0}
.tv-oars .tv-oar img{width:44px;height:44px;object-fit:contain}
.tv-oars .tv-oar:active:not(:disabled){transform:scale(.96)}
.tv-tab small{font-weight:700;color:#8e24aa}
.tv-tab.on{background:#8e24aa;color:#fff;border-color:#8e24aa}
.tv-tab.on small{color:#f3e5f5}
@keyframes thRainbow{to{filter:hue-rotate(360deg) saturate(1.6) drop-shadow(0 6px 6px #0006)}}
