@font-face{font-family:NineThai;src:url('/fonts/plex-thai-regular.ttf') format('truetype');font-weight:400 500;font-display:swap}
@font-face{font-family:NineThai;src:url('/fonts/plex-thai-semibold.ttf') format('truetype');font-weight:600 800;font-display:swap}
:root{font-family:'Segoe UI',NineThai,Tahoma,sans-serif;color:#26324b;background:#f7f9fc;font-synthesis:none;--bg:#f7f9fc;--surface:#fff;--ink:#26324b;--muted:#7c879b;--line:#e5e9f1;--accent:#345bea;--tint:#eef2ff;--peer:#f2f5fb;--same:#dce6ff;--selected:#c8d8ff;--given:#25324a;--error:#d34259;--error-bg:#ffedf1;--grid:#cbd3e1;--box:#8e9db5}
*{box-sizing:border-box}body{margin:0}button,a,input{ -webkit-tap-highlight-color:transparent}button,input,select{font:inherit}button{border:0;background:none;color:inherit;cursor:pointer}button:disabled{opacity:.38;cursor:not-allowed}a{color:inherit;text-decoration:none}button,a{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #7894f4;outline-offset:4px}svg{display:block;width:20px;height:20px;flex-shrink:0}span[data-icon]{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}[hidden]{display:none!important}
.header{background:var(--surface);border-bottom:1px solid var(--line)}.header-inner{max-width:1248px;padding:0 32px;height:80px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:30px}.brand{display:flex;align-items:center;gap:11px;font-size:25px;font-weight:800;letter-spacing:1.5px}.brand>span{display:flex;align-items:baseline;gap:9px}.brand-sub{font-size:15px;font-weight:400;letter-spacing:0;color:var(--muted)}.nav{display:flex;align-self:stretch;gap:30px;margin-right:auto;margin-left:35px}.nav-item{position:relative;display:flex;gap:8px;align-items:center;font-size:14px;white-space:nowrap;color:var(--muted);font-weight:500}.nav-item svg{width:18px;height:18px}.nav-item.active{color:var(--accent);font-weight:600}.nav-item.active:after{content:'';position:absolute;bottom:0;left:0;right:0;height:3px;background:var(--accent);border-radius:3px 3px 0 0}.new-label{background:var(--tint);font-size:11px;padding:2px 6px;color:var(--accent);border-radius:4px}.header-actions{display:flex;gap:13px;align-items:center}.icon-button{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;color:var(--muted);transition:background .18s}.icon-button:hover{background:var(--tint);color:var(--accent)}.language{border-left:1px solid var(--line);padding-left:19px;font-size:12px;font-weight:600;color:var(--muted)}
.main{max-width:1248px;margin:auto;padding:40px 32px 0}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px}.eyebrow{font-size:10px;font-weight:650;letter-spacing:2px;color:var(--muted)}h1{font-size:36px;font-weight:650;margin:7px 0 5px;letter-spacing:-.8px;line-height:1.4}.title-dot{color:var(--accent);margin-left:3px}.page-heading p{font-size:14px;color:var(--muted);margin:0;line-height:1.7}.save-status{font-size:12px;color:var(--muted);display:flex;gap:7px;align-items:center;padding-top:30px}.save-status svg{width:17px;height:17px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:42px}.game-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:8px}.difficulty{display:flex;gap:4px;background:#edf0f6;border-radius:10px;padding:4px}.difficulty button{padding:9px 18px;border-radius:7px;font-size:14px;color:var(--muted);transition:color .18s,background .18s,box-shadow .18s}.difficulty button:hover{color:var(--accent)}.difficulty button.active{color:var(--accent);background:var(--surface);box-shadow:0 2px 5px #182d5110;font-weight:600}.text-button{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--muted);padding:5px 0}.text-button:hover{color:var(--accent)}.text-button svg{width:16px;height:16px}.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 224px;gap:25px}.board-meta{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:13px;color:var(--muted);height:25px}.board-meta strong{font-weight:600;color:var(--ink);margin-left:6px}.timer-wrap{display:flex;gap:7px;align-items:center}.timer-wrap>span[data-icon] svg{width:15px;height:15px}.timer-wrap #timer{font-variant-numeric:tabular-nums;color:var(--ink);min-width:43px;font-size:14px}.small-icon{height:26px;width:26px;display:grid;place-items:center;color:var(--muted);padding:0;border-radius:6px}.small-icon:hover{background:var(--tint)}.small-icon svg{height:14px;width:14px}.board-frame{position:relative;border-radius:9px;overflow:hidden;box-shadow:0 5px 15px #1c315006;border:2px solid var(--box);background:var(--surface)}.board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));grid-template-rows:repeat(9,minmax(0,1fr));position:relative;aspect-ratio:1;outline:none}.cell{padding:0;display:flex;align-items:center;justify-content:center;position:relative;border-right:1px solid var(--grid);border-bottom:1px solid var(--grid);background:var(--surface);color:var(--accent);font-size:clamp(23px,2.3vw,32px);line-height:1;font-weight:400;min-width:0;transition:background .12s;-webkit-user-select:none;user-select:none}.cell:nth-child(3n){border-right:2px solid var(--box)}.cell:nth-child(9n){border-right:0}.cell:nth-child(n+19):nth-child(-n+27),.cell:nth-child(n+46):nth-child(-n+54){border-bottom:2px solid var(--box)}.cell:nth-child(n+73){border-bottom:0}.cell.given{color:var(--given);font-weight:500}.cell.peer{background:var(--peer)}.cell.same{background:var(--same)}.cell.selected{background:var(--selected);box-shadow:inset 0 0 0 2px var(--accent);z-index:1}.cell.error{color:var(--error);background:var(--error-bg)}.cell.selected.error{box-shadow:inset 0 0 0 2px var(--error)}.cell:focus-visible{outline:none;box-shadow:inset 0 0 0 3px var(--accent);z-index:2}.cell-notes{display:grid;grid-template-columns:repeat(3,1fr);position:absolute;inset:4px;font-size:11px;color:var(--muted);line-height:1}.cell-notes span{display:grid;place-items:center}.cell.pop{animation:number-in .18s ease-out}.board-bottom{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:14px}.board-bottom>span:first-child{display:flex;align-items:center;gap:6px}.mini-dot{width:5px;height:5px;border-radius:50%;background:var(--accent)}.progress-track{height:3px;border-radius:3px;background:var(--line);margin-top:10px;overflow:hidden}.progress-track>div{height:100%;background:var(--accent);transition:width .35s}.controls-column{padding-top:37px}.tools{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:24px}.tool{display:flex;align-items:center;flex-direction:column;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted);height:56px;padding:3px 0 0}.tool svg{height:22px;width:22px}.tool:hover{color:var(--accent)}.tool.active{color:var(--accent)}.tool-icon{position:relative;display:flex}.tool-icon small{position:absolute;top:-8px;right:-19px;min-width:26px;background:#e5eaf3;border:2px solid var(--bg);border-radius:5px;color:var(--muted);font-size:8px;line-height:12px;text-align:center;font-weight:700}.tool.active .tool-icon small{background:var(--accent);color:#fff}.numpad{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.number-key{height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:#eaf0ff;border-radius:10px;font-size:29px;color:var(--accent);line-height:1.2;transition:background .18s,transform .12s}.number-key:hover{background:#dce5ff;transform:translateY(-2px)}.number-key:active{transform:scale(.95)}.number-key small{font-size:9px;color:#778cc6;line-height:1.2}.primary{background:var(--accent);color:white;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:14px 22px;font-size:14px;font-weight:600;min-height:48px;transition:background .2s,transform .15s}.primary:hover{background:#234bd7;transform:translateY(-1px)}.new-game{width:100%;margin-top:17px}.new-game svg{width:17px;height:17px}.control-tip{display:flex;align-items:flex-start;gap:9px;color:var(--muted);margin-top:20px}.control-tip svg{width:17px;height:17px;margin-top:3px}.control-tip p{font-size:11px;line-height:1.9;margin:0}.control-tip strong{font-weight:500;color:var(--ink)}.hint-message{font-size:12px;line-height:1.8;border-left:2px solid var(--accent);padding:9px 12px;margin-top:15px;color:var(--accent);background:var(--tint)}
.sidebar{padding-top:0}.daily-card{background:#eef2ff;border:1px solid #e1e8ff;border-radius:15px;padding:22px;color:#26385f;position:relative;overflow:hidden}.daily-top{display:flex;justify-content:space-between;align-items:center}.daily-top .eyebrow{font-size:10px;letter-spacing:1.6px;color:#6a7dae}.daily-top svg{color:#6c89e2;width:22px;height:22px}.daily-date{display:flex;align-items:center;gap:17px;margin:15px 0 8px}.daily-date>span{font-size:68px;line-height:1;font-weight:600;letter-spacing:-4px;color:var(--accent)}.daily-date>div{display:flex;flex-direction:column;gap:3px;font-size:14px}.daily-date>div>span:last-child{font-size:12px;color:#7d8bab}.daily-card h2{font-size:20px;font-weight:600;margin:17px 0 5px;letter-spacing:-.4px}.daily-card p{font-size:12px;color:#7787aa;margin:0 0 20px}.daily-card button{display:flex;width:100%;align-items:center;justify-content:space-between;background:white;color:var(--accent);border-radius:8px;padding:12px 14px;font-size:13px;font-weight:600;box-shadow:0 2px 5px #345bea08;transition:box-shadow .18s}.daily-card button:hover{box-shadow:0 3px 12px #345bea22}.daily-card button svg{width:17px;height:17px}.daily-foot{display:flex;align-items:center;justify-content:center;gap:6px;font-size:10px;color:#8390ad;margin-top:15px}.daily-foot svg{width:13px;height:13px}.ad-section{margin-top:23px}.ad-label{font-size:8px;color:#9aa4b6;letter-spacing:1.8px;text-align:center;margin-bottom:8px}.ad-slot{border:1px dashed #d7dfea;background:#f0f3f8;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;border-radius:10px;color:#99a4b7;text-align:center;overflow:hidden}.sidebar-ad{width:300px;height:250px;font-size:13px}.ad-slot small{font-size:10px;font-weight:400}.ad-mark{background:#e7ecf4;border-radius:9px;height:39px;width:39px;margin-bottom:3px}.ad-mark svg{width:21px;height:21px;color:#a4b0c3}.ad-note{font-size:10px;color:#939daf;text-align:center;margin:10px 0 0}.journey-teaser{display:flex;width:100%;align-items:center;gap:12px;text-align:left;padding:21px 0 4px}.journey-icon{width:39px;height:39px;border-radius:10px;color:var(--accent);background:var(--tint)}.journey-teaser>span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:4px}.journey-teaser strong{font-size:13px;font-weight:600}.journey-teaser small{font-size:10px;color:var(--muted)}.journey-teaser>span:last-child{color:var(--muted)}.below-game{border-top:1px solid var(--line);margin-top:38px;padding-top:26px;margin-bottom:28px;display:grid;grid-template-columns:1fr 1.65fr;gap:38px;align-items:center}.tip-label{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:var(--ink)}.tip-label svg{width:16px;height:16px;color:var(--accent)}.learning-tip p{font-size:12px;color:var(--ink);line-height:1.9;margin:8px 0}.learning-tip p span{color:var(--muted)}.learning-tip .text-button{font-size:11px;color:var(--accent)}.bottom-ad{height:90px;font-size:12px;width:100%;border-radius:7px}.bottom-ad-wrap .ad-label{text-align:left}.footer{max-width:1184px;padding:22px 0 30px;border-top:1px solid var(--line);margin:auto;display:flex;align-items:center;gap:24px}.footer-brand{font-size:17px;gap:7px}.footer-brand .brand-sub{font-size:12px}.copyright{color:var(--muted);font-size:10px}.footer>div{display:flex;gap:24px;margin-left:auto}.footer button{font-size:11px;color:var(--muted);padding:6px 0}.footer button:hover{color:var(--accent)}
.pause-overlay{position:absolute;inset:0;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:4;text-align:center}.pause-symbol{color:var(--accent);width:65px;height:65px;background:var(--tint);border-radius:50%;display:grid!important;place-items:center}.pause-symbol svg{height:29px;width:29px}.pause-overlay h2{font-size:23px;margin:17px 0 5px}.pause-overlay p{font-size:14px;color:var(--muted);margin-bottom:22px}.journey-strip{display:flex;align-items:center;justify-content:space-between;gap:30px;border-top:1px solid var(--line);margin-top:30px;padding:26px 0 0}.journey-strip h2{font-size:20px;margin:6px 0}.journey-strip p{font-size:12px;color:var(--muted);margin:0}.stage-list{display:flex;gap:15px}.stage{display:flex;flex-direction:column;gap:6px;align-items:center;font-size:10px;color:var(--muted)}.stage>span{display:grid;place-items:center;height:44px;width:44px;border:1px solid var(--line);background:var(--surface);border-radius:14px;font-size:18px}.stage.current>span{background:var(--accent);color:white;border-color:var(--accent)}.stage.completed>span{color:var(--accent);background:var(--tint)}
dialog{border:0;border-radius:20px;padding:0;background:var(--surface);color:var(--ink);max-width:460px;width:calc(100% - 36px);box-shadow:0 24px 100px #10245233}dialog::backdrop{background:#15253f65;backdrop-filter:blur(5px)}dialog[open]{animation:dialog-in .2s ease-out}.dialog-shell{padding:36px;position:relative}.dialog-close{position:absolute;right:12px;top:12px}.dialog-shell h2{font-size:25px;font-weight:650;line-height:1.4;margin:8px 0 15px}.dialog-shell h3{font-size:15px;margin:22px 0 7px}.dialog-shell p,.dialog-shell li{font-size:14px;line-height:1.85;color:var(--muted)}.dialog-shell ul,.dialog-shell ol{padding-left:22px}.dialog-shell .eyebrow{color:var(--accent)}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:25px}.secondary{background:var(--peer);border-radius:10px;padding:12px 18px;font-size:14px;min-height:46px}.dialog-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}.level-choice{padding:17px;border:1px solid var(--line);border-radius:10px;text-align:left;font-size:16px}.level-choice:hover{border-color:var(--accent);color:var(--accent);background:var(--tint)}.level-choice small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.setting-row{display:flex;align-items:center;justify-content:space-between;padding:18px 0;border-bottom:1px solid var(--line);gap:20px;font-size:14px}.setting-row small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.switch{appearance:none;width:40px;height:23px;border-radius:16px;background:#cbd2df;flex-shrink:0;margin:0;cursor:pointer;position:relative;transition:background .2s}.switch:checked{background:var(--accent)}.switch:after{content:'';position:absolute;top:3px;left:3px;height:17px;width:17px;background:white;border-radius:50%;transition:transform .2s}.switch:checked:after{transform:translateX(17px)}.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:25px 0}.stat-grid>div{border-bottom:1px solid var(--line);padding-bottom:17px}.stat-grid strong{display:block;color:var(--accent);font-size:32px;line-height:1.4;font-weight:600}.stat-grid span{font-size:12px;color:var(--muted)}.win-icon{width:70px;height:70px;color:var(--accent);background:var(--tint);border-radius:50%;display:grid;place-items:center;margin-bottom:20px}.win-icon svg{height:32px;width:32px}.win-summary{display:flex;justify-content:space-around;background:var(--peer);padding:20px;border-radius:12px;margin:22px 0}.win-summary strong{display:block;font-size:22px;text-align:center}.win-summary small{font-size:11px;color:var(--muted)}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);padding:13px 20px;border-radius:12px;background:var(--ink);color:var(--surface);box-shadow:0 8px 30px #182d5120;font-size:13px;z-index:10;animation:dialog-in .15s}.skip{position:fixed;top:-60px;left:10px;background:var(--accent);color:white;padding:12px;z-index:100}.skip:focus{top:10px}.noscript{position:fixed;bottom:0;padding:20px;background:white;width:100%;text-align:center}.ad-slot a,.ad-slot img{display:block;width:100%;height:100%;object-fit:contain}.ad-slot ins{width:100%;height:100%;display:block}.ad-slot.filled{border:0;background:transparent;border-radius:0}
body.dark{--bg:#141c2b;--surface:#1d283b;--ink:#e1e8f5;--muted:#97a5bd;--line:#2d3b53;--accent:#8da7ff;--tint:#273756;--peer:#243149;--same:#314569;--selected:#3d5381;--given:#e2e9f7;--error:#ff93a4;--error-bg:#492d3c;--grid:#344560;--box:#68809f;background:var(--bg);color:var(--ink)}body.dark .difficulty{background:#1b273c}body.dark .number-key{background:#253857;color:#b1c3ff}body.dark .number-key small{color:#93a9d7}body.dark .primary{background:#4c6ce3;color:white}body.dark .daily-card{background:#243351;border-color:#344664;color:#dbe6ff}body.dark .daily-card button{background:#344769;color:#bfceff}body.dark .daily-card p,body.dark .daily-date>div>span:last-child,body.dark .daily-foot,body.dark .daily-top .eyebrow{color:#a2b3d4}body.dark .ad-slot{background:#1a2538;border-color:#35435b;color:#91a1ba}body.dark .ad-mark{background:#2b3850}
@keyframes number-in{from{transform:scale(.88)}to{transform:scale(1)}}@keyframes dialog-in{from{opacity:0;translate:0 9px}to{opacity:1;translate:0 0}}@keyframes enter{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}.game-section{animation:enter .45s both}.sidebar{animation:enter .5s .08s both}
@media(min-width:1400px){.main{padding-top:48px}.page-heading{margin-bottom:34px}.header-inner{height:84px}}
@media(max-width:1150px){.layout{gap:26px;grid-template-columns:minmax(0,1fr) 260px}.sidebar-ad{width:100%}.play-layout{grid-template-columns:minmax(0,1fr) 190px;gap:18px}.number-key{height:58px}.difficulty button{padding:8px 13px}.nav{gap:20px;margin-left:15px}.header-inner{gap:15px}.main{padding-top:30px}.footer{margin:0 32px}.daily-card{padding:20px}.control-tip p{font-size:10px}.tools{margin-bottom:18px}.cell{font-size:26px}}
@media(max-width:960px){.layout{grid-template-columns:minmax(0,1fr)}.play-layout{grid-template-columns:minmax(0,1fr) 240px;gap:28px}.sidebar{display:grid;grid-template-columns:1fr 300px;gap:25px;align-items:start}.sidebar .journey-teaser{display:none}.ad-section{margin:0}.daily-card{min-height:280px}.number-key{height:78px}.nav{gap:16px;margin-left:0}.nav-item{font-size:13px}.nav-item svg{display:none}.new-label{display:none}.cell{font-size:32px}.below-game{grid-template-columns:1fr}.bottom-ad-wrap{max-width:728px;width:100%;margin:auto}.main{max-width:850px}.header-inner{height:72px}.control-tip p{font-size:12px}.tools{margin-bottom:24px}}
@media(max-width:650px){.header-inner{padding:0 20px;height:auto;min-height:72px;flex-wrap:wrap;gap:0}.brand{font-size:23px}.brand img{height:30px;width:30px}.brand-sub{font-size:13px}.header-actions{margin-left:auto;gap:7px;height:65px}.header-actions .language{display:none}.nav{order:3;width:100%;height:48px;justify-content:space-between;margin:0;gap:20px}.nav-item{font-size:13px;gap:7px}.nav-item svg{display:block;width:16px;height:16px}.main{padding:23px 18px 0}.page-heading{margin-bottom:20px;align-items:flex-start}.page-heading .eyebrow{font-size:8px;letter-spacing:1.5px}h1{font-size:29px;margin-top:4px}.page-heading p{font-size:12px}.save-status{font-size:10px;padding-top:30px;gap:4px}.save-status svg{width:14px;height:14px}.layout{gap:28px}.game-top{margin-bottom:14px}.difficulty{padding:3px;gap:1px}.difficulty button{padding:8px 10px;font-size:12px}.game-top .text-button{font-size:11px;gap:4px}.game-top .text-button svg{width:14px;height:14px}.play-layout{display:flex;flex-direction:column;gap:17px}.board-meta{font-size:12px;margin-bottom:9px}.cell{font-size:clamp(22px,7vw,34px)}.cell-notes{font-size:10px;inset:3px}.board-bottom{margin-top:10px;font-size:10px}.controls-column{padding:0;display:flex;flex-direction:column}.tools{order:0;display:flex;justify-content:space-around;margin-bottom:16px}.tool{height:48px;font-size:11px;gap:7px;min-width:55px}.tool svg{width:20px;height:20px}.numpad{grid-template-columns:repeat(9,minmax(0,1fr));gap:5px;order:1}.number-key{height:54px;font-size:25px;border-radius:7px}.number-key small{font-size:9px}.new-game{order:2;margin-top:14px;min-height:45px;font-size:13px}.control-tip{display:none}.hint-message{order:3}.sidebar{grid-template-columns:1fr;gap:25px}.daily-card{min-height:0;padding:20px}.daily-date{float:right;margin-top:16px;margin-left:12px;gap:10px}.daily-date>span{font-size:52px}.daily-date>div{font-size:12px}.daily-card h2{margin-top:20px}.daily-card p{font-size:11px;margin-bottom:20px}.daily-card button{clear:both}.daily-foot{margin-top:12px}.ad-section{max-width:300px;width:100%;margin:auto}.below-game{gap:24px;margin-top:28px;padding-top:22px}.learning-tip p{font-size:12px}.bottom-ad{height:90px}.footer{margin:0 18px;flex-wrap:wrap;gap:12px;padding:20px 0}.footer>div{width:100%;margin:0;justify-content:space-between;gap:15px}.footer .copyright{margin-left:auto}.footer button{font-size:10px}.journey-strip{flex-direction:column;align-items:flex-start;gap:20px}.stage-list{width:100%;justify-content:space-between;gap:4px}.stage>span{width:39px;height:39px;border-radius:11px}.dialog-shell{padding:32px 24px}.dialog-shell h2{font-size:23px}.toast{font-size:12px;bottom:16px;width:max-content}.page-heading:has(+.layout) .save-status{max-width:115px}.ad-label{font-size:8px}}
/* Thai-first typography; keep the full board comfortably in view. */
:root{font-family:NineThai,'Segoe UI',Tahoma,sans-serif;--muted:#69768e}
.header-inner,.main{max-width:1184px}.header-inner{height:76px}.main{padding-top:28px}.page-heading{margin-bottom:24px}h1{font-size:32px;margin-top:4px;line-height:1.35}.page-heading p{font-size:14px}.game-top{margin-bottom:15px}.footer{max-width:1120px}.brand,.cell,.number-key,.daily-date>span,#timer,.stat-grid strong,.win-summary strong{font-family:'Segoe UI',NineThai,sans-serif}.nav-item{font-size:14px}.eyebrow{font-size:10px}.tool{font-size:13px}.control-tip p{font-size:12px}.board-bottom{font-size:12px}.daily-card p{font-size:13px}.daily-card button{font-size:14px}.daily-foot{font-size:12px}.ad-note{font-size:12px}.journey-teaser strong{font-size:14px}.journey-teaser small{font-size:12px}.learning-tip p{font-size:14px}.learning-tip .text-button{font-size:12px}.tip-label{font-size:14px}.footer button{font-size:12px}.dialog-shell p,.dialog-shell li{font-size:16px}.setting-row{font-size:16px}.setting-row small{font-size:13px}
@media(min-width:961px){.board-frame{max-width:533px}.game-section{min-width:0}.cell{font-size:30px}.layout{gap:32px}.play-layout{gap:24px}}
@media(min-width:651px) and (max-width:760px){.play-layout{grid-template-columns:minmax(0,1fr) 175px;gap:20px}.number-key{height:58px}.tools{gap:1px}.tool{font-size:11px}.control-tip p{font-size:10px}.sidebar{grid-template-columns:1fr 280px}}
@media(max-width:650px){.header-inner{height:auto}.main{padding-top:21px}.page-heading{margin-bottom:18px}h1{font-size:28px}.page-heading p{font-size:12px}.game-top{margin-bottom:12px}.nav-item{font-size:13px}.board-bottom{font-size:11px}.tool{font-size:12px}.daily-card p{font-size:12px}.daily-foot{font-size:11px}.cell{font-size:clamp(22px,7vw,34px)}.footer button{font-size:11px}.daily-date{margin-left:8px}.daily-date>span{font-size:48px}.below-game{margin-top:25px}.learning-tip p{font-size:13px}.footer{margin:0 18px}}
@media(max-width:650px){.page-heading .eyebrow,.page-heading p{display:none}.page-heading{align-items:center;margin-bottom:14px}.page-heading h1{margin:0;font-size:27px}.save-status{padding-top:0}.main{padding-top:18px}.board-meta{height:23px}.tools{margin-bottom:13px}.play-layout{gap:14px}}
@media(max-width:360px){.nav{gap:5px}.nav-item{font-size:12px;gap:5px}.header-inner{padding-left:16px;padding-right:16px}.page-heading h1{font-size:24px}.save-status{font-size:9px}.game-top{gap:4px}.difficulty button{padding:8px}.daily-date>div{font-size:11px}.daily-date>span{font-size:42px}}
.dialog-shell .shortcut-help{font-size:13px;line-height:1.7;margin:8px 0 12px}.shortcut-row{padding:12px 0;gap:12px}.shortcut-input{width:68px;min-height:44px;border:1px solid var(--grid);border-radius:8px;text-align:center;font-family:'Segoe UI',NineThai,sans-serif;font-size:20px;font-weight:600;background:var(--peer);color:var(--accent);padding:6px}.shortcut-input[aria-invalid=true]{border-color:var(--error)}.shortcut-feedback{font-size:12px;line-height:1.7;min-height:40px;padding:10px 0;color:var(--muted)}.shortcut-feedback.error{color:var(--error)}#reset-shortcuts{color:var(--accent);min-height:36px;font-size:13px}
.dialog-shell .hint-location{color:var(--accent);font-size:14px;margin-top:-5px}.hint-steps{padding-left:24px}.hint-steps li{padding-left:4px;margin:12px 0}.hint-steps li::marker{color:var(--accent);font-weight:600}.hint-details{border-top:1px solid var(--line);padding-top:14px;margin-top:18px}.hint-details summary{cursor:pointer;font-size:14px;color:var(--accent);line-height:1.8}.hint-details li{font-size:14px;line-height:1.9;margin:12px 0}.dialog-shell .hint-context{font-size:12px;line-height:1.8;margin-top:18px}.hint-message strong{display:block;font-size:13px}.hint-message .text-button{color:var(--accent);font-size:12px;margin-top:6px}
.number-key.number-complete{visibility:hidden;pointer-events:none}
/* Hint steps annotate the live board; game values stay underneath. */
.game-section{--hv-source:#a55c13;--hv-source-bg:#fff1d8;--hv-cross:#b94057;--hv-cross-bg:#ffedf1}
body.dark .game-section{--hv-source:#ffd089;--hv-source-bg:#483924;--hv-cross:#ff9bae;--hv-cross-bg:#4a2b3a}
.is-hinting .tools,.is-hinting .numpad,.is-hinting .new-game,.is-hinting .control-tip{display:none}
.hint-message.inline-hint{margin:0;padding:0;border:0;background:none;color:var(--ink)}
.inline-hint-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:-7px 0 10px}.inline-hint-heading .eyebrow{color:var(--accent);letter-spacing:0;font-size:13px}.inline-hint-heading .icon-button{flex-shrink:0}
.hv-explanation{min-width:0}.hv-step-label{font-size:12px;color:var(--accent)}.hv-title{font-size:18px;line-height:1.6;margin:7px 0}.hv-caption{font-size:14px;line-height:1.85;margin:0 0 16px;color:var(--ink)}
.hv-candidate-label{font-size:12px;color:var(--muted);margin-bottom:8px}.hv-candidates{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:3px}.hv-chip{height:30px;border-radius:4px;background:var(--tint);color:var(--accent);display:grid;place-items:center;font-family:'Segoe UI',sans-serif;font-size:16px}.hv-chip.excluded{background:var(--peer);color:var(--muted);text-decoration:line-through;opacity:.55}.hv-chip.just-removed{opacity:1;border:1px solid var(--hv-source);color:var(--hv-source);background:var(--hv-source-bg)}.hv-chip.answer{background:var(--accent);color:var(--surface);font-weight:700}body.dark .hv-chip.answer{color:#14203b}
.hv-state-key{font-size:10px;line-height:1.8;color:var(--muted);margin:9px 0 16px}.hv-controls,.hint-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hv-controls button,.hint-actions button{padding:10px 6px;min-height:44px;font-size:12px}.hv-progress{display:flex;gap:3px;margin-top:14px}.hv-progress>span{flex:1;height:3px;border-radius:3px;background:var(--line)}.hv-progress>span.passed{background:var(--accent)}
.hv-legend{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:11px;line-height:1.7;color:var(--muted);margin-top:14px}.hv-legend>span{display:flex;align-items:center;gap:5px}.hv-key{width:11px;height:11px;border-radius:2px;display:inline-block}.hv-key.target{background:var(--selected);border:1px solid var(--accent)}.hv-key.source{background:var(--hv-source-bg);border:1px solid var(--hv-source)}
.hint-actions{margin:20px 0 16px}.hint-full{border-top:1px solid var(--line);padding-top:12px}.hint-full>summary{color:var(--accent);font-size:13px;cursor:pointer;line-height:1.8}.hint-full li{font-size:13px;line-height:1.85;margin:10px 0}.hint-full ul{padding-left:20px}.hint-context{font-size:11px;color:var(--muted);line-height:1.8;margin:14px 0 0}
.showing-hint .cell{--hint-fill:var(--surface)}.showing-hint .cell.live-hint-active{--hint-fill:var(--tint);background:var(--hint-fill)}.showing-hint .cell.live-hint-source{--hint-fill:var(--hv-source-bg);background:var(--hint-fill);color:var(--hv-source);box-shadow:inset 0 0 0 1px var(--hv-source);font-weight:600}.showing-hint .cell.live-hint-crossed{--hint-fill:var(--hv-cross-bg);background:var(--hint-fill);color:var(--hv-cross)}.showing-hint .cell.live-hint-target{--hint-fill:var(--selected);background:var(--hint-fill);box-shadow:inset 0 0 0 2px var(--accent);color:var(--accent)}.showing-hint .cell.live-hint-target.live-hint-crossed{--hint-fill:var(--hv-cross-bg);color:var(--hv-cross);box-shadow:inset 0 0 0 2px var(--hv-cross)}
.live-hint-annotation{position:absolute;inset:3px;display:grid;place-items:center;background:var(--hint-fill);border:1px dashed currentColor;border-radius:3px;color:inherit;z-index:2;pointer-events:none;font-weight:500}.live-hint-cross{position:absolute;right:3px;bottom:2px;font-size:16px;font-weight:700;color:var(--hv-cross);z-index:3;pointer-events:none}.showing-hint .live-hint-result .live-hint-annotation{font-weight:700}.live-hint-arrows{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}
@media(max-width:650px){.inline-hint-heading{margin-top:0}.hv-title{font-size:18px}.hv-caption{margin-bottom:12px}.hv-chip{height:34px;font-size:18px}.hv-controls button,.hint-actions button{font-size:14px}.hv-legend{gap:6px 14px}.hint-actions{margin-top:17px}.hint-full li{font-size:14px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Technique scanner: an explanation and its evidence live on the same board. */
.tools{grid-template-columns:repeat(6,1fr)}
.cell.technique-source{background:var(--hv-source-bg);color:var(--hv-source);box-shadow:inset 0 0 0 2px var(--hv-source);font-weight:600;z-index:1}
.cell.technique-target{background:#dceff6;box-shadow:inset 0 0 0 2px #277e9e;color:#17617d;z-index:1}
.cell.technique-source.technique-target{box-shadow:inset 0 0 0 2px var(--hv-source)}
.cell .technique-notes{opacity:1;color:var(--ink);font-weight:400}
.cell .technique-notes .technique-keep{color:var(--hv-source);font-weight:800;background:var(--hv-source-bg);border-radius:2px}
.cell .technique-notes .technique-remove{color:#923645;text-decoration:line-through;text-decoration-thickness:2px;font-weight:800;background:#fbe6e5;border-radius:2px}
body.dark .cell .technique-notes{color:#dce9d0}
body.dark .cell .technique-notes .technique-remove{color:#ffd0d8;background:#56323c}
.technique-cuts{columns:2;column-gap:20px}.technique-cuts li{break-inside:avoid}
.hint-message p,.hint-message ol{margin:7px 0}.hint-message li{margin:5px 0}.hint-message b{color:var(--accent)}
.technique-list{display:grid;gap:8px;margin:18px 0}.technique-choice{border:1px solid var(--line);border-radius:10px;padding:12px 14px;text-align:left;display:grid;gap:3px;transition:border-color .15s,background .15s}.technique-choice:hover{border-color:var(--accent);background:var(--tint)}.technique-choice strong{font-size:14px;color:var(--accent)}.technique-choice span{font-size:13px}.technique-choice small,.technique-note{font-size:12px;color:var(--muted)}
@media(max-width:650px){.tools{gap:2px;flex-wrap:wrap;justify-content:center}.tool{min-width:0;flex:0 1 57px;font-size:10px}.tool svg{width:18px;height:18px}.hint-message{font-size:13px}.technique-choice{padding:11px 12px}}
body.dark .cell.technique-target{background:#214657;box-shadow:inset 0 0 0 2px #77c8e5;color:#a9e4f7}.technique-source-label{color:var(--hv-source)!important}.technique-target-label{color:#17617d!important}body.dark .technique-target-label{color:#a9e4f7!important}

#technique-button:target{outline:3px solid #aa791c;outline-offset:4px}
