:root{
 --board-size:min(calc(100vw - 40px),calc(100dvh - 323px),560px);--bg:#f6f8f3;--ink:#253c4b;--muted:#617985;--teal:#267e87;--teal2:#178e95;--teal-dark:#175c64;--mint:#dceee6;--cream:#fffaf0;--yellow:#f4c868;--line:#d9e5e0;--shadow:0 15px 34px rgba(41,78,80,.09),0 3px 9px rgba(27,64,76,.04);
 --font-ui:"Rubik","Nunito","Trebuchet MS","Segoe UI",system-ui,sans-serif;
 --font-head:"Shantell Sans","Trebuchet MS","Arial Rounded MT Bold",system-ui,sans-serif;
}
*{box-sizing:border-box}
html,body{min-height:100%;margin:0}
body{background:radial-gradient(ellipse 42% 36% at 4% 90%,#e5f3e8 0%,transparent 95%),radial-gradient(ellipse 32% 42% at 100% 8%,#fff0d5 0%,transparent 91%),var(--bg);color:var(--ink);font-family:var(--font-ui);font-size:16px;line-height:1.45;overscroll-behavior-y:none}
button{font:inherit;color:inherit;cursor:pointer}
button:focus-visible,a:focus-visible{outline:3px solid #edb44d;outline-offset:4px}
button:disabled{cursor:default}
.app-header{height:76px;position:relative;z-index:8;background:rgba(255,255,255,.65);border-bottom:1px solid rgba(206,225,218,.8);backdrop-filter:blur(12px)}
.header-inner{max-width:1320px;margin:auto;height:100%;padding:0 30px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:11px;border:0;background:none;padding:0;text-align:left}
.brand-spark{background:#ffe6ab;border-radius:16px;color:#bd791e;font-size:28px;display:grid;place-items:center;width:48px;height:48px;transform:rotate(-9deg);box-shadow:0 3px 0 rgba(215,163,75,.15)}
.brand-copy{display:flex;flex-direction:column;line-height:1.05;gap:4px}.brand-copy strong{font-family:var(--font-head);font-size:21px;letter-spacing:-.7px}.brand-copy small{color:#69858b;font-size:11px;letter-spacing:1.3px;text-transform:uppercase;font-weight:800}
.header-actions{display:flex;align-items:center;gap:12px}.icon-btn,.header-home,.soft-btn{border:1px solid #dbe8e2;background:#fff;border-radius:15px;height:44px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 14px;box-shadow:0 3px 6px rgba(22,72,68,.03)}.icon-btn{width:45px;font-size:21px}.icon-btn[aria-pressed=false]{background:#eef2ef;color:#80949c}.header-home{font-weight:800;color:var(--teal-dark)}.header-home span:first-child{font-size:24px;line-height:1}
.screen{max-width:1320px;min-height:calc(100dvh - 76px);margin:auto;padding:28px 30px 30px;position:relative}.screen:focus{outline:none}
h1,h2,h3,p{margin:0}h1,h2,h3{font-family:var(--font-head);line-height:1.16;letter-spacing:-.8px}h1{font-size:clamp(40px,4.8vw,68px);font-weight:900}h2{font-size:clamp(30px,3.4vw,44px)}h3{font-size:21px}
.eyebrow{color:var(--teal);text-transform:uppercase;letter-spacing:2.6px;font-size:12px;font-weight:900}.lead{color:var(--muted);font-size:clamp(16px,1.35vw,19px);line-height:1.62;max-width:520px}.primary-btn,.outline-btn,.link-btn{border:0;border-radius:19px;min-height:54px;display:inline-flex;align-items:center;justify-content:center;gap:12px;padding:13px 24px;font-weight:900;font-size:16px;text-align:center;transition:transform .18s,box-shadow .18s,background .18s}
.primary-btn{background:linear-gradient(145deg,#1e9798,#1a747f);box-shadow:0 8px 0 #155e68,0 16px 23px rgba(26,105,111,.15);color:white}.primary-btn:hover{transform:translateY(-2px)}.primary-btn:active{transform:translateY(5px);box-shadow:0 3px 0 #155e68}.outline-btn{background:white;border:2px solid #d9e8e0;color:#2e6671}.outline-btn:hover,.soft-btn:hover{background:#f2faf6}.link-btn{color:var(--teal-dark);padding:12px 8px;background:transparent;min-height:42px}.link-btn:hover{text-decoration:underline}.btn-small{font-size:14px;min-height:40px;padding:9px 16px;border-radius:13px}.btn-row{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.hero{min-height:min(670px,calc(100dvh - 152px));display:grid;grid-template-columns:1fr 1fr;align-items:center;position:relative;isolation:isolate;padding:18px 16px 20px 55px;background:linear-gradient(126deg,rgba(255,255,255,.73),rgba(255,255,255,.32));border:1px solid rgba(220,231,220,.9);border-radius:37px;box-shadow:var(--shadow);overflow:hidden}
.hero:before{content:"";position:absolute;inset:auto -160px -310px 28%;height:570px;border-radius:50%;background:linear-gradient(70deg,#e0f4dd,#fff3c5);z-index:-1}.hero:after{content:"";position:absolute;width:340px;height:340px;right:-130px;top:-190px;background:#e5f5f3;border-radius:50%;z-index:-1}
.hero-content{display:flex;flex-direction:column;align-items:flex-start;gap:27px;position:relative;z-index:2}.hero h1 em{font-style:normal;color:var(--teal)}.hero h1 .second-line{display:block;color:var(--teal)}.hero-stats{display:flex;gap:20px;flex-wrap:wrap;margin-top:8px}.hero-stats span{display:flex;align-items:center;gap:6px;color:#56757b;font-size:14px;font-weight:800}.hero-stats b{display:inline-block;width:8px;height:8px;border-radius:50%;background:#e6ae4b}
.hero-visual{height:100%;min-height:500px;position:relative;display:flex;align-items:flex-end;justify-content:center}.hero-halo{position:absolute;inset:12% 11% 6%;border-radius:50%;background:radial-gradient(circle at 55% 30%,#ffedbf,#f8dd91 62%,#e8f4d9 63%,transparent 68%);transform:rotate(-8deg)}.hero-character{position:relative;z-index:2;height:min(500px,63vh);width:auto;max-width:90%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 13px 6px rgba(91,81,48,.13))}.decor-num{position:absolute;z-index:3;width:80px;height:80px;display:grid;place-items:center;border-radius:21px;color:#2a6069;font-family:var(--font-head);font-weight:900;font-size:34px;border:3px solid white;box-shadow:0 12px 20px rgba(28,71,69,.12);transform:rotate(var(--rot,10deg));pointer-events:none}.decor-num.one{top:15%;left:7%;background:#ffdda4;--rot:-12deg}.decor-num.two{top:25%;right:7%;background:#dcf0ee;--rot:12deg}.decor-num.three{bottom:15%;right:11%;background:#dcecc4;--rot:-11deg}.hero-star{position:absolute;top:9%;left:43%;color:#edb353;font-size:52px;transform:rotate(22deg)}
.page-intro{max-width:980px;margin:18px auto 26px;text-align:center;display:flex;flex-direction:column;gap:12px;align-items:center}.page-intro p:last-child{color:var(--muted);font-size:17px;max-width:620px}.back-link{display:inline-flex;align-items:center;gap:8px;background:transparent;border:0;color:#56818a;font-size:14px;font-weight:900;padding:10px 6px}.back-link:hover{color:var(--teal-dark)}
.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:23px;max-width:1050px;margin:35px auto}.mode-card{border:1px solid #e1ebe3;min-height:330px;border-radius:29px;background:#fff;box-shadow:var(--shadow);padding:31px;display:flex;flex-direction:column;gap:15px;align-items:flex-start;text-align:left;transition:transform .18s,box-shadow .18s;overflow:hidden;position:relative}.mode-card:hover,.level-card:hover{transform:translateY(-4px);box-shadow:0 23px 36px rgba(36,85,82,.12)}.mode-card:after{content:"";position:absolute;width:200px;height:200px;border-radius:50%;background:#eaf8f2;right:-72px;top:-70px}.mode-card.reverse:after{background:#fff1d7}.mode-icon{position:relative;z-index:1;display:grid;place-items:center;width:75px;height:75px;border-radius:23px;background:#e4f4e9;color:#267e87;font-size:36px;font-weight:1000;font-family:var(--font-head)}.mode-card.reverse .mode-icon{background:#ffefca;color:#a97023}.mode-card h3{font-size:29px;z-index:1}.mode-card p{color:#697d86;font-size:16px;z-index:1;max-width:350px}.sequence-badges{display:flex;align-items:center;gap:8px;margin-top:auto;font-size:23px;font-weight:900;color:#2e7884;z-index:1}.sequence-badges span{background:#f0f7f2;border-radius:12px;padding:4px 12px;min-width:42px;text-align:center}.mode-card.reverse .sequence-badges{color:#a06d22}.mode-card.reverse .sequence-badges span{background:#fff6e7}.pick-indicator{color:#377c82;font-weight:900;font-size:14px;z-index:1;display:flex;align-items:center;gap:7px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px}.section-head .heading-stack{display:flex;flex-direction:column;gap:8px}.section-head p{color:var(--muted)}.level-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:17px}.level-card{background:white;border:1px solid #deebe3;border-radius:25px;padding:16px;box-shadow:var(--shadow);text-align:left;display:flex;flex-direction:column;gap:12px;transition:transform .18s,box-shadow .18s}.level-title{display:flex;justify-content:space-between;align-items:center;gap:6px}.level-title strong{font-size:17px}.level-title span{font-size:11px;color:#468b85;background:#e7f7ed;border-radius:50px;padding:5px 8px;font-weight:900;white-space:nowrap}.level-preview{display:grid;grid-template-columns:repeat(var(--grid-n,5),1fr);aspect-ratio:1;gap:3px;background:#f0f5f0;border-radius:14px;padding:8px}.level-preview i{font-style:normal;display:grid;place-items:center;aspect-ratio:1;background:#fff;border-radius:4px;color:#87a3a7;font-weight:800;font-size:clamp(8px,.75vw,12px)}.level-card .level-meta{color:#69848c;font-size:13px;min-height:22px}.level-go{font-weight:900;color:var(--teal);display:flex;justify-content:space-between;align-items:center}
.info-note{border:1px solid #e1ebe6;background:rgba(255,255,255,.65);padding:15px 21px;border-radius:17px;color:#607d84;display:flex;align-items:center;gap:12px;max-width:790px;margin:26px auto;font-size:14px}
/* Гра */
.screen.is-game{max-width:1420px;padding-top:14px;padding-bottom:8px;min-height:calc(100dvh - 76px)}
.game-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 13px}.game-head-left{display:flex;flex-direction:column;gap:3px}.game-head-left small{font-size:12px;font-weight:900;color:var(--teal);text-transform:uppercase;letter-spacing:1px}.game-head-left strong{font-size:21px;font-family:var(--font-head)}.game-head-actions{display:flex;gap:10px;align-items:center}
.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 294px;gap:24px;align-items:stretch}.game-card{background:white;border:1px solid #e1eae5;border-radius:28px;box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;padding:19px 22px 18px;min-width:0}.game-topline{width:min(100%,620px);display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.search-for{display:flex;align-items:center;gap:12px}.search-for small{display:block;color:#718b8f;font-weight:800;font-size:13px}.target-num{display:grid;place-items:center;background:#f3cd79;color:#735022;border-radius:15px;width:56px;height:56px;font-weight:1000;font-size:30px;font-family:var(--font-head);box-shadow:inset 0 -4px 0 rgba(166,111,30,.15)}.timer-block{display:flex;align-items:center;gap:9px;padding:8px 13px;background:#eff7f6;border-radius:14px;color:#376d76}.timer-icon{font-size:24px}.timer-block small{display:block;font-size:11px;font-weight:900;color:#729197}.timer-value{font-weight:1000;font-size:23px;letter-spacing:1px;font-variant-numeric:tabular-nums;line-height:1}
.board{width:var(--board-size);height:var(--board-size);display:grid;grid-template-columns:repeat(var(--grid-n,5),minmax(0,1fr));grid-template-rows:repeat(var(--grid-n,5),minmax(0,1fr));gap:clamp(5px,.7vw,9px);padding:clamp(7px,.8vw,11px);background:#e8f0eb;border:1px solid #dce8e1;border-radius:24px;box-shadow:inset 0 3px 7px rgba(33,70,65,.05);touch-action:manipulation;user-select:none;-webkit-user-select:none}
.cell{position:relative;border:1px solid #e2e7de;background:#fffdf9;border-radius:clamp(9px,1.2vw,16px);font-family:var(--font-head);font-size:clamp(19px,calc(var(--board-size) / 16),33px);line-height:1;font-weight:900;color:#263e50;display:flex;justify-content:center;align-items:center;box-shadow:0 3px 0 #d6e1dd;min-width:0;min-height:0;transition:background .12s,color .12s,box-shadow .12s,transform .12s}.cell:not(:disabled):hover{background:#f4fbf7;box-shadow:0 3px 0 #c5dcd2}.cell:not(:disabled):active{transform:translateY(2px);box-shadow:0 1px 0 #c6dcd2}.cell.found{background:#cfeae2;border-color:#badbd0;color:#477871;box-shadow:inset 0 0 0 2px #d9f3ea;opacity:.77}.cell.found:after{content:"";position:absolute;width:7px;height:7px;top:7px;right:7px;border-radius:50%;background:#66aaa0}.cell.wrong{animation:soft-nudge .25s ease}
@keyframes soft-nudge{0%,100%{transform:translateX(0)}40%{transform:translateX(-2px)}70%{transform:translateX(2px)}}
.game-bottom{width:min(100%,620px);display:flex;flex-direction:column;gap:8px;margin-top:11px}.game-progress-line{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:800;color:#608087}.track{height:9px;border-radius:10px;background:#e7f0ea;overflow:hidden}.track-fill{height:100%;width:0;background:linear-gradient(90deg,#88cb9e,#27979d);border-radius:10px;transition:width .18s}.coach-panel{background:#fff;border:1px solid #e1eae5;border-radius:28px;padding:24px 20px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:14px;box-shadow:var(--shadow);min-width:0}.coach-top{display:flex;flex-direction:column;text-align:center;gap:8px}.coach-top .tiny{font-size:11px;text-transform:uppercase;letter-spacing:2px;color:var(--teal);font-weight:1000}.coach-top strong{font-family:var(--font-head);font-size:23px}.coach-top p{color:#70898c;font-size:14px}.coach-character{height:240px;width:auto;max-width:100%;object-fit:contain;filter:drop-shadow(0 8px 5px rgba(53,93,64,.10))}.coach-bubble{background:#eef8f2;border-radius:17px;padding:13px;text-align:center;color:#34747a;font-weight:800;font-size:14px;max-width:100%}.coach-panel .outline-btn{width:100%}.game-mobile-note{display:none}.mobile-stats{display:none}
/* Завершення, статистика */
.finish{max-width:990px;margin:0 auto;text-align:center}.finish-head{display:grid;grid-template-columns:260px 1fr;align-items:center;gap:20px;background:white;border-radius:29px;padding:24px 36px;text-align:left;box-shadow:var(--shadow);border:1px solid #e1ebe5}.finish-character{height:250px;max-width:100%;justify-self:center;filter:drop-shadow(0 10px 5px rgba(53,93,64,.08))}.finish-copy{display:flex;flex-direction:column;align-items:flex-start;gap:11px}.finish-copy h2{font-size:clamp(32px,3vw,45px)}.finish-copy>p{color:#66838a}.big-time{display:flex;align-items:baseline;gap:10px;margin:10px 0}.big-time strong{font-size:52px;color:#267e87;font-variant-numeric:tabular-nums;letter-spacing:-2px;line-height:1;font-family:var(--font-head)}.big-time span{font-size:14px;color:#718b8d}.finish-actions{justify-content:center;margin:28px 0 16px}.mini-summary{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:20px auto;max-width:780px}.summary-tile{background:#fff;border:1px solid #dfeae3;border-radius:20px;padding:20px;display:flex;flex-direction:column;gap:4px;text-align:center}.summary-tile small{color:#69838b;font-size:13px;font-weight:800}.summary-tile strong{font-size:23px;color:#295967;font-family:var(--font-head)}
.results-wrap{max-width:1060px;margin:auto}.stats-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:20px 0 22px}.metric{background:#fff;border:1px solid #deebe3;border-radius:20px;padding:17px 19px;display:flex;flex-direction:column;gap:4px}.metric small{color:#769096;font-size:13px;font-weight:800}.metric strong{font-size:26px;color:#255966;font-weight:1000;font-variant-numeric:tabular-nums}.stats-panel{border:1px solid #deebe3;background:#fff;border-radius:27px;box-shadow:var(--shadow);padding:25px 28px;margin-bottom:20px}.stats-panel-header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px}.stats-panel h3{font-size:22px}.subtle{color:#748d92;font-size:14px}.stat-table{display:grid;grid-template-columns:1fr 1fr;gap:11px 23px}.stat-row{display:grid;grid-template-columns:40px minmax(0,1fr) 69px;gap:9px;align-items:center;font-variant-numeric:tabular-nums;font-size:13px}.stat-n{font-weight:900;color:#346977;background:#eff5f4;padding:7px;text-align:center;border-radius:9px}.stat-bar{height:9px;background:#eef2ee;border-radius:10px;overflow:hidden}.stat-bar b{height:100%;display:block;background:#65b7ad;border-radius:10px;min-width:2px}.stat-row.slowest .stat-bar b{background:#e9b65e}.stat-s{font-weight:900;text-align:right;color:#546e74}.record-list{display:flex;flex-direction:column;gap:11px;margin-top:17px}.record-item{display:grid;grid-template-columns:1.1fr 1fr .8fr auto;gap:12px;align-items:center;background:#fff;border:1px solid #e2eae5;border-radius:17px;padding:14px 18px;min-width:0}.record-item strong{font-weight:900}.record-item span{font-size:13px;color:#70878c}.record-item .record-time{font-variant-numeric:tabular-nums;font-weight:900;color:#2d6c73;font-size:19px}.empty-state{text-align:center;border:1px dashed #d2e4dd;border-radius:26px;background:rgba(255,255,255,.75);padding:48px 20px;color:#6a858c}.empty-state strong{display:block;font-family:var(--font-head);font-size:24px;color:#2b5c69;margin-bottom:8px}.stats-actions{display:flex;gap:11px;flex-wrap:wrap;align-items:center}.time-legend{display:flex;align-items:center;gap:7px;color:#81949a;font-size:12px;margin-top:16px}.time-legend b{background:#e9b65e;display:inline-block;width:12px;height:12px;border-radius:3px}
.modal-root:empty{display:none}.modal-root{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:16px;background:rgba(24,54,59,.47);backdrop-filter:blur(3px)}.dialog{border-radius:27px;background:white;padding:29px;max-width:425px;width:100%;box-shadow:0 30px 80px rgba(10,42,45,.23);display:flex;flex-direction:column;gap:15px;text-align:center}.dialog h3{font-size:29px}.dialog p{color:#6d8388}.dialog .btn-row{justify-content:center}.dialog .btn-row button{flex:1}.pause-layer{position:absolute;z-index:5;inset:0;background:rgba(242,247,243,.89);border-radius:28px;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(8px)}.pause-box{text-align:center;display:flex;flex-direction:column;gap:13px;align-items:center;max-width:340px}.pause-box h3{font-size:28px}.pause-box p{color:#668187}.pause-box .primary-btn{min-width:210px}.game-card{position:relative}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:#255d65;color:white;font-weight:800;border-radius:15px;padding:12px 20px;z-index:90;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;box-shadow:var(--shadow);font-size:14px;max-width:calc(100vw - 40px);text-align:center}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:1130px){.level-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.game-layout{grid-template-columns:minmax(0,1fr) 250px;gap:12px}.coach-character{height:220px}.coach-panel{padding:17px}.hero{padding-left:35px}.hero-visual{min-height:430px}}
@media(max-width:850px){:root{--board-size:min(calc(100vw - 40px),calc(100dvh - 280px),560px)}.screen{padding:20px 18px}.hero{min-height:initial;padding:28px;grid-template-columns:1.1fr .9fr}.hero-visual{min-height:430px}.hero-character{height:340px}.hero-halo{inset:18% 0 4%}.decor-num{width:51px;height:51px;font-size:24px;border-radius:13px}.hero-content{gap:16px}.hero-stats{gap:10px}.game-layout{display:block}.coach-panel{display:none}.mobile-stats{display:flex;margin:10px auto 0;min-height:39px}.game-mobile-note{display:block;text-align:center;margin-top:9px;color:#719095;font-size:13px;font-weight:800}.screen.is-game{padding:12px 14px 20px}.game-card{padding:14px}.game-head{padding:2px 2px 8px}.game-head-left strong{font-size:18px}.level-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-table{gap:9px}}
@media(max-width:600px){.app-header{height:62px}.header-inner{padding:0 15px}.screen{min-height:calc(100dvh - 62px);padding:14px}.brand-spark{width:40px;height:40px;border-radius:13px;font-size:23px}.brand-copy strong{font-size:18px}.brand-copy small{font-size:9px}.header-actions{gap:8px}.header-home{height:41px;padding:0 10px}.header-home span:first-child{font-size:22px}.icon-btn{width:41px;height:41px}.header-home span:last-child{display:none}.hero{grid-template-columns:1fr;min-height:calc(100dvh - 94px);padding:26px 23px 0;justify-items:center;align-content:space-between;text-align:center;gap:12px;overflow:hidden;border-radius:25px}.hero-content{align-items:center;gap:15px}.hero h1{font-size:clamp(34px,9.1vw,52px)}.hero h1 .second-line{display:inline}.lead{font-size:15px;line-height:1.45}.hero-stats{justify-content:center;margin:0;gap:12px}.hero-stats span{font-size:11px}.hero-visual{height:245px;min-height:245px;width:100%;max-width:370px}.hero-character{height:280px;max-width:80%;transform:translateY(-7px)}.hero-halo{inset:0 14% -26%;background:radial-gradient(circle,#ffefc9 48%,#e5f3e0 53%,transparent 73%)}.hero-star{font-size:31px;top:0}.decor-num{width:44px;height:44px;font-size:21px}.decor-num.one{top:10%;left:10%}.decor-num.two{top:24%;right:5%}.decor-num.three{bottom:12%;right:8%}.page-intro{margin:12px auto 15px;gap:8px}.page-intro h2{font-size:31px}.page-intro p:last-child{font-size:14px}.mode-grid{grid-template-columns:1fr;gap:15px;margin:18px auto}.mode-card{min-height:207px;padding:20px;gap:8px;border-radius:22px}.mode-icon{width:54px;height:54px;border-radius:16px;font-size:27px}.mode-card h3{font-size:23px}.mode-card p{font-size:14px}.sequence-badges{font-size:17px;gap:5px}.sequence-badges span{min-width:33px;padding:2px 8px}.pick-indicator{font-size:13px}.section-head{margin:0 0 17px}.section-head h2{font-size:28px}.level-grid{gap:11px}.level-card{padding:12px;border-radius:17px;gap:8px}.level-title strong{font-size:15px}.level-title span{font-size:10px;padding:4px 6px}.level-preview{padding:5px;gap:2px}.level-preview i{font-size:9px}.level-meta{font-size:11px!important}.level-go{font-size:12px}.info-note{margin:14px 0;padding:11px;font-size:12px}.screen.is-game{padding:7px 10px 10px;min-height:calc(100dvh - 62px)}.game-head{padding:2px 1px 9px}.game-head-left small{font-size:10px}.game-head-left strong{font-size:15px}.game-head-actions{gap:6px}.game-head-actions .soft-btn{font-size:12px;height:36px;padding:0 10px}.game-card{padding:12px 8px 10px;border-radius:19px}.game-topline{margin-bottom:10px}.target-num{width:45px;height:45px;border-radius:12px;font-size:24px}.search-for small{font-size:11px}.timer-block{padding:6px 10px;gap:6px}.timer-icon{font-size:18px}.timer-block small{font-size:10px}.timer-value{font-size:20px}.board{border-radius:17px;gap:5px;padding:6px}.cell{border-radius:9px;box-shadow:0 2px 0 #d6e1dd}.cell.found:after{top:4px;right:4px;width:5px;height:5px}.game-bottom{margin-top:8px;gap:6px}.game-mobile-note{font-size:11px;margin-top:5px}.finish-head{grid-template-columns:1fr;text-align:center;padding:20px 19px;gap:6px}.finish-character{height:190px}.finish-copy{align-items:center;gap:7px}.big-time strong{font-size:45px}.finish-actions{margin:15px auto}.stats-panel{padding:18px 13px;border-radius:20px}.stats-summary{gap:7px}.metric{padding:12px 8px;border-radius:15px}.metric small{font-size:11px}.metric strong{font-size:19px}.stat-table{grid-template-columns:1fr;gap:9px}.stat-row{grid-template-columns:40px minmax(0,1fr) 65px}.record-item{grid-template-columns:1fr auto;gap:7px}.record-item span:nth-child(2){grid-row:2}.record-item button{grid-row:1/3;grid-column:2}.record-item .record-time{grid-row:2;grid-column:1}.stats-panel-header{flex-direction:column;align-items:flex-start}}
@media(max-width:370px){.hero{min-height:calc(100dvh - 82px);padding:15px 14px 0}.hero h1{font-size:33px}.lead{font-size:13px}.hero-content{gap:10px}.hero-stats span{font-size:10px}.hero-visual{height:180px;min-height:180px}.hero-character{height:225px}.hero .primary-btn{min-height:48px}.game-head-actions .soft-btn{height:32px;padding:0 8px;font-size:11px}.game-head-left strong{font-size:13px}.game-card{padding:9px 6px}.game-topline{margin-bottom:7px}.game-mobile-note{display:none}.mobile-stats{display:flex;min-height:34px;margin:5px auto 0;font-size:12px}.finish-character{height:150px}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Три рівні складності: поле завжди однакового зовнішнього розміру. */
.board[data-size="3"] .cell{font-size:clamp(30px,calc(var(--board-size)/9),60px)}
.board[data-size="4"] .cell{font-size:clamp(25px,calc(var(--board-size)/12),44px)}
.level-preview[style*="--grid-n:3"] i{font-size:clamp(13px,1vw,18px)}
.level-preview[style*="--grid-n:4"] i{font-size:clamp(10px,.85vw,14px)}
.size-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:stretch;margin:28px auto;max-width:1200px}
.size-card{border:1px solid #deebe3;border-radius:25px;padding:22px;background:white;box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;gap:15px;text-align:center;min-width:0;transition:transform .18s,box-shadow .18s}
.size-card:hover{transform:translateY(-3px);box-shadow:0 23px 36px rgba(36,85,82,.12)}
.size-info{display:flex;flex-direction:column;align-items:center;gap:6px}
.size-tag{font-size:12px;font-weight:900;letter-spacing:.05em;background:#e9f6ec;color:#39756e;padding:4px 12px;border-radius:30px}
.size-card h3{font-size:35px;margin-top:5px;color:#275f6d}
.size-card strong{font-size:19px}
.size-card p{font-size:14px;line-height:1.5;color:var(--muted);min-height:42px}
.size-range{font-family:var(--font-head);color:#3d7e83;font-weight:900;font-size:20px}
.size-action{font-size:13px;font-weight:900;color:var(--teal);margin-top:6px}
.size-example{width:min(100%,225px);display:block}
.size-example .level-preview{width:100%;padding:9px}
.size-example .level-preview i{font-size:clamp(13px,1.6vw,22px)}
@media(max-width:900px){.size-grid{gap:12px}.size-card{padding:16px 10px}.size-card h3{font-size:29px}}
@media(max-width:600px){.size-grid{grid-template-columns:1fr;gap:12px;margin:15px auto}.size-card{padding:15px 16px;display:grid;grid-template-columns:minmax(0,1fr) 128px;gap:12px;text-align:left;align-items:center}.size-info{align-items:flex-start;gap:4px}.size-card p{font-size:12px;min-height:0}.size-card h3{font-size:27px}.size-card strong{font-size:16px}.size-tag{font-size:10px}.size-range{font-size:17px}.size-action{font-size:11px}.size-example{width:128px}.size-example .level-preview{padding:5px}.size-example .level-preview i{font-size:clamp(10px,3vw,16px)}.level-preview[style*="--grid-n:3"] i{font-size:clamp(12px,3vw,15px)}.level-preview[style*="--grid-n:4"] i{font-size:clamp(10px,2.6vw,13px)}}
@media(max-width:370px){.size-card{grid-template-columns:minmax(0,1fr) 100px}.size-example{width:100px}}
