:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#242c29;background:#f6f4ed;font-synthesis:none;--green:#265a46;--lime:#d6ed96}*{box-sizing:border-box}body{margin:0;padding:env(safe-area-inset-top) 20px env(safe-area-inset-bottom)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border:0}button:focus-visible,a:focus-visible,#board:focus-visible{outline:3px solid #c08035;outline-offset:4px}main{max-width:460px;margin:auto}header{display:flex;align-items:center;justify-content:space-between;padding:24px 0 30px}.brand{text-decoration:none;color:var(--green);font-weight:850;font-size:40px;letter-spacing:-3px}.brand span{font-size:30px;margin-left:4px}.round{border:1px solid #d9ddd3;border-radius:50%;background:transparent;width:40px;height:40px;font-weight:600}.eyebrow{font-size:10px;letter-spacing:2.5px;font-weight:750;color:var(--green)}h1{font-size:42px;letter-spacing:-2px;margin:12px 0 9px;font-weight:750}.intro p{margin:0;color:#73796e;font-size:15px}.intro{margin-bottom:30px}.game{background:#fffef9;border:1px solid #e2e3d9;border-radius:24px;padding:20px;box-shadow:0 8px 30px #263b2405}.game-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.level-button{background:transparent;padding:4px 0;font-weight:700;font-size:17px}.chevron{color:#828b7b;margin-left:8px}#difficulty{font-size:9px;letter-spacing:1.4px;color:#66735e;background:#edf0e4;padding:7px 9px;border-radius:6px}.board-wrap{position:relative;aspect-ratio:1}#board{position:absolute;inset:0;display:grid;gap:0;touch-action:none;user-select:none;-webkit-user-select:none;border:1px solid #d8ddce;border-radius:12px;overflow:hidden;background:#f1f3e9}.cell{position:relative;display:flex;align-items:center;justify-content:center;border-right:1px solid #d8ddce;border-bottom:1px solid #d8ddce;min-width:0;min-height:0;appearance:none;-webkit-appearance:none;background:transparent;padding:0}.cell.visited{background:#e4eecf}.number{display:flex;align-items:center;justify-content:center;position:relative;z-index:3;width:clamp(26px,8vw,38px);height:clamp(26px,8vw,38px);border-radius:50%;background:#fffef9;border:2px solid #314b3b;font-size:17px;font-weight:750}.visited .number{background:var(--green);color:white;border-color:var(--green)}.cell.tip:after{content:"";width:15px;height:15px;position:absolute;border-radius:50%;background:var(--green);z-index:2}.cell.suggest{box-shadow:inset 0 0 0 4px #d49d49}.cell.suggest .number{background:#f7df9e;color:#242c29}#trace{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}#line{fill:none;stroke:var(--green);stroke-width:10;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.meter{display:flex;justify-content:space-between;font-size:11px;color:#737c6b;margin-top:17px}.track{height:4px;background:#e9ecdf;border-radius:4px;margin:9px 0 0;overflow:hidden}#fill{height:100%;background:var(--green);width:0;transition:width .15s}#status{font-size:12px;color:#66735e;min-height:32px;line-height:1.5;margin:14px 0 10px}.actions{display:flex;gap:8px;border-top:1px solid #e9ecdf;padding-top:16px}.actions button{flex:1;background:transparent;font-size:10px;padding:0;min-height:45px}.actions span{display:block;font-size:25px;margin-bottom:5px}.actions button:active{color:#79a346}footer{text-align:center;color:#73796e;font-size:11px;padding:23px 0}footer p{color:#969b8d;font-size:10px;margin-top:7px}dialog{border:1px solid #e2e3d9;border-radius:24px;background:#fffef9;color:#242c29;padding:30px;max-width:420px;width:calc(100% - 32px);max-height:85dvh;overflow:auto;box-shadow:0 20px 80px #142a2633}dialog::backdrop{background:#122b2466;backdrop-filter:blur(5px)}h2{font-size:30px;letter-spacing:-1px;margin:16px 0}dialog p,dialog li{font-size:14px;color:#66735e;line-height:1.7}ol{padding-left:20px}li{margin:12px 0}.close{position:absolute;right:16px;top:12px;font-size:28px;background:transparent;min-width:44px;min-height:44px}.primary{background:var(--green);color:#fff;border-radius:12px;width:100%;padding:16px;font-weight:650;margin-top:12px}.secondary{background:transparent;width:100%;padding:16px;font-size:12px}.small{font-size:12px!important}#level-list{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}#level-list button{aspect-ratio:1;border-radius:10px;background:#edf0e4;font-weight:600}#level-list .done{background:var(--green);color:white}#level-list .current{outline:2px solid #c18e3a;outline-offset:1px}.win-icon{font-size:60px;color:var(--green);text-align:center}#win-dialog{text-align:center}@media(max-height:740px){header{padding:14px 0 16px}.intro{margin-bottom:20px}h1{font-size:36px}.game{padding:16px}footer{padding:16px 0}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.beginner-tip{font-size:12px;line-height:1.6;color:#42553b;background:#edf2df;padding:12px 14px;border-radius:10px;margin:0 0 16px}.beginner-tip strong{display:block}.beginner-tip[hidden]{display:none}#error-dialog{text-align:center}#error-title{font-size:27px}#error-dialog .error-cross{color:#d32f36;font-size:128px;font-weight:700;line-height:1;margin:0 auto 12px;animation:error-pop .25s ease-out}#error-dialog .primary{background:#b62830}@keyframes error-pop{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){#error-dialog .error-cross{animation:none}}

.stats-button{margin-left:auto;margin-right:12px;background:#e8eddd;color:var(--green);border-radius:20px;padding:11px 15px;font-size:12px;font-weight:650}.live-stats{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;margin-top:16px;font-size:11px;color:#66735e}.live-stats strong{font-variant-numeric:tabular-nums;color:var(--green)}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stat-card{background:#edf0e4;padding:14px;border-radius:12px}.stat-card strong{display:block;font-size:23px;color:var(--green)}.stat-card span{font-size:11px;color:#66735e}.stats-table{width:100%;border-collapse:collapse;font-size:12px;margin-top:20px}.stats-table th,.stats-table td{text-align:left;padding:10px 4px;border-bottom:1px solid #e2e3d9}.stats-table caption{text-align:left;font-weight:700;margin:12px 0}#win-stats{background:#edf0e4;border-radius:12px;padding:12px}
