:root{color-scheme:dark;--ink:#f2e9d7;--muted:#c6bba5;--gold:#d8bd87;--red:#a85c4d;--bg:#171b18;--serif:"KaiTi","STKaiti","FangSong","SimSun",serif;--sans:"PingFang SC","Microsoft YaHei",sans-serif}
*{box-sizing:border-box} [hidden]{display:none!important} html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--ink);font:15px/1.6 var(--sans)}
button,a,input{font:inherit;color:inherit} button,a{-webkit-tap-highlight-color:transparent} button{cursor:pointer;border:0;background:transparent;min-height:44px;padding:8px 14px;white-space:nowrap} button:hover{color:#ffe2a9} button:disabled{opacity:.45;cursor:default} a{text-underline-offset:5px} :focus-visible{outline:2px solid var(--gold);outline-offset:4px} button[aria-pressed=true]{color:#f6d9a5;box-shadow:inset 0 -1px var(--gold)}
#viewer{position:relative;width:100%;height:100%;height:100dvh;isolation:isolate} #canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab;outline-offset:-4px} #canvas.dragging{cursor:grabbing}
.masthead{position:absolute;top:30px;left:clamp(24px,4vw,64px);right:clamp(24px,4vw,64px);pointer-events:none;text-shadow:0 2px 15px #0009}.eyebrow{margin:0 0 8px;color:var(--muted);letter-spacing:.2em;font-size:12px}.masthead h1{margin:0;font:400 clamp(28px,4vw,44px)/1.25 var(--serif);letter-spacing:.12em}.back{position:absolute;right:0;top:0;pointer-events:auto;font-size:13px;text-decoration:none;padding:10px 0}
.bottom{position:absolute;left:0;right:0;bottom:0;padding:54px clamp(24px,4vw,64px) max(16px,env(safe-area-inset-bottom));background:linear-gradient(0deg,#101410f5 0%,#101410e3 65%,transparent);pointer-events:none}.bottom button,.bottom input,.keyboard-help{pointer-events:auto}.invitation{display:flex;align-items:baseline;gap:24px;flex-wrap:wrap}.invitation p{margin:0 0 10px}#message{font:400 clamp(18px,2vw,24px)/1.4 var(--serif)}.hint{font-size:12px;color:var(--muted)}.toolbar{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.range-group{min-width:200px;width:260px;margin-right:20px}.range-group label{display:flex;justify-content:space-between;font-size:13px;color:var(--muted)}#openValue{color:var(--ink);font-variant-numeric:tabular-nums}.range-group input{width:100%;accent-color:var(--gold);height:26px;margin:0;touch-action:pan-x}.views{display:flex;gap:0;border-right:1px solid #cfb88730;padding-right:12px}.toolbar>.primary{color:#f4d49c;border-bottom:1px solid #c6a16b;font-family:var(--serif);margin-left:auto}.keyboard-help{width:fit-content;color:var(--muted);font-size:11px;margin-top:8px}.keyboard-help summary{cursor:pointer}.keyboard-help p{max-width:700px;margin:5px 0}
.loading,.failure{position:absolute;z-index:8;top:50%;left:50%;transform:translate(-50%,-50%);padding:32px;width:min(92vw,480px);background:#171b18ed;border:1px solid #a9936c30}.loading h2,.failure h2{font:400 26px/1.6 var(--serif);margin:5px 0 10px}.loading p,.failure p{font-size:13px;color:var(--muted)}progress{width:100%;height:3px;accent-color:var(--gold)}.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.actions a{font-size:13px}.actions button{padding-left:0}.failure{z-index:10}
.handle-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden}.handle{position:absolute;left:0;top:0;width:54px;height:54px;transform:translate(-50%,-50%);padding:0;pointer-events:auto;touch-action:none;border-radius:50%;background:radial-gradient(circle,#f4dca066 0 5px,#ffe2a011 6px 16px,transparent 17px);filter:drop-shadow(0 1px 4px #0007)}.handle::after{content:"";position:absolute;inset:14px;border:1px solid #f3d9a077;border-radius:50%}.handle span{position:absolute;top:49px;left:50%;transform:translateX(-50%);font-size:11px;text-shadow:0 1px 7px #000;color:#f1d9a4;white-space:nowrap}.handle:hover::after{border-color:#ffe9b9}.handle:focus-visible{outline-offset:0}.touched .handle span{display:none}
body.embed .masthead{display:none}body.embed .bottom{padding-top:45px}body.embed .invitation .hint{font-size:11px}body.embed .keyboard-help{margin-top:4px}
dialog{background:#191d18;color:var(--ink);border:1px solid #a9936c50;width:min(96vw,1500px);max-width:96vw;padding:28px;overflow:hidden}dialog::backdrop{background:#080d0ee6;backdrop-filter:blur(4px)}.dialog-head{display:flex;gap:20px;justify-content:space-between;align-items:center}.dialog-head h2{font:400 26px/1.4 var(--serif);margin:0}.art-tools{display:flex;align-items:center;gap:12px;margin:20px 0}.art-tools p{font-size:12px;color:var(--muted);margin:0 0 0 auto}.art-window{overflow:auto;max-height:60dvh;min-height:180px;display:flex;align-items:flex-start;background:#100f0b;padding:24px 0;overscroll-behavior:contain}.art-window img{display:block;height:auto;max-width:none;flex-shrink:0;width:100%}
@media(max-width:700px){.masthead{top:22px;left:24px;right:24px}.masthead h1{font-size:28px}.eyebrow{font-size:10px}.bottom{padding:38px 18px max(12px,env(safe-area-inset-bottom))}.invitation{gap:0}.invitation p{margin-bottom:6px}#message{font-size:18px}.hint{font-size:11px}.toolbar{gap:4px 6px}.range-group{width:100%;margin:5px 0 0;min-width:0}.toolbar button{padding:6px 10px;font-size:13px}.views{padding-right:4px}.toolbar>.primary{margin-left:0}.handle{width:48px;height:48px}.handle span{top:41px}.keyboard-help{margin-top:2px;font-size:10px}.loading,.failure{padding:24px}.loading h2{font-size:22px}dialog{padding:18px}.dialog-head h2{font-size:20px}.dialog-head button{font-size:12px}.art-tools{gap:6px;flex-wrap:wrap}.art-tools p{width:100%}.art-window{min-height:140px}}
@media(max-height:540px){.masthead{top:15px}.masthead h1{font-size:24px}.bottom{padding-top:30px;padding-bottom:8px}.hint,.keyboard-help{display:none}.range-group{width:200px}.invitation p{margin-bottom:3px}.toolbar{gap:4px}.toolbar button{min-height:36px}body.embed .bottom{padding-top:25px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
