:root{color-scheme:dark;--ink:#e7dfcf;--muted:#a6a598;--brass:#c2ad7d;--edge:rgba(205,193,155,.23);--glass:#1d201cf2;--mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace;--sans:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font:14px var(--sans);color:var(--ink);background:#101211;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden}body{background:#101211}button{border:0;background:none;color:inherit;font:inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.34;cursor:default}button:hover:not(:disabled){color:#fff4d8}button:focus-visible,[tabindex]:focus-visible{outline:2px solid #d4c185;outline-offset:3px}button{touch-action:manipulation}h1,h2,h3,p{margin:0}[hidden]{display:none!important}i[data-i]{display:inline-flex;align-items:center;justify-content:center;flex:none}i[data-i] svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(100%);white-space:nowrap}
#stage{position:relative;isolation:isolate;width:100%;height:100%;height:100dvh;overflow:hidden;background:radial-gradient(ellipse at 49% 53%,#37372d 0%,#20241f 43%,#0d1111 85%)}#scene,.vignette{position:absolute;inset:0}#scene canvas{display:block;width:100%;height:100%}.vignette{pointer-events:none;background:linear-gradient(180deg,rgba(7,10,11,.24),transparent 18%,transparent 78%,rgba(6,9,10,.5)),radial-gradient(ellipse at 50% 47%,transparent 36%,rgba(5,10,11,.16) 68%,rgba(4,7,8,.58) 100%)}.hud-header{position:absolute;z-index:3;top:max(clamp(18px,3.4vh,34px),env(safe-area-inset-top));left:clamp(18px,2.7vw,48px);right:clamp(18px,2.7vw,48px);display:flex;justify-content:flex-end;align-items:flex-start;pointer-events:none}.station-tools,.bubble-head,.bubble-head>div,.bubble-label,.tree-actions,.panel-head{display:flex;align-items:center}.station-tools{gap:10px;pointer-events:auto}.status-pill{display:inline-flex;align-items:center;gap:7px;color:#c2c6b0;font-size:12px;text-shadow:0 1px 7px #000}.status-pill b{display:inline-block;width:5px;height:5px;border-radius:50%;background:#99ac78;box-shadow:0 0 7px #a1ba7050}.hairline{height:13px;width:1px;background:var(--edge);margin:0 3px}.icon-btn{width:35px;height:35px;border-radius:50%;border:1px solid var(--edge);color:#c9c8b9;background:rgba(21,24,22,.67);box-shadow:0 1px 3px #0002}.icon-btn:hover,.plain-icon:hover{background:#414338}.icon-btn[aria-pressed="false"]{color:#a09d8d}
#bubble{--tip:50%;position:absolute;z-index:2;top:var(--bubble-y,31%);left:var(--bubble-x,50%);transform:translate(-50%,-100%);width:clamp(232px,18vw,270px);border:1px solid #a6a08055;border-radius:9px;background:linear-gradient(116deg,#292c25f0,#20241fe8);color:#d6d7c7;box-shadow:0 7px 24px #0003,inset 0 1px 0 #fff1;backdrop-filter:blur(9px)}#bubble:after{content:"";position:absolute;width:7px;height:7px;left:var(--tip);bottom:-5px;transform:translateX(-50%) rotate(45deg);background:#232720;border:solid #a6a08055;border-width:0 1px 1px 0}.bubble-head{padding:7px 9px 0 13px;justify-content:space-between}.bubble-label{color:#b6baa4;font-size:11px;letter-spacing:.12em;gap:6px}.bubble-label i svg{width:13px;height:13px;color:#b7bd9d}.bubble-head>div{gap:2px}.bubble-head button{height:28px;min-width:27px;border-radius:4px;padding:2px 4px;font:500 14px Georgia,serif;color:#b3b6a5}.bubble-head button:hover,.bubble-head button[aria-expanded="true"]{background:#cfd0ae1c;color:#f4f0d9}.message-actions i svg{width:14px;height:14px}.message-actions button:disabled{opacity:.44}.message-actions #translate{margin-left:3px;border-left:1px solid var(--edge);border-radius:0;padding-left:7px}
.scrollbox{margin:0;padding:6px 14px 12px;overflow-y:auto;max-height:clamp(58px,12vh,104px);overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#646c58 transparent}.code{color:#e3e6b9;white-space:pre-wrap;overflow-wrap:anywhere;font:500 23px/1.15 var(--mono);letter-spacing:2px}.code.empty{font:400 14px/1.4 var(--sans);letter-spacing:.03em;color:#c2c4af}.code.empty:before{content:"";display:inline-block;width:5px;height:11px;margin-right:7px;background:#9bb67a;box-shadow:0 0 7px #9cb67c40}.code:not(.empty){text-shadow:0 0 8px #acbc6d47}#translation{margin-top:7px;border-top:1px solid #c5c2a329;padding-top:6px;overflow-wrap:anywhere;color:#e5e3d0;font:500 14px/1.45 var(--mono)}.pending{margin-left:6px;color:#bcbaa4;font:11px var(--sans)}#latest{margin:0 10px 5px auto;background:#444b39;font-size:11px;padding:3px 8px;border-radius:4px}
.send-hud,#tree-card{position:absolute;z-index:2}.send-hud{left:50%;transform:translateX(-50%);bottom:max(clamp(18px,3.3vh,36px),env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:11px;white-space:nowrap}#send-key{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;height:45px;min-width:184px;padding:0 18px;border-radius:7px;border:1px solid #aaa18388;color:#e5e4ce;background:linear-gradient(165deg,#3e4436e8,#2b3027f2);box-shadow:inset 0 1px 0 #c8c7a82e,0 3px 0 #151b15,0 5px 15px #0005;gap:9px}#send-key i{color:#c3bc95}#send-key i svg{width:21px;height:21px}#send-key strong{font-weight:550;letter-spacing:.06em;font-size:14px}#send-key kbd{font:500 9px/1.3 var(--mono);letter-spacing:.07em;color:#c4c6af;border:1px solid #9fa38866;padding:2px 5px;border-radius:3px;margin-left:3px}#send-key.pressed{transform:translateY(2px);background:#48553a;box-shadow:inset 0 1px 5px #151e15cc,0 0 15px #82975532}#key-hint{display:flex;align-items:center;justify-content:center;gap:11px;font-size:11px;letter-spacing:.1em;color:#bebda8;text-shadow:0 1px 4px #000a}#key-hint span{display:inline-flex;align-items:center;gap:6px}.dot,.dash{display:inline-block;background:#b2b395;width:4px;height:4px;border-radius:50%}.dash{width:12px;height:2px;border-radius:1px}#key-hint i{width:1px;height:8px;background:#85877777}#enable-audio{border:1px solid var(--edge);border-radius:5px;background:var(--glass);font-size:12px;padding:6px 9px}body.playback #send-key,body.playback #key-hint{display:none}
#tree-card{bottom:max(clamp(17px,2.5vh,30px),env(safe-area-inset-bottom));right:clamp(18px,2.7vw,48px);display:flex;flex-direction:column;align-items:stretch;width:clamp(168px,14.1vw,224px)}#tree-body{width:100%;filter:drop-shadow(0 7px 10px #0009)}#tree-body canvas{display:block;width:100%;height:100%}.tree-actions{justify-content:space-between;gap:5px;padding:2px 4px 0}.tree-actions i svg{width:13px;height:13px}.tree-actions button{min-height:26px;color:#bbbdac;font-size:11px}#tree-toggle{padding:2px 0;gap:6px}#tree-toggle>i:last-child{transform:rotate(180deg)}#tree-toggle[aria-expanded="false"]>i:last-child{transform:none}#tree-toggle[aria-expanded="false"]{padding:5px 9px;border:1px solid var(--edge);border-radius:5px;background:var(--glass)}.tree-closed #tree-card{width:auto}.tree-zoom #tree-card{width:min(310px,32vw,43vh)}.plain-icon{width:28px;height:28px;padding:0;color:#c4c5ae;border-radius:4px}
[popover],dialog{color:var(--ink);background:linear-gradient(130deg,#272b23,#1b201c);border:1px solid #a4a18158;border-radius:9px;box-shadow:0 12px 38px #0006}#tools{inset:auto;top:max(calc(clamp(18px,3.4vh,34px) + 46px),calc(env(safe-area-inset-top) + 46px));right:clamp(18px,2.7vw,48px);margin:0;padding:15px 17px 10px;width:258px}.panel-head{justify-content:space-between;gap:12px}h2{font:600 17px/1.4 var(--sans);letter-spacing:.045em}.panel-head .plain-icon i svg{width:16px}.tool-panel section{margin:11px 0 15px}.tool-panel h3{font-size:12px;font-weight:500;margin-bottom:6px;color:#b6baa8}.speeds{display:flex;gap:6px}.speeds button,.guide{background:#d0d2b50b;border:1px solid #c4c9ae36;border-radius:4px;font-size:12px;padding:6px 8px;flex:1}.speeds button[aria-pressed="true"]{background:#526044;border-color:#a5b4826b;color:#e8efd0}.guide{display:flex;width:100%;margin-top:5px;background:transparent;border:0;border-top:1px solid var(--edge);border-radius:0;justify-content:flex-start;padding:10px 0 2px}.guide i svg{width:15px}dialog{width:min(430px,91vw);padding:20px;max-height:85dvh}dialog::backdrop{background:#080b0a99;backdrop-filter:blur(3px)}.manual-content h3{font-size:14px;margin:15px 0 4px;font-weight:600}.manual-content p,#link-dialog p{color:#c3c6b4;font-size:13px;line-height:1.75}.manual-content table{width:100%;border-collapse:collapse;margin:8px 0;color:#c9cdba;font-size:12px}.manual-content th,.manual-content td{text-align:left;border-bottom:1px solid var(--edge);padding:5px}.manual-content th{color:#e1e4cf}#fallback-text{width:100%;min-height:70px;margin-top:8px}#toast{position:fixed;z-index:8;left:50%;bottom:max(115px,13vh);transform:translate(-50%,4px);color:#ebefdc;background:#282f26ed;border-radius:5px;border:1px solid #90997666;padding:7px 12px;font-size:13px;white-space:nowrap;opacity:0;pointer-events:none;transition:.15s}#toast.visible{opacity:1;transform:translate(-50%,0)}.scene-error{position:absolute;top:52%;width:100%;text-align:center;color:#c7c4ad}

.letter-board{position:relative;isolation:isolate;width:100%;aspect-ratio:.735}
#tree-mode{
  display:flex;width:100%;min-height:32px;padding:3px 5px;
  border:1px solid #91927a77;border-radius:5px;
  background:linear-gradient(#32372e,#232920);
  color:#e0e1c9;font:500 12px/1.25 var(--sans);
}
#tree-mode:hover{background:#3b4235}
.digit-legend{
  position:relative;left:100%;transform:translateX(-100%);
  width:max(146px,100%);margin:0 0 5px;
  padding:6px 9px 7px;
  border:1px solid #8c9385;
  border-radius:6px;
  background:linear-gradient(155deg,#282d2a,#181c1f 76%);
  color:#e1e4d8;
  box-shadow:inset 0 0 0 2px #121719,inset 0 3px 1px #ffffff1c;
}
.digit-legend h3{margin:0 0 4px;font:550 11px/1.2 var(--sans);letter-spacing:.1em;color:#c2c7b4}
.digit-legend dl{
  display:grid;grid-template:repeat(5,auto)/repeat(2,minmax(0,1fr));grid-auto-flow:column;
  gap:1px 8px;margin:0;
}
.digit-legend dl>div{display:flex;align-items:center;justify-content:space-between;line-height:15px;border-radius:2px}
.digit-legend dt{font:600 12px/15px var(--mono);color:#d5d9c8}
.digit-legend dd{margin:0;white-space:nowrap;font:600 13px/15px var(--mono);letter-spacing:.035em;color:#d4dbd3}
.digit-legend .lit{background:#6b93513b;outline:1px solid #8bbb6f}
.digit-legend .lit dt,.digit-legend .lit dd{color:#ddffbe}

@media(min-aspect-ratio:19/10) and (max-height:680px){#tree-card{width:145px}.tree-zoom #tree-card{width:210px}.hud-header{top:17px}#tools{top:61px}.send-hud{bottom:14px}}
@media(max-width:700px){.hud-header{top:max(15px,env(safe-area-inset-top));left:15px;right:15px}.station-tools{gap:7px}.status-pill{font-size:10px;gap:5px}.hairline{display:none}.icon-btn{width:31px;height:31px}.icon-btn i svg{width:15px;height:15px}#bubble{width:min(234px,calc(100vw - 24px))}.bubble-head{padding:5px 7px 0 10px}.scrollbox{padding:3px 11px 9px;max-height:75px}.code.empty{font-size:13px}#tools{top:max(57px,calc(env(safe-area-inset-top) + 42px));right:13px}.send-hud{bottom:max(20px,env(safe-area-inset-bottom));gap:7px}#send-key{min-width:107px;padding:0 11px;height:42px;gap:6px}#send-key kbd{display:none}#key-hint{font-size:10px;gap:7px}#tree-card{right:12px;bottom:max(17px,env(safe-area-inset-bottom));width:min(152px,40vw,28vh)}.tree-zoom #tree-card{width:min(220px,55vw,40vh)}.tree-closed #tree-card{width:auto}.tree-actions{padding:1px 0}.tree-actions button{min-height:30px}.tree-open #tree-card{bottom:max(96px,calc(env(safe-area-inset-bottom) + 80px))}.tree-actions .plain-icon{width:26px}.playback .send-hud{bottom:max(15px,env(safe-area-inset-bottom))}.playback #tree-card{bottom:max(79px,env(safe-area-inset-bottom))}.playback.tree-open #tree-card{bottom:92px}}
@media(max-width:365px){.status-pill{display:none}#send-key{min-width:94px}.tree-actions{gap:0}}

.tree-zoom .digit-legend{width:max(168px,100%);padding:9px 11px}
.tree-zoom .digit-legend h3{font-size:13px;margin-bottom:7px}
.tree-zoom .digit-legend dt,.tree-zoom .digit-legend dd{font-size:15px;line-height:21px}
@media (max-width:700px){
  #tree-mode{min-height:36px}
}
@media (max-width:700px) and (orientation:portrait){
  .letter-board{max-height:calc(69dvh - 152px)}
}
@media (orientation:landscape) and (max-height:550px){
  .tree-open #tree-card,.playback.tree-open #tree-card{bottom:max(10px,env(safe-area-inset-bottom))}
  .letter-board{max-height:calc(100dvh - 159px)}
}
@media (orientation:landscape) and (min-height:551px) and (max-height:740px) and (max-width:1100px){
  .tree-zoom .letter-board{max-height:calc(78dvh - 106px)}
}

@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

#playback-controls{display:flex;align-items:center;gap:11px;padding:5px 7px 5px 13px;border-radius:7px;border:1px solid var(--edge);background:var(--glass);box-shadow:0 4px 16px #0004}
#time{font:12px/1.5 var(--mono);color:#d2d6c1;font-variant-numeric:tabular-nums}
.transport{display:flex;align-items:center;gap:2px;border-left:1px solid var(--edge);padding-left:6px}
.transport button{height:32px;min-width:32px;padding:3px 5px;border-radius:4px;color:#d3d9c0;font-size:12px}
.transport button:hover{background:#d5d8ac18}.transport i svg{width:15px;height:15px}
@media(max-width:700px){.bubble-head button{min-width:30px;height:30px}.bubble-head{padding-inline:9px}.bubble-head>div{gap:1px}}

#appreciate{color:var(--brass);font-weight:600}
#appreciation-dialog{width:min(410px,92vw,calc(100dvh - 82px));padding:12px;max-height:calc(100dvh - 20px)}
#appreciation-dialog .panel-head{margin-bottom:9px;padding-left:4px}
#appreciation-dialog .plain-icon{width:36px;height:36px}
#appreciation-dialog img{display:block;width:100%;height:auto;border-radius:3px}
