@font-face{
  font-family:"UmePlus Gothic Web";
  src:url("assets/fonts/umeplus-gothic.ttf") format("truetype"),
      url("https://cdn.jsdelivr.net/gh/youxkei/dgs@master/example/font/umeplus-gothic.ttf") format("truetype"),
      local("UmePlus Gothic");
  font-weight:400;
  font-style:normal;
  font-display:block;
}
:root{
  --bg:#0b0b0d;--panel:#121216;--panel2:#17171c;--line:#2b2b33;--text:#f1f1f3;--muted:#9b9ba6;--soft:#686874;
  --accent:#d7d7dc;--stage-w:640;--stage-h:480;--dialogue-font-size:13px;
}
*{box-sizing:border-box} html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif}
button,input,select{font:inherit;color:inherit} button{cursor:pointer}
.app-shell{display:grid;grid-template-columns:310px minmax(0,1fr);min-height:100vh}
.sidebar{height:100vh;position:sticky;top:0;border-right:1px solid var(--line);background:#0e0e11;display:flex;flex-direction:column;min-width:0}
.brand{padding:24px 20px 14px}.brand h1{font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif;font-weight:500;font-size:24px;margin:5px 0 4px}.brand p{margin:0;color:var(--muted);font-size:13px}.eyebrow{letter-spacing:.16em;text-transform:uppercase;color:var(--soft);font-size:10px;font-weight:700}
.search-wrap{padding:0 14px 12px}.search-wrap input{width:100%;background:#16161b;border:1px solid var(--line);border-radius:9px;padding:10px 12px;outline:none}.search-wrap input:focus{border-color:#666672}
.scene-list{overflow:auto;padding:0 8px 12px;flex:1}.scene-item{width:100%;border:0;background:transparent;text-align:left;padding:10px 12px;border-radius:8px;color:var(--muted);display:block}.scene-item:hover{background:#17171c;color:var(--text)}.scene-item.active{background:#222228;color:#fff}.scene-item .name{font-weight:650;font-size:13px}.scene-item .coord{font-size:11px;color:var(--soft)}.scene-item .ce{font:11px "UmePlus Gothic Web","UmePlus Gothic",sans-serif;color:#7f7f8a;grid-row:1/3;grid-column:2;align-self:center}
.sidebar-footer{border-top:1px solid var(--line);padding:12px 18px 16px;font-size:12px;color:var(--muted)}.muted{color:var(--soft);margin-top:3px}
.main{min-width:0;padding:22px 26px 34px;max-width:1260px;width:100%;margin:0 auto}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.scene-title{font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif;font-size:29px}.scene-meta{font-size:12px;color:var(--muted);margin-top:5px}.status-row{display:flex;gap:8px;align-items:center}.pill{border:1px solid var(--line);border-radius:999px;padding:6px 10px;color:var(--muted);font-size:12px}.button,.icon-button,.play-button,.next-button{border:1px solid var(--line);background:#1a1a20;border-radius:8px}.button{padding:7px 11px}.button.ghost{background:transparent}.button:hover,.icon-button:hover,.play-button:hover,.next-button:hover{background:#25252c}
.player-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--panel)}
.stage{width:min(100%,calc(640px * 1.2));aspect-ratio:640/480;max-height:72vh;margin:20px auto;position:relative;overflow:hidden;background:#000;box-shadow:0 14px 50px rgba(0,0,0,.32)}
.picture-layer,.flash-layer,.fade-layer{position:absolute;inset:0}.picture-layer{z-index:100}.picture-layer img{position:absolute;max-width:none;user-select:none;pointer-events:none}.flash-layer{z-index:900;pointer-events:none;opacity:0}.fade-layer{z-index:925;background:#000;opacity:0;pointer-events:none;transition:opacity .45s linear}
.missing-notice{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;color:#666;pointer-events:none;text-align:center}.missing-notice .missing-icon{font-size:36px;color:#444}.missing-notice small{font-size:11px}.missing-notice code{color:#85858f}
.message-box{
  position:absolute;left:0;top:0;width:640px;height:120px;z-index:1000;
  transform-origin:top left;overflow:visible;cursor:pointer;user-select:none;
}
.hidden{display:none!important}
.message-main{position:absolute;inset:0;overflow:visible}
.message-backdrop,.message-contents{position:absolute;inset:0}
.message-backdrop{background-repeat:no-repeat;background-position:0 0;background-size:640px 120px;pointer-events:none}
.message-backdrop.rpg-window{background-image:url("assets/system/MessageWindow.webp")}
.message-backdrop.rpg-dim{
  background-image:linear-gradient(to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,.627) 12px,
    rgba(0,0,0,.627) 108px,
    rgba(0,0,0,0) 120px);
}
.message-backdrop.rpg-transparent{background-image:none}
.message-contents{overflow:hidden;pointer-events:none}

.name-window{
  position:absolute;left:116px;top:-16px;height:28px;min-width:34px;z-index:1015;
  display:flex;align-items:center;justify-content:center;white-space:nowrap;pointer-events:none;
  padding:0 8px;border:6px solid transparent;box-sizing:border-box;
  border-image-source:url("assets/system/WindowFrame.webp");border-image-slice:16;border-image-repeat:round;
  background-image:url("assets/system/WindowBack.webp");background-repeat:repeat;background-size:64px 64px;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.5));
  transform-origin:center center;
}
.name-text{
  font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif;
  font-size:16px;line-height:16px;font-weight:400;font-style:normal;color:#fff;text-align:center;
  font-synthesis:none;
  text-shadow:-1px -1px rgba(0,0,0,.5),0 -1px rgba(0,0,0,.5),1px -1px rgba(0,0,0,.5),-1px 0 rgba(0,0,0,.5),1px 0 rgba(0,0,0,.5),-1px 1px rgba(0,0,0,.5),0 1px rgba(0,0,0,.5),1px 1px rgba(0,0,0,.5);
}
.face-box{
  position:absolute;left:12px;top:12px;width:96px;height:96px;
  background-repeat:no-repeat;background-color:transparent;border:0;image-rendering:auto;
}
.message-text{
  position:absolute;left:12px;top:12px;right:12px;height:96px;overflow:hidden;
  color:#fff;font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif;
  font-size:var(--dialogue-font-size,13px);line-height:24px;font-weight:400;font-style:normal;letter-spacing:0;white-space:pre-wrap;
  font-synthesis:none;
  text-shadow:-1px -1px rgba(0,0,0,.5),0 -1px rgba(0,0,0,.5),1px -1px rgba(0,0,0,.5),-1px 0 rgba(0,0,0,.5),1px 0 rgba(0,0,0,.5),-1px 1px rgba(0,0,0,.5),0 1px rgba(0,0,0,.5),1px 1px rgba(0,0,0,.5);
}
.message-box.has-face .message-text{left:124px}
.message-text.placeholder{color:#c9c9c9;font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif;font-size:var(--dialogue-font-size,13px)}
.message-pause{
  position:absolute;width:16px;height:16px;left:312px;bottom:4px;
  background-image:url("assets/system/Window.webp");background-size:128px 128px;background-repeat:no-repeat;
  animation:rpg-pause-mark .8s steps(1,end) infinite;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.55));
}
@keyframes rpg-pause-mark{
  0%,24.99%{background-position:-96px -64px}
  25%,49.99%{background-position:-112px -64px}
  50%,74.99%{background-position:-96px -80px}
  75%,100%{background-position:-112px -80px}
}
.choice-box{
  position:absolute;z-index:1100;min-width:120px;padding:0;border:0;box-sizing:border-box;
  background-image:url("assets/system/WindowBack.webp");background-repeat:repeat;background-size:64px 64px;
  transform-origin:top left;overflow:hidden;user-select:none;
  font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif;font-size:var(--dialogue-font-size, 13px);line-height:24px;
  text-shadow:-1px -1px rgba(0,0,0,.5),0 -1px rgba(0,0,0,.5),1px -1px rgba(0,0,0,.5),-1px 0 rgba(0,0,0,.5),1px 0 rgba(0,0,0,.5),-1px 1px rgba(0,0,0,.5),0 1px rgba(0,0,0,.5),1px 1px rgba(0,0,0,.5);
}
.choice-box::before{
  content:"";position:absolute;inset:0;z-index:3;pointer-events:none;box-sizing:border-box;
  border:16px solid transparent;border-image-source:url("assets/system/WindowFrame.webp");
  border-image-slice:16;border-image-repeat:round;
}
.choice-options{position:absolute;left:12px;right:12px;top:12px;bottom:12px;z-index:2;overflow:hidden}
.choice-option{
  position:relative;display:block;width:100%;height:24px;line-height:24px;background:transparent;border:0;
  margin:0;padding:0 4px;text-align:left;color:#fff;white-space:nowrap;text-shadow:inherit;font:inherit;outline:none;
}
.choice-option:hover,.choice-option:focus,.choice-option.choice-current{background:transparent;outline:none}
.choice-option.choice-disabled,.choice-option:disabled{opacity:.627;cursor:default}
.choice-cursor{
  position:absolute;left:12px;right:12px;height:24px;z-index:1;box-sizing:border-box;pointer-events:none;
  border:2px solid transparent;border-image-source:url("assets/system/WindowCursor.webp");border-image-slice:2 fill;border-image-repeat:stretch;
  animation:rpg-choice-cursor-blink 533.333ms linear infinite;
}
@keyframes rpg-choice-cursor-blink{0%,100%{opacity:1}50%{opacity:.502}}
.transport{border-top:1px solid var(--line);padding:12px 14px;display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap}.transport-left,.transport-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.icon-button{width:34px;height:32px}.play-button{height:34px;min-width:94px;padding:0 14px}.check,.speed,.volume,.dialogue-size-control{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}.speed select{background:#17171c;border:1px solid var(--line);padding:4px;border-radius:6px}.volume input{width:100px}
.dialogue-size-control input[type="range"]{width:92px}.dialogue-size-number{width:48px;background:#17171c;border:1px solid var(--line);border-radius:6px;padding:4px 5px;text-align:right;color:var(--text)}.dialogue-size-number:focus{outline:none;border-color:#666672}.dialogue-size-unit{margin-left:-3px}.mini-button{height:27px;padding:0 8px;border:1px solid var(--line);background:#1a1a20;border-radius:6px;color:var(--muted);font-size:11px}.mini-button:hover{background:#25252c;color:var(--text)}
.info-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:14px;margin-top:14px}.info-card{border:1px solid var(--line);background:var(--panel);border-radius:12px;padding:14px;min-height:180px}.card-heading{font-size:12px;font-weight:700;color:#b9b9c0;margin-bottom:10px}.log{height:155px;overflow:auto;font:11px/1.55 "UmePlus Gothic Web","UmePlus Gothic",sans-serif;color:#8e8e99}.log-line{border-bottom:1px solid #1d1d23;padding:3px 0}.log-line.warn{color:#b8a78d}.deps{font-size:12px;color:var(--muted);line-height:1.7}.dep-row{display:flex;justify-content:space-between;border-bottom:1px solid #202026;padding:5px 0}.dep-row strong{color:#ddd}
.asset-dialog{width:min(760px,calc(100vw - 30px));max-height:80vh;border:1px solid var(--line);border-radius:14px;background:#121216;color:var(--text);padding:0}.asset-dialog::backdrop{background:rgba(0,0,0,.72)}.dialog-head{display:flex;justify-content:space-between;padding:18px 18px 12px;border-bottom:1px solid var(--line)}.dialog-head h2{margin:4px 0 0;font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif;font-weight:500}.asset-body{padding:14px 18px 20px;overflow:auto;max-height:65vh}.asset-group{margin-bottom:18px}.asset-group h3{font-size:12px;color:#aaa;margin:0 0 7px}.asset-list{font:11px/1.55 "UmePlus Gothic Web","UmePlus Gothic",sans-serif;color:#83838e;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:880px){.app-shell{grid-template-columns:1fr}.sidebar{height:auto;position:relative;border-right:0;border-bottom:1px solid var(--line)}.scene-list{max-height:240px}.main{padding:16px}.info-grid{grid-template-columns:1fr}.topbar{align-items:center}.stage{margin:12px auto}.transport{align-items:flex-start}}

.brain-noise{position:absolute;inset:0;z-index:950;pointer-events:none;overflow:hidden;background-image:url("assets/system/BrainNoise.webp");background-size:cover;mix-blend-mode:screen;opacity:.9;animation:brain-noise-jolt 83ms steps(5,end) both}
.brain-noise::before,.brain-noise::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(0deg,rgba(255,255,255,.18) 0 1px,transparent 1px 3px)}
@keyframes brain-noise-jolt{0%{transform:translateX(-3px) skewX(-1deg)}25%{transform:translateX(4px) skewX(1deg)}50%{transform:translateX(-2px)}75%{transform:translateX(3px)}100%{transform:none}}

.scene-num{display:inline-block;min-width:2.8em;margin-right:.45em;opacity:.52;font-variant-numeric:tabular-nums;font-size:.78em;vertical-align:.08em}

.scene-item .scene-num,.scene-item .coord,.scene-item .ce,.scene-meta,.status-row,.sidebar-footer,.search-wrap,.info-grid,.dialogue-size-control{display:none!important}

/* Large-player layout: keep the gallery chrome minimal so the 640x480 scene is the focus. */
@media (min-width:881px){
  html,body{height:100%;overflow:hidden}
  .app-shell{grid-template-columns:230px minmax(0,1fr);height:100vh;min-height:0}
  .sidebar{height:100vh}
  .brand{padding:10px 12px 8px}
  .brand h1{font-size:15px;line-height:1.15;margin:2px 0 0;white-space:nowrap}
  .eyebrow{font-size:9px;line-height:1.1}
  .scene-list{padding:0 5px 6px}
  .scene-item{padding:7px 9px;border-radius:6px}
  .scene-item .name{font-size:12px;line-height:1.2}

  .main{height:100vh;max-width:none;margin:0;padding:5px 7px 6px;display:flex;flex-direction:column;min-height:0}
  .topbar{flex:0 0 auto;margin:0 0 4px;min-height:22px;align-items:center}
  .scene-title{font-size:17px;line-height:22px}

  .player-card{flex:1 1 auto;min-height:0;border:0;border-radius:0;background:transparent;display:flex;flex-direction:column;overflow:hidden}
  .stage{
    flex:0 1 auto;
    width:100%;
    max-width:calc(133.333vh - 116px);
    max-height:none;
    margin:0 auto;
    box-shadow:0 8px 28px rgba(0,0,0,.28);
  }
  .transport{flex:0 0 auto;padding:5px 7px;margin-top:4px;min-height:38px;border-top:0;background:transparent;gap:8px}
  .icon-button{width:30px;height:28px}
  .play-button{height:30px;min-width:72px;padding:0 10px}
  .transport-left,.transport-right{gap:6px}
  .check,.speed,.volume{font-size:11px}
  .volume input{width:88px}
}

@media(max-width:880px){
  .brand{padding:10px 12px 7px}
  .brand h1{font-size:15px;line-height:1.15;margin:2px 0 0}
  .eyebrow{font-size:9px}
  .main{padding:6px}
  .topbar{margin-bottom:5px}
  .scene-title{font-size:17px}
  .stage{margin:0 auto;max-height:none}
  .transport{padding:6px 7px}
}

.player-name-input{width:86px;height:30px;box-sizing:border-box;padding:4px 8px;border:1px solid var(--line);border-radius:6px;background:#17171c;color:inherit;font:12px "UmePlus Gothic Web","UmePlus Gothic",sans-serif;outline:none}.player-name-input:focus{border-color:rgba(255,255,255,.38);background:#1c1c22}


.fullscreen-button{height:30px;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:#17171c;color:inherit;font:11px "UmePlus Gothic Web","UmePlus Gothic",sans-serif;cursor:pointer;white-space:nowrap}
.fullscreen-button:hover{background:#25252c}
.player-card:fullscreen,.player-card:-webkit-full-screen{width:100vw;height:100vh;max-width:none;max-height:none;margin:0;padding:6px;box-sizing:border-box;background:#000;display:flex;flex-direction:column}
.player-card:fullscreen .stage,.player-card:-webkit-full-screen .stage{flex:1 1 auto;width:auto;height:auto;max-width:calc((100vh - 54px) * 4 / 3);max-height:calc(100vh - 54px);aspect-ratio:4/3;margin:0 auto}
.player-card:fullscreen .transport,.player-card:-webkit-full-screen .transport{flex:0 0 auto;width:min(100%,calc((100vh - 54px) * 4 / 3));margin:4px auto 0;box-sizing:border-box;background:rgba(0,0,0,.82)}


/* Automatic scene fullscreen + one-inch left-edge gallery reveal. */
body.cinema-mode{
  margin:0!important;
  width:100vw!important;
  height:100vh!important;
  overflow:hidden!important;
  background:#000!important;
}
body.cinema-mode .app-shell{
  display:block!important;
  position:relative!important;
  width:100vw!important;
  height:100vh!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#000!important;
}
body.cinema-mode .sidebar{
  position:fixed!important;
  z-index:9000!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:230px!important;
  height:100vh!important;
  transform:translateX(calc(-100% - 2px))!important;
  transition:transform 110ms ease-out!important;
  box-shadow:14px 0 34px rgba(0,0,0,.58)!important;
  border-right:1px solid rgba(255,255,255,.12)!important;
  background:rgba(14,14,17,.98)!important;
}
body.cinema-mode .sidebar.edge-visible{
  transform:translateX(0)!important;
}
body.cinema-mode .main{
  display:flex!important;
  flex-direction:column!important;
  width:100vw!important;
  height:100vh!important;
  min-height:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#000!important;
}
body.cinema-mode .topbar{
  display:none!important;
}
body.cinema-mode .player-card{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  width:100vw!important;
  height:100vh!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  overflow:hidden!important;
  background:#000!important;
}
body.cinema-mode .stage{
  flex:none!important;
  align-self:center!important;
  justify-self:center!important;
  width:min(100vw,calc(100vh * 4 / 3))!important;
  height:auto!important;
  max-width:none!important;
  max-height:100vh!important;
  aspect-ratio:4/3!important;
  margin:0!important;
  box-shadow:none!important;
}
body.cinema-mode .transport{
  align-self:end!important;
  justify-self:center!important;
  width:min(100vw,calc(100vh * 4 / 3))!important;
  min-height:38px!important;
  margin:0!important;
  padding:5px 7px!important;
  border-top:0!important;
  box-sizing:border-box!important;
  background:rgba(0,0,0,.86)!important;
}
body.cinema-mode .settings-toggle{
  position:fixed!important;
  z-index:10001!important;
}
body.cinema-mode .settings-panel{
  z-index:10000!important;
}


/* Normal / cinema mode hamburger toggle */
.mode-toggle{
  position:fixed;
  top:44px;
  right:8px;
  z-index:10001;
  width:30px;
  height:30px;
  min-width:30px;
  padding:6px 5px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:6px;
  background:rgba(14,14,17,.72);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  cursor:pointer;
  opacity:.72;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
}
.mode-toggle:hover{opacity:1}
.mode-toggle span{
  display:block;
  width:100%;
  height:2px;
  border-radius:999px;
  background:currentColor;
  color:inherit;
}
body.cinema-mode .mode-toggle{
  background:rgba(14,14,17,.72);
}


/* Cinema mode: fully hide scene title/header text. */
body.cinema-mode .scene-title,
body.cinema-mode .scene-header,
body.cinema-mode .selected-scene-title,
body.cinema-mode #sceneTitle,
body.cinema-mode #selectedSceneTitle{
  display:none!important;
}

/* Cinema mode: bottom transport behaves like the edge-reveal sidebar. */
body.cinema-mode .player-card{
  grid-template-rows:1fr!important;
}

body.cinema-mode .stage{
  width:min(100vw,calc(100vh * 4 / 3))!important;
  max-height:100vh!important;
  height:auto!important;
}

body.cinema-mode .transport{
  position:fixed!important;
  left:50%!important;
  bottom:0!important;
  z-index:9000!important;
  width:min(100vw,calc(100vh * 4 / 3))!important;
  min-height:38px!important;
  margin:0!important;
  padding:5px 7px!important;
  transform:translate(-50%, calc(100% + 2px))!important;
  transition:transform 110ms ease-out!important;
  border:0!important;
  box-sizing:border-box!important;
  background:rgba(0,0,0,.88)!important;
  box-shadow:0 -12px 30px rgba(0,0,0,.42)!important;
}

body.cinema-mode .transport.edge-visible{
  transform:translate(-50%, 0)!important;
}


/* Scene-area Play / Replay overlay. */
.stage{position:relative;}
.scene-play-overlay{
  -webkit-appearance:none;
  appearance:none;
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:8500;
  width:64px;
  height:64px;
  isolation:isolate;
  margin:0;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.30);
  border-radius:50%;
  background:rgba(0,0,0,.62);
  color:#fff;
  cursor:pointer;
  opacity:.94;
  box-sizing:border-box;
  box-shadow:0 5px 24px rgba(0,0,0,.48);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.scene-play-overlay:hover{
  opacity:1;
  background:rgba(0,0,0,.76);
  border-color:rgba(255,255,255,.45);
}
.scene-play-overlay:focus-visible{
  outline:2px solid rgba(255,255,255,.9);
  outline-offset:3px;
}
.scene-play-overlay svg{
  display:block;
  width:30px;
  height:30px;
  pointer-events:none;
}
.scene-play-overlay[data-mode="play"] svg{
  width:29px;
  height:31px;
  transform:translateX(2px);
}
.scene-play-overlay.hidden{display:none!important;}


/* Normal / cinema mode icon toggle */
.mode-toggle{
  position:fixed;
  top:44px;
  right:8px;
  z-index:10001;
  width:30px;
  height:30px;
  min-width:30px;
  padding:6px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:6px;
  background:rgba(14,14,17,.72);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  cursor:pointer;
  opacity:.72;
  display:flex;
  align-items:center;
  justify-content:center;
  color:inherit;
}
.mode-toggle:hover{opacity:1}
.mode-toggle svg{
  display:block;
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}


/* Group the scene browser by character so each character name appears once. */
.scene-group{
  margin:0 0 9px;
}
.scene-character{
  padding:10px 12px 4px;
  color:var(--text);
  font-size:13px;
  font-weight:700;
  line-height:1.2;
}
.scene-group .scene-item{
  padding:7px 12px 7px 22px;
}
.scene-group .scene-item .name{
  font-weight:500;
}


/* Restored scene search bar. */
.search-wrap.scene-search-restored{
  display:block!important;
  padding:0 10px 10px!important;
}
.search-wrap.scene-search-restored input{
  display:block!important;
  width:100%!important;
  box-sizing:border-box!important;
  height:32px!important;
  padding:6px 10px!important;
  border:1px solid var(--line)!important;
  border-radius:7px!important;
  background:#16161b!important;
  color:inherit!important;
  font:inherit!important;
  font-size:12px!important;
  outline:none!important;
}
.search-wrap.scene-search-restored input:focus{
  border-color:#666672!important;
}


/* Keep the sidebar scrollbar visually consistent on hover. */
.sidebar,
.scene-list,
#sceneList{
  scrollbar-color: rgba(255,255,255,.22) transparent;
}

.sidebar::-webkit-scrollbar,
.scene-list::-webkit-scrollbar,
#sceneList::-webkit-scrollbar{
  width:8px;
}

.sidebar::-webkit-scrollbar-track,
.scene-list::-webkit-scrollbar-track,
#sceneList::-webkit-scrollbar-track{
  background:transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.scene-list::-webkit-scrollbar-thumb,
#sceneList::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.22);
  border-radius:999px;
  border:2px solid transparent;
  background-clip:padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.scene-list::-webkit-scrollbar-thumb:hover,
#sceneList::-webkit-scrollbar-thumb:hover{
  background:rgba(255,255,255,.22);
  border:2px solid transparent;
  background-clip:padding-box;
}


/* BLACK SOULS I / II viewer switch. */
.game-switch-row{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.game-switch-row .eyebrow{flex:0 1 auto}
.game-switch-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:24px;
  height:20px;
  padding:0;
  border:1px solid rgba(255,255,255,.14);
  border-radius:5px;
  background:#17171c;
  color:#9b9ba6;
  line-height:1;
  text-decoration:none;
}
.game-switch-icon{
  width:14px;
  height:14px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.game-switch-button:hover{
  background:#222228;
  color:#fff;
  border-color:rgba(255,255,255,.24);
}




/* In cinema mode, the revealed sidebar remains fully interactive. */
body.cinema-mode .sidebar.edge-visible{
  pointer-events:auto!important;
}
body.cinema-mode .sidebar.edge-visible *{
  pointer-events:auto;
}

/* Subtle marker for BS2 replay scenes that contain an interactive choice. */
.scene-item.has-choices .name{
  color:#b94a4a;
}

/* UMEPLUS_EVERYWHERE */
*,*::before,*::after{font-family:"UmePlus Gothic Web","UmePlus Gothic",sans-serif !important}

/* Cinema controls: persistent edge handle + unified sidebar/transport reveal. */
.cinema-ui-handle{display:none}
body.cinema-mode .cinema-ui-handle{
  display:block;position:fixed;left:0;top:50%;z-index:9100;width:12px;height:62px;
  transform:translateY(-50%);padding:0;border:1px solid rgba(255,255,255,.18);border-left:0;
  border-radius:0 7px 7px 0;background:rgba(14,14,17,.82);box-shadow:4px 0 12px rgba(0,0,0,.32);
  cursor:pointer;opacity:.72;transition:opacity 140ms ease,background 140ms ease
}
body.cinema-mode .cinema-ui-handle:hover,body.cinema-mode .cinema-ui-handle:focus-visible{opacity:1;background:rgba(28,28,34,.96);outline:none}
body.cinema-mode .cinema-ui-handle::before{
  content:'';position:absolute;left:4px;top:50%;width:5px;height:5px;border-top:1px solid #ddd;border-right:1px solid #ddd;
  transform:translate(-1px,-50%) rotate(45deg);transition:transform 140ms ease
}
body.cinema-mode .cinema-ui-handle.active::before{transform:translate(1px,-50%) rotate(225deg)}
