*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:#000;color:#ddd;font:14px -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;overflow:hidden;overscroll-behavior:none}
#app{position:fixed;inset:0;display:flex;flex-direction:column}
.hidden{display:none!important}
button{font:inherit;color:inherit}
.ib{background:none;border:0;color:#f39c12;font-size:22px;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.ib svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2}
#top{display:flex;align-items:center;padding:env(safe-area-inset-top) 4px 0;background:#000;border-bottom:1px solid #222;flex:none}
#titles{flex:1;text-align:center;min-width:0}
#title{color:#fff;font-weight:600;font-size:16px}
#subtitle{color:#f39c12;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#stage{flex:1;position:relative;overflow:hidden;touch-action:none}
#cv{position:absolute;inset:0;width:100%;height:100%}
#lab{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#lab text{pointer-events:auto;cursor:pointer;font-size:11px;paint-order:stroke;stroke:#000;stroke-width:3px;stroke-linejoin:round}
#lab text.hl{font-weight:700;font-size:12.5px}
#lab line{stroke-width:.8}
#lab circle{stroke:#000;stroke-width:.6}
#loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#888}
#sel{position:absolute;left:50%;transform:translateX(-50%);bottom:8px;background:rgba(20,20,20,.9);border:1px solid #444;border-radius:8px;padding:6px 12px;max-width:92%;text-align:center;font-size:13px}
#sel small{color:#999}
#bottom{flex:none;background:#000;border-top:1px solid #222;padding-bottom:env(safe-area-inset-bottom)}
#strip{display:flex;gap:6px;overflow-x:auto;padding:6px 8px;scrollbar-width:none}
#strip::-webkit-scrollbar{display:none}
.th{flex:none;width:64px;cursor:pointer;text-align:center;font-size:9px;color:#aaa}
.th img{width:64px;height:64px;object-fit:cover;border:2px solid #333;border-radius:4px;display:block;background:#111}
.th.on img{border-color:#f39c12}.th.on{color:#f39c12}
#nav{display:flex;align-items:center;justify-content:center;gap:4px}
#counter{min-width:80px;text-align:center;color:#fff;font-variant-numeric:tabular-nums}
.arrow{font-size:18px}
.tog{font-size:12px;width:40px;border:1px solid #444;border-radius:6px;height:28px;color:#888}
.tog.on{color:#f39c12;border-color:#f39c12}
#disc{font-size:9.5px;color:#666;text-align:center;padding:2px 6px 4px}
#drawer{position:absolute;top:0;right:0;bottom:0;width:min(340px,88vw);background:#111;border-left:1px solid #333;overflow-y:auto;z-index:20;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);-webkit-overflow-scrolling:touch}
.dhead{display:flex;align-items:center;gap:10px;padding:10px;border-bottom:1px solid #333}
.dhead img{width:44px;height:44px;border-radius:10px}.dhead div{flex:1}
.dsec{padding:8px 12px;border-bottom:1px solid #222}
.dsec h3{margin:4px 0 8px;font-size:13px;color:#f39c12;text-transform:uppercase;letter-spacing:.04em}
.row{display:flex;align-items:center;gap:8px;padding:6px 0;cursor:pointer}
.row .sw{width:12px;height:12px;border-radius:3px;flex:none}
.row .cnt{margin-left:auto;color:#666;font-size:11px}
.row.soon{color:#555;cursor:default}
.row input{accent-color:#f39c12;width:18px;height:18px}
.tbtns{display:flex;flex-wrap:wrap;gap:6px}
.tbtns button,.wide{background:#222;border:1px solid #444;border-radius:6px;padding:7px 10px;cursor:pointer}
.wide{width:100%;margin:3px 0}
.small{font-size:11px;color:#777}
.ser{padding:8px;border:1px solid #333;border-radius:6px;margin:4px 0;cursor:pointer}.ser.on{border-color:#f39c12;color:#f39c12}
#search{position:absolute;inset:0;background:rgba(0,0,0,.94);z-index:30;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top)}
.shead{display:flex;padding:8px;gap:6px}
#q{flex:1;font-size:16px;padding:10px;border-radius:8px;border:1px solid #444;background:#1a1a1a;color:#fff}
#results{overflow-y:auto;flex:1}
.res{padding:10px 14px;border-bottom:1px solid #1d1d1d;cursor:pointer;display:flex;gap:8px;align-items:center}
.res small{color:#777;margin-left:auto}
.res:hover,.res.k{background:#1c1c1c}
#help{position:absolute;inset:0;background:rgba(0,0,0,.8);z-index:40;display:flex;align-items:center;justify-content:center}
.hbox{background:#151515;border:1px solid #444;border-radius:10px;max-width:640px;width:94%;max-height:86%;overflow-y:auto;padding:14px 18px;position:relative}
.hbox .ib{position:absolute;right:4px;top:4px}
.hbox h2{color:#f39c12;font-size:17px}.hbox h3{color:#f39c12;font-size:14px;margin-bottom:4px}
.hbox li{margin:3px 0}
#shareInfo img{background:#fff;padding:6px;width:180px;display:block;margin:6px 0;border-radius:6px}
#shareInfo code{word-break:break-all;font-size:11px;color:#9cf}
@media (min-width:1000px){
  #drawer{position:relative;order:-1;border-left:0;border-right:1px solid #333;width:320px}
  #app{flex-direction:column}
  body.desk #app{display:grid;grid-template-columns:320px 1fr;grid-template-rows:auto 1fr auto}
  body.desk #top{grid-column:1/3}
  body.desk #drawer{grid-row:2/4;grid-column:1;display:block!important}
  body.desk #stage{grid-column:2;grid-row:2}
  body.desk #bottom{grid-column:2;grid-row:3}
  body.desk #btnCloseMenu{display:none}
  #lab text{font-size:13px}#lab text.hl{font-size:14.5px}
  .th{width:84px}.th img{width:84px;height:84px}
}
#sel .card{text-align:left;font-size:12.5px;line-height:1.35;margin:5px 0 3px;color:#ddd;max-width:340px}
#sel{max-height:30%;overflow-y:auto}

#zoombar{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:6px;
  background:rgba(20,20,20,.75);border:1px solid #333;border-radius:12px;padding:6px 4px;z-index:5;touch-action:none}
.zb{width:36px;height:36px;border-radius:8px;border:1px solid #555;background:#1b1b1b;color:#f39c12;font-size:22px;line-height:1;cursor:pointer}
.zb.fit{font-size:12px}
#zSlider{writing-mode:vertical-lr;direction:rtl;-webkit-appearance:slider-vertical;appearance:slider-vertical;width:28px;height:150px;accent-color:#f39c12;margin:2px 0}
#zPct{font-size:12px;color:#ddd;font-variant-numeric:tabular-nums;min-width:40px;text-align:center}
#sliceSlider{display:block;width:calc(100% - 24px);margin:2px 12px 0;accent-color:#f39c12;height:26px}
@media (max-height:700px){#zSlider{height:100px}}
#lab text{font-size:inherit}
