:root{--paper:#eae8dd;--ink:#222521;--line:#999f90;--bone:#fffdf3;--orange:#f3724c;--mint:#c7ec7c;--blue:#98bbe1;--soft:#dbd9cb}*{box-sizing:border-box}html{background:var(--paper)}body{margin:0;color:var(--ink);font-family:Arial,'PingFang SC','Microsoft YaHei',sans-serif}button,input,select{font:inherit}button{cursor:pointer;background:var(--bone);border:1.5px solid var(--ink);padding:10px 13px;border-radius:3px;color:var(--ink);font-size:12px;font-weight:800}button:hover{background:var(--mint)}button:active{transform:translate(1px,1px)}button:disabled{opacity:.5;cursor:not-allowed}input[type=text],input:not([type]),select{border:1.5px solid var(--ink);background:var(--bone);padding:10px;border-radius:3px;min-width:0}.app{max-width:1430px;margin:auto;padding:25px 30px 50px}.mast{display:flex;align-items:end;justify-content:space-between;border-bottom:3px solid var(--ink);padding-bottom:12px}.overline,.micro,.strip,.counter,.tag,footer{font-family:'Courier New',monospace;font-weight:700;letter-spacing:1px}.overline,.micro{font-size:10px}.mast h1{font-size:clamp(52px,7vw,92px);letter-spacing:-7px;line-height:.93;margin:9px 0 0}.mast h1 span{color:var(--orange)}.mast-right{text-align:right;font-size:19px;font-weight:900;line-height:1.8}.mast-right small{font:10px 'Courier New',monospace;color:#63685f}.mission{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:18px 0}.mission-title{font-size:22px;font-weight:900;margin:4px 0}.sub{font-size:12px;color:#6b6f65}.tag{display:inline-block;border:1.5px solid var(--ink);background:var(--mint);border-radius:50px;padding:10px 14px;white-space:nowrap;font-size:11px;transform:rotate(-2deg)}.tag.black{background:var(--ink);color:var(--bone)}.machine{border:2px solid var(--ink);background:var(--bone);box-shadow:7px 7px 0 var(--ink)}.strip{background:var(--ink);color:var(--bone);padding:11px 17px;display:flex;justify-content:space-between;font-size:10px}.light{display:inline-block;width:8px;height:8px;background:var(--mint);border-radius:50%;margin-right:7px}.loop-indicator{display:inline-flex;align-items:center;padding:12px 16px;border:1px solid #27332b;background:#d5eeb0;border-radius:6px;color:#26352b;font-weight:800;font-size:12px;letter-spacing:.02em;white-space:normal}.transport{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding:17px;border-bottom:2px solid var(--ink)}.primary{background:var(--orange);font-size:15px;border-width:2px;padding:13px 22px;border-radius:50px;box-shadow:2px 2px 0 var(--ink)}.spacer{flex:1}.bpm{display:grid;gap:4px;min-width:120px;font:12px 'Courier New',monospace}.bpm input{accent-color:var(--orange);width:120px}.counter{border-left:1px solid var(--line);padding-left:12px;white-space:nowrap}.counter strong{font-size:28px}.counter span{font-size:11px;color:#676f68}.main{display:grid;grid-template-columns:218px minmax(0,1fr)}aside{border-right:2px solid var(--ink);background:#e5e3d7;padding:17px 12px}.space{margin:2px 6px 15px}.track{display:flex;width:100%;gap:9px;align-items:center;margin-bottom:7px;text-align:left;border-color:transparent;background:none}.track.selected{background:var(--bone);border-color:var(--ink);box-shadow:3px 3px 0 var(--ink)}.track .glyph{border:1.5px solid var(--ink);display:grid;place-items:center;width:31px;height:31px;flex-shrink:0}.track strong{display:block;font-size:12px}.track small{display:block;font:10px 'Courier New',monospace;color:#7d8076;margin-top:3px}.aside-help{font-size:11px;line-height:1.8;border-top:1px solid var(--line);padding:12px 5px;margin-top:18px;color:#646960}.legend{font:10px 'Courier New',monospace;padding:20px 4px}.dot{display:inline-block;width:8px;height:8px;border-radius:50%}.orange{background:var(--orange)}.green{background:#7dbb44}article{padding:19px;min-width:0}.editor-head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:15px;flex-wrap:wrap}.editor-head h2{font-size:28px;margin:5px 0 0;letter-spacing:-1px}.editor-actions{display:flex;gap:8px;align-items:end}.editor-actions label{font-size:10px;font-weight:700;display:grid;gap:4px}.editor-actions select{font-size:12px;max-width:155px}.roll-viewport{height:470px;overflow:auto;border:2px solid var(--ink);background:#dfdfd2;position:relative;overscroll-behavior:contain;touch-action:pan-x pan-y}.roll-viewport canvas{display:block;image-rendering:auto;cursor:crosshair}.editor-foot{display:flex;justify-content:space-between;font:10px 'Courier New',monospace;color:#686f63;margin-top:10px;gap:10px;flex-wrap:wrap}.game{margin-top:45px;padding-top:20px;border-top:3px solid var(--ink)}.game-title{display:flex;align-items:center;justify-content:space-between}.game-title h2{margin:4px 0 20px;font-size:32px;letter-spacing:-1px}.game-title em{font-size:15px;font-style:normal;color:#777e75}.mode-tabs{display:flex;gap:7px;flex-wrap:wrap;border-bottom:2px solid var(--ink);padding-bottom:12px}.mode-tabs button.chosen{background:var(--ink);color:var(--bone)}.mode-pane{padding:19px 1px;min-height:130px}.mode-pane p{font-size:13px;line-height:1.7}.hidden{display:none!important}.formline{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.formline input{flex:1;min-width:180px}.muted{margin:12px 0;font-size:12px;color:#71786f}.result{font-weight:700}.history{margin:13px 0}.history button{margin:3px}.io{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);padding-top:17px;flex-wrap:wrap}.import{display:inline-block;border:1.5px solid var(--ink);background:var(--bone);padding:10px 13px;border-radius:3px;font-size:12px;font-weight:800;cursor:pointer}.import input{display:none}#toast{font-size:11px;color:#567c34}footer{margin-top:30px;display:flex;justify-content:space-between;gap:20px;font-size:10px;color:#71776c}@media(max-width:850px){.app{padding:14px 12px 30px}.mast-right{display:none}.main{display:block}aside{border-right:0;border-bottom:2px solid var(--ink)}#tracks{display:flex;overflow:auto;gap:7px}.track{min-width:136px}.aside-help,.legend{display:none}.roll-viewport{height:420px}article{padding:12px}.machine{box-shadow:4px 4px 0 var(--ink)}.tag{font-size:10px}.mission-title{font-size:18px}.loop-indicator{display:inline-flex;align-items:center;padding:12px 16px;border:1px solid #27332b;background:#d5eeb0;border-radius:6px;color:#26352b;font-weight:800;font-size:12px;letter-spacing:.02em;white-space:normal}.transport{padding:10px}.spacer{flex-basis:100%}.game-title h2{font-size:23px}footer span{display:none}}
/* V5 — instrument-workstation visual language: tightly framed roll, no dead right gutter */
:root{--paper:#e7e6da;--bone:#faf9ee;--ink:#252923;--orange:#fc744c;--mint:#c9ed8e}
.app{max-width:1580px}.main{grid-template-columns:192px minmax(0,1fr)}article{min-width:0;padding:14px 16px 16px}.editor-head{margin-bottom:10px;align-items:center}.editor-head h2{font-size:23px}.roll-wrap{border:2px solid #252923;background:#dfe3d5;border-radius:9px;overflow:hidden;box-shadow:4px 4px 0 #b8bfb0}.roll-tools{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;background:#303d35;color:#d6f1ba;font:bold 10px 'Courier New',monospace;letter-spacing:1px;gap:8px}.roll-tools>div{display:flex;gap:5px}.roll-tools button{padding:5px 8px;font-size:10px;color:#e6f0da;background:#4c5a50;border-color:#718273;border-radius:4px}.roll-tools button:hover{background:#61765d}.roll-viewport{border:0;height:460px;background:#e8eadf;scrollbar-color:#899988 #d9ded3;scrollbar-width:thin;scroll-behavior:smooth}.roll-viewport::-webkit-scrollbar{width:9px;height:9px}.roll-viewport::-webkit-scrollbar-track{background:#d9ded3}.roll-viewport::-webkit-scrollbar-thumb{background:#879988;border:2px solid #d9ded3;border-radius:10px}.roll-viewport::-webkit-scrollbar-corner{background:#d9ded3}.roll-viewport canvas{touch-action:none}.editor-actions select{max-width:184px}.lobby{margin-top:30px;padding:20px 0;border-top:3px solid var(--ink)}.lobby-intro{font-size:12px;line-height:1.7;color:#646e61}.room-panel{border:1.5px solid var(--ink);background:#f9faf0;padding:15px;margin-top:12px;border-radius:6px}.room-panel .formline{margin:12px 0}.room-panel input{flex:0 1 210px}.room-feed{font-size:12px;line-height:1.9;max-height:190px;overflow:auto;white-space:pre-line}.room-panel button{padding:9px 10px}.net-live{background:var(--mint)!important}.net-wait{background:#fae59e!important}
@media(max-width:850px){.main{display:block}.roll-viewport{height:420px}.roll-tools{flex-wrap:wrap}.lobby .formline>input{min-width:135px}}

/* V5.1: scrollbar stays subtle; scrollbar track not a second side panel */
.roll-viewport{background:#f1f1e9;scrollbar-color:#a4b2a4 transparent;scrollbar-width:thin}
.roll-viewport::-webkit-scrollbar{width:7px;height:7px}
.roll-viewport::-webkit-scrollbar-track{background:#eef0e7}
.roll-viewport::-webkit-scrollbar-thumb{background:#a0b19f;border:1px solid #eef0e7;border-radius:8px}
.roll-wrap{background:#f3f3ec}

/* V6 responsive frame: fully use iframe width; itch.io page shell is controlled by itch.io. */
html,body{width:100%;min-height:100%;overflow-x:hidden}
.app{width:100%;max-width:none;margin:0 auto;padding:clamp(10px,1.6vw,26px) clamp(12px,2.1vw,38px) 40px}
.roll-viewport{height:clamp(330px,54vh,620px)}
.floating-controls{display:flex;justify-content:flex-end;margin-bottom:6px}
.floating-controls button{background:#303e35;color:#e4f3cc;border-radius:20px;border-color:#303e35}
.wordbank{margin-top:32px;padding-top:20px;border-top:3px solid var(--ink)}
.deck-controls{display:flex;gap:12px;align-items:stretch;flex-wrap:wrap;margin:14px 0}
.deck-controls .primary{white-space:nowrap}
.drawn-card{background:#d8ebaa;border:2px solid var(--ink);border-radius:7px;padding:12px 18px;flex:1 1 230px;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:6px;box-shadow:3px 3px 0 #929b84}
.drawn-card span{font:700 10px 'Courier New',monospace;letter-spacing:1px}
.drawn-card strong{font-size:clamp(20px,2.5vw,33px);overflow-wrap:anywhere}
.deck-details{background:#f6f5ed;border:1.5px solid var(--ink);padding:12px;border-radius:5px}
.deck-details summary{font-weight:800;cursor:pointer}
#wordList{display:block;width:100%;max-width:100%;resize:vertical;min-height:145px;margin:12px 0;padding:13px;background:#fffdf3;border:1.5px solid var(--ink);border-radius:4px;font:13px/1.7 'Microsoft YaHei',sans-serif}
@media(max-width:850px){.app{padding:10px 10px 25px}.roll-viewport{height:clamp(290px,50vh,500px)}.drawn-card{order:-1;flex-basis:100%}.deck-controls .primary{flex:1}.deck-controls>button:not(.primary){flex:1}}

/* V7 full-browser game workspace (host page iframe still controls its own margins). */
.app{width:100%;max-width:none;padding:12px clamp(12px,2vw,28px) 32px}.mast{padding-bottom:7px}.mast h1{font-size:54px;letter-spacing:-4px}.mast-right{font-size:15px}.mission{margin:10px 0}.stage{margin:10px 0 18px;padding:16px 18px;background:#f5f3e9;border:2px solid var(--ink);box-shadow:4px 4px 0 #303d35}.stage-top{display:flex;justify-content:space-between;align-items:center}.stage-top h2{font-size:23px;margin:4px 0 12px}.stage-top em{font-size:13px;font-weight:400;color:#778077;font-style:normal}.stage-row{display:flex;gap:8px;flex-wrap:wrap}.stage-row input{flex:1;min-width:140px}.stage-row .primary{padding:10px 22px;font-size:12px}.stage-row #roomCode{max-width:210px}.room-panel{padding:12px 16px;margin-top:12px;background:#fcfcf5}.stage-line{display:flex;justify-content:space-between;align-items:center;gap:14px}.stage-line h3{font-size:22px;margin:3px 0}.stage-line p{font-size:12px;margin:3px 0;color:#647067}.clock{text-align:center;background:#2e4034;padding:10px 15px;border-radius:8px;color:#d6efaa;min-width:92px}.clock strong{font-size:26px;display:block;font-family:monospace}.clock small{font:10px monospace}.stage-options,.stage-guess,.choice-buttons{display:flex;gap:9px;align-items:end;flex-wrap:wrap;margin:12px 0}.stage-options label{display:grid;gap:4px;font-size:11px;font-weight:700}.stage-options select{min-width:110px}.stage-guess input{flex:1;min-width:150px}.stage-guess .primary{font-size:12px;padding:10px 18px}.choice-buttons button{background:#d3eea0;font-size:18px;border-radius:9px;padding:18px 24px}.stage-progress{height:5px;background:#dee4d9;overflow:hidden}.stage-progress>div{height:100%;background:var(--orange);transition:width .15s linear}.room-feed{font-size:13px;max-height:85px;overflow:auto;line-height:1.6}.room-score{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.score-item{display:flex;align-items:center;gap:8px;background:#e4e8da;border:1px solid #adb8a7;padding:6px 10px;border-radius:6px;font-size:12px}.score-item strong{color:#a55135}.machine.listen-only .main{display:none}.machine.listen-only .editor-head{display:none}.machine.listen-only .transport #extend,.machine.listen-only .transport #demo,.machine.listen-only .transport #bpm{pointer-events:none;opacity:.5}.machine.listen-only:after{content:'♫ 旋律正在循环播放 · 猜题者看不到谱面';display:block;padding:24px;text-align:center;font-size:15px;font-weight:800;background:#d8e7c1}.machine{margin-bottom:14px}.roll-viewport{height:clamp(340px,49vh,560px)}.wordbank{margin:24px 0 0;border-top:2px solid var(--ink);padding:13px;background:#edede1}.wordbank>summary{font-size:14px;font-weight:900;cursor:pointer}.wordbank>p{font-size:12px;color:#687066}.wordbank textarea{width:100%;margin:8px 0;padding:12px;resize:vertical;border:1px solid #8a9487;background:#fffdf5;font:13px/1.7 sans-serif}.roll-viewport{scroll-behavior:auto}
@media(max-width:850px){.main{display:block}.stage{padding:10px}.stage-line h3{font-size:17px}.mast h1{font-size:46px}.roll-viewport{height:47vh}.stage-row input{min-width:95px}.stage-row #roomCode{max-width:150px}.loop-indicator{display:inline-flex;align-items:center;padding:12px 16px;border:1px solid #27332b;background:#d5eeb0;border-radius:6px;color:#26352b;font-weight:800;font-size:12px;letter-spacing:.02em;white-space:normal}.transport{gap:5px}.transport button{padding:8px;font-size:11px}}

/* V9 - new brand and clearly labeled master dB slider */
.mast h1.brand{font-size:clamp(45px,6.7vw,89px);letter-spacing:-.065em;line-height:1.04;white-space:normal}
.mast h1.brand span{color:var(--orange)}
.master-level{display:grid;gap:5px;min-width:142px;padding:4px 12px;border-left:1px solid var(--line);font:700 11px 'Courier New',monospace}
.master-level label{display:flex;justify-content:space-between;align-items:center;gap:12px}
.master-level output{font-size:12px;color:#c45130}
.master-level input{width:100%;accent-color:var(--orange);cursor:pointer}
.db-marks{display:flex;justify-content:space-between;font-size:9px;color:#6d746b}
@media(max-width:750px){.master-level{min-width:130px;flex:1}.mast h1.brand{font-size:clamp(42px,9vw,66px)}}

/* V10: room host controls wordbank and selected pool before play. */
.stage-options #wordPack{min-width:170px;max-width:240px;background:#fffdf4;font-weight:700}.wordbank.hidden{display:none!important}

/* V13: timed clue tiles, always inside the room interface */
.letter-hint{background:#fbf8ec;border:1px solid #c8cfc1;border-radius:5px;padding:12px 15px;margin:12px 0;display:grid;gap:10px}
.letter-hint.hidden,.hint-button.hidden{display:none!important}
.letter-hint-top{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.letter-tiles{display:flex;gap:5px;flex-wrap:wrap}
.letter-tile{display:grid;place-items:center;width:clamp(25px,3.2vw,37px);height:39px;border:1px solid #aab4a4;background:#eef0e9;color:#27352e;font-weight:800;font-size:18px;font-family:system-ui,sans-serif;border-radius:3px}
.letter-tile.revealed{background:#dbedcc;border-color:#7b9f65;color:#253f24}
.hint-button{background:#eff1df;color:#233928;border:1px solid #7e9568;cursor:pointer;padding:8px 12px;font-weight:700;border-radius:4px}
.hint-button:disabled{opacity:.45;cursor:default}
#hintMeta{font-size:12px}
