/* 張特的賽車人生 — Fullscreen VN runtime v2 */
:root{
  --vn-ink:#f3f8fb;
  --vn-muted:#a9bac5;
  --vn-line:#d8ebf42c;
  --vn-glass:#07111bd9;
  --vn-glass-strong:#050c13f2;
  --vn-cyan:#78dcff;
  --vn-shadow:0 28px 90px #000c;
}
html,body{scroll-behavior:smooth}

/* Fix the old desktop shell that locked the viewport. The normal page can scroll again. */
@media (min-width:701px){
  .game{
    display:block!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }
  .game .top{position:sticky!important;top:0!important;height:72px!important}
  .game .progress{position:sticky!important;top:72px!important;height:3px!important}
  .game-grid{
    grid-template-columns:minmax(180px,14vw) minmax(0,1fr)!important;
    width:100%!important;
    max-width:1680px!important;
    height:auto!important;
    min-height:calc(100dvh - 75px)!important;
    gap:clamp(18px,2vw,34px)!important;
    padding:clamp(18px,3vh,38px) clamp(18px,2.2vw,42px) 7vh!important;
    overflow:visible!important;
  }
  .stats-panel{height:auto!important;max-height:none!important;overflow:visible!important}
  .event-card{height:auto!important;min-height:0!important;overflow:visible!important;padding-bottom:80px!important}
}

/* The previous injected VN card is disabled by v2. */
.vn-stage{display:none!important}

