:root{font-family:"Pretendard","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;color:#303e34;background:#f6f5ed;font-synthesis:none;--green:#42664a;--muted:#899084;--red:#cf6d5c}
*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible{outline:3px solid #c99c42;outline-offset:4px}button{transition:background .16s,transform .16s}button:active:not(:disabled){transform:translateY(1px)}a{color:inherit;text-decoration:none}.svg-library{position:absolute;width:0;height:0;overflow:hidden}.site-header{max-width:1280px;margin:auto;height:112px;padding:0 60px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e3e4d9}.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:21px;letter-spacing:-.8px}.brand-mark{display:flex;position:relative;width:55px;height:44px}.brand-mark svg{width:37px;height:40px;position:absolute;left:0;transform:rotate(-13deg)}.brand-mark svg+svg{left:22px;top:5px;transform:rotate(12deg)}.brand-en{display:block;font-size:8px;letter-spacing:2px;margin-top:3px;color:#7a846f}.header-actions{display:flex;align-items:center;gap:12px}.offline{font-size:11px;color:#778471;margin-right:14px;display:flex;align-items:center;gap:7px}.offline i,.game-heading i{width:6px;height:6px;background:#82a270;border-radius:50%;display:inline-block}.icon-button{background:transparent;border:1px solid #dce0d3;border-radius:50%;width:32px;height:32px;color:#63705b;font-size:16px;position:relative}.sound-slash{position:absolute;left:10px;top:7px;font-size:16px}.layout{display:grid;grid-template-columns:360px minmax(0,510px);column-gap:106px;justify-content:center;padding:50px 36px 44px;max-width:1280px;margin:auto}.intro{padding-top:28px}.eyebrow{font-size:10px;font-weight:650;letter-spacing:2px;color:#7c8c6c;display:flex;align-items:center;gap:8px}.eyebrow>span{width:17px;height:1px;background:#899779}h1{font-size:43px;line-height:1.43;letter-spacing:-2.8px;font-weight:750;margin:21px 0 18px}.period{color:#d8846d}.intro-copy{font-size:14px;line-height:1.95;letter-spacing:-.3px;color:#7d8276}.how-card{margin-top:34px;border:1px solid #dfe2d4;border-radius:16px;padding:22px 23px;background:#f1f2e7}.step-label{font-size:9px;letter-spacing:1.9px;color:#90967e;font-weight:650}.demo{display:flex;align-items:center;gap:29px;margin:20px 0 22px}.demo-selection{display:grid;grid-template-columns:repeat(2,39px);grid-template-rows:repeat(2,38px);background:#e2e9d4;border:1.5px dashed #84a177;border-radius:8px;padding:6px;position:relative}.demo-selection svg{width:37px;height:37px}.demo-cursor{font-size:27px;color:#4b6647;position:absolute;bottom:-18px;right:-10px;text-shadow:1px 1px #fff}.demo-equation{font-size:17px;font-weight:650;display:grid;grid-template-columns:auto auto auto;gap:8px}.demo-equation>span:first-child{color:#cf7564}.demo-equation>span:nth-of-type(2){color:#799660}.demo-equation>b{font-size:13px;color:#9fa792}.demo-equation small{grid-column:1/-1;font-size:11px;color:#859477;font-weight:400;margin-top:5px}h2{letter-spacing:-.7px}.how-card h2{font-size:15px;margin:0 0 9px}.how-card p{font-size:12px;color:#818877;line-height:1.85;margin:0}.rule-notes{margin:25px 4px 0;display:grid;gap:17px}.rule-notes>div{display:flex;gap:12px;align-items:center}.note-icon{font-size:23px;width:30px;text-align:center;color:#92a180}.rule-notes p{margin:0}.rule-notes strong{font-size:12px;font-weight:600}.rule-notes small{display:block;font-size:11px;color:#929786;margin-top:5px}.intro-footer{font-size:11px;color:#8d9481;margin:35px 3px 0}.intro-footer span{font-size:8px;letter-spacing:1.4px;display:block;margin-top:9px;color:#afb19e}.game-heading{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin:0 3px 17px}.game-heading>span:first-child{display:flex;gap:8px;align-items:center;font-weight:650}.mode-label{color:#9b9f8f;font-size:9px;letter-spacing:1.1px}.stats{display:grid;grid-template-columns:1fr 1fr 1fr;margin-bottom:18px;border:1px solid #e4e5da;border-radius:13px;padding:17px 0;background:#fbfaf4}.stat{padding:0 20px;display:flex;flex-direction:column;gap:7px}.stat+.stat{border-left:1px solid #e4e5da}.stat>span{font-size:10px;color:#8b917e}.stat strong{font-size:30px;font-weight:650;letter-spacing:-1px;font-variant-numeric:tabular-nums;line-height:1.05}.stat small{font-size:9px;color:#a1a58f}.timer-stat strong{color:#526b46}.best-stat strong{color:#8a9277}.crown{color:#ac9c70}.time-track{height:3px;background:#e7e9da;border-radius:3px;margin-top:5px}.time-track>div{height:100%;background:#97af7a;border-radius:3px;width:100%;transition:width .15s}.timer-stat.urgent strong{color:#c76853}.timer-stat.urgent .time-track>div{background:#d77c65}.board-shell{background:#fdfcf6;border:1px solid #dde1d1;border-radius:17px;box-shadow:0 6px 18px #3c4b2b05;padding:0 17px}.selection-panel{height:55px;display:flex;justify-content:space-between;align-items:center;gap:5px}.counts{display:flex;align-items:center;gap:12px;font-size:11px;font-weight:600}.counts b{font-size:16px;margin-left:4px;font-variant-numeric:tabular-nums}.red-count{color:#c87967}.green-count{color:#7e9868}#equal-sign{color:#b8bcab;font-size:14px}#selection-label{font-size:10px;color:#999f8a;text-align:right}.selection-panel.valid #selection-label{color:#537640;font-weight:650}.selection-panel.invalid #selection-label{color:#c37460}.board-wrap{position:relative;isolation:isolate}#board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(10,minmax(0,1fr));aspect-ratio:8/10;padding:7px;background:#ebeedf;border-radius:10px;border:1px solid #e0e4d1;touch-action:none;user-select:none;-webkit-user-select:none;outline:none;overflow:hidden}#board:focus-visible{outline:2px solid #879a65;outline-offset:3px}.cell{display:flex;align-items:center;justify-content:center;border-radius:6px;position:relative;min-width:0;min-height:0}.cell::before{content:"";width:3px;height:3px;border-radius:50%;background:#d2d8c0;position:absolute;z-index:-1}.cell svg{width:83%;height:83%;max-width:47px;max-height:47px;filter:drop-shadow(0 2px 0 #6d814c10);pointer-events:none;transition:transform .12s}.cell.selected{background:#6f915c19}.cell.selected svg{transform:scale(1.07)}.cell.keyboard{box-shadow:inset 0 0 0 2px #c49849}.cell.hinted{background:#e5cc763d;box-shadow:inset 0 0 0 1px #c3a656}.cell.harvested::after{content:"✧";position:absolute;font-size:26px;color:#8caa66;animation:spark .55s forwards}#selection-box{display:none;position:absolute;pointer-events:none;border:1.5px dashed #97a981;border-radius:6px;z-index:2}#selection-box.valid{border:2px solid #688950;background:#8faa6512}#selection-box.invalid{border-color:#cb846a}#floating-score{pointer-events:none;position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);font-size:32px;font-weight:800;color:#43663d;text-shadow:0 2px 0 #fff,0 0 14px #fff;z-index:4;white-space:nowrap}#floating-score.animate{animation:float 1.05s forwards}#floating-score.error{font-size:24px;color:#ba6552}.board-bottom{height:42px;display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#969e85;gap:4px}.board-bottom #remaining>span{margin:0 6px;color:#bfc4b1}.shape-key{font-size:9px;white-space:nowrap}.game-actions{display:flex;justify-content:space-between;margin-top:16px;align-items:center}.secondary-button{border:1px solid #dce1d1;background:#f0f1e6;border-radius:8px;color:#6c785e;padding:10px 17px;font-size:11px;display:flex;gap:8px;align-items:center}.secondary-button:hover:not(:disabled){background:#e7ebda}.text-button{border:0;background:transparent;color:#7d8c6b;font-size:12px;padding:9px 2px}.text-button small{margin-left:4px;font-size:9px;color:#9ea88d}.game-tip{text-align:center;font-size:10px;color:#a1a88f;margin:18px 0 0}.site-footer{max-width:1160px;border-top:1px solid #e2e4d7;margin:0 auto;padding:24px 0 28px;display:flex;justify-content:space-between;font-size:9px;color:#a0a58f;letter-spacing:.5px}.site-footer i{font-style:normal;margin:0 12px;color:#bdc3af}.site-footer>span:last-child>i{font-size:15px;color:#8fa37b}.curtain{position:absolute;inset:0;background:#ecf0e1f7;backdrop-filter:blur(9px);border-radius:10px;display:flex;align-items:center;justify-content:center;z-index:5;padding:22px;text-align:center}.curtain[hidden]{display:none}.curtain-content{max-width:290px;width:100%}.curtain-basket{width:64px;height:64px;color:#6d8556;background:#e0e7d2;border-radius:50%;padding:9px}.curtain h2{font-size:25px;margin:17px 0 12px}.curtain p{font-size:12px;color:#869076;line-height:1.9;margin:0 0 22px}.primary-button{border:0;background:#496b4e;color:#fffdf2;border-radius:10px;padding:14px 25px;font-size:13px;font-weight:600;min-width:190px;box-shadow:0 3px 0 #36543c}.primary-button:hover{background:#3c5e41}.curtain .eyebrow{justify-content:center;font-size:8px;margin-top:20px;letter-spacing:1.5px}.curtain .result-score{font-size:48px;line-height:1.3;color:#486545;font-weight:700;font-variant-numeric:tabular-nums}.result-details{display:flex;justify-content:center;gap:18px;font-size:11px;color:#879275;margin:10px 0 24px}.curtain .text-button{display:block;margin:17px auto 0;font-size:10px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{border:1px solid #d9dfcd;border-radius:19px;padding:36px;max-width:470px;width:calc(100% - 32px);color:#3c4c38;background:#f9f9ef;box-shadow:0 24px 80px #28371d33}dialog::backdrop{background:#25352166;backdrop-filter:blur(4px)}dialog h2{font-size:25px}dialog ol{padding-left:20px}dialog li{font-size:13px;line-height:1.9;margin:12px 0}dialog p{font-size:11px;line-height:1.8;color:#818b73}.dialog-close{position:absolute;top:16px;right:16px}.dialog-done{width:100%;margin-top:12px}body.dragging{overscroll-behavior:none}@keyframes float{0%{opacity:1;transform:translate(-50%,0) scale(.8)}20%{transform:translate(-50%,-15px) scale(1)}70%{opacity:1}100%{opacity:0;transform:translate(-50%,-50px)}}@keyframes spark{to{opacity:0;transform:scale(1.5) rotate(20deg)}}
@media(min-width:1400px){.layout{padding-top:62px;padding-bottom:55px}}
@media(max-width:1000px){.layout{grid-template-columns:300px minmax(0,460px);gap:40px;padding:32px}.site-header{padding:0 32px;height:90px}h1{font-size:36px}.site-footer{margin:0 32px}.stat{padding:0 14px}.intro{padding-top:20px}.how-card{padding:20px}.demo{gap:22px}.shape-key{font-size:8px}}
@media(max-width:760px){.site-header{height:72px;padding:0 22px;max-width:510px;border:0}.brand{font-size:18px;gap:8px}.brand-mark{transform:scale(.86);width:48px}.brand-en{font-size:7px}.header-actions{gap:8px}.offline{font-size:9px;margin-right:2px}.offline i{width:5px;height:5px}.icon-button{width:29px;height:29px}.layout{display:block;padding:7px 16px 24px;max-width:510px}.intro{display:none}.game-heading{font-size:11px;margin:0 3px 13px}.mode-label{font-size:8px}.stats{padding:13px 0;margin-bottom:12px}.stat{padding:0 15px;gap:6px}.stat strong{font-size:27px}.stat>span{font-size:9px}.stat small{font-size:8px}.board-shell{padding:0 11px;border-radius:14px}.selection-panel{height:46px}.counts{font-size:10px;gap:9px}.counts b{font-size:15px}#selection-label{font-size:9px}#board{padding:5px}.board-bottom{height:34px;font-size:8px}.shape-key{font-size:8px}.game-actions{margin-top:12px}.game-tip{margin-top:14px;font-size:9px}.site-footer{max-width:478px;margin:0 auto;padding:17px 16px 22px;font-size:8px}.site-footer>span:last-child{font-size:0}.site-footer>span:last-child>i{font-size:13px}.curtain h2{font-size:24px}.curtain p{font-size:11px}}
@media(max-width:360px){.offline{display:none}.stat{padding:0 10px}.shape-key{display:none}.counts{gap:6px}.board-shell{padding:0 9px}.layout{padding-left:12px;padding-right:12px}}
@media(min-width:761px) and (max-height:850px){.site-header{height:64px}.layout{grid-template-columns:320px minmax(300px,calc((100svh - 320px)*.8 + 26px));gap:76px;padding-top:20px;padding-bottom:24px}.intro{padding-top:8px}h1{font-size:35px;margin:15px 0 10px}.intro-copy{font-size:12px;line-height:1.85}.how-card{margin-top:23px;padding:17px 20px}.demo{margin:14px 0 17px}.rule-notes{margin-top:19px;gap:14px}.intro-footer{margin-top:23px}.game-heading{margin-bottom:12px;font-size:10px}.mode-label{font-size:8px}.stats{padding:12px 0;margin-bottom:12px}.stat{padding:0 12px;gap:5px}.stat strong{font-size:25px}.stat>span{font-size:9px}.stat small{font-size:8px}.board-shell{padding:0 12px}.selection-panel{height:43px}.counts{font-size:9px;gap:6px}.counts b{font-size:14px}#selection-label{font-size:9px}#board{padding:5px}.board-bottom{height:32px;font-size:8px}.shape-key{display:none}.game-actions{margin-top:11px}.game-tip{margin-top:12px;font-size:9px}.site-footer{padding-top:16px;padding-bottom:16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition:none!important}}
/* Three-mode prototype */
[hidden]{display:none!important}.board-row{display:contents}.board-wrap{overflow:hidden;border-radius:10px}.blue-count{color:#507f9f}.mode-switch{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:5px;background:#eaeedf;border:1px solid #dce2ce;border-radius:11px}.mode-switch button{border:0;border-radius:7px;padding:10px 2px;background:transparent;color:#7c8970;font-size:12px;font-weight:600;min-height:40px}.mode-switch button>span{display:block;font-size:9px;letter-spacing:3px;margin-bottom:4px}.mode-switch button[aria-pressed=true]{color:#3e6547;background:#fffdf5;box-shadow:0 2px 5px #3040220d}.mode-switch button:disabled{opacity:.55}.mode-switch button[aria-pressed=true]:disabled{opacity:1}#mode-summary{font-size:10px;color:#89957c;line-height:1.5;text-align:center;margin:10px 0 15px}.triple-demo{display:none}body[data-colors="3"] .triple-demo{display:block}body[data-colors="3"] .demo-selection{grid-template-rows:repeat(3,32px);grid-template-columns:repeat(2,35px)}body[data-colors="3"] .demo-selection svg{width:32px;height:32px}.demo-blue{grid-column:1/-1;color:#7197b3;font-size:14px}.result-unit{font-size:16px}.curtain p.result-meta{font-size:10px;margin:-12px 0 19px}body[data-mode=timeattack] .stat strong{font-size:25px;letter-spacing:-1.1px}body[data-colors="3"] .counts{gap:7px;font-size:10px}body[data-colors="3"] .counts b{margin-left:2px}.game-actions button{min-height:42px}
@media(max-width:760px){.mode-switch button{padding:6px 2px;min-height:38px;font-size:11px}.mode-switch button>span{display:inline;font-size:8px;letter-spacing:0;margin-right:4px}#mode-summary{font-size:9px;margin:7px 0 10px}.game-heading{margin-bottom:10px}body[data-mode=timeattack] .stat strong{font-size:23px}body[data-colors="3"] .selection-panel{flex-wrap:wrap;justify-content:center;height:57px;gap:0;padding:7px 0}body[data-colors="3"] #selection-label{width:100%;text-align:center;font-size:9px}body[data-colors="3"] .counts{font-size:11px;gap:11px}.curtain h2{font-size:22px}.curtain .result-score{font-size:38px}.curtain-basket{width:54px;height:54px}.curtain p{margin-bottom:18px}.curtain .eyebrow{letter-spacing:.7px}}
@media(min-width:761px) and (max-height:850px){.layout{grid-template-columns:320px minmax(310px,calc((100svh - 395px)*.8 + 26px))}.mode-switch button{padding:6px 2px;min-height:32px;font-size:10px}.mode-switch button>span{display:inline;font-size:8px;letter-spacing:0}#mode-summary{font-size:8px;margin:6px 0 9px}body[data-mode=timeattack] .stat strong{font-size:20px}body[data-colors="3"] .selection-panel{flex-wrap:wrap;justify-content:center;height:49px;padding:5px 0;gap:0}body[data-colors="3"] #selection-label{width:100%;text-align:center}.curtain{padding:15px}.curtain-basket{width:46px;height:46px}.curtain h2{font-size:20px;margin:12px 0 9px}.curtain p{font-size:10px;line-height:1.8;margin-bottom:15px}.curtain .eyebrow{letter-spacing:.5px;font-size:8px}.intro-footer{display:none}}
@media(max-width:360px){body[data-mode=timeattack] .stat strong{font-size:20px}.mode-switch button{font-size:10px}.curtain .primary-button{min-width:160px;padding:12px 14px;font-size:12px}}

/* Keep result actions reachable even on short screens or with enlarged text. */
.curtain{overflow-y:auto;align-items:flex-start}.curtain-content{margin-block:auto}

.mode-switch{grid-template-columns:repeat(2,1fr)}

