/* SKYLINE — VN layer: stage, filters, camera, director, scenes, hotspots, talk modes, sprite actions. */
/* ===================================================== VN layer (VND-01..12) */
#bg { z-index: 0; transform-origin: 50% 50%; transition: transform .8s cubic-bezier(.2,.7,.2,1); overflow: hidden; }
#bg .bgl { position: absolute; inset: 0; opacity: 1; }
#bg .bgl video { width: 100%; height: 100%; object-fit: cover; }
#bg .bgl.tr-fade { opacity: 0; transition: opacity 1.1s ease; } #bg .bgl.tr-fade.in { opacity: 1; }
#bg .bgl.tr-slide { transform: translateX(100%); transition: transform 1s cubic-bezier(.6,0,.2,1); } #bg .bgl.tr-slide.in { transform: none; }
#bg .bgl.tr-flash { opacity: 0; transition: opacity .25s .15s; } #bg .bgl.tr-flash.in { opacity: 1; }
.props { position: absolute; inset: 0; pointer-events: none; transform-origin: 50% 50%; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
#props-back { z-index: 1; } #props-front { z-index: 2; }
.props.off, #reveal.off, #location.off { display: none; }
.prop { position: absolute; top: 14%; margin: 0; transform: translateX(-50%) rotate(-1.5deg); background: #f4f1ea; padding: 8px 8px 6px;
  border-radius: 3px; box-shadow: 0 10px 30px rgba(0,0,0,.55); animation: propin .5s cubic-bezier(.2,.8,.2,1.2); }
#props-back .prop { filter: brightness(.8); transform: translateX(-50%) rotate(1deg); }
.prop img { display: block; width: 100%; max-height: 46vh; object-fit: contain; }
.prop figcaption { color: #2a2a2a; font: 600 12px var(--head); text-align: center; padding-top: 5px; }
@keyframes propin { from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(.9); } }
#cast { z-index: 1; transform-origin: 50% 50%; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
#cast .sprite { filter: none; transform: translateX(-50%); transition: left .35s ease, filter .35s, transform .35s, opacity .35s; }
#cast .sprite.speaking { transform: translateX(-50%) translateY(-6px) scale(1.02); filter: drop-shadow(0 0 14px rgba(255,255,255,.18)); }
#cast .sprite.dim { filter: brightness(.5) saturate(.7); transform: translateX(-50%) scale(.97); }
#cast .sprite .pic { display: flex; justify-content: center; }
#cast .sprite img.body { max-height: 66vh; max-width: 30vw; object-fit: contain; display: block; }
#cast .sprite.flip .pic { transform: scaleX(-1); }
#cast .sprite.flip img, #cast .sprite.flip svg { transform: none; }
#cast .sprite.bob .pic { animation: bob .26s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
#cast .sprite.flip.bob .pic { animation-name: bobf; } @keyframes bobf { from { transform: scaleX(-1) translateY(0); } to { transform: scaleX(-1) translateY(-4px); } }
#cast .sprite.enter { animation: castin .45s ease-out; } @keyframes castin { from { opacity: 0; margin-bottom: -18px; } }
#cast .sprite.leave { opacity: 0; transition: opacity .3s; }
#cast .sprite.ghost { opacity: .38; }
#cast .sprite.grab { pointer-events: auto; cursor: grab; }
#cast .sprite.drag { cursor: grabbing; transition: none; }
#weather { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; display: none; }
#weather.on { display: block; }
#vfilter { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .8s, background .8s; }
#flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: #fff; opacity: 0; }
#flash.on { animation: flash .7s ease-out; } #flash.bolt { animation: bolt .9s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes bolt { 0% { opacity: 0; } 6% { opacity: .85; } 12% { opacity: .1; } 18% { opacity: .7; } 100% { opacity: 0; } }
#location { position: absolute; left: 0; top: 13%; z-index: 4; pointer-events: none; display: flex; align-items: center; gap: 10px;
  padding: 8px 26px 8px 18px; background: linear-gradient(90deg, rgba(5,10,18,.85), rgba(5,10,18,.6) 70%, transparent);
  font: 600 18px var(--head); letter-spacing: .12em; color: #fff; opacity: 0; transform: translateX(-30px); }
#location .pin { color: var(--accent); font-size: 12px; }
#location.on { animation: locin 4.2s ease forwards; }
@keyframes locin { 0% { opacity: 0; transform: translateX(-30px); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(10px); } }
#reveal { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(0,0,0,.55); pointer-events: none; padding-bottom: 14%; }
#reveal.in .rv-card { animation: reveal .7s cubic-bezier(.2,.8,.2,1); }
@keyframes reveal { from { opacity: 0; transform: scale(.82); filter: blur(6px); } }
.rv-card { max-width: 62%; text-align: center; }
.rv-card img { max-width: 100%; max-height: 54vh; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 20px 60px rgba(0,0,0,.7); }
.rv-card .cap { margin-top: 10px; font: 600 15px var(--head); letter-spacing: .08em; color: #fff; text-shadow: 0 2px 8px #000; }
#dialogue.narr #dl-text { font-style: italic; color: #dfe7f1; }

/* filters (VND-11) */
#stage.vf-night #vfilter { opacity: 1; background: linear-gradient(180deg, rgba(8,18,60,.55), rgba(5,10,40,.6)); mix-blend-mode: multiply; }
#stage.vf-dusk #vfilter { opacity: 1; background: linear-gradient(180deg, rgba(255,120,40,.28), rgba(120,40,90,.32)); mix-blend-mode: overlay; }
#stage.vf-dawn #vfilter { opacity: 1; background: linear-gradient(180deg, rgba(255,190,200,.3), rgba(255,230,180,.18)); mix-blend-mode: soft-light; }
#stage.vf-flashback #bg, #stage.vf-flashback #cast, #stage.vf-flashback .props { filter: sepia(.75) contrast(.95) brightness(1.05); }
#stage.vf-flashback #vfilter { opacity: 1; background: radial-gradient(ellipse at center, transparent 45%, rgba(40,25,10,.75) 100%); }
#stage.vf-dream #bg, #stage.vf-dream .props { filter: blur(2px) saturate(1.3) brightness(1.1); }
#stage.vf-dream #vfilter { opacity: 1; background: radial-gradient(ellipse at center, rgba(255,255,255,0) 40%, rgba(255,230,255,.55) 100%); }
#stage.vf-mono #bg, #stage.vf-mono #cast, #stage.vf-mono .props { filter: grayscale(1) contrast(1.1); }
#stage.vf-vignette #vfilter { opacity: 1; background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.85) 100%); }
#stage.vf-oldtv #vfilter { opacity: 1; background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 2px, transparent 2px 4px),
  radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.8) 100%); animation: tvflick .18s steps(2) infinite; }
