:root{--ink:#29384d;--muted:#657187;--line:#dde5ee;--green:#3865b3}*{box-sizing:border-box}body{margin:0;background:#f8fafc;color:var(--ink);font:15px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;background:white;color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:10px 13px;font-weight:600;min-height:44px}button:hover{background:#edf3fc}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #efad42;outline-offset:3px}main{max-width:1650px;margin:auto;padding:26px 3%}.top{display:flex;align-items:center;gap:14px;margin-bottom:20px}.logo{font-size:40px;background:#fff1cc;border-radius:20px;width:68px;height:68px;text-align:center;line-height:68px}.top h1{font-size:27px;margin:0}.top p{margin:3px 0 0;font-size:13px;color:var(--muted)}nav{display:flex;gap:8px;margin-left:auto}nav button{font-size:13px}.active{background:#e4edfd;color:#325b9f;border-color:#bfcfed}.steps{display:flex;align-items:center;gap:25px;padding:14px 0 22px;font-size:13px;color:#52617a}.steps b{display:inline-grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#e7edf7;margin-right:5px}.support{margin-left:auto;display:flex;align-items:center;gap:7px}.support input{width:18px;height:18px;accent-color:#3865b3}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:24px;align-items:start}.canvas{min-width:0}.board-scroll{overflow:auto;padding:3px}.board{display:grid;grid-template-columns:repeat(9,minmax(90px,1fr));grid-template-rows:repeat(5,190px);gap:7px;min-width:880px}.cell{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:8px 7px;text-align:center;border:1px solid #d4e0ed;border-radius:15px;background:#f0f6ff;min-width:0;overflow:hidden}.cell:nth-child(3n+1){background:#fff8e7;border-color:#ebdfbc}.cell:nth-child(3n+2){background:#eff8f1;border-color:#cee4d3}.number{align-self:flex-start;font-size:10px;font-weight:700;color:#63718a}.icon{font-size:26px;line-height:1.25;margin:1px 0 5px}.text{font-size:17px;line-height:1.4;font-weight:700;overflow-wrap:anywhere}.pinyin{font-size:11px;line-height:1.4;color:#526b91;font-weight:500;margin:4px 0;overflow-wrap:anywhere}.english{font-size:10px;line-height:1.4;color:#586579;font-weight:400;overflow-wrap:anywhere}.tokens{margin-top:auto;display:flex;justify-content:center;flex-wrap:wrap;gap:2px;min-height:20px;padding-top:3px}.token{display:inline-grid;place-items:center;width:23px;height:23px;border:2px solid white;border-radius:50%;font-size:15px;line-height:1;box-shadow:0 1px 3px #0002}.start,.finish{justify-content:center;background:#e5edf9!important;border-color:#c2d4ef!important}.start strong,.finish strong{font-size:17px}.finish{background:#fff0be!important}.start .number,.finish .number{align-self:center;margin-bottom:5px}.start .tokens,.finish .tokens{margin-top:5px}.trail-note{grid-column:2/9;display:flex;align-items:center;justify-content:center;color:#8b96a5;font-size:14px;text-align:center}.cell.selected{outline:3px solid #4173c2;outline-offset:-3px}.cell.long .text{font-size:12px}.cell.long .pinyin{font-size:9px}.cell.long .english{font-size:9px}.cell.long .icon{display:none}.board-footer{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:var(--muted);margin:15px 3px}aside{background:#fff;border:1px solid var(--line);border-radius:20px;padding:20px;position:sticky;top:16px}.eyebrow{font-size:10px;color:var(--muted);letter-spacing:1px}h2{font-size:21px;margin:8px 0 15px}.count-label{display:flex;justify-content:space-between;align-items:center;font-size:12px}.count-label select{width:65px;margin:0}#players{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:14px}.player{display:flex;align-items:center;gap:3px;padding:4px;font-size:10px;border-radius:8px}.player.current{background:#e9effb}.roll-row{display:flex;align-items:center;gap:14px;margin:15px 0}.dice{font-size:60px;color:#3865b3;line-height:1.3}.primary{background:#3865b3;border-color:#3865b3;color:white}.primary:hover{background:#2c5294}.roll-row button{flex:1}.question{background:#f4f7fd;border-radius:14px;padding:15px}.question small{font-size:11px;color:#62718a}.question h3{font-size:23px;margin:12px 0 5px}.question .pinyin{font-size:15px}#questionEnglish{font-size:13px;color:#586579;line-height:1.5;margin:10px 0}.hint{font-size:11px;color:var(--muted);line-height:1.6}.subtle{background:transparent;color:var(--muted);border:0;font-size:12px}.full{width:100%}#answerActions{display:grid;gap:8px;margin-top:14px}#answerActions button{font-size:12px}label{display:block;font-size:12px;color:#586579;margin:12px 0}input,textarea,select{width:100%;display:block;background:white;color:var(--ink);border:1px solid #d5dfea;border-radius:8px;padding:9px;margin-top:5px}textarea{resize:vertical}details{margin-top:20px;border-top:1px solid var(--line);padding-top:15px}summary{font-size:12px;cursor:pointer}.backup{display:flex;gap:7px;margin-top:12px}.backup button{font-size:11px;flex:1;padding:8px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);border-radius:14px;padding:14px 22px;background:#29384d;color:white;z-index:20;max-width:90vw}.print-rules{display:none}.no-hints .cell .pinyin,.no-hints .cell .english,.no-hints #questionPinyin,.no-hints #questionEnglish{display:none}[hidden]{display:none!important}@media(max-width:1250px){.workspace{grid-template-columns:1fr}aside{position:static;max-width:700px;width:100%;margin:auto}.steps{flex-wrap:wrap;gap:12px}.support{margin-left:0}#players{max-width:300px}}@media(max-width:650px){main{padding:18px 12px}.top{flex-wrap:wrap;gap:10px}.logo{width:50px;height:50px;line-height:50px;font-size:30px}.top h1{font-size:23px}nav{width:100%;margin:7px 0 0}nav button{flex:1;font-size:12px;padding:8px}.steps{font-size:11px}.board-footer span:last-child{display:none}.trail-note{font-size:12px}}
@page{size:A4 landscape;margin:7mm}@media print{*{-webkit-print-color-adjust:exact;print-color-adjust:exact}body{background:white}main{padding:0;max-width:none}.top{margin-bottom:2mm;gap:3mm}.logo{font-size:22pt;width:auto;height:auto;line-height:1;background:transparent}.top h1{font-size:17pt}.top p{font-size:8pt;margin:0}nav,aside,.board-footer,#toast,.support{display:none!important}.steps{padding:0;margin:0 0 2mm;gap:8mm;font-size:8pt}.steps b{width:4mm;height:4mm}.workspace{display:block}.board-scroll{overflow:visible;padding:0}.board{min-width:0;grid-template-columns:repeat(9,minmax(0,1fr));grid-template-rows:repeat(5,30mm);gap:1mm}.cell{padding:1mm;border-radius:2mm;min-height:0;break-inside:avoid}.number{font-size:5.5pt}.icon{font-size:12pt;margin:0}.text{font-size:10pt;line-height:1.2}.pinyin{font-size:6.5pt;line-height:1.2;margin:1mm 0}.english{font-size:6pt;line-height:1.2}.tokens{display:none}.start strong,.finish strong{font-size:10pt}.trail-note{font-size:8pt}.cell.long .text{font-size:7pt}.cell.long .pinyin{font-size:5.5pt}.cell.long .english{font-size:5.5pt}.print-rules{display:block;margin-top:2mm}.print-rules h3{font-size:8pt;margin:0}.print-rules p{font-size:6.5pt;line-height:1.3;margin:1mm 0}.print-rules small{font-size:6pt}.cutouts{display:flex;gap:3mm;margin-top:2mm}.cutouts span{border:1px dashed #8490a0;border-radius:3mm;padding:1mm 3mm;font-size:8pt}}



/* One large, direct action for young players. */
.roll-row{flex-direction:column;gap:17px;margin:28px 0 24px;text-align:center}
.roll-row .dice-button{flex:none;width:152px;height:152px;min-height:152px;padding:24px;background:#fff;border:3px solid #3865b3;border-radius:30px;color:#315da7;box-shadow:0 7px 0 #ccdaf0,0 10px 20px #2c529410;touch-action:manipulation;transition:transform .15s,box-shadow .15s}
.roll-row .dice-button:hover:enabled{background:#f4f8ff;transform:translateY(-3px);box-shadow:0 10px 0 #ccdaf0,0 12px 24px #2c529418}
.roll-row .dice-button:active:enabled{transform:translateY(5px);box-shadow:0 2px 0 #ccdaf0}
.roll-row .dice-button:disabled{opacity:1;background:#f4f7fb;border-color:#b8c8df;box-shadow:0 4px 0 #e1e7ef;cursor:default;color:#6c82a4}
.dice-face{display:grid;width:100%;height:100%;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:8px}.pip{background:currentColor;border-radius:50%;visibility:hidden;align-self:center;justify-self:center;width:22px;height:22px}
.dice-face[data-value="1"] .pip:nth-child(5),.dice-face[data-value="2"] .pip:nth-child(1),.dice-face[data-value="2"] .pip:nth-child(9),.dice-face[data-value="3"] .pip:nth-child(1),.dice-face[data-value="3"] .pip:nth-child(5),.dice-face[data-value="3"] .pip:nth-child(9),.dice-face[data-value="4"] .pip:nth-child(1),.dice-face[data-value="4"] .pip:nth-child(3),.dice-face[data-value="4"] .pip:nth-child(7),.dice-face[data-value="4"] .pip:nth-child(9),.dice-face[data-value="5"] .pip:nth-child(1),.dice-face[data-value="5"] .pip:nth-child(3),.dice-face[data-value="5"] .pip:nth-child(5),.dice-face[data-value="5"] .pip:nth-child(7),.dice-face[data-value="5"] .pip:nth-child(9),.dice-face[data-value="6"] .pip:nth-child(1),.dice-face[data-value="6"] .pip:nth-child(3),.dice-face[data-value="6"] .pip:nth-child(4),.dice-face[data-value="6"] .pip:nth-child(6),.dice-face[data-value="6"] .pip:nth-child(7),.dice-face[data-value="6"] .pip:nth-child(9){visibility:visible}
#diceHint{font-size:18px;color:#315da7;line-height:1.4}#diceHint small{display:block;font-size:13px;color:#657187;font-weight:500;margin-top:4px}
@media(prefers-reduced-motion:reduce){.roll-row .dice-button{transition:none}}
/* Six physical faces, with perspective and a soft table shadow. */
.roll-row .dice-button{width:194px;height:194px;min-height:194px;padding:0;background:transparent;border:0;border-radius:24px;box-shadow:none;perspective:700px;overflow:visible}
.roll-row .dice-button:hover:enabled,.roll-row .dice-button:active:enabled,.roll-row .dice-button:disabled{background:transparent;box-shadow:none;transform:none;border:0;color:#315da7}
.dice-stage{display:block;position:relative;width:100%;height:100%;perspective:700px}
.dice-tilt{position:absolute;left:39px;top:32px;width:116px;height:116px;transform-style:preserve-3d;transform:rotateX(-16deg) rotateY(-22deg);z-index:1}
.dice-cube{position:relative;display:block;width:116px;height:116px;transform-style:preserve-3d}
.dice-cube .dice-face{position:absolute;inset:0;width:116px;height:116px;padding:18px;gap:5px;border:1px solid #aab9d0;border-radius:7px;backface-visibility:hidden;background:linear-gradient(145deg,#fff,#eef3fb);box-shadow:inset 0 0 0 3px #ffffffa0,inset -3px -4px 9px #cbd6e64d}
.dice-cube .pip{width:18px;height:18px;background:#2e5590;box-shadow:inset 1px 2px 3px #142f6680,0 1px 0 #fff}
.face-1{transform:translateZ(58px)}.face-2{transform:rotateY(90deg) translateZ(58px)}.face-3{transform:rotateX(90deg) translateZ(58px)}.face-4{transform:rotateX(-90deg) translateZ(58px)}.face-5{transform:rotateY(-90deg) translateZ(58px)}.face-6{transform:rotateY(180deg) translateZ(58px)}
.dice-cube .face-2,.dice-cube .face-5{background:linear-gradient(135deg,#e7eef9,#c5d3e8)}.dice-cube .face-3{background:linear-gradient(135deg,#fff,#f0f5fd)}.dice-cube .face-4,.dice-cube .face-6{background:linear-gradient(135deg,#e6edf7,#d3dfef)}
.dice-shadow{position:absolute;left:35px;bottom:14px;width:130px;height:24px;border-radius:50%;background:#294b7a30;filter:blur(8px)}
.roll-row{gap:3px;margin:18px 0 24px}.roll-row .dice-button:disabled .dice-cube{opacity:.86}
/* Opacity on a 3D parent flattens its faces; keep the cube opaque. */
.roll-row .dice-button:disabled .dice-cube{opacity:1}

/* At rest, show only the result face; tumbling temporarily adds the 3D tilt. */
.dice-tilt{transform:rotateX(0deg) rotateY(0deg)}
/* Follow the pawn: a lit trail, hopping counter and clear destination. */
.cell.visited{background:#fff9e6;border-color:#e7c574}
.cell.moving-cell,.cell.landed-cell{background:#fff4cd;border-color:#dda52d;box-shadow:inset 0 0 0 3px #e4aa24}
.cell.moving-cell{overflow:visible;z-index:3}
.cell.moving-cell .tokens .token{width:30px;height:30px;font-size:21px;box-shadow:0 3px 8px #0003;position:relative;z-index:4}
.cell.landed-cell .tokens .token{box-shadow:0 0 0 3px #f3ce62,0 3px 8px #0002}
@media print{.cell.visited,.cell.moving-cell,.cell.landed-cell{box-shadow:none;border-color:#d4e0ed;background:#f0f6ff}}
#batchDialog{width:min(1380px,96vw);max-width:96vw;height:94vh;max-height:94vh;padding:0;border:1px solid #d8e2ef;border-radius:20px;color:var(--ink);background:#fff}#batchDialog::backdrop{background:#172b475c;backdrop-filter:blur(3px)}#batchDialog[open]{display:flex;flex-direction:column}.batch-head{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--line);flex-shrink:0}.batch-head h2{margin:0;font-size:22px}.batch-head h2 small{font-size:14px;font-weight:400;color:var(--muted);margin-left:10px}.batch-head p{font-size:12px;color:var(--muted);margin:5px 0 0}.batch-body{overflow:auto;padding:0 24px 20px;flex:1}.batch-intro{display:grid;grid-template-columns:230px 1fr;gap:24px;align-items:start}.batch-intro details{border:0;margin:12px 0;padding:0}.batch-intro summary{font-weight:600;font-size:14px}.batch-intro textarea{font-size:13px}.paste-actions{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-size:12px;color:var(--muted)}.paste-actions button{font-size:12px}.batch-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:16px}.batch-toolbar strong{margin-right:auto}.batch-toolbar button{font-size:12px}.batch-disclosure{font-size:11px;color:#6b778a;line-height:1.6;max-width:1000px}#batchProgress{font-size:13px;color:#356294;min-height:20px}.batch-table-wrap{overflow:auto}.batch-table{border-collapse:collapse;width:100%;table-layout:fixed;min-width:850px}.batch-table th,.batch-table td{padding:8px 6px;border-bottom:1px solid #e5eaf0;text-align:left;vertical-align:top}.batch-table thead th{position:sticky;top:0;background:#eff4fa;font-size:12px;z-index:1}.batch-table th:nth-child(1){width:48px}.batch-table th:nth-child(2){width:64px}.batch-table th:nth-child(3){width:24%}.batch-table th:nth-child(4){width:23%}.batch-table th:nth-child(6){width:104px}.batch-table tbody th{font-size:12px;padding-top:20px;color:#7c8b9e}.batch-table input,.batch-table textarea{margin:0;font-size:13px;border-color:#e0e6ed;min-height:65px;line-height:1.5;resize:vertical}.batch-table input{font-size:25px;text-align:center;padding:5px;min-height:46px}.row-status{display:block;font-size:10px;color:#7a8799;margin-bottom:4px}.row-status.needs-review{color:#a46a19}.row-generate{padding:3px 10px;min-height:30px;font-size:11px}.batch-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 24px;border-top:1px solid var(--line);background:#f8fafc;flex-shrink:0}.batch-foot span{font-size:12px;color:var(--muted)}@media(max-width:650px){.batch-head,.batch-foot{padding:12px}.batch-body{padding:0 12px 12px}.batch-head h2{font-size:18px}.batch-head h2 small{display:none}.batch-intro{grid-template-columns:1fr;gap:0}.batch-toolbar strong{width:100%}.batch-foot button{font-size:12px;white-space:nowrap}}@media print{#batchDialog{display:none!important}}
.batch-intro summary{padding:12px 14px;background:#f0f5fc;border:1px solid #d8e3f2;border-radius:10px;color:#356294}.batch-intro details[open] summary{margin-bottom:8px}
/* The teacher's default workflow is one paste box and one action. */
#batchDialog{width:min(740px,94vw);height:auto;max-height:94vh}.batch-head{padding:22px 24px}.batch-head h2{font-size:23px}.batch-head p{font-size:13px;margin-top:8px}.batch-body{padding:18px 24px 8px}.simple-paste-label{display:flex;justify-content:space-between;margin:0 0 8px;font-size:14px;font-weight:600}.simple-paste-label span{font-size:12px;font-weight:400;color:#7a8799}#batchPaste{height:36vh;min-height:200px;font-size:16px;line-height:1.8;padding:14px 16px;resize:vertical;border:1px solid #ccd9eb;background:#fbfcfe}.simple-help{font-size:12px;color:#64748b;margin:10px 0}#batchProgress{font-size:13px;margin:8px 0;color:#356294;min-height:0}#batchProgress:empty{display:none}.simple-privacy{font-size:10px;color:#8a94a4;margin:14px 0 4px}#advancedBatch{margin-top:14px;padding-top:12px}#advancedBatch>summary{font-size:12px;color:#657187}#advancedBatch .batch-toolbar{border:0;margin-bottom:12px}.batch-foot{padding:16px 24px}.batch-foot #simpleGenerate{width:100%;font-size:17px;padding:13px}.batch-table{min-width:850px}.batch-table-wrap{max-height:50vh}.batch-head #batchClose{flex-shrink:0}@media(max-width:650px){.batch-head,.batch-body,.batch-foot{padding:16px}.batch-head h2{font-size:20px}#batchPaste{font-size:15px}.batch-head p{font-size:12px}}

/* Put the child's main action first; keep adult setup out of the way. */
#playPanel>.roll-row{margin:0 0 14px;gap:0}#playPanel .compact-turn{display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 6px;margin-bottom:14px;background:#f4f7fc;border-radius:10px}.compact-turn>span{font-size:11px;color:#768399}.compact-turn #turnTitle{font-size:15px;margin:0;line-height:1.4}#playPanel .question{margin-top:0}#playPanel .game-settings{margin-top:16px;padding-top:12px;border-top:1px solid #e8edf4}#playPanel .game-settings summary{font-size:12px;color:#7c889a;text-align:center}#playPanel #gameHint{margin:10px 0 0;font-size:11px}#playPanel #diceHint{font-size:20px}#playPanel #diceHint small{font-size:13px}.game-settings #players{margin-bottom:8px}

.icon-toggle{display:flex;align-items:center;gap:8px;font-size:14px;margin:12px 0 0}.icon-toggle input{width:18px;height:18px;margin:0;accent-color:#3864ad}.icon img{width:32px;height:32px;object-fit:contain;vertical-align:middle}#question .icon img{width:42px;height:42px}.batch-table th:nth-child(2){width:185px}.batch-table td:nth-child(2){min-width:185px}.batch-table input[data-field="iconUrl"]{font-size:12px;text-align:left;margin-top:7px}.icon-preview .icon img{width:44px;height:44px}.icon-preview{margin-top:6px}.icon-url-status{display:block;font-size:11px;white-space:normal;line-height:1.5;color:#64748b}.icon-url-status.needs-review{color:#aa4e26}@media print{.icon img{width:7mm;height:7mm}}

.account-link{font-size:13px;color:#365f9e;text-decoration:none;padding:10px 12px;white-space:nowrap}.cloud-title{margin-bottom:18px}.cloud-title label{font-size:12px;display:block;color:#60718b;margin-bottom:6px}.cloud-title input{font-size:17px;font-weight:600}.cloud-title #cloudSaveStatus{display:block;font-size:12px;color:#61816b;margin-top:7px}#cloudConflict{padding:12px;background:#fff5dc;border-radius:12px;font-size:13px;margin:12px 0}#cloudConflict button{font-size:12px;margin:5px}#cloudHistory{font-size:12px;white-space:nowrap;margin-bottom:10px}#historyDialog{width:min(620px,94vw);max-height:80vh;overflow:auto;border:1px solid #d8e2ef;border-radius:18px;padding:25px;color:#283c59}#historyList button{display:block;width:100%;margin:10px 0;text-align:left;font-size:13px}#historyDialog p{font-size:13px;color:#6a7990}@media print{.account-link,#accountButton,#historyDialog{display:none!important}}

/* ===== iumichina brand skin (同舟). Appearance only; app.js is unchanged. ===== */
:root{--ink:#10222B;--muted:#4F6169;--line:#DCE3E4;--green:#0E4D64;--teal:#0E4D64;--red:#C8372D;--gold:#E8B54A;--paper:#F8F8F2}
body{background:var(--paper);color:var(--ink)}
button{border-color:var(--line);color:var(--ink)}button:hover{background:#EEF3F4}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline-color:var(--teal)}
.primary{background:var(--teal);border-color:var(--teal);color:#fff}.primary:hover{background:#0b3e51}
/* Header */
.top{gap:16px;margin-bottom:8px}
.logo{display:block;width:60px;height:60px;line-height:0;background:none;border-radius:14px;overflow:hidden;flex-shrink:0}.logo img{width:100%;height:100%;display:block}
.top h1{font-size:26px;letter-spacing:-.01em}.top p{color:var(--muted)}
nav{align-items:center;gap:10px}
.mode-switch{display:flex;gap:2px;padding:4px;background:#E6EDEE;border-radius:14px}
.mode-switch button{border:0;background:transparent;border-radius:10px;min-height:40px;padding:8px 16px;color:var(--muted);white-space:nowrap}
.mode-switch button:hover{background:#fff8}
.mode-switch .active,.mode-switch .active:hover{background:var(--teal);color:#fff;box-shadow:0 2px 6px #0E4D6433}
#print{white-space:nowrap;font-size:13px}
.account-link{color:var(--teal);font-weight:600}
#accountButton{font-size:13px;white-space:nowrap}
/* Steps */
.steps{color:var(--muted);padding:12px 0 20px}.steps b{background:#E6EDEE;color:var(--teal)}
.support input,.icon-toggle input{accent-color:var(--teal)}
/* Board */
.cell{background:#fff;border-color:var(--line)}
.cell:nth-child(3n+1){background:#FFF8EC;border-color:#EEDDB8}
.cell:nth-child(3n+2){background:#EEF5F6;border-color:#CFE0E3}
.number{color:#55696F}.pinyin{color:#2F6B7C}.english{color:var(--muted)}
.start{background:var(--teal)!important;border-color:var(--teal)!important;color:#fff}.start .number{color:#CFE0E3}
.finish{background:var(--gold)!important;border-color:#D9A63A!important;color:var(--ink)}.finish .number{color:#6B4E12}
.trail-note{color:#7A8B91}
.cell.selected{outline-color:var(--teal)}
.cell.visited{background:#FBF1D9;border-color:#E8C77A}
.cell.moving-cell,.cell.landed-cell{background:#FCEBC0;border-color:var(--gold);box-shadow:inset 0 0 0 3px var(--gold)}
.board-footer{color:var(--muted)}
/* Play panel */
aside{border-color:var(--line);border-radius:20px;box-shadow:0 10px 30px #0E4D640d}
.roll-row .dice-button:hover:enabled,.roll-row .dice-button:active:enabled,.roll-row .dice-button:disabled{color:var(--teal)}
.dice-cube .dice-face{border-color:#B9CDD3;background:linear-gradient(145deg,#fff,#F3F7F7)}
.dice-cube .face-2,.dice-cube .face-5{background:linear-gradient(135deg,#EEF4F5,#D3E2E5)}.dice-cube .face-4,.dice-cube .face-6{background:linear-gradient(135deg,#EEF4F5,#DCE8EA)}
.dice-cube .pip{background:var(--red);box-shadow:inset 1px 2px 3px #7a1d1680,0 1px 0 #fff}
.dice-shadow{background:#0E4D6430}
#diceHint,#playPanel #diceHint{color:var(--teal)}#diceHint small{color:var(--muted)}
#playPanel .compact-turn{background:#EEF3F4}.compact-turn>span{color:var(--muted)}
.question{background:#F1F6F7}.question small{color:var(--muted)}#questionEnglish{color:var(--muted)}
.player.current{background:#E6EDEE}
#toast{background:var(--ink)}
/* Teacher dialogs */
#batchDialog,#historyDialog{border-color:var(--line);color:var(--ink)}#batchDialog::backdrop{background:#10222B5c}
#batchProgress{color:var(--teal)}#batchPaste{border-color:#CFDCDF;background:#FCFCF9}
.batch-table thead th{background:#EEF3F4}.batch-foot{background:var(--paper)}
.cloud-title #cloudSaveStatus{color:#2F6B7C}#cloudConflict{background:#FBF1D9}
/* Tablet & phone: keep the dice and question in reach while the board scrolls above. */
@media(max-width:1250px){aside{max-width:none}}
@media(max-width:900px){
 aside:has(#playPanel:not([hidden])){position:sticky;bottom:0;top:auto;z-index:10;border-radius:20px 20px 0 0;padding:12px 14px calc(12px + env(safe-area-inset-bottom));box-shadow:0 -8px 28px #10222B1f;max-height:60vh;overflow:auto;margin-top:8px}
 #playPanel{display:grid;grid-template-columns:96px 1fr;column-gap:14px;align-items:start}
 #playPanel>.roll-row{grid-row:1/3;display:block;width:96px;height:96px;margin:0;overflow:visible}
 #playPanel .roll-row .dice-button{transform:scale(.495);transform-origin:top left}
 #playPanel #diceHint{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 #playPanel .compact-turn{margin:0 0 8px;padding:6px 8px}
 #playPanel .question{padding:10px 12px}.question h3{font-size:20px;margin:6px 0 2px}#questionEnglish{margin:6px 0 0}
 #playPanel #gameHint{display:none}
 #playPanel .game-settings{grid-column:1/-1;margin-top:10px;padding-top:8px}
 .board{grid-template-columns:repeat(9,minmax(80px,1fr));grid-template-rows:repeat(5,172px);min-width:780px}
}
@media(max-width:650px){
 .top{flex-wrap:wrap}.logo{width:46px;height:46px}.top h1{font-size:22px}
 nav{width:100%;margin:4px 0 0;gap:6px}
 .mode-switch{flex:1}.mode-switch button{flex:1;padding:8px 6px;font-size:13px}
 #print{display:none}
 .account-link{padding:8px 4px;font-size:12px}#accountButton{min-height:40px;padding:8px 10px;font-size:12px}
 .steps{gap:10px 14px;padding:8px 0 14px}
}
@media print{.logo img{width:12mm;height:12mm}.start{color:#fff}.mode-switch{display:none}}

/* ===== Toolbar v2: one calm system. Mode switch on a soft track; utilities as quiet icon buttons; sign-in is the only filled button. ===== */
nav{gap:4px}
.mode-switch{padding:3px;background:#E9EEEF;border-radius:12px;margin-right:6px}
.mode-switch button{min-height:36px;padding:7px 16px;border-radius:9px;font-size:13px;font-weight:600;color:var(--muted)}
.mode-switch button:hover{background:transparent;color:var(--ink)}
.mode-switch .active,.mode-switch .active:hover{background:#fff;color:var(--teal);box-shadow:0 1px 2px #10222B1f,0 0 0 1px #10222B0d}
.tool-sep{width:1px;height:22px;background:var(--line);margin:0 6px}
nav .tool-btn,nav .account-link,nav #accountButton{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:8px 12px;border:0;border-radius:10px;background:transparent;color:var(--ink);font-size:13px;font-weight:600;line-height:1;text-decoration:none;white-space:nowrap;box-shadow:none}
nav .tool-btn:hover,nav .account-link:hover{background:#EBF0F1;color:var(--teal)}
nav .tool-btn::before,nav .account-link::before,nav #accountButton::before{content:"";width:17px;height:17px;flex-shrink:0;background:currentColor;-webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat}
#print{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9V3h12v6'/><rect x='3' y='9' width='18' height='8' rx='2'/><path d='M7 14h10v7H7z'/></svg>")}
nav .account-link{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='7' height='7' rx='1.5'/><rect x='14' y='3' width='7' height='7' rx='1.5'/><rect x='3' y='14' width='7' height='7' rx='1.5'/><rect x='14' y='14' width='7' height='7' rx='1.5'/></svg>")}
nav #accountButton{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/></svg>");margin-left:4px;padding:8px 16px;background:var(--teal);color:#fff}
nav #accountButton:hover{background:#0b3e51;color:#fff}
@media(max-width:650px){
 nav{gap:2px}.mode-switch{margin-right:2px}.mode-switch button{padding:7px 8px;font-size:12.5px}
 .tool-sep{display:none}
 nav .account-link{padding:8px 8px;font-size:12.5px}
 nav #accountButton{padding:8px 11px;font-size:12.5px;margin-left:0}
}
@media(max-width:380px){nav .account-link{font-size:0;gap:0;padding:8px 10px}nav .account-link::before{width:19px;height:19px}}
nav #accountButton.signed-in{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/><path d='M16 17l5-5-5-5'/><path d='M21 12H9'/></svg>");background:transparent;color:var(--muted);padding:8px 12px}nav #accountButton.signed-in:hover{background:#EBF0F1;color:var(--ink)}

/* ===== Toolbar v3: 打印 · 编辑游戏 · ＋新建游戏 (primary) · 登录 / 个人中心 ===== */
#editGame{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/></svg>")}
nav #newGame{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><path d='M12 5v14M5 12h14'/></svg>");background:transparent;color:var(--ink);padding:8px 12px;margin-left:4px}
nav #newGame:hover{background:#EBF0F1;color:var(--teal)}nav #newGame:disabled{opacity:.6}
nav #accountButton{background:#fff;color:var(--teal);box-shadow:inset 0 0 0 1.5px #0E4D6455;margin-left:6px}
nav #accountButton:hover{background:#EEF3F4;color:var(--teal)}
#accountMenu{position:relative;margin:0 0 0 6px;padding:0;border:0}
#accountMenu>summary{display:flex;align-items:center;gap:8px;min-height:40px;padding:4px 12px 4px 4px;border-radius:999px;list-style:none;cursor:pointer;font-size:13px;font-weight:600;color:var(--ink)}
#accountMenu>summary::-webkit-details-marker{display:none}
#accountMenu>summary:hover,#accountMenu[open]>summary{background:#EBF0F1}
#accountMenu .avatar{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--teal);color:#fff;font-size:14px;font-weight:700}
#accountMenu .account-pop{position:absolute;right:0;top:calc(100% + 8px);z-index:30;min-width:220px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 14px 32px #10222B24}
#accountMenu .account-email{margin:4px 10px 8px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
#accountMenu .account-pop a,#accountMenu .account-pop button{display:flex;align-items:center;width:100%;min-height:42px;padding:8px 10px;border:0;border-radius:9px;background:transparent;color:var(--ink);font-size:14px;font-weight:600;text-decoration:none;text-align:left}
#accountMenu .account-pop a:hover,#accountMenu .account-pop button:hover{background:#EEF3F4}
#accountMenu .account-signout{color:var(--muted)!important;border-top:1px solid var(--line)!important;border-radius:0 0 9px 9px!important;margin-top:4px}
@media(max-width:650px){
 nav{justify-content:flex-end}
 nav button,nav .tool-btn{flex:none}
 nav #newGame{padding:8px 14px;margin-left:0}
 #accountMenu .menu-label{display:none}#accountMenu>summary{padding:4px}
}
@media print{#accountMenu,#newGame,#editGame{display:none!important}}

/* ===== Toolbar v4: only ＋新建游戏 when signed out; 打印 lives in 个人中心; in-page sign-in dialog ===== */
#accountMenu .account-pop #print{display:flex;width:100%;min-height:42px;padding:8px 10px;border:0;border-radius:9px;background:transparent;color:var(--ink);font-size:14px;font-weight:600;gap:8px}
#accountMenu .account-pop #print::before{display:none}
#accountMenu .account-pop #print:hover{background:#EEF3F4;color:var(--ink)}
@media(max-width:650px){#accountMenu .account-pop #print{display:flex!important}}
#gameLogin{width:min(420px,92vw);padding:28px;border:1px solid var(--line);border-radius:20px;color:var(--ink);background:#fff;box-shadow:0 24px 60px #10222B33}
#gameLogin::backdrop{background:#10222B66;backdrop-filter:blur(3px)}
#gameLogin h2{font-size:22px;margin:0 0 6px}
#gameLogin .gl-sub{font-size:13px;color:var(--muted);margin:0 0 18px;line-height:1.6}
#gameLogin label{font-size:13px;color:var(--ink);margin:12px 0 0}
#gameLogin input{margin-top:6px;padding:11px 12px;border-radius:10px;border-color:var(--line);background:var(--paper);font-size:15px}
#gameLogin input[readonly]{color:var(--muted)}
#gameLogin #glSubmit{width:100%;min-height:46px;margin-top:16px;font-size:15px}
#gameLogin .gl-actions{display:flex;justify-content:space-between;margin-top:8px}
#gameLogin .gl-actions button{border:0;background:transparent;color:var(--muted);font-size:13px;min-height:40px;padding:8px 4px}
#gameLogin .gl-actions button:hover{color:var(--teal)}
#gameLogin #glStatus{font-size:13px;color:var(--teal);margin:12px 0 0;min-height:1em}
#gameLogin #glStatus:empty{display:none}
#gameLogin .gl-close{position:absolute;top:14px;right:14px;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:16px}
#gameLogin .gl-close:hover{background:#EEF3F4}
@media print{#gameLogin{display:none!important}}

/* ===== Header v2: the same horizontal colour logo as iumichina.com, then the game's own name ===== */
.top{gap:18px}
.logo.brand-logo{width:auto;height:auto;border-radius:0;overflow:visible;background:none;flex-shrink:0}
.logo.brand-logo img{display:block;width:auto;height:52px}
.brand-sep{align-self:center;width:1px;height:40px;background:var(--line);flex-shrink:0}
.game-name{min-width:0}
.game-name h1{font-size:24px;line-height:1.25;margin:0;letter-spacing:-.01em}
.game-name p{margin:2px 0 0;font-size:13px;color:var(--muted)}
@media(max-width:650px){
 .top{gap:12px}
 .logo.brand-logo img{height:38px}
 .brand-sep{height:32px}
 .game-name h1{font-size:19px}.game-name p{font-size:11.5px}
}
@media(max-width:360px){.logo.brand-logo img{height:32px}.game-name h1{font-size:17px}}
@media print{.logo.brand-logo img{height:10mm}.brand-sep{height:8mm}}

/* One A4 landscape sheet. Keep this after all screen and brand overrides. */
@media print {
  html, body { margin:0; padding:0; background:#fff; }
  main { width:100%; max-width:283mm; margin:0 auto; padding:0; }
  .top { flex-wrap:nowrap; gap:3mm; margin:0 0 2mm; }
  .logo.brand-logo img { width:auto; height:10mm; }
  .brand-sep { height:8mm; }
  .game-name h1 { font-size:16pt; line-height:1.2; }
  .game-name p { font-size:8pt; margin:0; }
  .steps { flex-wrap:nowrap; gap:8mm; padding:0; margin:0 0 2mm; font-size:8pt; }
  .steps b { width:4mm; height:4mm; }
  .workspace { display:block; }
  .board-scroll { overflow:visible; padding:0; }
  .board { min-width:0; width:100%; grid-template-columns:repeat(9,minmax(0,1fr)); grid-template-rows:repeat(5,32mm); gap:1mm; break-inside:avoid; page-break-inside:avoid; }
  .cell { min-height:0; padding:1mm; border-radius:2mm; box-shadow:none!important; outline:none!important; break-inside:avoid; }
  .cell.visited,.cell.moving-cell,.cell.landed-cell { background:#fff; border-color:var(--line); }
  .cell:nth-child(3n+1) { background:#FFF8EC; border-color:#EEDDB8; }
  .cell:nth-child(3n+2) { background:#EEF5F6; border-color:#CFE0E3; }
  nav,aside,.support,.board-footer,.print-rules,.tokens,#toast,dialog { display:none!important; }
}

@media screen and (max-width:650px){nav #print:not([hidden]){display:inline-flex;font-size:12px;padding:8px}}

.batch-foot #simpleGenerate,.batch-foot #batchApply{width:auto;flex:1;font-size:16px;padding:13px;white-space:nowrap}.batch-foot #cloudHistory{flex:none}
@media screen and (max-width:650px){.batch-foot{flex-wrap:wrap;gap:8px}.batch-foot #cloudHistory{order:3;flex-basis:100%;margin:0;min-height:30px;padding:4px}.batch-foot #simpleGenerate,.batch-foot #batchApply{font-size:14px;padding:10px}}

/* Route selection changes square positions, never the game state. */
.board-style-setting{margin:14px 0 4px;padding-top:12px;border-top:1px solid var(--line)}
.board-style-setting label{margin:0 0 6px;font-weight:600;color:var(--ink)}
.board-style-setting select{margin:0;font-size:13px;min-height:44px;background:#fff}
.board-style-setting .hint{margin:7px 0 0;font-size:11px}
@media screen {
 .board[data-layout]:not([data-layout="classic"]){grid-template-columns:repeat(7,minmax(100px,1fr));grid-template-rows:repeat(5,190px);min-width:742px}
}
@media print {
 .board[data-layout]:not([data-layout="classic"]){grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(5,32mm);min-width:0}
}
/* All supported counts fit the same printable board height. */
@media screen{.board[data-layout]{grid-template-columns:repeat(var(--board-columns,9),minmax(90px,1fr));grid-template-rows:repeat(var(--board-rows,5),190px);min-width:var(--board-min,880px)}.board[data-layout]:not([data-layout="classic"]){grid-template-columns:repeat(var(--board-columns,7),minmax(100px,1fr));grid-template-rows:repeat(var(--board-rows,5),190px);min-width:var(--board-min,742px)}}
@media print{.board[data-layout],.board[data-layout]:not([data-layout="classic"]){grid-template-columns:repeat(var(--board-columns,9),minmax(0,1fr));grid-template-rows:repeat(var(--board-rows,5),var(--print-row,32mm));min-width:0}}
#batchCount{font-size:14px;min-height:44px}
#countWarning{margin:10px 0;padding:12px;border:1px solid #E8D5A4;background:#FFF8EC;border-radius:10px;font-size:12px}#countWarning button{font-size:12px;margin:3px;padding:8px}
@media print{
 .board[data-count="16"] .text,.board[data-count="20"] .text{font-size:12pt}
 .board[data-count="16"] .pinyin,.board[data-count="20"] .pinyin{font-size:8pt}
 .board[data-count="16"] .english,.board[data-count="20"] .english{font-size:7.5pt;line-height:1.3}
 .board[data-count="24"] .text{font-size:11pt}
 .board[data-count="24"] .pinyin,.board[data-count="24"] .english{font-size:7pt}
 .board[data-count] .cell.long .text{font-size:8pt}
 .board[data-count] .cell.long .pinyin,.board[data-count] .cell.long .english{font-size:6pt}
}

nav #myGames::before{display:none}

.print-type-setting{margin:18px 0}.print-type-setting select{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:white;font:inherit}.print-type-preview{display:flex;align-items:center;gap:18px;padding:16px;margin-top:10px;border:1px solid #e1e7e3;border-radius:10px;background:#f8f8f2}.print-type-preview>span{font-size:11px;color:#71818a;white-space:nowrap}.print-type-preview strong{line-height:1.35;overflow-wrap:anywhere}
@media print{.board[data-print-font]:not([data-print-font="0"]) .cell .text{font-size:var(--print-zh-size)!important;line-height:1.2}}

nav #defaultGame{--ico:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 4 4 9l5 5'/><path d='M4 9h10a6 6 0 0 1 0 12h-3'/></svg>")}
@media print{#defaultGame{display:none!important}}

/* Keep the creation flow focused; optional controls stay collapsed. */
#batchDialog{width:min(640px,94vw)}
#batchPaste{height:28vh;min-height:180px}
.game-options{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}
.game-options>summary,#advancedBatch>summary{font-size:13px;font-weight:600;color:var(--teal);cursor:pointer}
.game-options[open]>summary{margin-bottom:16px}
.batch-foot{justify-content:flex-end;gap:12px}
.batch-foot #simpleGenerate{width:auto;font-size:14px;padding:11px 18px}
.batch-foot #batchApply{font-size:14px;padding:11px 18px}

#boardEditBar:not([hidden]){display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px;margin:12px 0 20px;border:1px solid #ccdbdf;border-radius:14px;background:#eef4f4}
#boardEditBar strong,#boardEditBar span{display:block}#boardEditBar span{font-size:12px;color:var(--muted);margin-top:4px}
#boardEditBar label{flex:1;min-width:160px;font-size:12px}#boardEditName{margin:4px 0 0}
.board-editing .workspace{grid-template-columns:1fr}.board-editing .workspace>aside,.board-editing .steps{display:none}
.board-editing .cell:not(.start):not(.finish){cursor:pointer}.board-editing .cell:not(.start):not(.finish):hover{outline:3px solid var(--teal);outline-offset:-3px}
#squareEditor{width:min(440px,92vw);max-height:90vh;overflow:auto;padding:24px;border:1px solid var(--line);border-radius:18px;color:var(--ink)}
#squareEditor::backdrop{background:#10222b66}#squareEditor h2{margin:0 0 16px}#squareEditor label{display:block;margin:12px 0;font-weight:600}#squareEditor textarea{width:100%;box-sizing:border-box}#squareEditor p{font-size:12px;color:var(--muted)}#squareEditor>div{display:flex;justify-content:flex-end;gap:12px}
@media print{#boardEditBar,#squareEditor{display:none!important}}

/* ===== Board editing v2: a clear edit mode. Sticky white edit bar, tappable squares, a focused square editor. ===== */
#boardEditBar:not([hidden]){position:sticky;top:8px;z-index:15;display:grid;grid-template-columns:auto minmax(180px,1fr) auto auto;align-items:center;gap:10px 18px;padding:12px 14px 12px 16px;margin:6px 0 18px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 10px 26px #10222B14}
#boardEditBar .edit-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:999px;background:#FBF1D9;color:#6B4E12;font-size:12px;font-weight:700;white-space:nowrap}
#boardEditBar .edit-chip::before{content:"";width:13px;height:13px;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/></svg>") center/contain no-repeat}
#boardEditBar .edit-title{display:block;flex:none;min-width:0;margin:0}
#boardEditBar .edit-title-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#boardEditBar #boardEditName{margin:0;padding:6px 10px;border:1.5px solid transparent;border-radius:10px;background:transparent;font-size:20px;font-weight:700;color:var(--ink);text-overflow:ellipsis}
#boardEditBar #boardEditName:hover{background:#F3F7F7}
#boardEditBar #boardEditName:focus{background:#fff;border-color:#0E4D64;outline:0;box-shadow:0 0 0 3px #0E4D6422}
#boardEditBar .edit-hint{margin:0;font-size:12.5px;color:var(--muted);white-space:nowrap}
#boardEditBar .edit-actions{display:flex;align-items:center;gap:8px}
#boardEditBar .edit-btn{min-height:40px;padding:8px 14px;border-radius:10px;font-size:13px;font-weight:600;background:#fff;border:1px solid var(--line);color:var(--ink);white-space:nowrap;display:inline-flex;align-items:center;gap:7px}
#boardEditBar #boardBatch::before{content:"";width:15px;height:15px;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><path d='M9 6h11M9 12h11M9 18h11'/><circle cx='4.5' cy='6' r='1.2' fill='black'/><circle cx='4.5' cy='12' r='1.2' fill='black'/><circle cx='4.5' cy='18' r='1.2' fill='black'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><path d='M9 6h11M9 12h11M9 18h11'/><circle cx='4.5' cy='6' r='1.2' fill='black'/><circle cx='4.5' cy='12' r='1.2' fill='black'/><circle cx='4.5' cy='18' r='1.2' fill='black'/></svg>") center/contain no-repeat}
#boardEditBar .edit-btn:hover{background:#EEF3F4}
#boardEditBar .edit-btn.quiet{border-color:transparent;background:transparent;color:var(--muted)}
#boardEditBar .edit-btn.quiet:hover{background:#EEF3F4;color:var(--ink)}
#boardEditBar #boardEditSave{min-height:40px;padding:8px 18px;border-radius:10px;font-size:14px;font-weight:650;display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
#boardEditBar #boardEditSave::before{content:"";width:16px;height:16px;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center/contain no-repeat}
/* squares become obviously tappable while editing */
body.board-editing .board-scroll{border-radius:20px;outline:2px dashed #E8B54A99;outline-offset:6px}
body.board-editing .board .cell:not(.start):not(.finish){cursor:pointer;position:relative}
body.board-editing .board .cell:not(.start):not(.finish)::after{content:"";position:absolute;top:8px;right:8px;width:22px;height:22px;border-radius:50%;background:#fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/></svg>") center/12px no-repeat;box-shadow:0 1px 3px #10222B26;opacity:0;transform:scale(.8);transition:opacity .15s,transform .15s}
body.board-editing .board .cell:not(.start):not(.finish):hover{transform:translateY(-3px);box-shadow:0 10px 22px #0E4D641f;outline:2px dashed #0E4D6466;outline-offset:-4px}
body.board-editing .board .cell:not(.start):not(.finish):hover::after,body.board-editing .board .cell.selected::after{opacity:1;transform:none}
body.board-editing .board .cell.selected{outline:3px solid #E8B54A!important;outline-offset:-3px;box-shadow:0 0 0 4px #E8B54A33}
body.board-editing .board .cell:has(.pinyin:empty):has(.english:empty) {border-style:dashed;background:#FCFCFA}
body.board-editing .board .cell:has(.pinyin:empty):has(.english:empty) .text{color:#8A9AA0;font-weight:500;font-size:14px}
body.board-editing .board .cell:has(.pinyin:empty):has(.english:empty) .text::before{content:"＋";display:block;font-size:22px;line-height:1.2;color:#0E4D64;font-weight:400}
/* the square editor */
#squareEditor{width:min(480px,92vw);padding:26px 26px 22px;border-radius:20px;box-shadow:0 24px 60px #10222B33}
#squareEditor::backdrop{background:#10222B59;backdrop-filter:blur(2px)}
#squareEditor h2{display:flex;align-items:center;gap:10px;margin:0 0 18px;font-size:20px}
#squareEditor h2::before{content:"";width:30px;height:30px;border-radius:9px;background:#FBF1D9 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/></svg>") center/15px no-repeat}
#squareEditor .sq-field{display:block;margin:0 0 14px;font-weight:400}
#squareEditor .sq-field>span{display:block;font-size:12px;font-weight:650;color:var(--muted);letter-spacing:.04em;margin-bottom:6px}
#squareEditor textarea{display:block;width:100%;margin:0;padding:10px 12px;border:1.5px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);resize:vertical;line-height:1.5}
#squareEditor textarea:focus{outline:0;background:#fff;border-color:#0E4D64;box-shadow:0 0 0 3px #0E4D6422}
#squareEditor .sq-zh textarea{font-size:24px;font-weight:700;letter-spacing:.02em}
#squareEditor .sq-py textarea{font-size:16px;font-weight:600;color:#2F6B7C}
#squareEditor .sq-en textarea{font-size:14px}
#squareEditor p{margin:4px 0 16px;font-size:12px;color:var(--muted)}
#squareEditor>div{display:flex;justify-content:space-between;gap:10px}
#squareEditor #squarePinyin{display:inline-flex;align-items:center;gap:7px;background:#fff;border:1px solid var(--line);border-radius:10px;font-size:13px;color:#0E4D64}
#squareEditor #squarePinyin::before{content:"";width:15px;height:15px;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2l1.9 5.6L19.5 9.5l-5.6 1.9L12 17l-1.9-5.6L4.5 9.5l5.6-1.9z'/><path d='M19 15l.8 2.2 2.2.8-2.2.8L19 21l-.8-2.2-2.2-.8 2.2-.8z'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M12 2l1.9 5.6L19.5 9.5l-5.6 1.9L12 17l-1.9-5.6L4.5 9.5l5.6-1.9z'/><path d='M19 15l.8 2.2 2.2.8-2.2.8L19 21l-.8-2.2-2.2-.8 2.2-.8z'/></svg>") center/contain no-repeat}
#squareEditor #squareDone{min-width:110px;border-radius:10px;font-size:15px}
@media(max-width:900px){#boardEditBar:not([hidden]){grid-template-columns:auto minmax(0,1fr);top:6px}#boardEditBar .edit-hint{display:none}#boardEditBar .edit-actions{grid-column:1/-1;justify-content:flex-end}}
@media(max-width:520px){#boardEditBar:not([hidden]){padding:12px}#boardEditBar .edit-actions{flex-wrap:wrap}#boardEditBar .edit-actions>*{flex:1 1 0;min-width:0;justify-content:center}#boardEditBar #boardEditSave{order:-1;flex:1 1 100%}#boardEditBar #boardBatch::before{display:none}#boardEditBar #boardEditName{font-size:17px}body.board-editing .board-scroll{outline-offset:2px}}
@media(prefers-reduced-motion:reduce){body.board-editing .board .cell{transition:none}body.board-editing .board .cell:hover{transform:none}}

#boardDisplaySettings{grid-column:1/-1;display:flex;align-items:center;gap:24px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:12px}
#boardDisplaySettings .board-hints{display:flex;align-items:center;gap:8px;flex:none;margin:0;font-size:13px;min-width:0}
#boardDisplaySettings .board-hints input{width:17px;height:17px;margin:0}
#boardDisplaySettings .print-type-setting{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0;padding:0;border:0;background:none}
#boardDisplaySettings .print-type-setting label{flex:none;min-width:0;margin:0;font-size:13px}
#boardDisplaySettings #batchPrintFont{width:auto;margin:0;padding:6px 10px;font-size:13px}
#boardDisplaySettings .print-type-preview{display:none}
#boardDisplaySettings .print-type-setting .simple-help{display:none}
@media(max-width:520px){#boardDisplaySettings{gap:12px}}

/* Dice in the classic board's first open lane; sidebar shows the current player. */
#boardDicePanel{display:flex;align-items:center;justify-content:center;gap:18px;min-width:0;min-height:0;padding:6px}
#boardDicePanel .roll-row{flex:none;display:flex;flex-direction:column;gap:0;margin:0}
#boardDicePanel .dice-button{width:130px;height:130px;min-height:130px}
#boardDicePanel .dice-stage{width:194px;height:194px;transform:scale(.67);transform-origin:top left}
#boardDicePanel #diceHint{font-size:14px;line-height:1.3}#boardDicePanel #diceHint small{font-size:11px;margin-top:2px}
#boardDicePanel .board-challenge{max-width:420px;max-height:100%;overflow:auto;min-width:0}
#boardDicePanel .board-challenge:has(#questionCard[hidden]){display:none}
#boardDicePanel .question{padding:8px 12px}#boardDicePanel .question h3{font-size:19px;margin:3px 0}#boardDicePanel .question p{margin:3px 0;font-size:12px}
#boardDicePanel #answerActions{display:flex;gap:8px;margin-top:6px}#boardDicePanel #answerActions button{font-size:12px;padding:7px 10px;min-height:36px}
#boardDiceDock:empty{display:none}#boardDiceDock #boardDicePanel{margin-bottom:14px}
#playPanel{display:block}#playPanel .compact-turn{margin:0;padding:12px;flex-direction:column}#playPanel .compact-turn #turnTitle{font-size:18px}
.canvas>.game-settings{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:12px}.canvas>.game-settings #players{max-width:300px}
.board-editing #boardDicePanel,.board-editing .canvas>.game-settings{display:none}
@media print{#boardDicePanel,#boardDiceDock,.canvas>.game-settings{display:none!important}}

.no-pinyin .cell .pinyin,.no-pinyin #questionPinyin{display:none!important}
.no-english .cell .english,.no-english #questionEnglish{display:none!important}

/* The board lane contains only the die; the task sits below the current player. */
#boardDicePanel #diceHint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#playPanel .board-challenge{margin-top:14px}
#playPanel .board-challenge:has(#questionCard[hidden]){display:none}
#playPanel .board-challenge .question{overflow-wrap:anywhere}

#boardDisplaySettings{display:none;min-width:0}
.board-editing #boardDisplaySettings{display:flex;justify-content:center;align-content:center;align-self:center;flex-wrap:wrap;gap:14px 24px;margin:12px;padding:18px;border:1px solid var(--line);border-radius:14px;background:#fff}
#boardDisplaySettings .print-type-setting{justify-content:center}
@media print{#boardDisplaySettings{display:none!important}}

#boardEditBar:not([hidden]){grid-template-columns:auto minmax(180px,1fr) auto}
@media(max-width:900px){#boardEditBar:not([hidden]){grid-template-columns:auto minmax(0,1fr)}}

/* Display controls before batch entry, followed by the play action. */
#boardEditBar:not([hidden]){grid-template-columns:auto minmax(120px,1fr) auto auto;gap:12px}
#boardEditBar #boardDisplaySettings{grid-column:auto;display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin:0;padding:0;border:0;background:transparent}
#boardEditBar #boardDisplaySettings .board-hints{white-space:nowrap}
#boardEditBar #boardDisplaySettings .print-type-setting{gap:8px}
#boardEditBar #batchPrintFont{max-width:170px}
#boardEditBar .edit-actions{grid-column:auto;display:flex;gap:8px;flex-wrap:nowrap}
#boardPlay{white-space:nowrap;border-radius:10px;min-height:40px;font-size:14px}
.board-editing nav #editGame{display:none}
@media(max-width:1100px){#boardEditBar:not([hidden]){grid-template-columns:auto minmax(0,1fr)}#boardEditBar #boardDisplaySettings{grid-column:1/-1}#boardEditBar .edit-actions{grid-column:1/-1;justify-content:flex-end}}
@media print{#boardEditBar #boardDisplaySettings{display:none!important}}

/* A single, calm task card with a compact player header. */
aside:has(#playPanel:not([hidden])){padding:20px;border-radius:22px;box-shadow:0 8px 28px #10222b08}
#playPanel .compact-turn{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:0 0 18px;margin:0;background:none;border-radius:0;border-bottom:1px solid var(--line)}
#turnAvatar{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:50%;background:#f7f3e8;border:2px solid var(--avatar-color);font-size:27px;line-height:1}
#playPanel .turn-copy{min-width:0}.turn-copy>span{font-size:10px;color:var(--muted);letter-spacing:.03em}
#playPanel .compact-turn #turnTitle{font-size:16px;line-height:1.4;margin:4px 0 0;overflow-wrap:anywhere}
#playPanel .board-challenge{margin-top:20px}
#playPanel .question{background:none;padding:0;text-align:center;border-radius:0}
#playPanel #questionLabel{display:inline-block;max-width:100%;padding:5px 10px;border-radius:8px;background:#f4f6f3;color:#64767c;font-size:10px;line-height:1.6}
#playPanel #question{font-size:34px;line-height:1.35;letter-spacing:.04em;margin:23px 0 8px;overflow-wrap:anywhere}
#playPanel #questionPinyin{font-size:18px;font-weight:500;line-height:1.5;margin:0 0 10px;color:#357489}
#playPanel #questionEnglish{font-size:14px;line-height:1.65;margin:0;color:#66767b}
#playPanel #questionPinyin:empty,#playPanel #questionEnglish:empty{display:none}
#playPanel #answerActions{display:flex;flex-direction:column;gap:7px;margin-top:25px;padding-top:18px;border-top:1px solid #eef1ee}
#playPanel #answerActions button{width:100%;min-height:44px;padding:10px 12px;border-radius:11px;font-size:13px}
#playPanel #correct{box-shadow:0 3px 7px #0e4d6414}
#playPanel #wrong{background:transparent;border-color:transparent;color:#59717b;font-weight:500}
#playPanel #wrong:hover{background:#f1f6f6;color:var(--teal)}
#playPanel #gameHint{text-align:center;margin-top:12px}
@media(max-width:650px){aside:has(#playPanel:not([hidden])){padding:14px 18px}#playPanel .compact-turn{padding-bottom:10px}#playPanel .board-challenge{margin-top:12px}#playPanel #question{font-size:28px;margin-top:14px}#playPanel #answerActions{margin-top:14px;padding-top:12px}}

#gameLoading{display:none}
html.game-loading #gameLoading,html.game-load-error #gameLoading{display:block;text-align:center;padding:64px 20px;color:var(--muted)}
html.game-loading .workspace,html.game-loading .steps,html.game-loading #boardEditBar,html.game-load-error .workspace,html.game-load-error .steps,html.game-load-error #boardEditBar{display:none!important}
html.game-loading .game-name,html.game-load-error .game-name,html.game-loading nav,html.game-load-error nav{visibility:hidden}
.loading-recovery{display:none;align-items:center;justify-content:center;gap:20px;margin-top:20px}
html.game-load-error .loading-recovery{display:flex}

#boardDisplaySettings .board-style-setting{display:flex;align-items:center;gap:8px;margin:0;padding:0;border:0}
#boardDisplaySettings .board-style-setting label{flex:none;min-width:0;margin:0;white-space:nowrap;font-size:13px}
#boardDisplaySettings #boardStyle{width:auto;max-width:170px;margin:0;padding:6px 10px;font-size:13px}
#boardDisplaySettings #boardStyleHint{display:none}
@media(min-width:1101px){#boardEditBar #boardDisplaySettings{max-width:640px}}

/* Aligned editor toolbar and player settings */
#boardEditBar:not([hidden]){grid-template-columns:auto minmax(140px,1fr) auto auto;gap:16px;padding:14px 18px;background:#fff;box-shadow:0 4px 16px #10222b08}
#boardEditBar .edit-chip{margin:0;padding:6px 10px}
#boardEditBar #boardEditName{font-size:18px;padding:8px 4px}
#boardEditBar #boardDisplaySettings{max-width:none;gap:10px;justify-content:flex-start;flex-wrap:nowrap;padding-left:18px;border-left:1px solid var(--line);border-radius:0}
#boardEditBar #boardDisplaySettings label{font-size:12px;color:var(--muted);font-weight:500}
#boardEditBar #boardDisplaySettings select{height:38px;padding:6px 9px;border-radius:8px;background:#f8faf9;font-size:13px}
#boardEditBar #boardStyle{max-width:150px}
#boardEditBar #batchPrintFont{width:100px;max-width:100px}
#boardEditBar #boardDisplaySettings .board-hints{gap:5px;padding:8px 6px;white-space:nowrap}
#boardEditBar .board-hints input{accent-color:var(--teal,#0e4d64);width:16px;height:16px}
#boardEditBar #boardDisplaySettings .print-type-setting{flex-wrap:nowrap;gap:6px}
#boardEditBar .edit-actions{gap:8px;padding-left:14px;border-left:1px solid var(--line)}
#boardEditBar .edit-actions button{height:38px;min-height:38px;padding:8px 12px;border-radius:8px;font-size:13px;white-space:nowrap}
#playPanel .compact-turn{position:relative}
#playPanel .compact-turn .game-settings{position:relative;margin:0 0 0 auto;padding:0;border:0;flex:none}
#playPanel .game-settings summary{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;cursor:pointer;color:#657c83;list-style:none}
#playPanel .game-settings summary::-webkit-details-marker{display:none}
#playPanel .game-settings summary:hover,#playPanel .game-settings[open] summary{background:#edf3f4;color:#0e4d64}
#playPanel .game-settings summary:focus-visible{outline:2px solid #0e4d64;outline-offset:2px}
.player-settings-popover{position:absolute;right:0;top:42px;z-index:25;width:230px;padding:16px;background:white;border:1px solid var(--line);border-radius:14px;box-shadow:0 10px 32px #10222b20}
.player-settings-popover .count-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}
.player-settings-popover #playerCount{width:65px;margin:0}
.player-settings-popover #players{margin:12px 0}
.player-settings-popover #reset{font-size:12px}
@media(max-width:1150px){
 #boardEditBar:not([hidden]){grid-template-columns:auto minmax(0,1fr) auto;gap:12px}
 #boardEditBar #boardDisplaySettings{grid-row:2;grid-column:1/-1;padding:12px 0 0;border-left:0;border-top:1px solid var(--line);flex-wrap:wrap}
 #boardEditBar .edit-actions{grid-row:1;grid-column:3}
}
@media(max-width:600px){
 #boardEditBar:not([hidden]){padding:12px;gap:8px}
 #boardEditBar .edit-chip{display:none}
 #boardEditBar .edit-title{grid-column:1/3}
 #boardEditBar #boardEditName{font-size:16px}
 #boardEditBar .edit-actions{padding-left:0;border:0}
 #boardEditBar .edit-actions button{padding:8px;font-size:12px}
 #boardEditBar #boardDisplaySettings{gap:8px 10px}
 #boardEditBar #boardDisplaySettings .board-style-setting{flex:1 1 100%}
}
/* Keep every player within the gear menu, including four-player games. */
.player-settings-popover{width:230px;max-width:calc(100vw - 48px)}
#playPanel .player-settings-popover #players{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;min-width:0}
.player-settings-popover .player{min-width:0;gap:5px;overflow-wrap:anywhere}
.player-settings-popover .player .token{flex-shrink:0}
@media(max-width:650px){#playPanel .game-settings[open] .player-settings-popover{position:static;margin-top:8px}#playPanel .compact-turn:has(.game-settings[open]){flex-wrap:wrap}#playPanel .compact-turn .game-settings[open]{flex:1 1 100%;margin-left:0}#playPanel .game-settings[open] summary{margin-left:auto}#playPanel .game-settings[open] .player-settings-popover{width:100%;max-width:100%}}

/* VIP output controls: keyboard printing must not expose a free printable board. */
#vipPrintNotice{display:none}
#vipRequiredDialog{max-width:440px;width:calc(100% - 32px);padding:28px;border:1px solid var(--line);border-radius:18px}
#vipRequiredDialog::backdrop{background:#10222b66}
#vipRequiredDialog p{color:var(--muted);line-height:1.8}
.vip-dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}
@media print{
 body:not(.vip-print-authorized)>*{display:none!important}
 body:not(.vip-print-authorized)>#vipPrintNotice{display:block!important;padding:30px;font-size:16px;color:#000}
 body.vip-print-authorized>#vipPrintNotice{display:none!important}
}

/* ===== VIP dialog v2: teal header with a gold crown, clear perks, gold call to action ===== */
#vipRequiredDialog{max-width:420px;width:calc(100% - 32px);padding:0;overflow:hidden;border:0;border-radius:20px;box-shadow:0 28px 70px #10222B40;color:#10222B}
#vipRequiredDialog::backdrop{background:#10222B66;backdrop-filter:blur(3px)}
.vip-dialog-hero{display:flex;align-items:center;gap:10px;padding:18px 24px;background:#0E4D64;color:#CFE0E3;font-size:13px;font-weight:700;letter-spacing:.08em}
.vip-crown{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#E8B54A}
.vip-crown::before{content:"";width:18px;height:18px;background:#10222B;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 7l4.5 4L12 4l4.5 7L21 7l-2 11H5z'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 7l4.5 4L12 4l4.5 7L21 7l-2 11H5z'/></svg>") center/contain no-repeat}
.vip-dialog-body{padding:22px 24px 22px}
#vipRequiredDialog h2{font-size:21px;line-height:1.35;margin:0 0 6px}
#vipRequiredDialog .vip-dialog-lead{margin:0 0 16px;color:#4F6169;font-size:14px;line-height:1.7}
.vip-dialog-perks{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:10px}
.vip-dialog-perks li{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:600}
.vip-dialog-perks li::before{content:"";flex:none;width:22px;height:22px;border-radius:50%;background:#E8B54A url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310222B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center/13px no-repeat}
#vipRequiredDialog .vip-dialog-free{display:flex;flex-wrap:wrap;gap:4px 8px;margin:0;padding:10px 12px;border-radius:12px;background:#EEF3F4;color:#4F6169;font-size:13px;line-height:1.6}
.vip-dialog-free strong{color:#0E4D64}
#vipRequiredDialog .vip-dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:20px}
#vipRequiredDialog .vip-dialog-actions button{min-height:44px;padding:9px 16px;border-radius:12px;border:1px solid var(--line);background:#fff;color:#4F6169;font-size:14px;font-weight:600}
#vipRequiredDialog .vip-dialog-actions button:hover{background:#EEF3F4;color:#10222B}
.vip-dialog-cta{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:9px 18px;border-radius:12px;background:#E8B54A;color:#10222B;font-size:14px;font-weight:700;text-decoration:none;box-shadow:0 4px 0 #C99530}
.vip-dialog-cta::after{content:"→"}
.vip-dialog-cta:hover{background:#F0C25E}
.vip-dialog-cta:focus-visible{outline:3px solid #0E4D64;outline-offset:3px}
@media(max-width:420px){#vipRequiredDialog .vip-dialog-actions{flex-direction:column-reverse;align-items:stretch}.vip-dialog-cta{justify-content:center}}

/* ===== VIP gates: small gold tags on locked tools (body.vip-gate-* is set from the server settings) ===== */
body.vip-gate-create nav #newGame::after,body.vip-gate-edit nav #editGame::after,body.vip-gate-print #print::after{content:"VIP";margin-left:4px;padding:1px 6px;border-radius:999px;background:#E8B54A;color:#10222B;font-size:10px;font-weight:800;letter-spacing:.04em;line-height:1.5}
@media print{#newGame::after,#editGame::after,#print::after{display:none!important}}
