@charset "UTF-8";
:root{--paper:#f7f7f2;--surface:#fff;--ink:#293a33;--muted:#7c837c;--green:#2d5547;--green-dark:#214337;--line:#e0e3d9;--pale:#edf1e8;--selected:#d1e2c7;--related:#f0f4ec;--same:#dfead5;--error:#b44e43;--shadow:0 12px 32px #263f2c07;font-family:"Avenir Next","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.36}button:focus-visible,a:focus-visible{outline:3px solid #8baf67;outline-offset:4px}button{border:0}a{color:inherit;text-decoration:none}.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-library{position:absolute;width:0;height:0;overflow:hidden}.site-shell{max-width:1080px;margin:auto;padding:0 48px}.site-header{height:110px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:13px}.brand-mark{width:39px;height:39px;display:grid;grid-template-columns:repeat(3,1fr);gap:3px;transform:rotate(-6deg)}.brand-mark i{background:var(--green);border-radius:2px}.brand-mark i:nth-child(2),.brand-mark i:nth-child(6){background:#b7cfa2}.brand-mark i:nth-child(5){background:transparent;border:1.6px solid var(--green)}.brand-name{font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif;font-size:27px;font-weight:600;letter-spacing:3px;display:flex;flex-direction:column;gap:3px}.brand-name>span{font-family:"Avenir Next",sans-serif;font-size:9px;font-weight:500;letter-spacing:3.6px}.header-right{display:flex;align-items:center;gap:28px}.offline-label{font-size:12px;letter-spacing:1px;color:var(--muted)}.help-button{background:none;display:flex;align-items:center;gap:7px;font-size:13px;padding:10px 0 10px 12px}.help-button:hover{color:#638342}.intro{display:flex;align-items:center;justify-content:space-between;padding:40px 0 33px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:600;color:#7e8a78;display:flex;gap:8px;align-items:center}.eyebrow>span{width:5px;height:5px;display:inline-block;background:#7c9764;border-radius:50%}h1{font-family:"Songti SC","Noto Serif CJK SC","SimSun",serif;font-weight:600;font-size:33px;letter-spacing:1px;margin:14px 0 10px}h1 em{font-style:normal;color:#678064}.intro p{font-size:13px;color:var(--muted);margin:0;letter-spacing:.5px}.intro-motif{display:grid;grid-template-columns:repeat(3,26px);grid-auto-rows:26px;gap:4px;transform:rotate(9deg);margin-right:16px;opacity:.55}.intro-motif span{background:#e7ebdf;display:grid;place-items:center;font-family:Georgia,serif;font-size:16px;color:#809770;border-radius:3px}.intro-motif span:nth-child(5){background:#ccdbb6;color:#425f33}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 296px;gap:46px;align-items:start}.board-toolbar{display:flex;align-items:center;justify-content:space-between;height:42px;margin-bottom:15px}.game-label{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:600}.game-label>span{font-size:11px;font-weight:500;color:#627853;background:#e9efdf;border:1px solid #dce6cd;border-radius:5px;padding:4px 9px}.timer-group{display:flex;align-items:center;gap:9px;color:#747e72;font-size:14px}.timer-group>.icon{width:16px;height:16px}.timer-group>span{font-variant-numeric:tabular-nums;letter-spacing:1px;color:var(--ink);min-width:43px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:5px;background:transparent;border-radius:7px}.icon-button:hover{background:#e8eddf}.timer-group .icon-button{margin-left:5px;border:1px solid var(--line)}.timer-group .icon-button .icon{height:16px;width:16px}.board-frame{position:relative;border:2px solid #657061;border-radius:9px;overflow:hidden;background:white;box-shadow:var(--shadow);isolation:isolate}.sudoku-board{display:grid;grid-template-columns:repeat(9,1fr);aspect-ratio:1;width:100%;background:var(--surface)}.board-row{display:contents}.cell{position:relative;background:var(--surface);padding:0;border-right:1px solid #e1e5dc;border-bottom:1px solid #e1e5dc;display:grid;place-items:center;min-width:0;font-size:clamp(22px,2.5vw,30px);font-family:"Avenir Next","Trebuchet MS",sans-serif;font-weight:500;color:#47753e;line-height:1;outline:none!important;transition:background .12s;touch-action:manipulation;user-select:none}.cell[data-col="2"],.cell[data-col="5"]{border-right:2px solid #88927f}.cell[data-col="8"]{border-right:0}.cell[data-row="2"],.cell[data-row="5"]{border-bottom:2px solid #88927f}.cell[data-row="8"]{border-bottom:0}.cell.given{color:#333e35;font-weight:500}.cell.related{background:var(--related)}.cell.same{background:var(--same)}.cell:hover{background:#e6eddf}.cell.selected{background:var(--selected);box-shadow:inset 0 0 0 2px #92b480}.cell:focus-visible{box-shadow:inset 0 0 0 2px var(--green)}.cell.error{color:var(--error);background:#fbebe7}.cell.error::after{content:"";position:absolute;bottom:5px;right:5px;width:4px;height:4px;border-radius:50%;background:var(--error)}.cell.error.selected{background:#efd4c8;box-shadow:inset 0 0 0 2px #c27c6b}.cell.hinted{color:#47753e}.cell .notes-grid{width:100%;height:100%;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);padding:4px;gap:1px}.notes-grid span{display:grid;place-items:center;font-size:clamp(9px,1vw,12px);color:#778971;line-height:1;font-weight:500}.board-bottom{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#7b8378;margin:18px 0 10px}.save-status{display:flex;align-items:center;gap:5px;font-size:11px;color:#889080}.save-status .icon{width:14px;height:14px}.progress-track{height:4px;background:#e5e9df;border-radius:5px;overflow:hidden}.progress-track>div{height:100%;width:0;background:#94af7c;border-radius:5px;transition:width .25s}.keyboard-tip{display:flex;justify-content:center;align-items:center;gap:6px;color:#939a90;font-size:10px;margin-top:24px;white-space:nowrap}.key{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:21px;padding:1px 4px;font-size:10px;border:1px solid #dfe4d9;border-bottom-width:2px;border-radius:4px;background:#f9faf6;color:#85907f;margin-left:8px}.key:first-child{margin-left:0}.key.arrows{letter-spacing:2px}.controls-column{padding-top:3px}.section-label{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:500;margin:0 0 12px}.section-label>span{font-size:11px;font-weight:400;color:#92988d}.difficulty-tabs{padding:4px;display:flex;background:#eceedf;border-radius:9px;gap:4px}.difficulty-tabs button{flex:1;font-size:13px;background:transparent;color:#89907d;border-radius:6px;padding:10px 4px;transition:.15s}.difficulty-tabs button.active{background:var(--surface);color:var(--green);box-shadow:0 2px 5px #2b44280b;font-weight:600}.difficulty-tabs button:hover:not(.active){background:#e2e7d7}.input-section{margin-top:29px}.number-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.number-button{min-height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#eef1e7;border:1px solid #e2e7d9;border-radius:9px;color:#4a6044;transition:transform .12s,background .12s;touch-action:manipulation}.number-button:hover{background:#dfe8d3;transform:translateY(-2px)}.number-button:active{transform:scale(.96)}.number-button>strong{font-family:"Avenir Next","Trebuchet MS",sans-serif;font-size:28px;font-weight:500;line-height:1.1}.number-button>span{font-size:10px;color:#92a084;line-height:1}.number-button.exhausted{opacity:.45}.tools{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:23px -5px 20px}.tool-button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;background:transparent;border-radius:8px;padding:10px 3px;color:#68775f;font-size:11px;min-height:65px}.tool-button:hover:not(:disabled){background:#e9eedf}.tool-button.active{background:#e1ebd5;color:#3e6835}.tool-button .icon{height:22px;width:22px}.tool-badge{position:absolute;top:1px;right:8px;font-size:8px;background:#e5e9de;padding:2px 4px;border-radius:4px;color:#8b9681}.tool-button.active .tool-badge{color:white;background:#638347}.hint-badge{color:#6e8558;background:#e3ebd7;min-width:16px}.primary-button{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;padding:16px 20px;color:#fcfff8;background:var(--green);border-radius:9px;font-size:14px;font-weight:500;letter-spacing:.5px;transition:background .15s,transform .15s}.primary-button:hover{background:var(--green-dark);transform:translateY(-1px)}.new-game-button{justify-content:flex-start}.new-game-button>.icon{width:18px;height:18px}.new-game-button>.trailing{margin-left:auto;width:17px;height:17px;opacity:.7}.small-stats{display:flex;justify-content:space-between;font-size:11px;color:#92998b;padding:14px 1px 0}.small-stats strong{font-weight:500;color:#697761;margin-left:4px}.tip-card{margin-top:26px;background:#eef0e5;border:1px solid #e4e7d8;border-radius:10px;padding:18px 18px 13px;position:relative;overflow:hidden}.tip-title{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:500;color:#647555}.tip-title .icon{width:16px;height:16px}.tip-card p{font-size:12px;line-height:1.95;color:#92977f;margin:9px 0 10px}.tip-decoration{font-family:"Songti SC","SimSun",serif;font-size:12px;color:#9ba588;letter-spacing:1px;border-top:1px solid #dee3d2;padding-top:11px}footer{margin-top:41px;border-top:1px solid var(--line);padding:22px 0 24px;display:flex;justify-content:space-between;color:#a0a596;font-size:10px;letter-spacing:.5px}.footer-dot{margin:0 10px}.pause-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#f5f7ef;z-index:2;text-align:center;padding:20px}.pause-overlay[hidden]{display:none}.board-frame.paused .sudoku-board{visibility:hidden}.pause-art{width:76px;height:76px;display:grid;place-items:center;border-radius:50%;background:#e4ecd8;color:#779563}.pause-art svg{width:38px;height:38px;stroke:currentColor;fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round}.pause-overlay h2{font-family:"Songti SC","SimSun",serif;font-weight:500;font-size:25px;margin:23px 0 0}.pause-overlay p{font-size:13px;color:var(--muted);margin-bottom:25px}.pause-overlay .primary-button{width:auto;padding:13px 24px}.toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);padding:13px 20px;color:#fff;background:#2d453a;box-shadow:0 4px 22px #20312718;border-radius:10px;font-size:13px;z-index:10;animation:toast-in .2s ease;line-height:1.6;text-align:center}.toast[hidden]{display:none}dialog{border:1px solid #dfe6d6;padding:0;background:#fbfcf7;color:var(--ink);border-radius:19px;width:min(430px,calc(100% - 32px));max-height:85dvh;box-shadow:0 28px 100px #23332635}dialog::backdrop{background:#1c2c2459;backdrop-filter:blur(5px)}.dialog-content{padding:35px;position:relative}.dialog-close{position:absolute;top:15px;right:15px}.dialog-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#e6eedb;color:#638447;margin:0 0 20px}.dialog-icon .icon{width:26px;height:26px}.dialog-content>.eyebrow{font-size:9px;letter-spacing:1.8px}.dialog-content h2{font-family:"Songti SC","SimSun",serif;font-size:28px;font-weight:600;margin:9px 0 16px}.dialog-content p{font-size:14px;line-height:1.9;color:#808974;margin:12px 0}.dialog-actions{display:flex;gap:9px;margin-top:24px}.dialog-actions>button{flex:1;font-size:13px;white-space:nowrap}.secondary-button{background:#e9eedf;color:#627557;border-radius:9px;padding:13px 16px}.secondary-button:hover{background:#dee7d1}.rules-list{padding:0;margin:0;list-style:none;counter-reset:rules}.rules-list li{counter-increment:rules;position:relative;padding:9px 0 9px 30px;font-size:14px;line-height:1.7;color:#768369}.rules-list li::before{content:counter(rules);position:absolute;left:0;top:11px;display:grid;place-items:center;width:21px;height:21px;font-size:11px;background:#e7eeda;border-radius:50%;color:#638545}.rules-list strong{font-weight:600;color:#4a6040}.shortcut-description{font-size:12px!important;background:#eef2e6;border-radius:8px;padding:12px 14px}.win-stats{display:grid;grid-template-columns:repeat(3,1fr);margin:23px 0;gap:10px}.win-stats div{display:flex;flex-direction:column;align-items:center;gap:9px;background:#eef2e6;border-radius:9px;padding:16px 7px}.win-stats strong{font-size:22px;font-weight:500;font-variant-numeric:tabular-nums}.win-stats span{font-size:11px;color:#8b9581}.win-grid{display:grid;grid-template-columns:repeat(3,10px);grid-template-rows:repeat(3,10px);gap:4px}.win-grid i{background:#77925a;border-radius:2px;animation:win-pop .55s backwards}.win-grid i:nth-child(2n){background:#b8cf96;animation-delay:.12s}.win-grid i:nth-child(3n){animation-delay:.22s}.noscript{position:fixed;inset:0;display:grid;place-items:center;background:var(--paper);z-index:20}.board-frame.won{border-color:#76975e}.board-frame.won .cell{background:#f1f6e9;color:#52713f}.game-layout{animation:enter .5s .06s backwards}.intro{animation:enter .5s backwards}@keyframes enter{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes toast-in{from{opacity:0;bottom:18px}to{opacity:1;bottom:26px}}@keyframes win-pop{from{transform:scale(.2);opacity:0}to{transform:scale(1);opacity:1}}
@media(min-width:1400px){.site-shell{max-width:1120px}.intro{padding-top:45px;padding-bottom:40px}.game-layout{gap:58px;grid-template-columns:minmax(0,1fr) 308px}.number-button{min-height:83px}.tip-card{margin-top:28px}footer{margin-top:45px}}
@media(max-width:900px){.site-shell{padding:0 30px}.game-layout{gap:28px;grid-template-columns:minmax(0,1fr) 254px}.number-button{min-height:63px}.number-pad{gap:7px}.tip-card{padding:14px;margin-top:18px}.tools{margin-top:16px;margin-bottom:14px}.intro{padding:30px 0}.input-section{margin-top:22px}.keyboard-tip{font-size:9px;gap:3px}.key{margin-left:3px}.cell{font-size:25px}.offline-label{display:none}.tip-card p{font-size:11px}}
@media(max-width:720px){.site-shell{max-width:580px;padding:0 23px}.site-header{height:88px}.brand-mark{width:33px;height:33px}.brand-name{font-size:24px}.brand-name>span{font-size:8px}.header-right{gap:0}.help-button{font-size:12px}.intro{padding:29px 0 24px}.intro h1{font-size:29px}.intro p{font-size:12px}.eyebrow{font-size:8px}.intro-motif{grid-template-columns:repeat(3,19px);grid-auto-rows:19px;gap:3px;margin-right:5px}.intro-motif span{font-size:12px}.game-layout{display:flex;flex-direction:column;gap:26px}.board-column,.controls-column{width:100%}.board-toolbar{height:30px;margin-bottom:13px}.cell{font-size:clamp(22px,6vw,31px)}.notes-grid span{font-size:clamp(9px,2.4vw,12px)}.board-bottom{margin-top:14px}.keyboard-tip{display:none}.controls-column{display:grid;grid-template-columns:1fr;gap:0;padding:0}.difficulty-section{order:0}.input-section{order:1;margin-top:19px}.number-pad{grid-template-columns:repeat(9,1fr);gap:5px}.number-button{min-height:60px;border-radius:7px;gap:7px}.number-button>strong{font-size:23px}.number-button>span{font-size:9px}.tools{order:2;margin:15px 0 13px;gap:12px}.tool-button{background:#eef1e7;min-height:63px;padding-top:12px}.tool-badge{right:calc(50% - 24px);top:4px}.new-game-button{order:3}.small-stats{order:4}.tip-card{order:5;margin-top:21px}.tip-card p{font-size:12px;margin-bottom:0}.tip-card p br{display:none}.tip-decoration{display:none}footer{margin-top:28px;font-size:9px;gap:12px;line-height:1.8;padding:17px 0}.footer-dot{margin:0 5px}.toast{font-size:12px}.section-label{font-size:13px}.section-label>span{font-size:11px}.difficulty-tabs button{padding:9px 4px}}
@media(max-width:380px){.site-shell{padding:0 16px}.intro-motif{display:none}.intro h1{font-size:27px}.number-pad{gap:3px}.number-button{min-height:53px}.number-button>strong{font-size:20px}.game-label{font-size:14px}footer{flex-direction:column;gap:2px}.dialog-content{padding:30px 23px}.board-bottom{font-size:11px}}
/* Keep secondary game controls legible on the paper palette. */
.stats-link{font-size:13px;color:var(--green);padding:9px 12px;border:1px solid var(--line);border-radius:7px}
.stats-link:hover{background:var(--pale)}
.save-status{background:transparent;padding:2px 0;text-align:right}
.save-status[data-status="error"],.save-status[data-status="offline"]{color:#986237}
footer a{color:#667b55;text-decoration:underline;text-underline-offset:3px}
@media(max-width:720px){.header-right{gap:9px}.stats-link{font-size:12px;padding:8px}.site-shell>footer{flex-wrap:wrap;row-gap:7px}}
.sudoku-board{grid-template-rows:repeat(9,minmax(0,1fr))}
.cell{min-height:0}
.difficulty-tabs button{color:#64705a}
.section-label>span,.small-stats{color:#67735f}
.number-button>span{color:#657651}
.tip-card p{color:#69745f}
.board-bottom,.save-status{color:#67735f}
@media(min-width:721px){
  .site-shell{max-width:1000px}
  .site-header{height:88px}
  .intro{padding:27px 0}
  .game-layout{grid-template-columns:minmax(0,1fr) 276px;gap:38px}
  .number-button{min-height:69px}
  .input-section{margin-top:23px}
  .tools{margin-top:17px;margin-bottom:15px}
  .tip-card{margin-top:20px;padding:15px 17px 12px}
  footer{margin-top:30px}
}
@media(min-width:721px) and (max-width:900px){
  .game-layout{grid-template-columns:minmax(0,1fr) 238px;gap:26px}
  .number-button{min-height:59px}
}
@media(max-width:720px){
  .site-header{height:76px}
  .intro{display:none}
  .game-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin-top:22px}
  .board-column,.controls-column{display:contents}
  .difficulty-section{grid-row:1}
  .board-toolbar{grid-row:2;margin-top:20px}
  .board-frame{grid-row:3}
  .board-bottom{grid-row:4}
  .progress-track{grid-row:5}
  .input-section{grid-row:6;margin-top:19px}
  .tools{grid-row:7}
  .new-game-button{grid-row:8}
  .small-stats{grid-row:9}
  .tip-card{grid-row:10}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