#stage.vf-oldtv #bg, #stage.vf-oldtv #cast { filter: saturate(.55) contrast(1.15) sepia(.2); }
@keyframes tvflick { 50% { opacity: .9; } }
#stage.vf-glitch #cast { animation: glitch 2.4s steps(1) infinite; }
#stage.vf-glitch #vfilter { opacity: 1; background: linear-gradient(90deg, rgba(255,0,80,.08), rgba(0,255,255,.08)); animation: glitchbar 1.7s steps(1) infinite; }
@keyframes glitch { 0%, 88%, 100% { filter: none; transform: none; } 89% { filter: drop-shadow(3px 0 0 rgba(255,0,80,.8)) drop-shadow(-3px 0 0 rgba(0,255,255,.8)); transform: translateX(4px); }
  92% { transform: translateX(-6px) skewX(4deg); } 95% { filter: hue-rotate(90deg); transform: none; } }
@keyframes glitchbar { 0%, 70%, 100% { clip-path: inset(0 0 0 0); } 72% { clip-path: inset(30% 0 60% 0); background: rgba(255,255,255,.18); } 76% { clip-path: inset(62% 0 20% 0); } }
/* camera shake (VND-01) */
#stage.shake1 { animation: shake .45s; } #stage.shake2 { animation: shake .6s; } #stage.shake3 { animation: shakeb .8s; }
@keyframes shake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }
@keyframes shakeb { 10% { transform: translate(-10px, 5px); } 25% { transform: translate(9px, -6px); } 40% { transform: translate(-8px, 3px); } 55% { transform: translate(6px, -3px); } 75% { transform: translate(-3px, 2px); } }

