/* Theme tokens intentionally live outside game logic. */
:root{--bg:#f7f8f5;--surface:#fff;--ink:#263c35;--muted:#7c857f;--accent:#315e4e;--accent-hover:#234b3c;--line:#e3e7e0;--soft:#edf1e9;--peer:#f0f3ee;--same:#dce8d7;--selected:#c7ddba;--error:#b75049;--error-bg:#fbe8e5;--radius:14px;--button-radius:8px;--font:"Inter","PingFang SC","Microsoft YaHei",system-ui,sans-serif;--board-line:#d7ddd5;--board-heavy:#526158}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.38}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #8faa82;outline-offset:3px}a{color:inherit;text-decoration:none}svg{width:20px;height:20px;flex-shrink:0;vertical-align:middle}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:600}button{color:inherit}#header{height:90px;border-bottom:1px solid var(--line);background:var(--bg)}.header-inner{max-width:1280px;height:100%;padding:0 48px;margin:auto;display:flex;align-items:center;gap:64px}.brand{display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:23px;font-weight:650;letter-spacing:2px}.brand img{height:37px;width:37px}.brand-sub{font-size:15px;letter-spacing:1px;margin-left:5px;font-weight:450}.header-inner nav{display:flex;height:100%;gap:28px;align-items:center}.header-inner nav a{color:var(--muted);position:relative;height:100%;display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:13px}.header-inner nav a svg{width:17px;height:17px}.header-inner nav a.active{color:var(--accent);font-weight:600}.header-inner nav a.active:after{content:"";height:3px;background:var(--accent);position:absolute;bottom:0;left:0;right:0;border-radius:2px}.local-badge{margin-left:auto;font-size:11px;color:var(--muted);white-space:nowrap;display:flex;align-items:center;gap:7px}i{font-style:normal}.local-badge i,.save-state i,.game-state i{height:5px;width:5px;border-radius:50%;background:#6c9872;display:inline-block}#app{max-width:1176px;min-height:calc(100vh - 180px);margin:auto;padding:52px 40px 60px}#footer{max-width:1176px;margin:auto;padding:24px 40px;display:flex;justify-content:space-between;color:#929a93;font-size:11px;border-top:1px solid var(--line);gap:20px}.footer-en{margin-left:20px;font-size:9px;letter-spacing:1.1px}.eyebrow{color:var(--accent);font-size:10px;font-weight:600;letter-spacing:2.4px;display:flex;align-items:center;gap:10px}.eyebrow>span{width:19px;height:1px;background:var(--accent)}.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:11px 22px;border-radius:var(--button-radius);border:1px solid transparent;font-size:13px;font-weight:500;transition:background .15s,transform .15s}.button:not(:disabled):active{transform:translateY(1px)}.primary{background:var(--accent);color:white}.primary:hover{background:var(--accent-hover)}.secondary{background:var(--surface);border-color:var(--line);color:var(--ink)}.secondary:hover{background:var(--soft)}.danger{background:#a84b43;color:white}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:none;border:0;padding:6px 0;font-size:12px;color:var(--accent)}.text-button svg{width:15px;height:15px}.icon-button{background:transparent;border:0;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px}.icon-button:not(:disabled):hover{background:var(--soft)}.quiet-note{font-size:11px;line-height:1.9;color:var(--muted)}.field{margin-bottom:24px}.field>label{display:block;font-size:12px;font-weight:500;margin-bottom:10px}.field>small{display:block;margin-top:7px;color:var(--muted);font-size:10px}.segmented{display:flex;gap:5px;border:1px solid var(--line);padding:5px;background:#f0f2ed;border-radius:9px}.segmented button{flex:1;border:1px solid transparent;background:none;min-height:41px;border-radius:6px;color:var(--muted);font-size:13px;white-space:nowrap}.segmented button.chosen{background:white;color:var(--accent);border-color:#e1e7db;box-shadow:0 1px 3px #243d3210;font-weight:600}.segmented button small{font-size:8px;font-weight:400;display:inline-block;margin-left:5px;vertical-align:top;background:var(--soft);padding:1px 3px;border-radius:3px}.compact{padding:3px;gap:3px}.compact button{font-size:12px;min-height:32px;padding:3px 17px}select,input[type=number]{width:100%;border:1px solid var(--line);border-radius:7px;background:white;color:var(--ink);height:44px;padding:0 13px;outline-offset:2px}select{cursor:pointer}.home-hero{display:grid;grid-template-columns:.9fr 1.1fr;gap:80px;align-items:center;padding:22px 20px 55px}.home-copy h1{font-size:51px;line-height:1.42;letter-spacing:1px;font-weight:500;margin-top:25px}.home-copy h1>span{color:var(--accent)}.intro{font-size:13px;color:var(--muted);line-height:2;margin-top:20px}.start-form{margin-top:30px;max-width:325px}.start-form .field{margin-bottom:17px}.start-button{width:100%;justify-content:space-between;margin-top:7px;font-size:14px;height:50px}.start-form .quiet-note{text-align:center;margin-top:12px}.continue-link{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:10px;margin-top:17px}.continue-link span{display:flex;gap:5px;align-items:center}.continue-link svg{height:13px;width:13px}.home-art{padding:18px 8px 14px;position:relative}.home-board{background:#fff;display:grid;grid-template-columns:repeat(9,1fr);aspect-ratio:1;border:1.5px solid var(--board-heavy);position:relative;box-shadow:0 18px 50px #263c3509;transform:rotate(-3deg);width:100%}.home-board>span{border-right:1px solid var(--board-line);border-bottom:1px solid var(--board-line);display:flex;align-items:center;justify-content:center;font-size:23px;font-weight:400;color:#48584e}.home-board>span:nth-child(9n){border-right:0}.home-board>span:nth-last-child(-n+10){border-bottom:0}.home-board .home-selected{background:var(--selected)}.board-tag{position:absolute;bottom:26px;right:-21px;background:var(--accent);color:#fff;display:flex;align-items:center;gap:10px;border-radius:7px;padding:12px 19px;font-size:11px;box-shadow:0 7px 16px #264e4020;transform:rotate(3deg)}.board-tag svg{width:16px;height:16px;color:#bdd4aa}.home-art-caption{display:flex;justify-content:space-between;padding:35px 5px 0;color:#8f998f;font-size:9px;letter-spacing:1px}.home-links{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:22px;border-top:1px solid var(--line);padding-top:32px}.home-links>a,.home-links>div{display:flex;align-items:center;gap:15px;padding:3px 10px}.home-links>a:not(:last-child),.home-links>div:not(:last-child){border-right:1px solid var(--line)}.home-links svg:first-child{width:24px;height:24px;color:var(--accent);stroke-width:1.4}.home-links>a>svg:last-child{width:15px;height:15px;margin-left:auto;color:var(--muted)}.home-links h3{font-size:12px;font-weight:500}.home-links p{font-size:10px;color:var(--muted);margin-top:6px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:36px}.page-heading h1{font-size:31px;letter-spacing:.5px;font-weight:500;line-height:1.5;margin-top:9px}.page-heading p{font-size:12px;color:var(--muted);margin-top:7px}.page-heading>.button{margin-top:14px}.game-layout{display:grid;grid-template-columns:minmax(0,558px) minmax(240px,306px);gap:44px;justify-content:center;align-items:start}.board-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;height:29px}.board-meta>div{display:flex;align-items:center;gap:12px}.size-label{font-size:13px;font-weight:600;letter-spacing:.5px}.difficulty-tag{font-size:10px;color:var(--accent);background:#e8eee3;padding:2px 9px;border-radius:4px}.game-state{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:5px}.timer-wrap{font-size:15px;color:#5e6e61;font-variant-numeric:tabular-nums}.timer-wrap>svg{width:15px;height:15px}.timer-wrap .icon-button{margin-left:-3px}.timer-wrap .icon-button svg{width:15px;height:15px}.board-wrap{position:relative}.board{width:100%;aspect-ratio:1;display:grid;grid-template-columns:repeat(var(--n),1fr);grid-template-rows:repeat(var(--n),1fr);border:2px solid var(--board-heavy);border-radius:2px;overflow:hidden;background:white;touch-action:manipulation}.cell{background:var(--surface);padding:0;border:0;border-right:1px solid var(--board-line);border-bottom:1px solid var(--board-line);display:flex;align-items:center;justify-content:center;color:var(--accent);font-size:clamp(23px,2.6vw,32px);font-weight:450;line-height:1;position:relative;user-select:none;min-width:0;min-height:0;font-variant-numeric:tabular-nums}.cell.given{color:#33463b;font-weight:550}.cell.peer{background:var(--peer)}.cell.same{background:var(--same)}.cell.hint-cell{background:#f1edcc}.cell.selected{background:var(--selected);box-shadow:inset 0 0 0 2px #81a474;z-index:1}.cell:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--accent);z-index:2}.cell.error{color:var(--error);background:var(--error-bg)}.cell.error.selected{box-shadow:inset 0 0 0 2px #c68077}.box-l{border-left:2px solid var(--board-heavy)!important}.box-t{border-top:2px solid var(--board-heavy)!important}.notes{display:grid;grid-template-columns:repeat(var(--note-cols),1fr);grid-template-rows:repeat(var(--note-rows),1fr);height:88%;width:86%;font-size:clamp(8px,1.1vw,11px);font-weight:400;color:#607063;line-height:1}.notes>span{display:flex;align-items:center;justify-content:center}.tools{display:grid;grid-template-columns:repeat(5,1fr);margin-top:18px;gap:9px}.tool{display:flex;flex-direction:column;align-items:center;gap:7px;background:none;border:1px solid transparent;border-radius:8px;padding:12px 4px 10px;font-size:11px;color:#68776b}.tool svg{width:21px;height:21px}.tool:not(:disabled):hover,.tool.is-on{background:var(--soft);border-color:#dce4d5;color:var(--accent)}.tool small{font-size:8px;margin-left:5px;padding:1px 3px;background:#dfe7d9;border-radius:3px}.board-foot{display:flex;justify-content:space-between;gap:12px;font-size:9px;color:#96a093;margin-top:15px}.save-state{display:flex;align-items:center;gap:6px}.game-sidebar{padding-top:44px}.progress-card{padding:19px 21px;background:#edf1e9;border-radius:11px;margin-bottom:23px}.card-label{font-size:11px;display:flex;justify-content:space-between}.card-label>span{font-size:12px;font-weight:600}.progress-track{height:4px;background:#dce4d6;border-radius:4px;margin-top:12px;overflow:hidden}.progress-track>i{display:block;height:100%;background:#6c8b5e;border-radius:4px;transition:width .3s}.game-metrics{display:grid;grid-template-columns:1.5fr 1fr 1fr;margin-top:21px;gap:12px}.game-metrics>div{display:flex;flex-direction:column}.game-metrics span{font-size:9px;color:#899382}.game-metrics strong{font-size:20px;font-weight:500;margin-top:3px;line-height:1.2}.game-metrics small{font-size:11px;font-weight:400;color:#8b9487}.input-label{display:flex;justify-content:space-between;align-items:center;font-size:11px;margin:0 1px 10px}.input-label .text-button{font-size:9px}.input-label svg{width:12px;height:12px}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.keypad>button{background:white;border:1px solid var(--line);border-radius:9px;padding:7px 5px 6px;min-height:67px;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:background .1s}.keypad>button:hover{background:var(--soft);border-color:#bdcdb3}.keypad>button>span{font-size:27px;line-height:1.2;font-weight:450}.keypad>button>small{font-size:8px;color:#a3aca0;margin-top:4px}.keypad>button.used{color:#a4ada1;background:#f0f2ed}.check-button{width:100%;margin-top:18px;min-height:44px}.check-button svg{width:17px;height:17px}.rule-note{font-size:9px;color:#8a958a;text-align:center;margin-top:10px;display:flex;justify-content:center;align-items:center;gap:5px}.rule-note svg{width:12px;height:12px}.hint-card{border:1px solid #e2e7db;border-radius:10px;background:#f0f3eb;padding:19px 20px;margin-top:25px}.hint-heading{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:500}.hint-heading>svg{width:16px;height:16px;color:#78906c}.hint-heading .icon-button{width:22px;height:22px;margin-left:auto}.hint-heading .icon-button svg{width:13px;height:13px}.hint-card p{font-size:11px;line-height:2;color:#84907d;margin-top:9px}.hint-card.expanded{background:#f3f3e5;border-color:#e5e4c9}.hint-card .text-button{margin-top:10px;font-size:10px}.restart{display:flex;margin:16px auto 0;color:#8c9689;font-size:10px}.restart svg{height:13px;width:13px}.difficulty-explainer{text-align:center;max-width:820px;margin:30px auto 0;font-size:10px;color:#9aA294}.pause-overlay{position:absolute;inset:2px;background:#f4f6f0ee;backdrop-filter:blur(10px);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:3}.pause-overlay>svg{width:35px;height:35px;color:#6d8963;margin-bottom:15px}.pause-overlay h2{font-size:22px;font-weight:500}.pause-overlay p{font-size:12px;color:var(--muted);margin:10px 20px 25px;text-align:center}.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:28px}.empty-setup{max-width:480px;margin:auto}.empty-setup .button{width:100%}.panel h2{font-size:17px;font-weight:500}.filter-bar{display:flex;align-items:center;gap:24px;margin-bottom:24px}.filter-bar label{display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:11px}.filter-bar select{width:130px;height:36px;font-size:11px}.filter-bar>span{margin-left:auto;font-size:10px;color:var(--muted)}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.stat-tile{background:white;border:1px solid var(--line);border-radius:11px;padding:21px 24px;display:flex;flex-direction:column}.stat-tile>span{font-size:11px;color:var(--muted)}.stat-tile strong{font-size:28px;font-weight:450;margin-top:10px;line-height:1.4;letter-spacing:-.7px;font-variant-numeric:tabular-nums}.stat-tile strong small{font-size:11px;color:var(--muted);font-weight:400;margin-left:7px}.best-tile{background:#eaf0e4;border-color:#dfe8d7}.trend-panel{margin-top:25px;margin-bottom:20px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.section-heading p{font-size:10px;color:var(--muted);margin-top:5px}.chart-controls{display:flex;align-items:center;gap:12px}.chart-controls select{width:140px;height:36px;font-size:11px}.chart-axis{font-size:9px;color:var(--muted);margin-top:27px}.bar-chart{display:grid;grid-template-columns:repeat(var(--days),1fr);gap:8px;align-items:end;height:197px;border-bottom:1px solid var(--line);padding-top:20px}.bar-column{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0}.bar{width:min(70%,39px);background:#b9cda9;border-radius:4px 4px 0 0;min-height:2px;transition:height .25s;flex-shrink:0}.bar-column:hover .bar,.bar-column:focus .bar{background:var(--accent)}.bar-value{font-size:9px;color:#7b8c72;margin-bottom:7px}.bar-chart[style*="30"] .bar-value{font-size:8px}.bar-date{display:flex;align-items:center;justify-content:center;font-size:9px;height:27px;white-space:nowrap;color:#929b8b}.chart-empty{text-align:center;font-size:11px;color:var(--muted);margin-top:20px}.print-layout{display:grid;grid-template-columns:365px minmax(0,1fr);gap:65px;align-items:start}.print-form h2{margin-bottom:28px}.print-form .button{width:100%;margin-top:20px}.print-form>.quiet-note{margin-top:15px}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:20px}.two-fields .field{margin-bottom:10px}.switch-row{display:flex;justify-content:space-between;gap:20px;align-items:center;border-bottom:1px solid var(--line);padding:20px 0}.switch-row strong{font-size:12px;font-weight:500}.switch-row small{display:block;font-size:10px;color:var(--muted);margin-top:5px;line-height:1.8}.switch-row input[type=checkbox]{appearance:none;-webkit-appearance:none;background:#d9dfd4;min-width:34px;width:34px;height:20px;border-radius:12px;position:relative;cursor:pointer;margin:0}.switch-row input:before{content:"";position:absolute;height:14px;width:14px;border-radius:50%;background:#fff;top:3px;left:3px;transition:transform .2s;box-shadow:0 1px 3px #0001}.switch-row input:checked{background:var(--accent)}.switch-row input:checked:before{transform:translateX(14px)}.preview-label{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-bottom:13px}.print-preview{max-width:470px;justify-self:center;width:100%}.preview-sheet{background:#fff;aspect-ratio:210/297;box-shadow:0 8px 35px #243d3210;border:1px solid var(--line);padding:27px 29px;display:flex;flex-direction:column;color:#444}.preview-title{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ddd;padding-bottom:12px;gap:10px}.preview-title b{font-size:12px;font-weight:500}.preview-title small{font-size:8px;color:#888}.preview-grid{display:grid;align-content:space-evenly;gap:25px;flex:1}.preview-grid.per-1{grid-template-columns:1fr;align-content:center}.preview-grid.per-4{grid-template-columns:1fr 1fr;gap:20px}.preview-problem-label{font-size:9px;margin-bottom:7px}.preview-footer{text-align:center;font-size:8px;color:#aaa;padding-top:12px}.print-preview>.quiet-note{text-align:center;margin-top:15px}.paper-board{display:grid;grid-template-columns:repeat(var(--n),1fr);grid-template-rows:repeat(var(--n),1fr);aspect-ratio:1;border:1.5pt solid #333;background:white;width:100%}.paper-board>span{display:flex;justify-content:center;align-items:center;border-bottom:.4pt solid #b8b8b8;border-right:.4pt solid #b8b8b8;line-height:1;font-size:clamp(11px,1.65vw,20px);font-weight:450;color:#222;min-width:0}.preview-grid.per-4 .paper-board>span{font-size:10px}.records-list{display:flex;flex-direction:column;gap:15px}.record-card{display:flex;gap:22px;align-items:center;padding:25px 28px;border:1px solid var(--line);border-radius:11px;background:white}.record-icon{width:49px;height:55px;border-radius:7px;background:var(--soft);display:flex;justify-content:center;align-items:center}.record-icon svg{width:23px;height:23px;color:#7c9271}.record-info h3{font-size:14px;font-weight:500}.record-info h3>span{font-size:10px;background:var(--soft);color:var(--muted);border-radius:4px;margin-left:9px;padding:2px 8px}.record-info p{font-size:10px;color:var(--muted);margin-top:7px}.record-info p>span{margin-left:20px;color:#a0a79b}.record-actions{margin-left:auto;display:flex;gap:10px;align-items:center}.record-actions .button{font-size:11px;min-height:37px;padding:7px 14px}.record-actions svg{width:15px;height:15px}.delete-button{color:#98a08f}.delete-button:hover{color:var(--error)}.empty-state{min-height:400px;text-align:center;display:flex;align-items:center;justify-content:center;flex-direction:column;background:white;border:1px solid var(--line);border-radius:13px;padding:30px}.empty-state>svg{width:40px;height:40px;color:#97ab89;margin-bottom:22px}.empty-state h2{font-size:21px;font-weight:500}.empty-state p{color:var(--muted);font-size:12px;margin:15px 0 26px}.empty-state .button{min-height:42px;font-size:12px}.back-link{display:inline-block;font-size:11px;color:var(--muted);margin-bottom:20px}.record-view-controls{display:flex;align-items:center;gap:24px;border-bottom:1px solid var(--line);padding-bottom:24px;margin-bottom:28px}.record-view-controls>label{display:flex;align-items:center;gap:9px;font-size:10px;white-space:nowrap}.inline-check input{accent-color:var(--accent);width:15px;height:15px}.record-view-controls>label:last-child{margin-left:auto}.record-view-controls select{width:75px;height:32px;font-size:11px}.question-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:26px}.question-card{padding:24px 30px 30px}.question-card>div:first-child{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}.question-card h3{font-size:13px}.question-card small{font-size:9px;color:var(--muted)}.question-card .paper-board{max-width:370px;margin:auto}.question-card .paper-board>span{font-size:22px}.answer-notice{padding:12px 17px;font-size:11px;background:#ecf1e6;border-radius:6px;margin-bottom:24px;color:#6e815f}.settings-layout{display:grid;grid-template-columns:1fr 300px;gap:40px;align-items:start}.settings-panel{padding:30px 35px}.section-sub{font-size:10px;color:var(--muted);margin-top:8px}.rule-options{display:flex;flex-direction:column;gap:10px;margin-top:22px}.rule-option{display:flex;align-items:flex-start;gap:13px;padding:17px;border:1px solid var(--line);border-radius:9px;cursor:pointer}.rule-option input{accent-color:var(--accent);width:15px;height:15px;margin:4px 0 0}.rule-option strong{font-size:12px;font-weight:500}.rule-option p{font-size:10px;color:var(--muted);margin-top:5px}.rule-option.chosen{background:#f1f5ed;border-color:#bacdad}.settings-section-title{margin-top:32px;margin-bottom:0}.settings-panel .switch-row:last-child{border:0;padding-bottom:3px}.settings-aside .hint-card{margin-top:0;padding:24px}.settings-aside h3{font-size:14px;font-weight:500;margin-top:14px}.settings-aside .hint-card>svg{color:#8dA17f;width:26px;height:26px}.settings-aside .button{width:100%;margin-top:20px;font-size:11px}.settings-note{padding:20px 8px}.settings-note p{font-size:10px;color:#8e9887;line-height:2;margin-top:15px}#print-root{display:none}#toast{position:fixed;left:50%;transform:translate(-50%,20px);bottom:30px;z-index:30;background:#2b4339;color:white;border-radius:9px;padding:12px 21px;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;box-shadow:0 4px 18px #0002;max-width:min(90vw,600px);text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}dialog{padding:32px;border:1px solid var(--line);border-radius:18px;background:#fff;color:var(--ink);width:min(460px,calc(100vw - 36px));box-shadow:0 20px 80px #182b2920;text-align:left}dialog::backdrop{background:#283a3340;backdrop-filter:blur(4px)}dialog h2{font-size:22px;font-weight:500;margin-top:16px}dialog p{font-size:12px;line-height:2;color:var(--muted);margin-top:13px}.dialog-icon{height:40px;width:40px;display:flex;align-items:center;justify-content:center;background:var(--soft);color:#7e9770;border-radius:12px}.dialog-buttons{display:flex;gap:10px;justify-content:flex-end;margin-top:28px}.dialog-setup{margin-top:25px}.completion-stats{display:flex;justify-content:space-around;padding:21px 10px;background:var(--soft);border-radius:9px;margin-top:25px}.completion-stats>div{display:flex;flex-direction:column;gap:6px;align-items:center}.completion-stats span{font-size:10px;color:var(--muted)}.completion-stats strong{font-size:23px;font-weight:450}.spinner{width:34px;height:34px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}#cancel-generation{margin-top:20px}.loading{padding:100px;text-align:center;color:var(--muted)}.celebrate{animation:celebrate 1.2s ease-in-out 2}@keyframes spin{to{transform:rotate(360deg)}}@keyframes celebrate{50%{box-shadow:0 0 0 9px #acc69950,0 0 35px #c8d7b860}}
@media(min-width:1400px){#app{padding-top:62px}.home-hero{padding-top:33px;padding-bottom:65px}.home-board>span{font-size:25px}}
@media(max-width:1100px){.header-inner{gap:35px;padding:0 30px}.header-inner nav{gap:21px}.local-badge{display:none}.home-hero{gap:50px;padding-left:0;padding-right:0}.home-copy h1{font-size:46px}.home-links{gap:10px}.home-links>a,.home-links>div{padding-left:0;padding-right:10px;gap:10px}.game-layout{gap:30px;grid-template-columns:minmax(0,1fr) 270px}.game-metrics{gap:7px}.print-layout{gap:40px;grid-template-columns:340px minmax(0,1fr)}.preview-sheet{padding:20px}.settings-layout{grid-template-columns:1fr 260px;gap:25px}.question-card .paper-board>span{font-size:19px}}
@media(max-width:800px){#header{height:76px}.header-inner{padding:0 24px;gap:35px}.header-inner nav{gap:20px;flex:1;justify-content:space-between}.header-inner nav a svg{display:none}.brand{font-size:20px;gap:9px}.brand img{width:31px;height:31px}.brand-sub{display:none}#app{padding:36px 26px 45px;min-height:calc(100vh - 160px)}#footer{padding:22px 26px}.home-hero{gap:35px}.home-copy h1{font-size:39px}.intro{font-size:11px}.home-art{padding-left:0;padding-right:0}.home-board>span{font-size:18px}.board-tag{right:-10px;font-size:9px;padding:10px 12px}.home-links h3{font-size:10px}.home-links p{font-size:9px}.home-links svg:first-child{width:20px;height:20px}.game-layout{grid-template-columns:minmax(0,1fr) 220px;gap:24px}.game-sidebar{padding-top:43px}.progress-card{padding:15px;margin-bottom:17px}.game-metrics strong{font-size:18px}.game-metrics span{font-size:8px}.keypad{gap:6px}.keypad>button{min-height:57px}.keypad>button>span{font-size:24px}.hint-card{padding:15px;margin-top:20px}.hint-card p{font-size:10px}.board-foot{flex-direction:column;gap:4px}.cell{font-size:25px}.notes{font-size:8px}.tools{margin-top:11px;gap:2px}.tool{padding:9px 0 6px;font-size:10px}.tool svg{width:18px;height:18px}.tool small{font-size:7px;margin-left:2px}.page-heading h1{font-size:28px}.stat-tile{padding:18px}.stat-tile strong{font-size:24px}.chart-controls{flex-direction:column;gap:5px}.print-layout{grid-template-columns:290px 1fr;gap:28px}.print-form{padding:23px}.preview-grid{gap:16px}.preview-grid.per-4{gap:14px}.preview-grid.per-4 .paper-board>span{font-size:7px}.preview-title{flex-direction:column;align-items:flex-start;gap:3px}.preview-grid .paper-board>span{font-size:11px}.settings-layout{grid-template-columns:1fr;gap:20px}.settings-aside{display:grid;grid-template-columns:1fr 1fr;gap:25px}.record-card{padding:20px;gap:16px}.record-info p>span{display:block;margin:3px 0 0}.record-view-controls{gap:15px}.record-view-controls>label{font-size:9px}.record-view-controls .compact button{padding:4px 10px;font-size:11px}.question-card{padding:20px}.question-card .paper-board>span{font-size:17px}}
@media(max-width:600px){#header{height:auto}.header-inner{padding:15px 20px 0;display:flex;flex-wrap:wrap;gap:13px}.brand{height:32px;font-size:20px}.brand-sub{display:inline;font-size:13px}.header-inner nav{width:100%;flex:auto;order:2;gap:0;height:43px}.header-inner nav a{font-size:11px;justify-content:center;padding:0 5px}.header-inner nav a.active:after{left:5px;right:5px}.header-inner:after{content:"无需登录 · 本地保存";order:1;position:absolute;top:24px;right:20px;font-size:9px;color:var(--muted)}#app{padding:28px 19px 37px}#footer{padding:20px 19px;font-size:9px}.footer-en{display:none}#footer>span:last-child{font-size:9px}.home-hero{display:flex;flex-direction:column;gap:0;align-items:stretch;padding:0 5px 30px}.home-copy{z-index:1}.home-copy .eyebrow{font-size:9px;letter-spacing:2px}.home-copy h1{font-size:39px;line-height:1.4;margin-top:20px}.intro{font-size:11px;margin-top:15px}.intro br{display:none}.start-form{max-width:none;margin-top:28px}.start-form .field{margin-bottom:18px}.start-form .field>label{font-size:11px}.segmented button{min-height:42px}.start-button{height:49px;font-size:13px}.home-art{display:none}.continue-link{font-size:11px;margin-top:16px}.home-links{grid-template-columns:1fr;gap:0;padding-top:0}.home-links>a,.home-links>div{border-right:0!important;border-bottom:1px solid var(--line);padding:20px 5px;gap:16px}.home-links>div:last-child{border-bottom:0;padding-bottom:0}.home-links h3{font-size:12px}.home-links p{font-size:10px}.home-links svg:first-child{width:23px;height:23px}.home-links>a>svg:last-child{width:15px}.eyebrow{font-size:9px;letter-spacing:1.8px}.page-heading{margin-bottom:25px;gap:10px;align-items:flex-start}.page-heading h1{font-size:25px;margin-top:7px}.page-heading p{font-size:10px;margin-top:6px;line-height:1.9}.page-heading>.button{font-size:10px;padding:7px 12px;min-height:35px;gap:5px;flex-shrink:0;margin-top:21px}.page-heading>.button>svg{height:14px;width:14px}.game-layout{display:flex;flex-direction:column;gap:0}.board-section,.game-sidebar{width:100%}.board-meta{margin-bottom:12px}.size-label{font-size:12px}.board-meta>div{gap:9px}.game-state{font-size:9px}.difficulty-tag{font-size:9px}.timer-wrap{font-size:13px}.board{border-width:1.5px}.cell{font-size:clamp(21px,6.5vw,29px)}.box-l{border-left-width:1.5px!important}.box-t{border-top-width:1.5px!important}.notes{font-size:clamp(7px,2.1vw,10px)}.tools{margin-top:12px;gap:4px}.tool{padding:9px 0;gap:7px;font-size:10px}.tool>svg{height:20px;width:20px}.tool small{font-size:7px}.board-foot{margin-top:11px;font-size:8px;flex-direction:row;gap:8px}.board-foot>span:last-child{display:none}.game-sidebar{padding-top:18px;display:flex;flex-direction:column}.progress-card{order:3;margin:17px 0 0;padding:15px 17px}.card-label{font-size:10px}.game-metrics{grid-template-columns:repeat(3,1fr);margin-top:12px}.game-metrics>div{flex-direction:row;align-items:center;justify-content:center;gap:8px;border-right:1px solid #d9e2d2}.game-metrics>div:first-child{justify-content:flex-start}.game-metrics>div:last-child{border-right:0}.game-metrics span{font-size:9px}.game-metrics strong{margin:0;font-size:16px}.game-metrics small{font-size:10px}.input-label{order:0;font-size:10px;margin-bottom:9px}.input-label .text-button{font-size:10px}.keypad{order:1;grid-template-columns:repeat(var(--keys),1fr);gap:5px}.keypad>button{min-height:57px;padding:7px 0;border-radius:6px}.keypad>button>span{font-size:23px}.keypad>button>small{margin-top:4px;font-size:8px}.check-button{order:2;margin-top:13px;min-height:43px;font-size:12px}.rule-note{order:4;font-size:9px;margin-top:12px}.hint-card{order:5;margin-top:17px;padding:16px}.hint-card p{font-size:11px}.hint-heading{font-size:11px}.restart{order:6;margin-top:15px}.difficulty-explainer{margin-top:23px;font-size:9px;line-height:1.9}.pause-overlay h2{font-size:20px}.pause-overlay p{font-size:11px}.panel{padding:22px}.filter-bar{flex-wrap:wrap;gap:12px;margin-bottom:18px}.filter-bar label{flex:1;font-size:10px;gap:7px}.filter-bar select{width:100%;font-size:10px}.filter-bar>span{width:100%;font-size:9px}.stat-grid{grid-template-columns:repeat(2,1fr);gap:10px}.stat-tile{padding:17px 19px}.stat-tile>span{font-size:10px}.stat-tile strong{font-size:26px;margin-top:8px}.stat-tile strong small{font-size:9px}.trend-panel{padding:20px 16px;margin-top:20px}.section-heading{align-items:flex-start;gap:10px}.section-heading h2{font-size:15px}.section-heading p{font-size:9px}.chart-controls{align-items:flex-end;gap:6px}.chart-controls select{font-size:9px;width:119px;height:30px}.compact button{font-size:10px;padding:3px 11px;min-height:27px}.chart-axis{font-size:8px}.bar-chart{gap:4px;height:190px}.bar-value{font-size:9px}.bar-date{font-size:8px}.bar-chart[style*="30"] .bar-value{opacity:0;max-height:10px}.bar-chart[style*="30"] .bar-column:focus .bar-value,.bar-chart[style*="30"] .bar-column:hover .bar-value{opacity:1}.bar-chart[style*="30"]{gap:2px}.chart-empty{font-size:10px}.print-layout{display:flex;flex-direction:column;gap:25px}.print-form{width:100%;padding:23px}.print-form h2{font-size:17px;margin-bottom:24px}.print-preview{max-width:380px}.preview-sheet{padding:25px 27px}.preview-title{flex-direction:row;align-items:center}.preview-grid .paper-board>span{font-size:16px}.preview-grid.per-4 .paper-board>span{font-size:9px}.switch-row strong{font-size:11px}.switch-row small{font-size:10px}.print-form .button{font-size:12px}.records-list{gap:12px}.record-card{flex-wrap:wrap;padding:20px;gap:15px}.record-icon{width:37px;height:45px}.record-info{flex:1}.record-info h3{font-size:12px}.record-info h3>span{font-size:9px;margin-left:6px}.record-info p{font-size:9px}.record-actions{width:100%;padding-left:52px;justify-content:space-between;margin-top:1px;gap:7px}.record-actions .button{font-size:10px;flex:1}.record-actions .icon-button{width:35px;flex-shrink:0}.record-view-controls{flex-wrap:wrap;justify-content:space-between;gap:14px;padding-bottom:20px}.record-view-controls .compact{width:100%}.record-view-controls>label{font-size:9px}.record-view-controls>label:last-child{margin-left:0}.question-gallery{grid-template-columns:1fr;gap:17px}.question-card{padding:22px 26px 26px}.question-card .paper-board>span{font-size:24px}.question-card small{font-size:9px}.answer-notice{font-size:10px;line-height:1.9}.settings-panel{padding:23px 20px}.settings-panel h2{font-size:16px}.rule-option{padding:14px;gap:10px}.rule-option p{font-size:10px;line-height:1.9}.settings-aside{grid-template-columns:1fr;gap:0}.settings-note{padding:7px 10px 0}.settings-note p{font-size:10px}.settings-aside .hint-card{padding:22px}.empty-state{padding:28px 20px;min-height:350px}.empty-state h2{font-size:19px}.empty-state p{font-size:11px;line-height:2}dialog{padding:27px 24px;border-radius:14px}dialog h2{font-size:21px}dialog p{font-size:11px}.dialog-buttons .button{font-size:12px;padding:10px 16px;min-height:43px}#toast{bottom:20px;font-size:11px;padding:11px 16px}.loading{padding:70px 20px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@page{size:A4 portrait;margin:12mm}
@media print{html,body{background:white!important;margin:0!important;padding:0!important;color:black!important}#header,#app,#footer,#toast,dialog{display:none!important}#print-root{display:block!important}.paper-page{width:100%;height:270mm;box-sizing:border-box;page-break-after:always;break-after:page;padding:0;display:flex;flex-direction:column;position:relative;color:#222;font-family:"Microsoft YaHei",sans-serif}.paper-page:last-child{page-break-after:auto;break-after:auto}.paper-head{display:flex;justify-content:space-between;align-items:center;border-bottom:.4mm solid #333;padding-bottom:4mm;font-size:9pt}.paper-head strong{font-size:13pt;font-weight:500;letter-spacing:1pt}.paper-head span{font-size:8pt}.paper-problems{flex:1;display:grid;grid-template-columns:1fr;align-content:space-evenly;gap:8mm;padding:8mm 0}.paper-page.per-4 .paper-problems{grid-template-columns:1fr 1fr;gap:9mm;align-content:space-around}.paper-problem{page-break-inside:avoid;break-inside:avoid;min-width:0;width:100%;margin:auto}.paper-page.per-1 .paper-problem{max-width:168mm}.paper-page.per-2 .paper-problem{max-width:103mm}.paper-page.per-4 .paper-problem{max-width:83mm}.paper-label{display:flex;align-items:center;justify-content:space-between;font-size:9pt;margin-bottom:3mm}.paper-label b{font-weight:500}.paper-label span{font-size:7pt;color:#555}.paper-board{aspect-ratio:1;overflow:hidden;border-width:1.5pt}.paper-board>span{font-size:20pt!important;border-color:#999}.paper-page.per-2 .paper-board>span{font-size:15pt!important}.paper-page.per-4 .paper-board>span{font-size:12pt!important}.paper-foot{font-size:7pt;color:#666;display:flex;justify-content:space-between;border-top:.2mm solid #ccc;padding-top:3mm;gap:5mm}.paper-page.per-4 .paper-head span{font-size:7pt}}
