.game { display: flex; flex-direction: column; gap: 16px; }

.level-pill { cursor: pointer; min-height: 44px; font-family: var(--body); }
.world-tag { background: #E4FAF2; color: #0B6B4C; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { display: block; width: 14px; height: 10px; border-radius: 50%; background: #E3EEF7; }
.dots i.done { background: #7FE0B5; }
.dots i.now { width: 18px; height: 13px; background: #FFD66B; border: 2px solid var(--ink); }
.daily-link { background: #FFF3D1; border-color: #FFE7A6; color: #7A4E00; text-decoration: none; min-height: 44px; }
.daily-link:hover { color: #5A3900; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}

/* Pond scene */
.pond {
  position: relative; border-radius: 32px; overflow: hidden;
  background: #DDF3FF; border: 1px solid #CDE8F7;
  padding: 92px 16px 24px; min-height: 360px;
}
.scene { position: absolute; inset: 0; pointer-events: none; }
.sky { position: absolute; left: 0; right: 0; top: 0; height: 26%; background: #F2FAFF; }
.sun { position: absolute; right: 5%; top: 6%; width: 70px; height: 70px; border-radius: 50%; background: #FFE69A; box-shadow: 0 0 0 12px rgba(255,230,154,.35); }
.cloud { position: absolute; width: 120px; height: 44px; }
.cloud span { position: absolute; background: #FFFFFF; border-radius: 999px; }
.cloud span:first-child { left: 0; bottom: 0; width: 100%; height: 64%; }
.cloud span:last-child { left: 28%; top: 0; width: 50%; height: 70%; }
.cloud.c1 { left: 30%; top: 4%; }
.cloud.c2 { left: 62%; top: 9%; width: 90px; height: 34px; }
.bank { position: absolute; border-radius: 50%; background: #C9F0DD; }
.bank.b1 { left: -60px; bottom: -70px; width: 260px; height: 160px; }
.bank.b2 { right: -70px; bottom: -90px; width: 300px; height: 200px; }
.reed { position: absolute; bottom: 30px; width: 7px; border-radius: 4px; background: #7FCFA6; }
.reed.r1 { right: 70px; height: 90px; } .reed.r2 { right: 86px; height: 120px; } .reed.r3 { right: 102px; height: 74px; }
@keyframes fly { 0% { transform: translate(0,0) rotate(-6deg); } 25% { transform: translate(80px,-24px) rotate(4deg); } 50% { transform: translate(160px,6px) rotate(-4deg); } 75% { transform: translate(80px,24px) rotate(6deg); } 100% { transform: translate(0,0) rotate(-6deg); } }
.dragonfly { position: absolute; left: 8%; top: 30%; width: 54px; height: 36px; animation: fly 9s ease-in-out infinite; }

.goal-card {
  position: absolute; left: 16px; top: 16px; z-index: 2; max-width: min(420px, calc(100% - 32px));
  background: var(--card); border-radius: 22px; padding: 12px 16px; box-shadow: 0 2px 0 #CDE8F7;
}
.goal-title { font-family: var(--display); font-weight: 600; font-size: 18px; }
.goal-sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.board-holder { position: relative; z-index: 1; display: flex; justify-content: center; }
.board {
  --cols: 7; --rows: 5;
  position: relative; width: min(100%, 700px);
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 0;
}
.cell { aspect-ratio: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.cell .pad { width: 84%; height: 64%; border-radius: 50%; background: #A5E8C6; position: relative; box-shadow: inset 0 -5px 0 rgba(47,160,110,.18); }
.cell .pad::after { content: ''; position: absolute; right: 16%; top: 22%; width: 22%; height: 22%; background: #DDF3FF; clip-path: polygon(0 0, 100% 0, 0 100%); }
.cell.goal .pad { background: #FFF0B8; border: 3px dashed #E0A800; }
.cell.goal .pad::after { display: none; }
.cell .star { position: absolute; width: 52%; animation: twinkle 1.8s ease-in-out infinite; }
.cell .shell { position: absolute; width: 36%; animation: wiggle 1.6s ease-in-out infinite; }
.cell .ripple { position: absolute; width: 50%; height: 20%; border: 2px solid #9FD6F2; border-radius: 50%; animation: ripple 3.2s ease-out infinite; }
.cell.trail .pad { background: #8FDDB8; }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(12deg); } }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes ripple { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.bloop {
  position: absolute; z-index: 3; width: calc(100% / var(--cols)); aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  transition: left .34s cubic-bezier(.4,1.4,.6,1), top .34s cubic-bezier(.4,1.4,.6,1);
  pointer-events: none;
}
.bloop-body { width: 62%; margin-top: -18%; animation: bob 2.4s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 4px 0 rgba(34,48,90,.12)); }
.bloop.hop .bloop-body { animation: hopsquish .34s ease-out; }
.bloop.glow .bloop-body { filter: drop-shadow(0 0 14px rgba(255,214,102,.95)) drop-shadow(0 0 4px rgba(255,214,102,1)); }
.bloop.splash .bloop-body { animation: sink .7s ease-in forwards; }
.bloop.cheer .bloop-body { animation: cheer .7s ease-in-out infinite; }
.facing { position: absolute; width: 26%; height: 26%; transition: transform .25s ease; }
@keyframes hopsquish { 0% { transform: translateY(0) scale(1.1,.85); } 50% { transform: translateY(-40%) scale(.92,1.08); } 100% { transform: translateY(0) scale(1,1); } }
@keyframes sink { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(40%) scale(.3,.1); opacity: 0; } }
@keyframes cheer { 0%,100% { transform: translateY(0) scale(1,1); } 15% { transform: scale(1.1,.88); } 45% { transform: translateY(-30%) scale(.94,1.06); } }

/* Pebble bag */
.bag { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.section-title { font-family: var(--display); font-weight: 600; font-size: 18px; }
.bag-pebbles { display: flex; flex-wrap: wrap; gap: 10px; }
.bag-note { font-size: 13px; color: var(--ink-soft); }

.pebble {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px / 80%;
  font-weight: 800; font-size: 15px; cursor: pointer; color: var(--ink);
  transition: transform .12s ease;
}
.pebble:hover { transform: translateY(-2px); }
.pebble:active { transform: translateY(2px); }
.pebble svg { flex-shrink: 0; }
.pebble.hop, .pebble.left, .pebble.right { background: var(--mint); box-shadow: 0 3px 0 var(--mint-deep); }
.pebble.glow { background: var(--lilac); box-shadow: 0 3px 0 var(--lilac-deep); }
.pebble.again { background: var(--coral-soft); border: 2px solid var(--coral); box-shadow: 0 3px 0 #FFCDBE; }
.pebble .new-tag { position: absolute; right: -6px; top: -10px; background: #D6336C; color: #FFFFFF; border-radius: 999px; padding: 1px 7px; font-size: 10px; letter-spacing: .5px; }
.pebble.is-new { animation: wiggle 1.6s ease-in-out infinite; }

/* Stepping stones */
.stones {
  background: var(--card); border: 1px solid var(--line); border-radius: 32px;
  padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: stretch;
}
.stones-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.stones-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.count { background: #F1F7FC; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.count.over { background: #FFEDE7; color: var(--coral-ink); }
.target-note { font-size: 12px; font-weight: 800; color: var(--coral-ink); }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 13px; border-radius: 14px; }

.path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: #EEF8FF; border-radius: 26px; padding: 14px 16px; min-height: 76px;
  border: 2px solid transparent; cursor: pointer;
}
.path.target { border-color: #9FD6F2; }
.path .stone {
  display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 6px 0 14px;
  border-radius: 999px / 80%; font-weight: 800; font-size: 15px; cursor: default; position: relative;
  transition: transform .15s ease, outline-color .15s ease;
}
.path .stone.start { background: var(--sun); box-shadow: 0 3px 0 var(--sun-deep); padding-right: 14px; }
.path .stone.hop, .path .stone.left, .path .stone.right { background: var(--mint); box-shadow: 0 3px 0 var(--mint-deep); }
.path .stone.glow { background: var(--lilac); box-shadow: 0 3px 0 var(--lilac-deep); }
.path .stone.running { outline: 4px solid var(--ink); outline-offset: 3px; transform: translateY(-3px) scale(1.06); }
.path .stone.oops { outline: 3px solid #FF8C69; outline-offset: 2px; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } }
.remove {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.75);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.remove:hover { background: #FFFFFF; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #B6D7EC; flex-shrink: 0; }

.ring {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px;
  border: 3px solid var(--coral); background: #FFF5F1; border-radius: 30px;
  padding: 6px 8px 6px 10px; cursor: pointer; min-height: 58px;
}
.ring.target { border-color: #E2553A; box-shadow: 0 0 0 4px rgba(255,140,105,.25); }
.ring.running-ring { background: #FFE6DD; }
.ring-head { display: inline-flex; align-items: center; gap: 4px; color: var(--coral-ink); font-weight: 800; font-size: 14px; }
.ring-head .step { width: 32px; height: 32px; border-radius: 10px; border: 0; background: #FFFFFF; font-weight: 800; font-size: 18px; cursor: pointer; color: var(--coral-ink); line-height: 1; }
.ring-head .n { min-width: 22px; text-align: center; font-size: 17px; }
.ring-body { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ring-empty { font-size: 12px; font-weight: 800; color: var(--coral-ink); padding: 0 6px; }
.drop-here {
  min-width: 110px; min-height: 46px; border: 2px dashed #A9CDE4; border-radius: 999px / 80%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--ink-soft); padding: 0 12px;
}

.code {
  margin: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 15px; line-height: 1.7;
  background: #1F2747; color: #EEF2FF; border-radius: 20px; padding: 14px 18px; white-space: pre-wrap; overflow-x: auto;
}
.code .kw { color: #FF9EC6; } .code .num { color: #FFE49A; } .code .str { color: #9EF0C9; }

.bloop-says { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-soft); }
.bloop-says span { color: var(--ink); }

.controls { flex: 1 1 220px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.control-row { display: flex; gap: 10px; }
.control-row .btn { flex: 1 1 0; }
.hint-btn { background: #FFF3D1; border-color: #FFE7A6; color: #7A4E00; }
.hint-btn:hover { background: #FFEAB0; color: #5A3900; }
@keyframes pulse { 0%,100% { box-shadow: 0 5px 0 var(--go-deep), 0 0 0 0 rgba(26,143,87,.45); } 50% { box-shadow: 0 5px 0 var(--go-deep), 0 0 0 14px rgba(26,143,87,0); } }
.pulse { animation: pulse 2s ease-in-out infinite; }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-go:disabled { animation: none; }

/* Dialogs */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(34,48,90,.45);
  display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
}
.overlay[hidden] { display: none; }
.sheet {
  position: relative; width: min(760px, 100%); background: #FFFFFF; border-radius: 32px;
  padding: 24px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 32px); overflow-y: auto;
  animation: popin .35s cubic-bezier(.3,1.4,.6,1);
}
@keyframes popin { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 28px; }
.level-list { display: flex; flex-direction: column; gap: 14px; }
.world-group { display: flex; flex-direction: column; gap: 8px; }
.world-group h3 { font-size: 18px; }
.world-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.level-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 84px;
  border-radius: 20px; border: 2px solid var(--line); background: #F7FBFF; padding: 10px 12px; cursor: pointer; text-align: left;
}
.level-tile:hover { border-color: #9FD6F2; }
.level-tile.current { border-color: var(--ink); }
.level-tile:disabled { opacity: .55; cursor: not-allowed; }
.level-tile .num { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.level-tile .t { font-family: var(--display); font-weight: 600; font-size: 16px; }
.level-tile .s { font-size: 14px; letter-spacing: 2px; color: #B07A00; }

.win { align-items: center; text-align: center; background: #FFF6E5; }
.win h2 { font-size: 40px; line-height: 1.05; }
.win-sub { margin: 0; color: var(--ink-soft); font-size: 17px; }
.win-stars { display: flex; gap: 10px; align-items: center; }
.win-stars svg { width: 56px; height: 56px; }
.win-stars svg:nth-child(2) { width: 72px; height: 72px; }
.win-stars svg.on { animation: starpop .6s ease-out both; }
.win-stars svg:nth-child(2).on { animation-delay: .25s; }
.win-stars svg:nth-child(3).on { animation-delay: .5s; }
@keyframes starpop { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.win-grid { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; text-align: left; }
.win-box { flex: 1 1 280px; background: #FFFFFF; border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.win-box.idea { background: #E4FAF2; font-size: 15px; line-height: 1.5; }
.win-box.idea strong { font-family: var(--display); font-weight: 600; font-size: 22px; }
.box-label { font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #7A5A2A; }
.box-label.green { color: #0B6B4C; }
.win-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.share-btn { background: #FFD1E4; border-color: #F2A8C8; }
.share-btn:hover { background: #FFC2DA; }
.share-note { margin: 0; font-size: 14px; color: #0B6B4C; min-height: 20px; }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall 3.2s linear forwards; }
@keyframes fall { 0% { transform: translateY(-20px) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(600deg); opacity: .8; } }

@media (max-width: 640px) {
  .pond { padding: 104px 8px 16px; min-height: 0; }
  .goal-title { font-size: 16px; }
  .sun { width: 46px; height: 46px; }
  .reed { display: none; }
  .bank.b1 { width: 160px; height: 70px; bottom: -40px; }
  .bank.b2 { width: 180px; height: 80px; bottom: -50px; }
  .dragonfly { top: 22%; }
  .brand-name { font-size: 22px; }
  .win h2 { font-size: 30px; }
  .stones { padding: 14px; }
}
