@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&display=swap');

:root{font-family:'DM Sans','Noto Sans SC',sans-serif;color:#eef3ff;background:#101729;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button{font:inherit;cursor:pointer}button:focus-visible{outline:2px solid #7ee8c4;outline-offset:3px}#app{min-height:100vh;background:radial-gradient(ellipse at 50% -20%,#273956 0%,#151e32 44%,#101729 100%);padding-bottom:34px}.topbar{height:76px;max-width:1200px;margin:auto;padding:0 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff0d}.brand{display:flex;align-items:center;gap:11px;font-size:19px;font-weight:800;letter-spacing:.05em}.brand-light{font-weight:500;color:#a8b7cf}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;color:#122c31;background:#77e5c0;font-size:23px;font-weight:700;box-shadow:0 0 24px #6de4bc55}.top-actions{display:flex;gap:10px}.icon-button{width:36px;height:36px;border:1px solid #667b9b43;border-radius:11px;color:#c9d9f1;background:#ffffff0a;font-size:19px;font-weight:700;transition:.2s}.icon-button:hover,.control-button:hover{transform:translateY(-2px);filter:brightness(1.12)}.game-shell{width:min(100% - 36px,860px);margin:31px auto 0}.game-heading{text-align:center;margin-bottom:27px}.eyebrow{display:flex;align-items:center;justify-content:center;gap:12px;color:#7ce3c5;font-size:11px;letter-spacing:.32em;font-weight:800}.eyebrow-line{width:27px;height:1px;background:#5bcaaa70}.game-heading h1{font-size:clamp(30px,5vw,42px);line-height:1.1;letter-spacing:.12em;margin:12px 0 10px}.game-heading p{margin:0;color:#9aacc9;font-size:14px;letter-spacing:.035em}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:15px}.stat-card{height:78px;padding:14px 22px;border:1px solid #68809f29;border-radius:16px;background:linear-gradient(135deg,#26334b9c,#1c2940bd);box-shadow:inset 0 1px #ffffff0b}.stat-label{display:block;color:#90a2bc;font-size:12px;letter-spacing:.06em}.stat-value{font-size:26px;line-height:1.35;font-weight:800;font-variant-numeric:tabular-nums}.stat-value small{font-size:14px;color:#8296b2}.timer-card{text-align:center}.timer-card .stat-value{color:#f5dc96}.hearts{color:#ff718d;font-size:25px;line-height:1.48;letter-spacing:.12em;white-space:nowrap}.hearts .lost{color:#516078}.board-frame{overflow:hidden;border:1px solid #60799d66;border-radius:20px;background:#1b263d;box-shadow:0 24px 60px #050b1d66, inset 0 1px #ffffff12}.board-top,.board-bottom{display:flex;align-items:center;justify-content:space-between;padding:0 22px;font-size:11px;letter-spacing:.04em;color:#8ea2bf}.board-top{height:43px;border-bottom:1px solid #60799d31}.board-top>span:first-child{color:#c7d6eb;font-weight:700}.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#71e7bb;box-shadow:0 0 10px #71e7bb;margin-right:7px}.board-bottom{height:43px;border-top:1px solid #60799d31}.board-bottom span:last-child{color:#83e4c7;font-weight:800;letter-spacing:.1em}#canvasWrap{position:relative;width:100%;aspect-ratio:1.36;background:radial-gradient(circle at 50% 45%,#26344e 0%,#1d2941 55%,#172238 100%);overflow:hidden}#gameCanvas{display:block;width:100%;height:100%;touch-action:none;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;overscroll-behavior:contain}.hint-toast{position:absolute;left:50%;bottom:20px;transform:translate(-50%,10px);padding:9px 14px;border:1px solid #8de7cb88;border-radius:10px;background:#183b3be8;color:#d9fff0;font-size:12px;opacity:0;pointer-events:none;transition:.25s;white-space:nowrap}.hint-toast.show{opacity:1;transform:translate(-50%,0)}.progress-track{height:3px;background:#2c3b56}.progress-track>div{height:100%;width:0;background:linear-gradient(90deg,#6fbde8,#76e6bc);transition:width .25s}.controls{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:20px}.instruction{display:flex;align-items:center;gap:12px;color:#d6e2f2}.instruction-icon{width:38px;height:38px;display:grid;place-items:center;border:1px solid #69ddbc44;border-radius:12px;background:#5dd6aa15;color:#7ce5c4;font-size:23px}.instruction strong,.instruction small{display:block}.instruction strong{font-size:13px;font-weight:700}.instruction small{margin-top:3px;color:#8296b4;font-size:11px}.control-buttons{display:flex;gap:9px}.control-button{height:42px;border-radius:11px;padding:0 17px;border:1px solid transparent;font-size:12px;font-weight:800;transition:.2s;white-space:nowrap}.control-button.secondary{color:#dceaf8;background:#293b56;border-color:#6984a344}.control-button.primary{color:#112d33;background:#7ce6c1;box-shadow:0 5px 19px #5cd2a72b}.control-button i{font-style:normal;display:inline-grid;place-items:center;background:#ffffff22;border-radius:50%;width:18px;height:18px;margin-left:4px;font-size:10px}.overlay{position:fixed;inset:0;z-index:20;background:#07101bd9;backdrop-filter:blur(9px);display:grid;place-items:center;padding:20px}.overlay.hidden{display:none}.modal{width:min(100%,390px);text-align:center;padding:35px 30px 30px;border:1px solid #7798aa66;border-radius:23px;background:linear-gradient(155deg,#293d56,#19273e);box-shadow:0 25px 70px #0008}.modal-symbol{margin:auto auto 15px;width:61px;height:61px;display:grid;place-items:center;border-radius:20px;color:#102c30;background:#7ce6c1;font-size:38px}.modal-kicker{color:#80e5c4;letter-spacing:.28em;font-size:10px;font-weight:800}.modal h2{font-size:28px;letter-spacing:.07em;margin:10px 0}.modal p{color:#acbdd3;font-size:14px;line-height:1.8;margin:0 0 25px}.modal .control-button{width:100%;height:46px;font-size:14px}.light #app{background:radial-gradient(ellipse at 50% -20%,#f1fcfd,#dfebf2 55%,#d9e5ed);color:#26354c}.light .topbar{border-color:#58738b24}.light .brand-light,.light .game-heading p,.light .stat-label,.light .instruction small{color:#657a90}.light .icon-button{color:#364d62;background:#ffffff9c;border-color:#7e9db344}.light .stat-card{background:#ffffffae;border-color:#a4bacb77;box-shadow:0 5px 20px #5d819318}.light .timer-card .stat-value{color:#b87f27}.light .board-frame{background:#e5f0f4;border-color:#9bafc0}.light #canvasWrap{background:radial-gradient(circle,#ecf4f8,#d9e6ee)}.light .board-top,.light .board-bottom{color:#668096;border-color:#8ca9bd55}.light .board-top>span:first-child{color:#344f62}.light .instruction{color:#304b5c}.light .control-button.secondary{color:#314e62;background:#ffffffb5;border-color:#a3b7c6}.light .hearts .lost{color:#b9c8d2}@media(max-width:650px){.topbar{height:62px;padding:0 19px}.game-shell{width:min(100% - 20px,550px);margin-top:26px}.game-heading{margin-bottom:23px}.game-heading h1{margin:10px 0 8px}.stats{gap:7px;margin-bottom:9px}.stat-card{height:67px;padding:10px 11px;border-radius:11px}.stat-label{font-size:10px}.stat-value{font-size:22px}.hearts{font-size:20px}.board-frame{border-radius:14px}.board-top,.board-bottom{padding:0 12px;height:35px;font-size:9px}#canvasWrap{aspect-ratio:1}.controls{align-items:stretch;flex-direction:column;margin-top:14px;gap:15px}.control-buttons{justify-content:space-between}.control-button{flex:1}.instruction strong{font-size:12px}.instruction small{font-size:10px}}

button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
@media(hover:none){.icon-button:hover,.control-button:hover{transform:none;filter:none}}

/* Playful level marker and controls */
.game-heading h1{display:none}
.stats{background:none;border:0;box-shadow:none}
.stat-card{background:none;border:0;box-shadow:none;border-radius:0}
.light .stat-card{background:none;border:0;box-shadow:none}
.game-shell{margin-top:22px}
.game-heading{margin-bottom:18px}
.eyebrow{
  color:#ffe486;
  font-family:'ZCOOL KuaiLe','Trebuchet MS','Comic Sans MS',sans-serif;
  font-size:clamp(27px,5vw,38px);
  font-weight:400;
  letter-spacing:.12em;
  text-shadow:0 2px 0 #bd6d45,0 4px 0 #743f54,0 7px 15px #0007;
}
.eyebrow-line{width:clamp(30px,7vw,64px);height:3px;border-radius:9px;background:linear-gradient(90deg,#7ce6c1,#ffe486);box-shadow:0 2px 0 #744454}
.control-button{
  min-height:58px;
  padding:0 22px;
  font-family:'ZCOOL KuaiLe','Trebuchet MS','Comic Sans MS',sans-serif;
  font-size:22px;
  font-weight:400;
  letter-spacing:.06em;
  border-radius:16px;
  text-shadow:0 1px 0 #ffffff25;
}
.control-button.secondary{box-shadow:0 5px 0 #17243a,0 8px 16px #0003}
.control-button.primary{box-shadow:0 5px 0 #389b82,0 8px 16px #0003}
.next-level-button{color:#fff8dd;background:#f2a846;box-shadow:0 5px 0 #bb6b31,0 8px 16px #0003}
.light .next-level-button{color:#fff;background:#df8d35}
.overlay.celebrating{background:#07101b70;backdrop-filter:blur(2px)}
#overlay.celebrating{pointer-events:none;background:transparent;backdrop-filter:none}
#overlay.celebrating .modal{pointer-events:auto}
.control-button i{width:23px;height:23px;font-size:13px}
.light .eyebrow{color:#f3aa49;text-shadow:0 2px 0 #d17a68,0 4px 0 #8e6682,0 7px 15px #314a5c44}
@media(max-width:650px){
  .game-shell{margin-top:16px}
  .game-heading{margin-bottom:13px}
  .control-button{min-height:62px;padding:0 12px;font-size:21px}
  .control-buttons{gap:12px}
}

.level-button{width:auto;min-width:68px;padding:0 8px;font-size:10px;white-space:nowrap}
@media(max-width:390px){
  .topbar{padding:0 12px}
  .top-actions{gap:4px}
  .top-actions .icon-button{width:32px;height:32px}
  .top-actions .level-button{width:auto;min-width:58px;padding:0 5px;font-size:9px}
}