/* IC bar: enter scene + expression (VN-06, VND-02) */
#stage-ctl { display: flex; gap: 6px; align-items: center; padding: 4px 8px 0; flex-wrap: wrap; }
#stage-ctl button { padding: 3px 9px; }
#ic-expr { width: auto; max-width: 120px; flex: 0 0 auto; }
/* art editor (profile + NPCs) */
.art-fields { margin: 6px 0; }
.art-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.art-row .lab { width: 74px; color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.art-row .voice { flex: 1; }
.art-ex-h, .art-ex { display: grid; grid-template-columns: 96px 1fr 1fr 74px 30px; gap: 6px; align-items: center; margin: 4px 0; }
.art-ex-h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.slot { display: flex; gap: 6px; align-items: center; border: 1px dashed transparent; border-radius: 6px; min-width: 0; }
.slot.over { border-color: var(--accent); background: rgba(79,195,247,.08); }
.slot .th { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 6px; object-fit: cover; object-position: top; border: 1px solid var(--line);
  cursor: pointer; background: #0d131d; display: grid; place-items: center; color: var(--muted); }
.slot .th.none:hover { border-color: var(--accent); color: var(--accent); }
.slot .lnk { font-size: 11px; padding: 4px 6px; min-width: 0; }
.st-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 10px; }

/* Director panel (VND-05) */
#gm-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 8px 0; position: sticky; top: 0; background: var(--panel); z-index: 3; }
#gm-nav button { flex: 1 1 30%; padding: 5px 4px; font-size: 12px; }
.cast-row .cth, .npc .cth { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 5px; overflow: hidden; display: grid; place-items: center; background: #0d131d; }
.cth img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cth .dotc { width: 12px; height: 12px; border-radius: 50%; }
.cast-row { display: flex; align-items: center; gap: 4px; margin: 3px 0; }
.cast-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cast-row select { width: auto; max-width: 90px; padding: 3px; font-size: 12px; }
.cast-row button { padding: 2px 7px; }
.cast-row.ghost { opacity: .55; }
.npc-grid { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.npc { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.npc.sel { border-color: var(--accent); } .npc .nm { flex: 1; font-weight: 600; }
.art-ed { border-top: 1px solid var(--line); padding-top: 6px; }
.art-ed .art-ex-h, .art-ed .art-ex { grid-template-columns: 70px 1fr 1fr 64px 26px; }
.art-ed .slot .lnk { display: none; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin: 6px 0; max-height: 260px; overflow: auto; }
.bgt { position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: pointer; aspect-ratio: 16 / 10; }
.bgt i, .bgt video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bgt span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; padding: 2px 5px; background: rgba(0,0,0,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgt.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bgt .rm { position: absolute; top: 2px; right: 4px; font-size: 11px; color: #fff; text-shadow: 0 0 4px #000; display: none; }
.bgt:hover .rm { display: block; }
#gm-filters button, #gm-weather button { padding: 3px 8px; font-size: 12px; }
/* ===================================================== VN round 2: scenes, rehearsal, choices (VND-06/07/09/13) */
#scene-tag { position: absolute; top: 10px; right: 12px; z-index: 6; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; }
#scene-tag > div { padding: 4px 10px; border-radius: 6px; font: 600 12px var(--head); letter-spacing: .04em; background: rgba(6,10,18,.82); border: 1px solid var(--line); }
#scene-tag .priv { border-color: #b39ddb; color: #e1d5ff; } #scene-tag .priv span { font-weight: 400; color: #c5b8ea; margin-left: 6px; }
#scene-tag .else { color: var(--muted); font-weight: 400; }
#scene-tag .reh { border-color: #ef5350; color: #ffcdd2; background: rgba(60,8,8,.85); }
#stage.rehearse { box-shadow: inset 0 0 0 3px rgba(239,83,80,.75); }
#stage.rehearse #dialogue { border-style: dashed; }
#choice { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 8; width: min(560px, 88%);
  padding: 14px 16px 12px; border-radius: 12px; background: rgba(6,12,22,.9); border: 1px solid rgba(179,157,219,.6);
  box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: chin .35s ease-out; }
@keyframes chin { from { opacity: 0; transform: translate(-50%, -46%); } }
#choice .chead { display: flex; justify-content: space-between; font: 600 11px var(--head); letter-spacing: .08em; color: #b39ddb; text-transform: uppercase; }
#choice .ctime { color: var(--warn); }
#choice .cq { font-size: 16px; margin: 6px 0 10px; line-height: 1.45; }
#choice .copts { display: flex; flex-direction: column; gap: 6px; }
.copt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 8px; background: var(--panel2);
  border: 1px solid var(--line); font-size: 14px; transition: border-color .15s, background .15s, transform .15s; }
.copt:not([disabled]):hover { border-color: #b39ddb; background: rgba(60,45,90,.6); transform: translateX(3px); }
.copt .cl { flex: 1; } .copt .ch { font-size: 12px; color: var(--warn); } .copt .cn { font: 600 12px var(--head); color: var(--muted); }
.copt.mine { border-color: var(--accent); background: rgba(18,64,94,.75); }
.copt.won { border-color: var(--good); background: rgba(30,80,40,.7); }
.copt.tied { border-color: var(--warn); }
.copt[disabled] { opacity: .75; cursor: default; }
.copt.st-lock, .copt.st-hint { opacity: .5; }
#choice .cfoot { margin-top: 8px; font-size: 12px; color: var(--muted); min-height: 1em; }
#dir-bar { display: flex; gap: 6px; align-items: center; padding: 6px 8px 0; flex-wrap: wrap; }
#dir-bar select { flex: 1; min-width: 120px; }
#dir-rehearse.on { border-color: #ef5350; background: #4a1414; }
.who-pick { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 4px 0; }
.chrow { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; margin: 5px 0; }
.chrow .row { margin: 3px 0; } .chrow select { width: auto; }
.chrow .cnum { width: 16px; color: var(--muted); }
.chlive { border: 1px solid #b39ddb; border-radius: 6px; padding: 6px; margin: 4px 0 8px; background: rgba(60,45,90,.18); }
.chlive.done { border-color: var(--good); } .chlive.tie { border-color: var(--warn); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: #c5e1a5; }
.msg.choice { color: #d1c4e9; font-size: 12px; }

/* ===================================================== VND-16 point & click + sound */
#hotspots { position: absolute; inset: 0; z-index: 3; pointer-events: none; transform-origin: 50% 50%; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
#hotspots.drawing { pointer-events: auto; cursor: crosshair; background: rgba(79,195,247,.06); }
#hotspots .hs { position: absolute; pointer-events: auto; cursor: zoom-in; border-radius: 8px; transition: box-shadow .2s, background .2s; }
#hotspots .hs span { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); white-space: nowrap; padding: 2px 8px; border-radius: 10px;
  background: rgba(6,12,22,.85); border: 1px solid rgba(255,255,255,.25); font: 600 11px var(--head); opacity: 0; transition: opacity .2s; pointer-events: none; }
#hotspots .hs:hover { background: rgba(255,255,255,.08); box-shadow: 0 0 0 2px rgba(255,241,118,.8), 0 0 24px rgba(255,241,118,.35); }
#hotspots .hs:hover span { opacity: 1; }
#hotspots:not(.gm) .hs { animation: hsglint 3.2s ease-in-out infinite; }
@keyframes hsglint { 0%, 80%, 100% { box-shadow: none; } 88% { box-shadow: 0 0 0 1px rgba(255,241,118,.5), 0 0 16px rgba(255,241,118,.25); } }
#hotspots.gm .hs { border: 2px dashed rgba(79,195,247,.75); background: rgba(79,195,247,.08); cursor: pointer; }
#hotspots.gm .hs span { opacity: 1; }
#hotspots.gm .hs.sel { border-color: #ffd740; background: rgba(255,215,64,.12); }
#hotspots.gm .hs.used { border-color: rgba(138,153,173,.6); opacity: .6; }
#hotspots.drawing .hs { pointer-events: none; }
#scene-tag .explore { border-color: #fff176; color: #fff9c4; }
#find { position: absolute; right: 16px; top: 44px; z-index: 9; width: min(320px, 70%); padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(10,16,28,.94); border: 1px solid #fff176; box-shadow: 0 10px 30px rgba(0,0,0,.55); }
#find.in { animation: findin .4s ease-out; } @keyframes findin { from { opacity: 0; transform: translateY(-8px); } }
#find .fl { font: 600 12px var(--head); color: #fff59d; letter-spacing: .05em; } #find .fl span { color: var(--muted); font-weight: 400; margin-left: 6px; }
#find .ft { margin: 6px 0 2px; } #find .fi { font-size: 12px; color: #c5e1a5; margin-top: 4px; }
#hs-draw.on { border-color: #ffd740; background: #4a3c08; }
.cast-row.sel { background: rgba(255,215,64,.08); border-radius: 5px; }
#hs-text { width: 100%; margin: 4px 0; }
/* VN-10..12 */
#dl-more { position: absolute; right: 40px; bottom: 9px; font: 700 12px var(--head); color: var(--accent); }
#typing { min-height: 16px; padding: 0 12px; font-size: 12px; color: var(--muted); font-style: italic; }
#talkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 10px; margin: 0 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel2); font-size: 13px; }
#talkbar .tk-mode { font: 700 11px var(--head); letter-spacing: .14em; color: var(--accent); }
#talkbar .tk-now { font-weight: 700; }
#talkbar .tk-o { opacity: .6; } #talkbar .tk-o.on { opacity: 1; font-weight: 700; color: var(--warn); }
#talkbar button { padding: 1px 8px; }
/* VN-13: sprite actions (players + NPCs) — on .mo, the flip stays on .pic */
#cast .sprite .mo { transform-origin: 50% 100%; }
#ic-act { max-width: 92px; }
.mo.m-hop { animation: m-hop .5s cubic-bezier(.3,.7,.4,1); }
@keyframes m-hop { 40% { transform: translateY(-34px); } 70% { transform: translateY(0) scaleY(.96); } 85% { transform: translateY(-4px); } }
.mo.m-laugh { animation: m-laugh .9s ease-in-out; }
@keyframes m-laugh { 15% { transform: translateY(-14px) rotate(-2deg); } 30% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-12px) rotate(2deg); }
  60% { transform: translateY(0); } 75% { transform: translateY(-6px) rotate(-1deg); } }
.mo.m-nod { animation: m-nod .7s ease-in-out; }
@keyframes m-nod { 25% { transform: translateY(8px) scaleY(.98); } 50% { transform: none; } 75% { transform: translateY(6px) scaleY(.985); } }
.mo.m-shake { animation: m-shake .6s ease-in-out; }
@keyframes m-shake { 15% { transform: translateX(-9px) rotate(-1deg); } 35% { transform: translateX(9px) rotate(1deg); } 55% { transform: translateX(-7px); } 75% { transform: translateX(5px); } }
.mo.m-surprise { animation: m-surprise .55s cubic-bezier(.2,.9,.3,1.3); }
@keyframes m-surprise { 25% { transform: translateY(-42px) scale(1.05); } 55% { transform: translateY(0) scale(1.02); } 70% { transform: translateY(-6px); } }
.mo.m-lean { animation: m-lean 1.5s ease-in-out; }
@keyframes m-lean { 20%, 75% { transform: translateY(-6px) scale(1.08); } }
.mo.m-back { animation: m-back 1.5s ease-in-out; }
@keyframes m-back { 20%, 75% { transform: translateY(8px) scale(.92); opacity: .85; } }
.mo.m-sigh { animation: m-sigh 1.5s ease-in-out; }
@keyframes m-sigh { 15% { transform: translateY(-5px) scaleY(1.02); } 55%, 80% { transform: translateY(10px) scaleY(.97); } }
.mo.m-angry { animation: m-angry .7s linear; }
@keyframes m-angry { 0%, 100% { transform: none; filter: none; } 10%, 30%, 50%, 70%, 90% { transform: translateX(-4px) translateY(-3px); filter: drop-shadow(0 0 12px rgba(255,60,40,.6)); }
  20%, 40%, 60%, 80% { transform: translateX(4px); filter: drop-shadow(0 0 12px rgba(255,60,40,.6)); } }
.mo.m-bow { animation: m-bow 1.3s ease-in-out; }
@keyframes m-bow { 30%, 65% { transform: translateY(16px) scaleY(.93); } }
.mo.m-tremble { animation: m-tremble 1.2s linear; }
@keyframes m-tremble { 0%, 100% { transform: none; } 5%, 15%, 25%, 35%, 45%, 55%, 65%, 75%, 85% { transform: translateX(-2px) scale(.98); } 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% { transform: translateX(2px) scale(.98); } }
.mo.m-spin { animation: m-spin .8s ease-in-out; }
@keyframes m-spin { 50% { transform: translateY(-16px) scaleX(-1); } 100% { transform: scaleX(1); } }

/* VN-14 clear box · SPR-02 fit editor */
#dialogue.cleared { opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.art-fit { margin-top: 10px; border: 1px solid var(--line, #2a3442); border-radius: 8px; padding: 6px 8px; }
.art-fit summary { cursor: pointer; font-weight: 600; }
.fit-wrap { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.fit-stage { position: relative; width: 220px; height: 300px; background: linear-gradient(#1b2633, #0e141c); border-radius: 6px; overflow: hidden; cursor: ns-resize; flex: none; }
.fit-stage .fit-spr { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; }
.fit-guide { position: absolute; left: 0; right: 0; border-top: 1px dashed #ffd740; z-index: 2; pointer-events: none; }
.fit-guide span { position: absolute; right: 4px; top: -15px; font-size: 10px; color: #ffd740; }
.fit-guide.floor { bottom: 0; top: auto; border-color: #4fc3f7; }
.fit-guide.floor span { color: #4fc3f7; }
.fit-ctl { display: flex; flex-direction: column; gap: 6px; min-width: 240px; flex: 1; }
.fit-ctl label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fit-warn .bad { color: #ffab91; margin-top: 4px; }
/* VN-15: free-role cooldown on the send button */
#ic-send[data-cool] { position: relative; opacity: .75; }
#ic-send[data-cool]::after { content: attr(data-cool); position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.72); color: #ffcf6a; font: 600 12px "Share Tech Mono", monospace; border-radius: inherit; }
/* CHO-01: watching a choice someone else makes */
#choice .copt .cw { display: block; font-size: 11px; color: #ffcf6a; margin-top: 2px; }
#choice.watch .copt[disabled] { opacity: .85; cursor: default; }
#choice.watch .cfoot { color: #9ec9ff; }
/* SUB-01: scenes in this room as tabs on the stage */
#scene-tabs { position: absolute; top: 10px; left: 12px; z-index: 7; display: flex; flex-wrap: wrap; gap: 4px; max-width: 62%; }
#scene-tabs .stab { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; font: 600 12px var(--head); border-radius: 6px;
  background: rgba(6,10,18,.8); border: 1px solid var(--line); color: #c9d3de; cursor: pointer; }
#scene-tabs .stab small { font-weight: 400; color: #8a97a5; }
#scene-tabs .stab.on { border-color: var(--accent); color: #fff; box-shadow: 0 0 0 1px var(--accent) inset; }
#scene-tabs .stab .me { color: var(--accent); font-style: normal; font-size: 9px; }
#scene-tabs .stab[disabled] { opacity: .5; cursor: not-allowed; }
#scene-tabs .stab.pend { border-style: dashed; }
#scene-tabs .stab.add { color: #9ec9ff; }
#scene-tag .watch { border-color: #9ec9ff; color: #d8ecff; pointer-events: auto; }
#scene-tag .watch button { margin-left: 8px; }
.cast-row.pend { background: rgba(255, 207, 106, .06); }
/* MUS-01: playlist */
.playlist { margin: 6px 0; padding: 6px; border: 1px solid var(--line); border-radius: 6px; }
.playlist .row button.on { border-color: var(--accent); color: var(--accent); }
.playlist .cast-row.sel { background: rgba(79,195,247,.1); }
/* LOG-01: full-screen VN backlog */
#backlog { position: fixed; inset: 0; z-index: 72; display: flex; flex-direction: column; background: rgba(4,6,10,.94); backdrop-filter: blur(6px); }
#backlog.hidden { display: none; }
#backlog .bl-head { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
#backlog .bl-head b { font: 400 26px var(--fr-disp, var(--head)); letter-spacing: .12em; }
#backlog .bl-scene { color: var(--accent); font-size: 13px; letter-spacing: .06em; }
#backlog .bl-count { color: #7d8a97; font-size: 12px; margin-right: auto; }
#backlog .bl-head select, #backlog .bl-head input { width: auto; max-width: 200px; }
#backlog .bl-list { flex: 1; overflow-y: auto; padding: 18px max(4vw, 18px) 40px; outline: none; }
#backlog .bl-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; max-width: 980px; margin: 0 auto 14px; align-items: start; }
#backlog .bl-face { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; background: #111820; border: 1px solid rgba(255,255,255,.1); }
#backlog .bl-face img, #backlog .bl-face svg { width: 100%; height: 100%; object-fit: cover; object-position: top; }
#backlog .bl-body b { display: block; font-size: 14px; letter-spacing: .03em; margin-bottom: 2px; }
#backlog .bl-body p, #backlog .bl-narr p { margin: 0; font-size: calc(var(--dl-size, 19px) * .9); line-height: 1.55; color: #e8edf2; }
#backlog .bl-row > i { font-style: normal; font-size: 11px; color: #5d6a77; }
#backlog .bl-narr { grid-template-columns: 1fr auto; }
#backlog .bl-narr p { font-style: italic; color: #c9d2db; padding-left: 78px; }
#backlog .bl-choice, #backlog .bl-roll { grid-template-columns: 1fr auto; text-align: center; color: #b39ddb; font-size: 13px; letter-spacing: .04em; }
#backlog .bl-roll { color: #ffcf6a; }
#backlog .bl-empty { text-align: center; color: #6c7884; margin-top: 20vh; }
#backlog .bl-foot { text-align: center; font-size: 11px; color: #56616c; padding: 8px; }
#dl-log { position: absolute; top: 6px; right: 40px; padding: 0 7px; font-size: 13px; line-height: 20px; opacity: .55; background: transparent; border: 1px solid rgba(255,255,255,.25); }
#dl-log:hover { opacity: 1; }
#scene-tabs:not(.hidden) ~ #scene-tag { top: 46px; }
/* VN-15/16: pacing inputs — three labelled boxes that fit the GM column */
.pace { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
.pace label { display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted, #9aa6b2); line-height: 1.2; min-width: 0; }
.pace input { width: 100%; min-width: 0; box-sizing: border-box; }

/* SUB-05 scene cuts: opening / closing cards and banners */
#scene-cut { position: absolute; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
#scene-cut.hidden { display: none; }
#scene-cut.sc-full { background: #000; animation: sc-in 3.6s ease forwards; }
#scene-cut.sc-full.close { animation: sc-in 2.4s ease forwards; }
@keyframes sc-in { 0% { opacity: 0; } 10% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
#scene-cut .sc-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
#scene-cut .sc-mid.right { align-items: flex-end; padding-right: 8%; text-align: right; }
#scene-cut .sc-big { font: 400 clamp(32px, 6vw, 72px) var(--display, var(--head)); letter-spacing: .08em; color: #fff; animation: sc-rise .9s ease both .2s; }
#scene-cut .sc-small { font: 600 13px var(--head); letter-spacing: .5em; color: rgba(255,255,255,.7); animation: sc-rise .8s ease both; }
#scene-cut .sc-time { font: 600 15px var(--head); letter-spacing: .3em; color: #ffe0b2; animation: sc-rise .8s ease both .5s; }
#scene-cut .sc-sub { max-width: 60%; font: 400 15px var(--body); color: rgba(255,255,255,.8); animation: sc-rise .8s ease both .7s; }
@keyframes sc-rise { from { opacity: 0; transform: translateY(14px); } }
#scene-cut .sc-people { position: absolute; left: 0; right: 0; bottom: 8%; display: flex; justify-content: center; gap: 22px; animation: sc-rise .8s ease both 1s; }
#scene-cut .sc-p { display: flex; align-items: center; gap: 8px; font: 700 14px var(--head); letter-spacing: .14em; color: #fff; text-transform: uppercase; }
#scene-cut .sc-p img, #scene-cut .sc-p i { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.5); display: grid; place-items: center; font-style: normal; background: #222; }
#scene-cut .sc-img { position: absolute; inset: 0; background: center / cover no-repeat; opacity: .35; filter: blur(2px); }
#scene-cut.k-flashback { background: #1b130a; }
#scene-cut.k-flashback .sc-big, #scene-cut.k-flashback .sc-small { color: #f3d9a4; text-shadow: 0 0 18px rgba(255,190,90,.25); }
#scene-cut.k-flashback::after { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 30% 40%, rgba(255,255,255,.03) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
#scene-cut.k-dream { background: radial-gradient(circle, #1d1440, #000); }
#scene-cut.k-dream .sc-big { filter: blur(.4px); color: #e1d5ff; }
#scene-cut .lb { position: absolute; left: 0; right: 0; height: 12%; background: #000; z-index: 2; }
#scene-cut .lb.t { top: 0; } #scene-cut .lb.b { bottom: 0; }
#scene-cut.k-cutscene { background: linear-gradient(90deg, #000 0 35%, #0b0f16); }
#scene-cut .sc-focus { position: absolute; left: 4%; bottom: 0; height: 88%; width: 42%; display: flex; align-items: flex-end; animation: sc-slide 1s ease both; }
#scene-cut .sc-focus img { max-height: 100%; max-width: 100%; object-fit: contain; }
@keyframes sc-slide { from { opacity: 0; transform: translateX(-30px); } }
#scene-cut .sc-name { position: absolute; left: 0; right: 0; bottom: 13%; text-align: center; z-index: 3; font: 400 clamp(36px, 7vw, 84px) var(--display, var(--head)); letter-spacing: .12em; color: #fff; animation: sc-rise .8s ease both .4s; }
#scene-cut .sc-split { position: absolute; inset: 0; background: linear-gradient(100deg, #0d1a2a 0 50%, #000 50%); animation: sc-wipe .9s ease both; }
@keyframes sc-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
#scene-cut.sc-ban { inset: auto 0 auto 0; top: 14px; display: flex; justify-content: center; }
#scene-cut .sc-banner { padding: 7px 18px; background: rgba(0,0,0,.72); border-left: 3px solid var(--accent); font: 700 13px var(--head); letter-spacing: .12em; color: #fff;
  text-transform: uppercase; animation: sc-ban 3.2s ease forwards; }
#scene-cut.k-flashback .sc-banner { border-color: #f3d9a4; color: #f3d9a4; }
@keyframes sc-ban { 0% { opacity: 0; transform: translateY(-10px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
#scene-cut.still, #scene-cut.still * { animation-duration: .01s !important; animation-delay: 0s !important; }
#scene-ending { position: absolute; top: 46px; left: 50%; transform: translateX(-50%); z-index: 55; padding: 6px 16px; background: rgba(120,20,20,.85);
  border: 1px solid #ff8a80; font: 700 13px var(--head); letter-spacing: .1em; color: #fff; border-radius: 4px; }
/* SUB-05: flashback lines in the logs */
.fb-line, .log-row.fb { font-style: italic; color: #f3d9a4 !important; }
.fb-line::before, .log-row.fb::before { content: "⟲ "; font-style: normal; opacity: .7; }

/* WSP-01 whisper */
#whisper-fx { position: absolute; inset: 0; z-index: 58; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#whisper-fx.hidden { display: none; }
#whisper-fx .wf-card { pointer-events: auto; max-width: min(520px, 86%); padding: 16px 20px 12px; border-radius: 6px; background: rgba(12,10,22,.88);
  border: 1px solid rgba(206,147,216,.6); box-shadow: 0 0 40px rgba(156,39,176,.25); animation: wf-in .5s ease; }
@keyframes wf-in { from { opacity: 0; transform: scale(.96) translateY(8px); filter: blur(3px); } }
#whisper-fx .wf-tag { font: 700 11px var(--head); letter-spacing: .3em; color: #ce93d8; margin-bottom: 8px; }
#whisper-fx .wf-text { font: italic 400 17px var(--body); line-height: 1.5; color: #f3e5f5; }
#whisper-fx img { max-width: 100%; max-height: 220px; display: block; margin: 0 auto 10px; border-radius: 4px; }
#whisper-fx .wf-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
#whisper-fx.w-notice .wf-card { border-color: #ffd54f; box-shadow: 0 0 40px rgba(255,213,79,.2); } #whisper-fx.w-notice .wf-tag { color: #ffd54f; }
#whisper-fx.w-notice .wf-text { font-style: normal; color: #fff8e1; }
#whisper-fx.w-instinct .wf-card { border-color: #ff5252; background: rgba(30,6,6,.9); animation: wf-in .3s ease, wf-jolt .5s ease .3s; } #whisper-fx.w-instinct .wf-tag { color: #ff8a80; }
@keyframes wf-jolt { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } }
#whisper-fx.w-radio .wf-card { border-color: #80deea; background: rgba(4,20,24,.9); font-family: monospace; } #whisper-fx.w-radio .wf-tag { color: #80deea; }
#whisper-fx.w-radio .wf-text { font: 500 15px monospace; font-style: normal; color: #e0f7fa; }
.msg.whisper { border-left: 2px solid #ce93d8; padding-left: 6px; font-style: italic; color: #e1bee7; }
.msg.whisper .who { color: #ce93d8 !important; font-style: normal; }
.msg.notice { color: #9e9e9e; font-size: .9em; }

/* MEN-01 mention chips + picker */
.mention { display: inline-block; padding: 0 5px; margin: 0 1px; border-radius: 9px; font-weight: 700; font-style: normal;
  color: var(--mc, #80deea); background: color-mix(in srgb, var(--mc, #80deea) 18%, transparent); border: 1px solid color-mix(in srgb, var(--mc, #80deea) 50%, transparent); }
.mention.me { color: #111; background: var(--mc, #ffd54f); box-shadow: 0 0 10px var(--mc, #ffd54f); }
#cast .sprite.mentioned .pic { filter: drop-shadow(0 0 10px rgba(255,255,255,.55)); }
.mention-pop { position: absolute; bottom: 100%; left: 0; z-index: 70; min-width: 200px; max-width: 320px; background: #10161f; border: 1px solid #2c4a66;
  border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.6); padding: 4px 0; }
.mention-pop.hidden { display: none; }
.mention-pop .mp-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.mention-pop .mp-row.on, .mention-pop .mp-row:hover { background: #1d2c3e; }
.mention-pop small { color: #8aa; }

/* CHO-02 centre-screen choices: big slanted panels that slide in one by one */
#choice.centre { top: 0; left: 0; right: 0; bottom: 0; transform: none; width: auto; border: none; border-radius: 0; padding: 0 8%;
  background: radial-gradient(ellipse at center, rgba(4,8,16,.55), rgba(0,0,0,.82)); box-shadow: none; display: flex; flex-direction: column;
  justify-content: center; animation: chc .4s ease-out; }
#choice.centre.hidden { display: none; }
@keyframes chc { from { opacity: 0; } }
#choice.centre .chead { justify-content: center; gap: 18px; font-size: 12px; letter-spacing: .3em; }
#choice.centre .cq { text-align: center; font: 600 clamp(17px, 2.2vw, 24px) var(--head); letter-spacing: .04em; margin: 10px auto 18px; max-width: 760px; }
#choice.centre .copts { gap: 12px; align-items: center; }
#choice.centre .copt { width: min(620px, 92%); padding: 14px 26px; border-radius: 0; transform: skewX(-12deg); background: rgba(20,28,44,.92);
  border: 1px solid rgba(179,157,219,.45); border-left: 4px solid #b39ddb; font: 600 16px var(--head); letter-spacing: .03em;
  opacity: 0; animation: chopt .45s cubic-bezier(.2,.9,.3,1.2) forwards; animation-delay: calc(var(--k, 0) * 90ms + 120ms); }
#choice.centre .copt > * { transform: skewX(12deg); }
@keyframes chopt { from { opacity: 0; transform: skewX(-12deg) translateX(-60px); } to { opacity: 1; transform: skewX(-12deg); } }
#choice.centre .copt:not([disabled]):hover { transform: skewX(-12deg) translateX(10px) scale(1.02); background: rgba(60,45,90,.95); border-left-color: #fff; }
#choice.centre .copt.mine { background: rgba(18,64,94,.95); border-left-color: var(--accent); }
#choice.centre .copt.won { background: rgba(30,90,46,.95); border-left-color: var(--good); }
#choice.centre .copt[disabled] { opacity: .85; }
#choice.centre .copt.st-lock, #choice.centre .copt.st-hint { opacity: .45; animation-name: chopt-dim; }
@keyframes chopt-dim { from { opacity: 0; transform: skewX(-12deg) translateX(-60px); } to { opacity: .45; transform: skewX(-12deg); } }
#choice.centre .cfoot { text-align: center; margin-top: 16px; font-size: 13px; }
#choice .cbar { height: 3px; background: rgba(255,255,255,.12); margin: -6px auto 14px; width: min(620px, 92%); overflow: hidden; }
#choice .cbar i { display: block; height: 100%; background: var(--warn); animation: cbar linear forwards; transform-origin: left; }
@keyframes cbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
#choice.centre.watch .copt { pointer-events: none; }
body.reduce-motion #choice.centre .copt { animation-duration: .01s; animation-delay: 0s; }

/* EMO-01 emotes + picker */
img.emote { height: 1.6em; width: auto; vertical-align: -0.45em; margin: 0 1px; }
#dl-text img.emote { height: 2em; }
.emote-btn { flex: 0 0 auto; padding: 0 8px; background: transparent; border: 1px solid var(--line); border-radius: 6px; font-size: 16px; cursor: pointer; }
.emote-pop { position: fixed; z-index: 200; width: 290px; max-height: 260px; display: flex; flex-direction: column; background: #10161f;
  border: 1px solid #2c4a66; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.6); }
.emote-pop .ep-tabs { display: flex; gap: 2px; padding: 4px; border-bottom: 1px solid #22344a; }
.emote-pop .ep-tabs button { flex: 1; font-size: 12px; padding: 3px; background: transparent; border: 0; color: #9ab; }
.emote-pop .ep-tabs button.on { color: #fff; border-bottom: 2px solid var(--accent); }
.emote-pop .ep-body { padding: 6px; overflow: auto; display: flex; flex-wrap: wrap; gap: 2px; }
.emote-pop .ep-body.hidden { display: none; }
.emote-pop .ep-i { width: 32px; height: 32px; font-size: 19px; background: transparent; border: 0; border-radius: 4px; cursor: pointer; padding: 0; }
.emote-pop .ep-i:hover { background: #1d2c3e; }
.emote-pop .ep-i img { max-width: 28px; max-height: 28px; }
.emote-pop .ep-m, .emote-pop .ep-s { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
.emote-pop .ep-row { display: flex; align-items: center; gap: 6px; font-size: 12px; } .emote-pop .ep-row img { height: 22px; }

/* SES standby screen + session bar */
#standby { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 900; background: #000; color: #cfd8dc; overflow: hidden; }
#standby .sb-chat { position: absolute; right: 14px; bottom: 10px; z-index: 2; }
body.sb-chat #side { position: relative; z-index: 901; }
body.sb-chat #standby .sb-chat { right: auto; left: 50%; transform: translateX(-50%); }
#standby .sb-scan { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(transparent, rgba(120,200,255,.06), transparent); animation: sb-scan 4s linear infinite; }
@keyframes sb-scan { from { top: -30%; } to { top: 100%; } }
#standby::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
#standby .sb-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
#standby .sb-a { font: 400 clamp(22px, 4vw, 44px) var(--display, var(--head)); letter-spacing: .2em; color: #e0f7fa; }
#standby .sb-cur { font-style: normal; animation: sb-blink 1s steps(2) infinite; } @keyframes sb-blink { 50% { opacity: 0; } }
#standby .sb-b { font: 600 12px var(--head); letter-spacing: .45em; color: #78909c; }
#standby .sb-c { margin-top: 18px; font: 600 11px var(--head); letter-spacing: .3em; color: #4fc3f7; }
#standby .sb-corner { position: absolute; left: 14px; bottom: 12px; font: 600 10px monospace; letter-spacing: .2em; color: #546e7a; }
body.reduce-motion #standby .sb-scan { animation: none; display: none; }
#sess-bar { position: absolute; top: 8px; right: 10px; z-index: 59; display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px;
  background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.15); font: 600 11px var(--head); }
#sess-bar.rec { border-color: rgba(255,82,82,.5); }
#sess-bar .rec-dot { color: #ff5252; animation: sb-blink 1.4s steps(2) infinite; margin-right: 4px; }
#sess-bar .sb-tag { color: #ffd54f; margin-right: 4px; }
#sess-bar.sb { border-color: #ffd54f; }
/* EPI archive + replay */
#episodes { position: fixed; inset: 4vh 4vw; z-index: 210; background: #0b1018; border: 1px solid #2c4a66; border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.7); }
#episodes .ep-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #22344a; } #episodes .ep-head button { margin-left: auto; }
#episodes .ep-body { flex: 1; overflow: auto; padding: 10px 12px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ep-card { border: 1px solid #22344a; border-radius: 8px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; background: #101826; }
.ep-card:hover { border-color: var(--accent); } .ep-card.hid { opacity: .5; }
.ep-cover { height: 110px; border-radius: 6px; background: #1a2636 center / cover; position: relative; }
.ep-live { position: absolute; left: 6px; top: 6px; font: 700 10px var(--head); color: #ff5252; background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 3px; }
.ep-kind { position: absolute; right: 6px; top: 6px; font: 700 10px var(--head); color: #f3d9a4; background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 3px; text-transform: uppercase; }
.ep-card small { font-size: 11px; } .ep-gm { display: flex; gap: 3px; margin-top: 2px; }
.rp { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.rp-stage { position: relative; flex: 1; min-height: 300px; background: #000; border-radius: 6px; overflow: hidden; cursor: pointer; }
.rp-bg { position: absolute; inset: 0; background: center / cover no-repeat; }
.rp-bg.f-flashback { filter: sepia(.7) blur(.5px); } .rp-bg.f-night { filter: brightness(.6) hue-rotate(200deg); } .rp-bg.f-mono { filter: grayscale(1); }
.rp-cast { position: absolute; inset: 0; }
.rp-spr { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; opacity: .65; transition: opacity .3s, left .4s; }
.rp-spr.on { opacity: 1; } .rp-spr img { max-height: 62vh; max-width: 28vw; } .rp-spr.flip img { transform: scaleX(-1); }
.rp-spr .rp-sil { width: 90px; height: 220px; border-radius: 45px 45px 0 0; opacity: .7; } .rp-spr b { font-size: 11px; background: rgba(0,0,0,.6); padding: 0 6px; border-radius: 3px; }
.rp-loc { position: absolute; left: 12px; top: 10px; font: 700 12px var(--head); letter-spacing: .2em; color: #fff; text-shadow: 0 1px 3px #000; }
.rp-box { position: absolute; left: 6%; right: 6%; bottom: 14px; min-height: 90px; padding: 12px 18px; background: rgba(6,12,22,.85); border: 1px solid rgba(79,195,247,.5); border-radius: 10px; }
.rp-name { position: absolute; top: -12px; left: 16px; padding: 1px 12px; background: #0d1a29; border: 1px solid rgba(79,195,247,.5); border-radius: 5px; font: 700 13px var(--head); }
.rp-name.hidden { display: none; } .rp-text { font-size: 16px; line-height: 1.5; white-space: pre-wrap; } .rp-more { position: absolute; right: 12px; bottom: 6px; color: var(--accent); }
.rp-cut { position: absolute; inset: 0; z-index: 5; background: #000; display: flex; align-items: center; justify-content: center; text-align: center; font: 400 34px var(--display, var(--head)); letter-spacing: .1em; }
.rp-cut.hidden { display: none; } .rp-cut.k-flashback { background: #1b130a; color: #f3d9a4; }
.rp-ctl { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; } .rp-ctl [data-back] { margin-left: auto; }
.rp-log { max-height: 30vh; overflow: auto; font-size: 13px; border: 1px solid #22344a; border-radius: 6px; padding: 6px 8px; }
.rp-log.hidden { display: none; }
@media (max-width: 760px) { #episodes { inset: 0; border-radius: 0; } #sess-bar { top: 4px; right: 4px; flex-wrap: wrap; } }
#scene-tabs { z-index: 58; }   /* SES: tabs + 📼 stay usable on the standby screen */
.rp-ctl select { width: auto; flex: 0 0 auto; }

/* ACT-01 VN rolls: cut-in + centre dice + stamp */
#vnroll { position: absolute; inset: 0; z-index: 56; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.5), rgba(0,0,0,.85)); }
#vnroll.hidden { display: none; }
#vnroll.watch { inset: auto 0 auto 0; top: 44px; background: none; pointer-events: none; }
#vnroll.watch .vr-strip { pointer-events: auto; display: flex; flex-direction: column; gap: 4px; }
.vr-w { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: rgba(0,0,0,.7); border-left: 3px solid #ffd54f; font-size: 13px; }
.vr-cut { position: relative; display: flex; align-items: center; gap: 16px; width: min(760px, 94%); padding: 10px 18px; background: rgba(10,14,22,.85);
  border-top: 2px solid #ffd54f; border-bottom: 2px solid #ffd54f; animation: vr-in .45s cubic-bezier(.2,.9,.3,1.1); }
@keyframes vr-in { from { opacity: 0; transform: translateX(-40px); } }
.vr-face { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; flex: 0 0 auto; background: #1b2636; display: grid; place-items: center; }
.vr-face img { width: 100%; height: 100%; object-fit: cover; } .vr-face i { font: 700 26px var(--head); font-style: normal; }
.vr-face.sm { width: 26px; height: 26px; }
.vr-words { display: flex; flex-direction: column; gap: 2px; } .vr-words small { font: 600 10px var(--head); letter-spacing: .3em; color: #ffd54f; }
.vr-words b { font: 400 clamp(22px, 3.4vw, 36px) var(--display, var(--head)); letter-spacing: .08em; }
.vr-words q { font-style: italic; color: #cfd8dc; font-size: 14px; }
.vr-tag { display: inline-block; margin-top: 2px; font: 700 10px var(--head); letter-spacing: .15em; color: #111; background: #ffd54f; padding: 1px 6px; border-radius: 2px; margin-right: 4px; }
.vr-opts { display: flex; flex-direction: column; gap: 8px; width: min(620px, 92%); }
.vr-opt { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; padding: 10px 18px; transform: skewX(-10deg); background: rgba(20,28,44,.95);
  border: 1px solid rgba(255,213,79,.4); border-left: 4px solid #ffd54f; animation: chopt .4s ease both; }
.vr-opt > * { transform: skewX(10deg); } .vr-opt b { font: 600 16px var(--head); } .vr-opt span { grid-column: 1; font-size: 12px; color: #b0bec5; }
.vr-opt em { grid-row: 1 / 3; grid-column: 2; align-self: center; font: 700 12px var(--head); font-style: normal; } .vr-opt small { color: var(--warn); }
.vr-opt:not([disabled]):hover { background: rgba(60,50,20,.95); } .vr-opt[disabled] { opacity: .45; }
.vr-free { display: flex; gap: 8px; align-items: center; } .vr-free select { width: auto; }
.vr-dice { display: flex; gap: 28px; cursor: pointer; }
.vr-die { width: 96px; height: 96px; border-radius: 16px; background: linear-gradient(145deg, #f5f5f5, #b0bec5); color: #111; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.6), inset 0 -4px 0 rgba(0,0,0,.2); }
.vr-die span { font: 800 44px var(--head); line-height: 1; } .vr-die small { font: 700 10px var(--head); color: #455a64; }
.vr-die.spin { animation: vr-spin .35s linear infinite; } @keyframes vr-spin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(.92); } 100% { transform: rotate(360deg) scale(1); } }
.vr-die.done { animation: vr-land .4s cubic-bezier(.2,1.6,.4,1); } @keyframes vr-land { from { transform: scale(1.3); } }
.vr-odds { font: 700 13px var(--head); letter-spacing: .15em; }
.vr-go { padding: 10px 34px; font: 700 16px var(--head); letter-spacing: .2em; background: #ffd54f; color: #111; border: 0; border-radius: 4px; animation: vr-pulse 1.4s ease infinite; }
@keyframes vr-pulse { 50% { box-shadow: 0 0 0 8px rgba(255,213,79,.15); } }
.vr-help, .vr-note { font-size: 12px; color: #cfd8dc; letter-spacing: .1em; }
.vr-stamp { font: 400 clamp(38px, 7vw, 76px) var(--display, var(--head)); letter-spacing: .12em; display: flex; flex-direction: column; align-items: center; animation: vr-stamp .45s cubic-bezier(.2,1.5,.4,1); }
.vr-stamp.hidden { display: none; } .vr-stamp small { font: 600 13px var(--head); letter-spacing: .1em; color: #cfd8dc; }
@keyframes vr-stamp { from { opacity: 0; transform: scale(2.2); } }
.vr-stamp.crit { color: #ffd740; text-shadow: 0 0 30px rgba(255,215,64,.7); } .vr-stamp.ok { color: #69f0ae; }
.vr-stamp.bad { color: #ff5252; } .vr-stamp.fumble { color: #b388ff; text-shadow: 2px 0 #ff1744, -2px 0 #00e5ff; } .vr-stamp.hid { color: #b0bec5; }
#vnroll.r-crit { animation: vr-flash .6s ease .9s; } @keyframes vr-flash { 30% { background-color: rgba(255,215,64,.35); } }
#vnroll.r-bad .vr-cut { animation: vr-in .45s ease, wf-jolt .4s ease .95s; }
#vnroll.r-fumble .vr-stamp { animation: vr-stamp .45s ease, vr-glitch .3s steps(2) 3; } @keyframes vr-glitch { 50% { transform: translateX(4px) skewX(8deg); } }
.vr-push { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; } .vr-push b { color: #ffd54f; letter-spacing: .2em; }
#vr-group { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); z-index: 57; padding: 10px 20px; background: rgba(0,0,0,.85); border: 2px solid #69f0ae; text-align: center; }
#vr-group.bad { border-color: #ff5252; } #vr-group b { font: 700 18px var(--head); letter-spacing: .1em; } #vr-group span { margin: 0 6px; font-size: 13px; }
#vr-group span.ok { color: #69f0ae; } #vr-group span.bad { color: #ff8a80; } #vr-group small { display: block; color: #b0bec5; }
body.reduce-motion #vnroll *, body.reduce-motion #vnroll { animation-duration: .01s !important; }
@media (max-width: 760px) { .vr-die { width: 72px; height: 72px; } .vr-die span { font-size: 32px; } .vr-face { width: 44px; height: 44px; } }
.vr-opt.st-lock, .vr-opt.st-hint { animation-name: chopt-dim; }
#now-playing.held .np-pause { animation: npPulse 1.2s ease-in-out infinite; }
@keyframes npPulse { 50% { box-shadow: 0 0 0 6px rgba(255, 215, 64, .35); } }
/* MUS-03 folders · MIX-01 mixer */
.snd-folder { border: 1px solid rgba(255,255,255,.08); border-radius: 6px; margin: 4px 0; padding: 2px 6px; }
.snd-folder .snd-fh { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.snd-folder .snd-fh b { flex: 1; }
.snd-folder .cast-row .snd-mv { width: 84px; font-size: 11px; padding: 1px 2px; }
.mixer { border: 1px solid rgba(79,195,247,.25); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; background: rgba(79,195,247,.04); }
.mixer .mix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; margin-top: 4px; }
.mixer .mix-grid label { display: flex; align-items: center; gap: 6px; }
.mixer .mix-grid input[type=range] { flex: 1; } .mixer .mix-grid b { width: 40px; text-align: right; font-weight: 600; }