.vn-overlay-root{position:relative;z-index:9990}
.vn-fullscreen{
  --scene-a:#243b4b;
  --scene-b:#09121b;
  --scene-c:#122734;
  position:fixed;
  inset:0;
  z-index:9991;
  overflow:hidden;
  color:var(--vn-ink);
  background:#050a0f;
  isolation:isolate;
  user-select:none;
  outline:none;
}
.vn-scene-bg,.vn-scene-light{position:absolute;inset:0;pointer-events:none}
.vn-scene-bg{
  z-index:-4;
  background:
    radial-gradient(circle at 62% 20%,color-mix(in srgb,var(--scene-a),white 12%) 0 7%,transparent 34%),
    linear-gradient(150deg,var(--scene-a),var(--scene-b) 55%,var(--scene-c));
  filter:saturate(.95) contrast(1.04);
  transform:scale(1.015);
  transition:filter .28s ease,transform .28s ease,background .35s ease;
}
.vn-scene-bg:before,.vn-scene-bg:after{content:"";position:absolute;inset:0;pointer-events:none}
.vn-scene-bg:before{opacity:.34}
.vn-scene-bg:after{opacity:.22}
.vn-scene-light{
  z-index:-2;
  background:
    linear-gradient(180deg,#01050a91 0%,transparent 19%,transparent 55%,#02070c5d 74%,#010408df 100%),
    radial-gradient(ellipse at 50% 38%,transparent 0 38%,#0009 100%);
}

/* 2E — same-location background state variants.
   The base plate remains unchanged; time, weather and major-event lighting are
   independent runtime layers so one scene can combine e.g. night + rain + climax. */
.vn-scene-light:before,.vn-scene-light:after{
  content:"";position:absolute;inset:0;pointer-events:none;
}

/* Time-of-day axis */
.vn-fullscreen[data-bg-time="night"] .vn-scene-bg{
  filter:saturate(.9) contrast(1.08) brightness(.82);
}
.vn-fullscreen[data-bg-time="night"] .vn-scene-light{
  background:
    linear-gradient(180deg,#07182c99 0%,#07101a33 26%,transparent 52%,#0206118a 78%,#01040be8 100%),
    radial-gradient(ellipse at 52% 34%,#6f9fc314 0 18%,transparent 52%,#000a 100%);
}
.vn-fullscreen[data-bg-time="dawn"] .vn-scene-bg{
  filter:saturate(1.05) contrast(1.01) brightness(1.04);
}
.vn-fullscreen[data-bg-time="dawn"] .vn-scene-light{
  background:
    linear-gradient(180deg,#ffc8882e 0%,#ffd9a017 24%,transparent 54%,#25100732 100%),
    radial-gradient(circle at 18% 22%,#ffe4a84a 0 7%,transparent 30%),
    radial-gradient(ellipse at 50% 42%,transparent 0 52%,#1a0d064f 100%);
}
.vn-fullscreen[data-bg-time="dusk"] .vn-scene-bg{
  filter:saturate(1.09) contrast(1.03) brightness(.94);
}
.vn-fullscreen[data-bg-time="dusk"] .vn-scene-light{
  background:
    linear-gradient(180deg,#3b31553d 0%,#b76f5130 38%,transparent 62%,#08051092 100%),
    radial-gradient(circle at 80% 24%,#ffb36b40 0 5%,transparent 27%),
    radial-gradient(ellipse at 50% 48%,transparent 0 54%,#160b1d55 100%);
}

/* Weather axis */
.vn-fullscreen[data-bg-weather="rain"] .vn-scene-light:before{
  background:linear-gradient(180deg,#8fc8df0d,#06111a24);
  opacity:.72;
  animation:none;
  mix-blend-mode:screen;
}

/* Major-event axis */
.vn-fullscreen[data-bg-event="climax"] .vn-scene-light:after{
  background:
    radial-gradient(ellipse at 50% 16%,#dff5ff2f 0 12%,transparent 36%),
    radial-gradient(ellipse at 50% 48%,transparent 0 48%,#0007 100%);
  box-shadow:inset 0 0 110px #0008;
}
.vn-fullscreen[data-bg-event="victory"] .vn-scene-light:after{
  background:
    radial-gradient(circle at 22% 18%,#ffd9873f 0 3%,transparent 22%),
    radial-gradient(circle at 78% 22%,#fff1bb29 0 2%,transparent 18%),
    linear-gradient(180deg,#ffda8d12,transparent 44%,#5a310d24 100%);
}

/* Scene library: deliberately scene-like, no Zhangte/ending/romance image fallbacks. */
.vn-fullscreen[data-scene="bg_rehearsal_room_rain_night"]{--scene-a:#263447;--scene-b:#090f17;--scene-c:#291e31}
.vn-fullscreen[data-scene="bg_rehearsal_room_rain_night"] .vn-scene-bg:before{
  background:
    linear-gradient(90deg,transparent 0 12%,#d6e7f318 12.3% 13%,transparent 13.2% 86%,#d6e7f318 86.2% 87%,transparent 87.2%),
    repeating-linear-gradient(90deg,#0b1017 0 5%,#151d28 5% 5.7%,#0a1017 5.7% 11%),
    linear-gradient(0deg,#0a0d12 0 18%,transparent 18%);
}
.vn-fullscreen[data-scene="bg_rehearsal_room_rain_night"] .vn-scene-bg:after{
  background:radial-gradient(circle at 72% 67%,#dbb45455 0 1.2%,transparent 1.5%),radial-gradient(circle at 24% 65%,#dbb45433 0 1%,transparent 1.4%);
}
.vn-fullscreen[data-scene="bg_lab_night"]{--scene-a:#153c48;--scene-b:#071118;--scene-c:#132a31}
.vn-fullscreen[data-scene="bg_lab_night"] .vn-scene-bg:before{
  background:repeating-linear-gradient(90deg,transparent 0 9%,#a4eff520 9.2% 9.5%,transparent 9.7% 18%),linear-gradient(0deg,#c7ffff12 0 3%,transparent 3% 58%,#bff7ff0b 58% 60%,transparent 60%);
}
.vn-fullscreen[data-scene="bg_rooftop_night"]{--scene-a:#17233c;--scene-b:#050813;--scene-c:#171724}
.vn-fullscreen[data-scene="bg_rooftop_night"] .vn-scene-bg:before{background:radial-gradient(circle at 77% 17%,#f7edc480 0 3%,transparent 3.3%),linear-gradient(0deg,#02050ab8 0 23%,transparent 23%),repeating-linear-gradient(90deg,transparent 0 12%,#d7e3ec12 12.2% 12.6%,transparent 12.8% 24%)}
.vn-fullscreen[data-scene="bg_rooftop_night"] .vn-scene-bg{background:linear-gradient(180deg,#06101b22,#02050952),url("/vn/backgrounds/rooftop-night.webp") center / cover no-repeat}
.vn-fullscreen[data-scene="bg_rooftop_night"] .vn-scene-bg:before{background:none}
.vn-fullscreen[data-scene="bg_lab_blackout"] .vn-scene-bg{background:linear-gradient(180deg,#050b1422,#02050859),url("/vn/backgrounds/lab-blackout.webp") center / cover no-repeat}
.vn-fullscreen[data-scene="bg_kitchen_dawn"]{--scene-a:#64452e;--scene-b:#17100c;--scene-c:#3b2719}
.vn-fullscreen[data-scene="bg_kitchen_dawn"] .vn-scene-bg:before{background:linear-gradient(90deg,#e5b87913 0 20%,transparent 20% 75%,#ffd98a19 75%),linear-gradient(0deg,#120b08 0 24%,transparent 24%)}
.vn-fullscreen[data-scene="bg_cram_school_day"]{--scene-a:#42505a;--scene-b:#15191d;--scene-c:#2a3339}
.vn-fullscreen[data-scene="bg_cram_school_day"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#eaf4f311 0 15%,#0f171c22 15.3% 15.8%,#f3fbfa0e 16% 31%),linear-gradient(0deg,#0c1215 0 23%,transparent 23%)}
.vn-fullscreen[data-scene="bg_tire_shop_evening"],.vn-fullscreen[data-scene="bg_garage_workshop"]{--scene-a:#37434a;--scene-b:#0d1215;--scene-c:#2d2119}
.vn-fullscreen[data-scene="bg_tire_shop_evening"] .vn-scene-bg:before,.vn-fullscreen[data-scene="bg_garage_workshop"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#0e1519 0 9%,#7aa1aa19 9.2% 9.6%,#121c21 9.8% 19%),linear-gradient(0deg,#080b0d 0 19%,transparent 19%)}
.vn-fullscreen[data-scene="bg_highschool_classroom"]{--scene-a:#5b6e6e;--scene-b:#192021;--scene-c:#3d4b48}
.vn-fullscreen[data-scene="bg_highschool_classroom"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#b8e3e21f 0 17%,#15202133 17.3% 18%,#badbd817 18.2% 35%),linear-gradient(0deg,#101819 0 24%,transparent 24%)}
.vn-fullscreen[data-scene="bg_track_night"],.vn-fullscreen[data-scene="bg_empty_track_moonlight"]{--scene-a:#203c53;--scene-b:#050a0f;--scene-c:#18242a}
.vn-fullscreen[data-scene="bg_track_night"] .vn-scene-bg:before,.vn-fullscreen[data-scene="bg_empty_track_moonlight"] .vn-scene-bg:before{background:linear-gradient(164deg,transparent 0 55%,#dce8ef22 55.4% 56.4%,#12191d 56.7% 62%,#f5f1db1e 62.3% 63%,transparent 63.2%),radial-gradient(circle at 74% 16%,#f8edbf55 0 3.2%,transparent 3.6%)}
.vn-fullscreen[data-scene="bg_world_race"],.vn-fullscreen[data-scene="bg_world_final_last_lap"]{--scene-a:#244e62;--scene-b:#05090d;--scene-c:#442c1c}
.vn-fullscreen[data-scene="bg_world_race"] .vn-scene-bg:before,.vn-fullscreen[data-scene="bg_world_final_last_lap"] .vn-scene-bg:before{background:repeating-linear-gradient(104deg,transparent 0 8%,#effcff1c 8.2% 8.45%,transparent 8.7% 16%),linear-gradient(166deg,transparent 0 59%,#f6fbff2d 59.3% 60.2%,#11161a 60.5% 66%,#e0c05624 66.4% 67%,transparent 67.3%)}
.vn-fullscreen[data-scene="bg_monaco_street"]{--scene-a:#355b70;--scene-b:#091017;--scene-c:#5c3924}
.vn-fullscreen[data-scene="bg_monaco_street"] .vn-scene-bg:before{background:linear-gradient(166deg,transparent 0 54%,#f4e9d633 54.3% 55%,#15191d 55.4% 61%,#f5c85329 61.4% 62%,transparent 62.2%),repeating-linear-gradient(90deg,#f3ead016 0 4%,#11181e00 4.2% 10%)}
.vn-fullscreen[data-scene="bg_rain_night"]{--scene-a:#19364d;--scene-b:#050a10;--scene-c:#202a38}
.vn-fullscreen[data-scene="bg_rain_night"] .vn-scene-bg:before{background:none;animation:none}
.vn-fullscreen[data-scene="bg_hospital_corridor"]{--scene-a:#50696a;--scene-b:#141b1d;--scene-c:#324745}
.vn-fullscreen[data-scene="bg_hospital_corridor"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#dff7f026 0 18%,#0f17171f 18.2% 18.8%,#d8eeee20 19% 37%),linear-gradient(0deg,#111a1a 0 20%,transparent 20%)}
.vn-fullscreen[data-scene="bg_convenience_store_night"]{--scene-a:#3d5665;--scene-b:#0b1015;--scene-c:#41332a}
.vn-fullscreen[data-scene="bg_convenience_store_night"] .vn-scene-bg:before{background:linear-gradient(90deg,#d9f3ff25 8% 26%,transparent 26% 70%,#ffd28d22 70% 91%),linear-gradient(0deg,#0b1014 0 21%,transparent 21%)}
.vn-fullscreen[data-scene="bg_dorm_night"]{--scene-a:#34364a;--scene-b:#0a0b12;--scene-c:#262b34}
.vn-fullscreen[data-scene="bg_hotel_room"]{--scene-a:#594839;--scene-b:#16100d;--scene-c:#41372e}
.vn-fullscreen[data-scene="bg_generic_city_night"]{--scene-a:#20364b;--scene-b:#070b11;--scene-c:#242b35}
.vn-fullscreen[data-scene="bg_generic_city_night"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#d5eaff0c 0 8%,transparent 8.2% 15%),linear-gradient(0deg,#03060a 0 27%,transparent 27%)}

.vn-fs-top{
  position:absolute;z-index:30;top:18px;left:50%;transform:translateX(-50%);
  width:min(92vw,1500px);display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
  pointer-events:none;text-shadow:0 3px 20px #000;
}
.vn-fs-top>div:first-child{display:flex;flex-direction:column;min-width:0}
.vn-fs-top small{font:800 10px/1.2 var(--font-geist-mono,monospace);letter-spacing:.13em;color:#c2d3dc}
.vn-fs-top b{font-size:clamp(21px,2vw,32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70vw}
.vn-fs-actions{display:flex;gap:6px;pointer-events:auto}
.vn-tool{
  min-width:52px;padding:8px 10px;border:1px solid #d4ecf02d;border-radius:9px;
  color:#d9eaf0;background:#06111bcf;backdrop-filter:blur(12px);cursor:pointer;
  font:800 9px/1 var(--font-geist-mono,monospace);letter-spacing:.08em
}
.vn-tool:hover,.vn-tool:focus-visible{border-color:#93e4ff99;color:#fff;filter:brightness(1.15)}

.vn-character-layer{position:absolute;z-index:4;inset:68px 3vw 152px;pointer-events:none}
.vn-character{
  --char-accent:#9fb0bd;position:absolute;bottom:-3%;width:min(31vw,470px);height:89%;
  transform-origin:center bottom;transition:opacity .24s ease,filter .24s ease,transform .24s ease;
}
.vn-side-left{left:4%}.vn-side-right{right:4%}.vn-side-center{left:50%;transform:translateX(-50%)}
.vn-character-silhouette{position:absolute;inset:0;filter:drop-shadow(0 28px 30px #000b)}
.vn-character-sprite{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center bottom}
.vn-character-chroma{position:absolute;inset:0;background-position:center bottom;background-size:contain;background-repeat:no-repeat;filter:url("#vn-chroma-key")}
/* The viewBox excludes Zhongxin's unused side margins. The figure then uses
   the same proportional, bottom-aligned fit as the other portrait assets. */
.vn-character-chroma-crop{width:100%;height:100%}
.vn-character-expressive{position:absolute;left:50%;bottom:0;height:100%;width:auto;max-width:100%;aspect-ratio:2/3;transform:translateX(-50%);background-size:400% 400%;background-repeat:no-repeat;clip-path:inset(3px);filter:url("#vn-chroma-key")}
.vn-character[data-art="expressive-sprite"] .vn-character-silhouette,.vn-character[data-art="expressive-sprite"] .vn-character-face{display:none}
.vn-character[data-art="clean-sprite"] .vn-character-silhouette,.vn-character[data-art="clean-sprite"] .vn-character-face{display:none}
.vn-character[data-art="sprite"] .vn-character-silhouette,.vn-character[data-art="sprite"] .vn-character-face{display:none}
.vn-character-silhouette .vn-head{
  position:absolute;left:50%;top:4%;width:30%;aspect-ratio:.84;border-radius:46% 46% 44% 44%;transform:translateX(-50%);
  background:linear-gradient(145deg,color-mix(in srgb,var(--char-accent),#bcd7e1 25%),color-mix(in srgb,var(--char-accent),#14202b 72%));
  box-shadow:inset -18px -14px 28px #0003,inset 8px 9px 14px #fff1;
}
.vn-character-silhouette .vn-body{
  position:absolute;left:50%;top:28%;width:57%;height:70%;transform:translateX(-50%);
  border-radius:37% 37% 14% 14%/18% 18% 6% 6%;
  background:linear-gradient(110deg,color-mix(in srgb,var(--char-accent),#17212b 63%),color-mix(in srgb,var(--char-accent),#071019 82%));
  box-shadow:inset -28px 0 44px #0004,inset 15px 0 26px #fff08;
  clip-path:polygon(21% 0,79% 0,91% 23%,84% 100%,16% 100%,9% 23%);
}
.vn-character-silhouette .vn-arm{position:absolute;top:35%;width:15%;height:53%;border-radius:50%;background:color-mix(in srgb,var(--char-accent),#0c1620 75%)}
.vn-arm-a{left:16%;transform:rotate(5deg)}.vn-arm-b{right:16%;transform:rotate(-5deg)}
.vn-pose-line{position:absolute;left:50%;top:34%;height:51%;width:2px;background:#fff0;transform-origin:top}
.vn-character[data-pose*="arms_crossed"] .vn-arm-a{left:34%;height:38%;transform:rotate(-48deg)}
.vn-character[data-pose*="arms_crossed"] .vn-arm-b{right:34%;height:38%;transform:rotate(48deg)}
.vn-character[data-pose*="lean_in"]{transform:translateY(1%) rotate(-1deg) scale(1.02)}
.vn-side-left[data-pose*="lean_in"]{transform:translateX(2%) rotate(1deg) scale(1.02)}
.vn-character[data-pose*="look_away"] .vn-head{transform:translateX(-58%) rotate(-5deg)}
.vn-character[data-pose*="scene_rehearsal"] .vn-arm-a{transform:rotate(-18deg)}
.vn-character[data-pose*="scene_lab"] .vn-arm-b{right:29%;height:38%;transform:rotate(35deg)}
.vn-character[data-pose*="scene_grid"]{width:min(33vw,500px)}
.vn-character[data-pose*="scene_study"] .vn-body{filter:saturate(.78)}
.vn-character-face{
  position:absolute;top:19%;left:50%;transform:translateX(-50%);max-width:62%;
  padding:5px 9px;border:1px solid color-mix(in srgb,var(--char-accent),white 30%);border-radius:999px;
  color:#eefaffb8;background:#06101abb;font:800 9px/1 var(--font-geist-mono,monospace);letter-spacing:.04em;
}
.vn-character-label{
  position:absolute;left:50%;bottom:2%;transform:translateX(-50%);padding:7px 11px;border-radius:999px;
  color:#fff;background:#050b10d9;border:1px solid color-mix(in srgb,var(--char-accent),white 35%);
  box-shadow:0 8px 26px #0009;font:900 10px/1 var(--font-geist-mono,monospace);letter-spacing:.08em;white-space:nowrap
}
.vn-dim-character{opacity:.44;filter:brightness(.58) saturate(.58);transform:scale(.965)}
.vn-hidden-character{opacity:0!important;transform:translateY(8%) scale(.95)!important}
.vn-side-center.vn-dim-character{transform:translateX(-50%) scale(.965)}
.vn-side-center.vn-hidden-character{transform:translateX(-50%) translateY(8%) scale(.95)!important}
.vn-character[data-staged="1"]{left:var(--vn-stage-x)!important;right:auto!important;transform:translateX(-50%)}
.vn-character[data-staged="1"].vn-dim-character{transform:translateX(-50%) scale(.965)}
.vn-character[data-staged="1"].vn-hidden-character{transform:translateX(-50%) translateY(8%) scale(.95)!important}
.vn-character-layer[data-cast-count="3"] .vn-character{width:min(28vw,420px)}
.vn-character-layer[data-cast-count="4"] .vn-character{width:min(23vw,350px)}

.vn-dialogue-shell{
  position:absolute;z-index:20;left:50%;bottom:24px;transform:translateX(-50%);width:min(88vw,1420px);min-height:144px;
  padding:28px 64px 24px 28px;border:1px solid #d9edf236;border-radius:18px;
  background:linear-gradient(180deg,#0a1926ee,#06121ced);box-shadow:var(--vn-shadow);backdrop-filter:blur(18px) saturate(1.08);
  transition:opacity .2s ease,transform .2s ease;
}
.vn-dialogue-name{
  position:absolute;top:-18px;left:20px;display:flex;align-items:center;gap:10px;max-width:82%;padding:8px 14px;
  border:1px solid #b7e7f14a;border-radius:11px;background:#07131bf6;box-shadow:0 9px 25px #0008
}
.vn-dialogue-name b{font-size:14px}.vn-dialogue-name small{color:#8eacbc;font:800 9px/1 var(--font-geist-mono,monospace);letter-spacing:.1em}
.vn-dialogue-text{margin:0!important;min-height:72px;color:#f4fbff!important;font-size:clamp(17px,1.45vw,21px)!important;line-height:1.8!important;letter-spacing:.015em;text-shadow:0 2px 12px #000a;white-space:pre-wrap}
.vn-dialogue-next{position:absolute;right:18px;bottom:15px;width:34px;height:34px;border:0;border-radius:999px;color:#e0f8ff;background:#72dcff21;cursor:pointer;animation:vn-bob 1s ease-in-out infinite alternate}
@keyframes vn-bob{to{transform:translateY(4px)}}
.vn-hidden-dialogue{opacity:0;pointer-events:none;transform:translate(-50%,14px)}

.vn-drawer-tab{
  position:absolute;z-index:35;top:50%;transform:translateY(-50%);padding:14px 8px;border:1px solid #bfe5ef35;
  color:#dbeff6;background:#06111bd9;backdrop-filter:blur(14px);cursor:pointer;writing-mode:vertical-rl;
  font:800 10px/1 var(--font-geist-mono,monospace);letter-spacing:.12em
}
.vn-drawer-tab-left{left:0;border-left:0;border-radius:0 10px 10px 0}.vn-drawer-tab-right{right:0;border-right:0;border-radius:10px 0 0 10px}
.vn-drawer{
  position:absolute;z-index:50;top:0;bottom:0;width:min(360px,88vw);padding:62px 22px 24px;
  background:#071018f4;border-color:#d0eaf12c;box-shadow:0 0 60px #000b;backdrop-filter:blur(22px);
  transition:transform .24s ease;overflow:auto
}
.vn-drawer-left{left:0;border-right:1px solid var(--vn-line);transform:translateX(-105%)}
.vn-drawer-right{right:0;border-left:1px solid var(--vn-line);transform:translateX(105%)}
.vn-drawer.open{transform:none}
.vn-drawer-close{position:absolute;top:16px;right:16px;width:34px;height:34px;border:1px solid #fff2;border-radius:50%;background:#fff08;color:#fff;font-size:20px;cursor:pointer}
.vn-drawer-content{user-select:text}.vn-drawer-content .stats-panel,.vn-drawer-content .right-panel{display:block!important;position:static!important;transform:none!important;width:auto!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:0!important;background:transparent!important;box-shadow:none!important;pointer-events:auto!important}

.vn-backlog{
  position:absolute;z-index:80;inset:56px max(18px,5vw) 24px;display:flex;flex-direction:column;opacity:0;pointer-events:none;transform:translateY(10px);
  border:1px solid #bce8f037;border-radius:18px;background:#040a10f7;box-shadow:var(--vn-shadow);backdrop-filter:blur(25px);transition:.18s ease
}
.vn-log-open .vn-backlog{opacity:1;pointer-events:auto;transform:none}
.vn-backlog header{display:flex;justify-content:space-between;align-items:center;padding:14px 17px;border-bottom:1px solid #fff1}.vn-backlog header b{font:900 11px/1 var(--font-geist-mono,monospace);letter-spacing:.15em;color:#9de2f8}.vn-backlog header button{border:0;background:transparent;color:#fff;font-size:24px;cursor:pointer}
.vn-backlog>div{overflow:auto;padding:8px 18px 20px;user-select:text}.vn-backlog p{display:grid;grid-template-columns:110px 1fr;gap:14px;margin:0!important;padding:12px 0;border-bottom:1px solid #ffffff0c}.vn-backlog p b{color:#99e2fb;font-size:12px}.vn-backlog p span{color:#d6e4eb;line-height:1.65}

/* Choice = time pause. */
.vn-fullscreen.vn-paused .vn-scene-bg{filter:grayscale(.82) saturate(.28) brightness(.58) contrast(.96);transform:scale(1.025)}
.vn-fullscreen.vn-paused .vn-character-layer{filter:grayscale(.8) saturate(.25) brightness(.62)}
.vn-fullscreen.vn-paused .vn-dialogue-shell,.vn-fullscreen.vn-paused .vn-fs-actions,.vn-fullscreen.vn-paused .vn-drawer-tab{opacity:.12;pointer-events:none}
.vn-choice-layer{
  position:absolute;z-index:70;inset:0;display:grid;grid-template-columns:minmax(190px,1fr) minmax(420px,2.35fr) minmax(190px,1fr);align-items:center;gap:clamp(12px,2vw,28px);padding:clamp(72px,8vh,110px) clamp(18px,3vw,54px) 48px;
  background:#828b8e20;backdrop-filter:blur(2.5px)
}
.vn-choice-layer[aria-hidden="true"]{display:none}
.vn-choice-window{
  box-sizing:border-box;min-width:0;max-height:min(72vh,680px);overflow:auto;padding:18px;border:1px solid #dcecf03d;border-radius:17px;
  background:#08121be8;box-shadow:0 22px 60px #000b, inset 0 1px #fff08;backdrop-filter:blur(17px);user-select:text
}
.vn-choice-window header{border-bottom:1px solid #fff1;padding-bottom:11px;margin-bottom:12px;color:#cfe2e9;font:800 11px/1.3 var(--font-geist-mono,monospace);letter-spacing:.09em}
.vn-choice-window-center{align-self:center;padding:22px;background:#07111bea}.vn-choice-window-center header{display:flex;flex-direction:column;gap:7px}.vn-choice-window-center header small{color:#ffdb8b;font-size:9px}.vn-choice-window-center header b{font:800 clamp(16px,1.5vw,21px)/1.5 var(--font-geist-sans,sans-serif);letter-spacing:0;color:#f4fbff}
.vn-choice-buttons{display:grid;gap:10px}.vn-choice-button{text-align:left;padding:15px 16px;border:1px solid #a9cbd638;border-radius:12px;color:#edf9fd;background:#0b1a25;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease,filter .15s ease}.vn-choice-button b{display:block;font-size:15px}.vn-choice-button small{display:block;margin-top:6px;color:#9fb3bd;line-height:1.5}.vn-choice-button:hover,.vn-choice-button:focus-visible{transform:translateY(-2px);border-color:#8ee4ff;background:#102534;filter:brightness(1.1);outline:none}
.vn-mini-stat{padding:7px 0;border-bottom:1px solid #fff0f;color:#d4e1e7;font-size:12px}.vn-choice-window-right small,.vn-choice-window-right b{display:block}.vn-choice-window-right small{color:#87dff9;font:800 9px/1 var(--font-geist-mono,monospace);letter-spacing:.12em}.vn-choice-window-right b{margin:7px 0 10px;font-size:17px}.vn-choice-window-right p{color:#aebdc4;font-size:12px;line-height:1.6}

.vn-result-layer{position:absolute;z-index:75;inset:0;display:grid;place-items:center;padding:40px;background:#02070bb8;backdrop-filter:blur(7px)}
.vn-result-layer[aria-hidden="true"]{display:none}.vn-result-box{box-sizing:border-box;width:min(680px,92vw);max-height:82vh;overflow:auto;padding:28px;border:1px solid #cae8f13b;border-radius:19px;background:#07121cf2;box-shadow:var(--vn-shadow);user-select:text}.vn-result-box>small{color:#8edff8;font:900 10px/1 var(--font-geist-mono,monospace);letter-spacing:.14em}.vn-result-box h2{font-size:clamp(25px,3vw,38px);margin:12px 0}.vn-result-box p{color:#cbd9df;line-height:1.75}.vn-result-deltas{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0}.vn-result-deltas span{padding:7px 9px;border:1px solid #b9d7e12c;border-radius:8px;background:#0d1d29;color:#d8e6eb;font-size:12px}.vn-result-next{width:100%;padding:13px;border:1px solid #8bdfff69;border-radius:10px;color:#eefbff;background:#102937;cursor:pointer;font-weight:800}

.vn-ui-hidden .vn-fs-top,.vn-ui-hidden .vn-dialogue-shell,.vn-ui-hidden .vn-drawer-tab{opacity:0;pointer-events:none}.vn-ui-hidden:after{content:"點一下恢復介面";position:absolute;right:18px;bottom:14px;color:#fff6;font:800 9px/1 var(--font-geist-mono,monospace);letter-spacing:.08em}

@media (max-width:900px){
  .vn-character{width:min(44vw,430px)}.vn-side-left{left:-1%}.vn-side-right{right:-1%}
  .vn-dialogue-shell{width:94vw;bottom:14px;min-height:155px;padding:28px 48px 20px 20px}
  .vn-choice-layer{grid-template-columns:1fr minmax(0,2.4fr) 1fr;padding-inline:14px;gap:10px}.vn-choice-window{padding:13px}
}
@media (max-width:700px){
  .vn-fs-top{top:10px;width:94vw}.vn-fs-top b{font-size:20px;max-width:76vw}.vn-fs-actions{position:absolute;top:43px;right:0}.vn-tool{min-width:43px;padding:7px 6px}
  .vn-character-layer{inset:78px 0 182px}.vn-character{width:69vw;height:88%}.vn-side-left{left:-26%}.vn-side-right{right:-26%}.vn-side-center{width:72vw}
  .vn-character-layer[data-cast-count="3"] .vn-character{width:56vw}
  .vn-character-layer[data-cast-count="4"] .vn-character{width:46vw}
  .vn-dialogue-shell{width:96vw;bottom:8px;min-height:170px;padding:28px 42px 18px 16px;border-radius:14px}.vn-dialogue-text{font-size:16px!important;line-height:1.72!important}.vn-dialogue-name{left:13px;max-width:87%}
  .vn-drawer{width:88vw}.vn-drawer-tab{top:43%}
  .vn-choice-layer{display:flex;flex-direction:column;justify-content:flex-start;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:74px 9px 18px}.vn-choice-window{width:min(96vw,620px);max-height:none;flex:none}.vn-choice-window-left,.vn-choice-window-right{order:2;max-height:135px}.vn-choice-window-center{order:1}.vn-choice-window-right{order:3}.vn-choice-buttons{gap:8px}.vn-choice-button{padding:13px}
  .vn-backlog{inset:54px 7px 8px}.vn-backlog p{grid-template-columns:72px 1fr;gap:8px}
}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.vn-fullscreen *{animation:none!important;transition:none!important}.vn-scene-bg{transform:none!important}}


/* v2.1 character differentiation: every named speaker gets a deterministic VN paper-doll,
   with hair/face/outfit silhouettes and expression/pose deltas instead of recycled ending CGs. */
.vn-character-silhouette .vn-hair-back{
  position:absolute;left:50%;top:1%;width:39%;height:42%;transform:translateX(-50%);
  border-radius:50% 50% 42% 42%;background:color-mix(in srgb,var(--char-accent),#05080c 68%);
  box-shadow:inset -14px -10px 20px #0005,0 10px 26px #0005
}
.vn-character-silhouette .vn-neck{
  position:absolute;left:50%;top:25%;width:10%;height:12%;transform:translateX(-50%);
  border-radius:0 0 42% 42%;background:color-mix(in srgb,var(--char-accent),#d9b8a2 72%)
}
.vn-character-silhouette .vn-head{overflow:visible}
.vn-character-silhouette .vn-hair-front{
  position:absolute;left:-5%;top:-9%;width:110%;height:43%;border-radius:48% 48% 30% 30%;
  background:linear-gradient(160deg,color-mix(in srgb,var(--char-accent),#10141b 54%),color-mix(in srgb,var(--char-accent),#020408 76%));
  clip-path:polygon(0 0,100% 0,95% 58%,82% 45%,74% 68%,62% 49%,52% 72%,42% 50%,31% 69%,20% 46%,8% 62%)
}
.vn-eye{
  position:absolute;top:55%;width:14%;height:5%;border-radius:50%;background:#e9fbff;
  box-shadow:0 0 0 2px #071019aa, inset 0 -2px #6fc8dc55
}
.vn-eye-l{left:24%}.vn-eye-r{right:24%}
.vn-mouth{
  position:absolute;left:50%;top:73%;width:13%;height:4%;transform:translateX(-50%);
  border-bottom:2px solid #2b1416;border-radius:0 0 50% 50%
}
.vn-character[data-expression="happy"] .vn-eye,.vn-character[data-expression="smile"] .vn-eye,.vn-character[data-expression="laugh"] .vn-eye{height:3%;border-top:2px solid #e9fbff;background:transparent;box-shadow:none}
.vn-character[data-expression="happy"] .vn-mouth,.vn-character[data-expression="laugh"] .vn-mouth{height:8%;border:2px solid #2b1416;border-top:0;background:#7c3441aa}
.vn-character[data-expression="shy"] .vn-head,.vn-character[data-expression="embarrassed"] .vn-head,.vn-character[data-expression="intimate_soft"] .vn-head{box-shadow:inset -18px -14px 28px #0003,inset 8px 9px 14px #fff1,0 0 28px #ff9fb526}
.vn-character[data-expression="shy"] .vn-mouth,.vn-character[data-expression="embarrassed"] .vn-mouth{width:8%;border-radius:50%}
.vn-character[data-expression="annoyed"] .vn-eye-l,.vn-character[data-expression="angry"] .vn-eye-l{transform:rotate(10deg)}
.vn-character[data-expression="annoyed"] .vn-eye-r,.vn-character[data-expression="angry"] .vn-eye-r{transform:rotate(-10deg)}
.vn-character[data-expression="sad"] .vn-eye-l,.vn-character[data-expression="disappointed"] .vn-eye-l,.vn-character[data-expression="hurt_silent"] .vn-eye-l{transform:rotate(-8deg)}
.vn-character[data-expression="sad"] .vn-eye-r,.vn-character[data-expression="disappointed"] .vn-eye-r,.vn-character[data-expression="hurt_silent"] .vn-eye-r{transform:rotate(8deg)}
.vn-character[data-expression="sad"] .vn-mouth,.vn-character[data-expression="disappointed"] .vn-mouth,.vn-character[data-expression="hurt_silent"] .vn-mouth{top:76%;transform:translateX(-50%) rotate(180deg)}
.vn-character[data-expression="surprised"] .vn-eye{height:9%;border-radius:50%}.vn-character[data-expression="surprised"] .vn-mouth{width:7%;height:7%;border:2px solid #2b1416;border-radius:50%}
.vn-character[data-expression="serious"] .vn-eye{height:4%;border-radius:20%}
.vn-character[data-expression="relieved"] .vn-eye{height:3%;border-top:2px solid #e9fbff;background:transparent;box-shadow:none}

.vn-shape-bright .vn-hair-back{width:48%;height:58%;border-radius:48% 48% 24% 24%}
.vn-shape-sharp .vn-hair-back{width:46%;height:68%;border-radius:48% 48% 18% 18%}
.vn-shape-soft .vn-hair-back{width:40%;height:45%;border-radius:46% 46% 38% 38%}
.vn-shape-lab .vn-body{background:linear-gradient(110deg,#d8e5e8cc,#667781cc 54%,#172530)}
.vn-shape-warm .vn-body{background:linear-gradient(110deg,color-mix(in srgb,var(--char-accent),#6f513c 56%),color-mix(in srgb,var(--char-accent),#17100b 82%))}
.vn-shape-driver .vn-body{background:linear-gradient(110deg,color-mix(in srgb,var(--char-accent),#182632 62%),#091018 82%);clip-path:polygon(17% 0,83% 0,94% 22%,86% 100%,14% 100%,6% 22%)}
.vn-shape-student .vn-body{background:linear-gradient(110deg,color-mix(in srgb,var(--char-accent),#34465c 58%),#111927 82%)}
.vn-shape-formal .vn-body{background:linear-gradient(110deg,#50545bcc,#171a20 78%)}

/* Additional scene art used by the full 158-event generated VN pack. */
.vn-fullscreen[data-scene="bg_food_shop"]{--scene-a:#6b4930;--scene-b:#1b100a;--scene-c:#3b2618}
.vn-fullscreen[data-scene="bg_food_shop"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#ffdca517 0 15%,transparent 15.4% 31%),linear-gradient(0deg,#100a06 0 24%,transparent 24%)}
.vn-fullscreen[data-scene="bg_airport_terminal"]{--scene-a:#536a78;--scene-b:#11181e;--scene-c:#293844}
.vn-fullscreen[data-scene="bg_airport_terminal"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#dff5ff1e 0 17%,#16212822 17.3% 18%,#e7f7ff19 18.3% 35%),linear-gradient(0deg,#11191f 0 18%,transparent 18%)}
.vn-fullscreen[data-scene="bg_foreign_city"]{--scene-a:#3d5669;--scene-b:#0b1017;--scene-c:#513c31}
.vn-fullscreen[data-scene="bg_foreign_city"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#ffe2b913 0 8%,transparent 8.3% 16%),linear-gradient(0deg,#080d12 0 25%,transparent 25%)}
.vn-fullscreen[data-scene="bg_farmland"]{--scene-a:#5a6b45;--scene-b:#172012;--scene-c:#31432a}
.vn-fullscreen[data-scene="bg_farmland"] .vn-scene-bg:before{background:linear-gradient(0deg,#293d1f 0 27%,transparent 27%),repeating-linear-gradient(168deg,#b2c86a12 0 7%,transparent 7.3% 14%)}
.vn-fullscreen[data-scene="bg_truck_depot"]{--scene-a:#3b4950;--scene-b:#0b1013;--scene-c:#34261e}
.vn-fullscreen[data-scene="bg_truck_depot"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#0e1519 0 13%,#9cbac51b 13.3% 13.7%,#111a1f 14% 27%),linear-gradient(0deg,#090d0f 0 21%,transparent 21%)}
.vn-fullscreen[data-scene="bg_civic_stage"]{--scene-a:#4d3b51;--scene-b:#100b14;--scene-c:#2e2738}
.vn-fullscreen[data-scene="bg_civic_stage"] .vn-scene-bg:before{background:radial-gradient(circle at 50% 22%,#f3d8a62a 0 7%,transparent 28%),repeating-linear-gradient(90deg,#e9e3df10 0 12%,transparent 12.4% 24%)}
.vn-fullscreen[data-scene="bg_office_boardroom"]{--scene-a:#46515a;--scene-b:#101519;--scene-c:#2b3035}
.vn-fullscreen[data-scene="bg_office_boardroom"] .vn-scene-bg:before{background:linear-gradient(90deg,#d8ebf515 5% 31%,transparent 31% 69%,#d8ebf510 69% 95%),linear-gradient(0deg,#111619 0 23%,transparent 23%)}
.vn-fullscreen[data-scene="bg_esports_room"]{--scene-a:#263f5c;--scene-b:#080b14;--scene-c:#3c2251}
.vn-fullscreen[data-scene="bg_esports_room"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#6bdcff16 0 9%,transparent 9.4% 18%),repeating-linear-gradient(0deg,#e36cff10 0 8%,transparent 8.4% 16%)}
.vn-fullscreen[data-scene="bg_fantasy_night"]{--scene-a:#39335a;--scene-b:#090812;--scene-c:#241b39}
.vn-fullscreen[data-scene="bg_fantasy_night"] .vn-scene-bg:before{background:radial-gradient(circle at 22% 20%,#d7c3ff26 0 2%,transparent 2.4%),radial-gradient(circle at 72% 32%,#f4de8c20 0 1.4%,transparent 1.8%),linear-gradient(0deg,#0b0912 0 24%,transparent 24%)}
.vn-fullscreen[data-scene="bg_community_garage"]{--scene-a:#5d5144;--scene-b:#18120e;--scene-c:#39443a}
.vn-fullscreen[data-scene="bg_community_garage"] .vn-scene-bg:before{background:linear-gradient(90deg,#e8d4af12 0 22%,transparent 22% 78%,#c8dfbd10 78%),linear-gradient(0deg,#0e0b08 0 22%,transparent 22%)}
.vn-fullscreen[data-scene="bg_seaside"]{--scene-a:#416f83;--scene-b:#10212a;--scene-c:#263a45}
.vn-fullscreen[data-scene="bg_seaside"] .vn-scene-bg:before{background:linear-gradient(0deg,#183746 0 34%,#9ed8e51c 34% 36%,transparent 36%),radial-gradient(circle at 76% 18%,#f5e3aa36 0 4%,transparent 4.4%)}
.vn-fullscreen[data-scene="bg_bus_night"]{--scene-a:#344756;--scene-b:#0a0f14;--scene-c:#322b29}
.vn-fullscreen[data-scene="bg_bus_night"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#dceef413 0 18%,#090f1422 18.3% 19%,transparent 19.3% 37%),linear-gradient(0deg,#070b0e 0 19%,transparent 19%)}
.vn-fullscreen[data-scene="bg_cinema"]{--scene-a:#382a42;--scene-b:#09070c;--scene-c:#221a28}
.vn-fullscreen[data-scene="bg_cinema"] .vn-scene-bg:before{background:radial-gradient(ellipse at 50% 12%,#dde6ff2c 0 12%,transparent 35%),repeating-linear-gradient(90deg,#7a4c6a16 0 8%,transparent 8.4% 16%)}
.vn-fullscreen[data-scene="bg_supermarket"]{--scene-a:#4f6064;--scene-b:#151b1c;--scene-c:#3a4545}
.vn-fullscreen[data-scene="bg_supermarket"] .vn-scene-bg:before{background:repeating-linear-gradient(90deg,#e7f4f011 0 10%,#1a242422 10.2% 10.8%,#f5f9ef0d 11% 21%),linear-gradient(0deg,#111818 0 20%,transparent 20%)}

/* Original VN environment plates. Gradients remain only for scenes awaiting art. */
.vn-fullscreen[data-scene="bg_world_race"] .vn-scene-bg,
.vn-fullscreen[data-scene="bg_world_final_last_lap"] .vn-scene-bg{background:linear-gradient(180deg,#02071326,#02071338),url("/vn/backgrounds/world-race.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_rehearsal_room_rain_night"] .vn-scene-bg{background:linear-gradient(180deg,#0207131a,#0207134d),url("/vn/backgrounds/rehearsal-rain.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_garage_workshop"] .vn-scene-bg,
.vn-fullscreen[data-scene="bg_tire_shop_evening"] .vn-scene-bg{background:linear-gradient(180deg,#02071316,#02071342),url("/vn/backgrounds/garage-workshop.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_rain_night"] .vn-scene-bg{background:linear-gradient(180deg,#02071316,#02071340),url("/vn/backgrounds/rain-road.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_food_shop"] .vn-scene-bg,
.vn-fullscreen[data-scene="bg_kitchen_dawn"] .vn-scene-bg{background:linear-gradient(180deg,#02071310,#0207133d),url("/vn/backgrounds/breakfast-dawn.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_cram_school_day"] .vn-scene-bg{background:linear-gradient(180deg,#02071316,#02071342),url("/vn/backgrounds/cram-school.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_track_night"] .vn-scene-bg,
.vn-fullscreen[data-scene="bg_empty_track_moonlight"] .vn-scene-bg{background:linear-gradient(180deg,#02071314,#02071339),url("/vn/backgrounds/riverside-track.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_generic_city_night"] .vn-scene-bg,.vn-fullscreen[data-scene="bg_bus_night"] .vn-scene-bg{background:linear-gradient(180deg,#02071316,#02071340),url("/vn/backgrounds/city-night.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_lab_night"] .vn-scene-bg{background:linear-gradient(180deg,#02071318,#02071340),url("/vn/backgrounds/lab-night.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_civic_stage"] .vn-scene-bg{background:linear-gradient(180deg,#02071316,#02071342),url("/vn/backgrounds/civic-stage.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_world_race"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_world_final_last_lap"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_rehearsal_room_rain_night"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_garage_workshop"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_tire_shop_evening"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_food_shop"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_kitchen_dawn"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_cram_school_day"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_track_night"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_empty_track_moonlight"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_generic_city_night"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_lab_night"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_civic_stage"] .vn-scene-bg:before{background:none}


/* 2B imported background plates */
.vn-fullscreen[data-scene="bg_airport_terminal"] .vn-scene-bg{background:linear-gradient(180deg,#02071314,#02071338),url("/vn/backgrounds/airport-terminal.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_hospital_corridor"] .vn-scene-bg{background:linear-gradient(180deg,#02071314,#0207133d),url("/vn/backgrounds/hospital-corridor.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_hotel_room"] .vn-scene-bg,.vn-fullscreen[data-scene="bg_dorm_night"] .vn-scene-bg{background:linear-gradient(180deg,#02071310,#02071334),url("/vn/backgrounds/hotel-room.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_airport_terminal"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_hospital_corridor"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_hotel_room"] .vn-scene-bg:before{background:none}


/* 2B complete base-background import */
.vn-fullscreen[data-scene="bg_airport_terminal"] .vn-scene-bg{background:linear-gradient(180deg,#02071314,#02071338),url("/vn/backgrounds/airport-terminal.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_community_garage"] .vn-scene-bg{background:linear-gradient(180deg,#02071314,#0207133b),url("/vn/backgrounds/community-garage.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_convenience_store_night"] .vn-scene-bg{background:linear-gradient(180deg,#02071316,#02071340),url("/vn/backgrounds/convenience-store-night.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_farmland"] .vn-scene-bg{background:linear-gradient(180deg,#02071310,#0207132f),url("/vn/backgrounds/farmland.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_highschool_classroom"] .vn-scene-bg{background:linear-gradient(180deg,#02071310,#02071335),url("/vn/backgrounds/highschool-classroom.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_hospital_corridor"] .vn-scene-bg{background:linear-gradient(180deg,#02071314,#0207133d),url("/vn/backgrounds/hospital-corridor.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_hotel_room"] .vn-scene-bg{background:linear-gradient(180deg,#02071310,#02071334),url("/vn/backgrounds/hotel-room.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_monaco_street"] .vn-scene-bg{background:linear-gradient(180deg,#02071310,#02071334),url("/vn/backgrounds/monaco-street.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_office_boardroom"] .vn-scene-bg{background:linear-gradient(180deg,#02071310,#02071336),url("/vn/backgrounds/office-boardroom.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_seaside"] .vn-scene-bg{background:linear-gradient(180deg,#02071310,#02071332),url("/vn/backgrounds/seaside.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_truck_depot"] .vn-scene-bg{background:linear-gradient(180deg,#02071314,#02071338),url("/vn/backgrounds/truck-depot.webp") center/cover no-repeat}
.vn-fullscreen[data-scene="bg_airport_terminal"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_community_garage"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_convenience_store_night"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_farmland"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_highschool_classroom"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_hospital_corridor"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_hotel_room"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_monaco_street"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_office_boardroom"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_seaside"] .vn-scene-bg:before,
.vn-fullscreen[data-scene="bg_truck_depot"] .vn-scene-bg:before{background:none}

/* 2C portrait-atlas cards for recurring and special named characters. */
.vn-character-atlas-card{
 position:absolute;left:50%;top:7%;height:62%;width:auto;max-width:78%;transform:translateX(-50%);
 border-radius:28px 28px 18px 18px;border:1px solid #ffffff24;
 box-shadow:0 28px 35px #000b,0 0 0 1px #0008 inset;
 background-color:#171c22;background-clip:padding-box;
 filter:drop-shadow(0 18px 22px #0008);
}
.vn-character[data-art="atlas-card"] .vn-character-silhouette,
.vn-character[data-art="atlas-card"] .vn-character-face{display:none}
.vn-character[data-art="atlas-card"] .vn-character-label{bottom:24%;background:#091018db;backdrop-filter:blur(7px)}
@media(max-width:720px){
 .vn-character-atlas-card{top:10%;width:76%;height:58%;border-radius:22px}
 .vn-character[data-art="atlas-card"] .vn-character-label{bottom:28%}
}


/* 2D pass 1: source-sheet-safe major rendering.
   Source expression tiles are complete busts, not detachable face layers. Showing both
   at once creates doubled shoulders/hair, so neutral shows the requested A/B/C pose
   and non-neutral dialogue cross-fades to the matching expression bust. */
.vn-major-atlas-pose,.vn-major-atlas-expression{
 position:absolute;left:50%;width:auto;transform:translateX(-50%);
 background-color:transparent;border:0;border-radius:0;box-shadow:none;
 mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent);
 overflow:hidden;
 transition:opacity .16s ease,filter .16s ease,transform .16s ease;
 pointer-events:none;
}
.vn-major-atlas-pose{
 bottom:1%;height:92%;max-width:100%;filter:url("#vn-major-atlas-key") drop-shadow(0 24px 24px #000a);
}
.vn-major-atlas-expression{
 bottom:3%;height:72%;max-width:94%;filter:url("#vn-major-atlas-key") drop-shadow(0 18px 18px #0009);
}
.vn-character[data-art="major-atlas"] .vn-character-silhouette,
.vn-character[data-art="major-atlas"] .vn-character-face{display:none}
.vn-character[data-art="major-atlas"] .vn-character-label{bottom:1.5%;background:#050b10e6}
.vn-character[data-art="major-atlas"][data-major-expression="neutral"] .vn-major-atlas-pose{opacity:1}
.vn-character[data-art="major-atlas"][data-major-expression="neutral"] .vn-major-atlas-expression{opacity:0}
.vn-character[data-art="major-atlas"]:not([data-major-expression="neutral"]) .vn-major-atlas-pose{opacity:0}
.vn-character[data-art="major-atlas"]:not([data-major-expression="neutral"]) .vn-major-atlas-expression{opacity:1}
.vn-character[data-art="major-atlas"][data-major-pose="pose-b"] .vn-major-atlas-pose{transform:translateX(-50%) scale(1.015)}
.vn-character[data-art="major-atlas"][data-major-pose="pose-c"] .vn-major-atlas-pose{transform:translateX(-50%) scale(1.03)}
.vn-character[data-art="major-atlas"][data-major-expression="angry"] .vn-major-atlas-expression,
.vn-character[data-art="major-atlas"][data-major-expression="serious"] .vn-major-atlas-expression{filter:url("#vn-major-atlas-key") drop-shadow(0 18px 20px #000b) contrast(1.04)}
.vn-character[data-art="major-atlas"][data-major-expression="blush_defensive"] .vn-major-atlas-expression{filter:url("#vn-major-atlas-key") drop-shadow(0 18px 18px #0009) saturate(1.08)}
.vn-character[data-art="major-atlas"][data-major-expression="intimate"] .vn-major-atlas-expression{filter:url("#vn-major-atlas-key") drop-shadow(0 18px 18px #0009) brightness(1.035)}

/* 2C-3 typed presentation cards for non-portrait production cast. */
.vn-cast-presentation{
 position:absolute;left:50%;top:12%;width:74%;height:66%;transform:translateX(-50%);
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
 border:1px solid color-mix(in srgb,var(--char-accent),white 28%);border-radius:26px;
 background:linear-gradient(145deg,#0a1520e8,#071019ee);box-shadow:0 24px 38px #000b,inset 0 1px #fff0d;
 overflow:hidden;backdrop-filter:blur(8px);
}
.vn-character[data-art="archetype"] .vn-character-silhouette,
.vn-character[data-art="archetype"] .vn-character-face,
.vn-character[data-art="ui"] .vn-character-silhouette,
.vn-character[data-art="ui"] .vn-character-face,
.vn-character[data-art="voice"] .vn-character-silhouette,
.vn-character[data-art="voice"] .vn-character-face,
.vn-character[data-art="prop"] .vn-character-silhouette,
.vn-character[data-art="prop"] .vn-character-face,
.vn-character[data-art="group"] .vn-character-silhouette,
.vn-character[data-art="group"] .vn-character-face{display:none}
.vn-character[data-art="archetype"] .vn-character-label,
.vn-character[data-art="ui"] .vn-character-label,
.vn-character[data-art="voice"] .vn-character-label,
.vn-character[data-art="prop"] .vn-character-label,
.vn-character[data-art="group"] .vn-character-label{bottom:17%;background:#050b10e8}
.vn-presentation-kicker,.vn-presentation-state{
 position:relative;z-index:2;color:#dff5fc;font:900 10px/1 var(--font-geist-mono,monospace);letter-spacing:.14em;text-transform:uppercase
}
.vn-presentation-state{color:#9fb7c3;font-size:8px;letter-spacing:.08em}
.vn-presentation-core{position:relative;width:66%;height:58%;display:flex;align-items:center;justify-content:center}
.vn-presentation-archetype .vn-presentation-core{width:52%}
.vn-archetype-head{position:absolute;top:3%;left:50%;width:37%;aspect-ratio:.82;transform:translateX(-50%);border-radius:48% 48% 44% 44%;background:linear-gradient(145deg,color-mix(in srgb,var(--char-accent),white 18%),color-mix(in srgb,var(--char-accent),#13202a 66%));box-shadow:inset -10px -8px 18px #0004}
.vn-archetype-body{position:absolute;left:50%;bottom:0;width:74%;height:58%;transform:translateX(-50%);clip-path:polygon(22% 0,78% 0,94% 28%,86% 100%,14% 100%,6% 28%);border-radius:30% 30% 12% 12%;background:linear-gradient(120deg,color-mix(in srgb,var(--char-accent),#1a2530 55%),#09121a)}
.vn-archetype-badge{position:absolute;right:9%;bottom:12%;width:18%;aspect-ratio:1;border:2px solid #dff6ff88;border-radius:50%;box-shadow:0 0 0 5px #09131bb8}
.vn-presentation-ui .vn-presentation-core{display:grid;align-content:center;gap:9px;padding:15px;border:1px solid #73dfff4d;border-radius:12px;background:#031019d9;box-shadow:inset 0 0 34px #4cd7ff0b}
.vn-presentation-ui .vn-ui-line{display:block;width:100%;height:6px;border-radius:8px;background:linear-gradient(90deg,#78dcffbb,#78dcff1a 72%,transparent)}
.vn-presentation-ui .vn-ui-line:nth-child(2){width:72%}.vn-presentation-ui .vn-ui-line:nth-child(3){width:86%}
.vn-presentation-ui .vn-presentation-core b{position:absolute;right:12px;bottom:10px;color:#83f4c5;font:900 8px/1 var(--font-geist-mono,monospace);letter-spacing:.12em}
.vn-presentation-voice .vn-presentation-core{gap:5px}
.vn-presentation-voice .vn-presentation-core i{display:block;width:7%;height:24%;border-radius:999px;background:color-mix(in srgb,var(--char-accent),#bcefff 38%);box-shadow:0 0 14px #8eeaff30}
.vn-presentation-voice .vn-presentation-core i:nth-child(2),.vn-presentation-voice .vn-presentation-core i:nth-child(6){height:48%}
.vn-presentation-voice .vn-presentation-core i:nth-child(3),.vn-presentation-voice .vn-presentation-core i:nth-child(5){height:72%}
.vn-presentation-voice .vn-presentation-core i:nth-child(4){height:92%}
.vn-presentation-prop .vn-presentation-core{filter:drop-shadow(0 0 22px color-mix(in srgb,var(--char-accent),transparent 55%))}
.vn-prop-orb{width:48%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 38% 31%,#fff8 0 6%,color-mix(in srgb,var(--char-accent),#e7c985 20%) 8% 30%,#28180b 72%);box-shadow:inset -16px -16px 26px #0007}
.vn-prop-ring{position:absolute;width:70%;height:24%;border:2px solid #f7d89b85;border-radius:50%;transform:rotate(-12deg)}
.vn-presentation-group .vn-presentation-core{gap:0}
.vn-presentation-group .vn-presentation-core i{position:absolute;width:29%;aspect-ratio:.86;border-radius:48% 48% 35% 35%;background:linear-gradient(160deg,color-mix(in srgb,var(--char-accent),white 14%),#101a22);box-shadow:0 12px 22px #0008}
.vn-presentation-group .vn-presentation-core i:nth-child(1){left:4%;bottom:14%;transform:scale(.8)}
.vn-presentation-group .vn-presentation-core i:nth-child(2){left:25%;bottom:2%;z-index:2}
.vn-presentation-group .vn-presentation-core i:nth-child(3){left:47%;bottom:12%;transform:scale(.86)}
.vn-presentation-group .vn-presentation-core i:nth-child(4){right:2%;bottom:22%;transform:scale(.66)}
.vn-presentation-group .vn-presentation-core i:nth-child(5){left:14%;bottom:37%;transform:scale(.58)}
.vn-cast-presentation[data-expression="angry"],.vn-cast-presentation[data-expression="serious"]{box-shadow:0 24px 38px #000c,inset 0 0 0 1px color-mix(in srgb,var(--char-accent),white 20%)}

@media(max-width:720px){
 .vn-character-atlas-card{top:9%;height:58%;width:auto;max-width:82%;border-radius:22px}
 .vn-major-atlas-pose{height:88%;width:auto;max-width:100%}
 .vn-major-atlas-expression{bottom:5%;height:70%;width:auto;max-width:96%}
 .vn-character[data-art="major-atlas"].vn-side-left,
 .vn-character[data-art="atlas-card"].vn-side-left{left:-18%}
 .vn-character[data-art="major-atlas"].vn-side-right,
 .vn-character[data-art="atlas-card"].vn-side-right{right:-18%}
 .vn-cast-presentation{top:15%;width:78%;height:60%;border-radius:20px}
 /* 2D mobile ensemble staging: keep 3/4-cast scenes inside the narrow viewport instead of
    letting full-height portrait crops collide or sit mostly off-screen. */
 .vn-character-layer[data-cast-count="3"] .vn-character{width:32vw;height:76%;bottom:3%}
 .vn-character-layer[data-cast-count="4"] .vn-character{width:22vw;height:72%;bottom:5%}
 .vn-character-layer[data-cast-count="3"] .vn-major-atlas-pose,
 .vn-character-layer[data-cast-count="3"] .vn-major-atlas-expression,
 .vn-character-layer[data-cast-count="3"] .vn-character-atlas-card,
 .vn-character-layer[data-cast-count="3"] .vn-cast-presentation,
 .vn-character-layer[data-cast-count="4"] .vn-major-atlas-pose,
 .vn-character-layer[data-cast-count="4"] .vn-major-atlas-expression,
 .vn-character-layer[data-cast-count="4"] .vn-character-atlas-card,
 .vn-character-layer[data-cast-count="4"] .vn-cast-presentation{
   width:100%;height:auto;max-width:100%;left:50%;transform:translateX(-50%);
 }
 .vn-character-layer[data-cast-count="3"] .vn-major-atlas-pose,
 .vn-character-layer[data-cast-count="4"] .vn-major-atlas-pose{bottom:1%}
 .vn-character-layer[data-cast-count="3"] .vn-major-atlas-expression,
 .vn-character-layer[data-cast-count="4"] .vn-major-atlas-expression{bottom:8%}
 .vn-character-layer[data-cast-count="3"] .vn-character-atlas-card,
 .vn-character-layer[data-cast-count="4"] .vn-character-atlas-card{top:16%}
 .vn-character-layer[data-cast-count="3"] .vn-cast-presentation,
 .vn-character-layer[data-cast-count="4"] .vn-cast-presentation{top:18%;aspect-ratio:.78}
 .vn-character-layer[data-cast-count="3"] .vn-character-label,
 .vn-character-layer[data-cast-count="4"] .vn-character-label{font-size:8px;padding:5px 7px;max-width:96%;overflow:hidden;text-overflow:ellipsis}
 .vn-character[data-art="archetype"] .vn-character-label,
 .vn-character[data-art="ui"] .vn-character-label,
 .vn-character[data-art="voice"] .vn-character-label,
 .vn-character[data-art="prop"] .vn-character-label,
 .vn-character[data-art="group"] .vn-character-label{bottom:22%}
}

/* Keep choice cards and result action inside narrow phone viewports. */
@media(max-width:720px){.vn-choice-window{box-sizing:border-box;max-width:100%}.vn-result-layer{padding:12px}.vn-result-box{box-sizing:border-box;width:min(100%,680px);min-width:0}.vn-result-next{box-sizing:border-box;min-height:44px}}
.vn-fullscreen[data-scene="bg_rehearsal_room_rain_night"] .vn-scene-light::before,
.vn-fullscreen[data-scene="bg_rehearsal_room_rain_night"] .vn-scene-bg::before {
 background:none!important;animation:none!important;transform:none!important;opacity:0!important;
}
.vn-character-unified {
 filter:none!important;clip-path:none!important;mask-image:none!important;
 background-repeat:no-repeat!important;box-shadow:none!important;
}
.vn-character-layer[data-cast-count="5"] .vn-character,
.vn-character-layer[data-cast-count="6"] .vn-character,
.vn-character-layer[data-cast-count="7"] .vn-character {
 width:min(17vw,270px);height:68%;bottom:5%;
}

/* Native cards and gallery share the v143 transparent character frames. */
.driver-cam img[src*="/vn/portraits/unified/"],.romance-reaction img[src*="/vn/portraits/unified/"],.collection-grid img[src*="/vn/portraits/unified/"],.ending-epilogue-portrait[src*="/vn/portraits/unified/"]{object-fit:contain;object-position:center bottom;filter:none;background:radial-gradient(ellipse at 50% 40%,#303345,#10131d 80%)}
.collection-modal img[src*="/vn/portraits/unified/"]{object-fit:contain;object-position:center;max-height:70dvh;background:#151823}
