:root {
  --font: 'Fredoka', 'Trebuchet MS', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --ink: #3a2410;
  --panel: #fff6e2;
  --panel-edge: #c98a3a;
  --panel-dark: #8a5418;
  --orange: #ff8a1a;
  --app-w: 480px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: var(--font); color: var(--ink);
  background-color: #082f5d;
  background-image: linear-gradient(rgba(2, 19, 48, .32), rgba(2, 19, 48, .32)), url('../assets/desktop-gem-pattern-bg-dark.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
img { -webkit-user-drag: none; }

/* ---------- brand splash ---------- */
.brand-splash {
  position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center;
  overflow: hidden; background: #060317; color: #fff;
  transition: opacity .38s ease, visibility .38s ease;
}
.brand-splash::after {
  content: ''; position: absolute; width: 45vw; height: 45vw; min-width: 360px; min-height: 360px;
  border-radius: 50%; background: radial-gradient(circle, rgba(73,87,255,.12), transparent 68%);
  animation: brandAura 1.8s ease-in-out infinite;
}
.brand-splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.brand-splash-content {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  animation: brandReveal .75s cubic-bezier(.2,.85,.3,1) both;
}
.brand-mark {
  position: relative; width: clamp(132px, 25vmin, 188px); aspect-ratio: 1; overflow: hidden;
  border-radius: 22%; box-shadow: 0 18px 45px rgba(31,43,170,.32);
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-mark::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.18) 43%, transparent 58%);
  transform: translateX(-120%); animation: brandShine 1.2s .35s ease-out both;
}
.brand-name { margin-top: 22px; font-size: clamp(38px, 7vmin, 58px); font-weight: 700; letter-spacing: .4px; }
.brand-presents { margin-top: 18px; font: 500 clamp(16px, 2.8vmin, 23px)/1 var(--font); letter-spacing: .48em; padding-left: .48em; opacity: .92; }
@keyframes brandReveal {
  from { opacity: 0; transform: translateY(15px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes brandShine { to { transform: translateX(120%); } }
@keyframes brandAura { 50% { transform: scale(1.08); opacity: .75; } }
@media (prefers-reduced-motion: reduce) {
  .brand-splash-content, .brand-mark::after, .brand-splash::after { animation: none; }
}

/* ---------- background ---------- */
#bg {
  position: fixed; z-index: 0; top: 0; bottom: 0; left: 50%;
  width: min(100%, var(--app-w)); transform: translateX(-50%); overflow: hidden;
}
#bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cloud {
  position: absolute; width: 160px; height: 52px; background: #fff; border-radius: 60px; opacity: .9;
  filter: drop-shadow(0 6px 0 rgba(120, 170, 210, .25));
  animation: drift 70s linear infinite;
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; left: 24px; top: -34px; }
.cloud::after { width: 54px; height: 54px; left: 82px; top: -22px; }
.cloud.c1 { top: 9%; animation-duration: 80s; animation-delay: -20s; }
.cloud.c2 { top: 24%; transform: scale(.7); animation-duration: 110s; animation-delay: -60s; }
.cloud.c3 { top: 4%; transform: scale(.55); animation-duration: 140s; animation-delay: -100s; }
#bg.night .cloud { opacity: .25; }
@keyframes drift { from { left: -200px; } to { left: 110%; } }

/* ---------- app shell ---------- */
#app {
  position: fixed; inset: 0; margin: 0 auto; max-width: var(--app-w); z-index: 1;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 8px 22px; border-radius: 18px;
  font-size: 22px; font-weight: 700; color: #fff; letter-spacing: .3px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
  background: linear-gradient(#8de04a, #3fae1e);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .22), inset 0 3px 0 rgba(255, 255, 255, .45), 0 5px 0 #276b12, 0 8px 14px rgba(0, 0, 0, .25);
  transition: transform .08s;
}
.btn::after {
  content: ''; position: absolute; left: 10%; right: 10%; top: 5px; height: 35%;
  border-radius: 14px; background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn:active { transform: translateY(3px); }
.btn small { display: block; font-size: 14px; font-weight: 600; opacity: .95; }
.btn-green { background: linear-gradient(#8de04a, #3fae1e); box-shadow: inset 0 -5px 0 rgba(0,0,0,.22), inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 #276b12, 0 8px 14px rgba(0,0,0,.25); }
.btn-blue { background: linear-gradient(#5cc8ff, #1a7ad6); box-shadow: inset 0 -5px 0 rgba(0,0,0,.22), inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 #0a4a8a, 0 8px 14px rgba(0,0,0,.25); }
.btn-orange { background: linear-gradient(#ffc04a, #ff7a1a); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 #a8460a, 0 8px 14px rgba(0,0,0,.25); }
.btn-purple { background: linear-gradient(#d68aff, #8a3ad8); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 #4a1a80, 0 8px 14px rgba(0,0,0,.25); }
.btn-red { background: linear-gradient(#ff7a8a, #d4203a); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 #7a0a1a, 0 8px 14px rgba(0,0,0,.25); }
.btn-gray { background: linear-gradient(#c8cdd4, #8a94a0); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.45), 0 5px 0 #4a525c, 0 8px 14px rgba(0,0,0,.25); }
.btn-play {
  font-size: 30px; min-height: 66px; padding: 8px 40px; border-radius: 24px; flex-direction: column; gap: 0;
  background: linear-gradient(#ffd84a, #ff8a1a);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.6), 0 6px 0 #b04a0a, 0 10px 18px rgba(0,0,0,.3);
  animation: pulse 1.8s ease-in-out infinite;
}
.btn-play.big { min-width: 240px; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.round-btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(#ffd27a, #f08a1a); color: #fff; font-size: 30px; font-weight: 700; line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.5), 0 4px 0 #9a4a0a, 0 6px 10px rgba(0,0,0,.25);
  text-shadow: 0 2px 0 rgba(0,0,0,.3);
}
.round-btn:active { transform: translateY(2px); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; position: relative; z-index: 3; }
.pill {
  display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 14px 0 8px;
  background: linear-gradient(#5a3a1a, #3a240e); border: 3px solid #f2c27a; border-radius: 25px; color: #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.pill img { width: 40px; height: 40px; margin: 0 1px 0 -4px; object-fit: contain; filter: drop-shadow(0 2px 1px rgba(0,0,0,.3)); }
.pill b { font-size: 19px; }
.pill small { font-size: 12px; opacity: .85; margin-left: 2px; }
.pill.coins { cursor: pointer; }
.pill .plus {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-left: 4px;
  background: linear-gradient(#a5f25c, #3caf23); border: 2px solid #286f16;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 2px 0 rgba(0,0,0,.18);
  font-weight: 700; font-size: 18px; line-height: 1;
}
.pill .plus[hidden] { display: none; }
.pill.lives.refillable { cursor: pointer; }
.gear-btn svg, .gear-btn img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(91,42,8,.22)); }
.topbar .gear-btn { margin-left: auto; }
.topbar .back-btn { font-size: 38px; padding-bottom: 4px; }

/* ---------- main menu ---------- */
.menu-body {
  position: relative; isolation: isolate; flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 4px 16px 18px; overflow: hidden;
}
.menu-garden-bg {
  position: absolute; inset: 0;
  background: #75cfef url('../assets/scene/base-scene.webp') center center / cover no-repeat;
}
@media (min-aspect-ratio: 4/3) {
  .menu-garden-bg { background-image: url('../assets/scene/base-scene.webp'); background-position: center; }
}
.logo { position: relative; text-align: center; line-height: .9; margin-top: 4px; }
.logo span { display: block; font-weight: 700; color: #fff; }
.logo-1 {
  font-size: 64px; letter-spacing: 2px;
  background: linear-gradient(#fff6a0, #ffb21a 55%, #ff7a1a); -webkit-background-clip: text; background-clip: text; color: transparent !important;
  -webkit-text-stroke: 3px #7a2a00; filter: drop-shadow(0 5px 0 #5a1a00) drop-shadow(0 8px 10px rgba(0,0,0,.3));
}
.logo-2 {
  font-size: 34px; margin-top: 2px;
  background: linear-gradient(#c8ffb0, #3fc23a 60%, #1a8a2a); -webkit-background-clip: text; background-clip: text; color: transparent !important;
  -webkit-text-stroke: 2px #0a4a12; filter: drop-shadow(0 4px 0 #0a3a0a) drop-shadow(0 6px 8px rgba(0,0,0,.3));
}
.logo-gems img { position: absolute; width: 40px; animation: bob 2.4s ease-in-out infinite; }
.logo-gems img:nth-child(1) { left: -38px; top: 6px; }
.logo-gems img:nth-child(2) { right: -36px; top: -8px; animation-delay: -.8s; }
.logo-gems img:nth-child(3) { right: -26px; top: 58px; width: 30px; animation-delay: -1.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }
.tagline {
  font-size: 17px; font-weight: 600; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 8px rgba(0,0,0,.2);
  text-align: center;
}
.menu-hero { position: relative; flex: 1; min-height: 150px; width: 100%; display: flex; justify-content: center; align-items: flex-end; }
.menu-hero .hero-character {
  display: block; height: 108%; max-height: 350px; max-width: 84%; object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); animation: breathe 3s ease-in-out infinite; transform-origin: bottom;
}
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02, .985); } }
.bubble {
  position: absolute; background: #fff; border-radius: 18px; padding: 10px 14px; font-size: 16px; font-weight: 600;
  box-shadow: 0 4px 0 rgba(0,0,0,.15), 0 6px 14px rgba(0,0,0,.2); border: 3px solid #f2c27a;
  max-width: 230px; line-height: 1.25; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .25s; pointer-events: none;
}
.bubble.show { opacity: 1; transform: scale(1); }
.menu-hero .hero-dialogue {
  right: 2px; top: 2px; width: 190px; max-width: 46%; padding: 13px 16px;
  color: #4a2a16; font-size: 15px; font-weight: 600; line-height: 1.28;
  background: linear-gradient(145deg, #fff, #fff9ef); border: 3px solid #f2bd6b; border-radius: 22px;
  box-shadow: 0 5px 0 rgba(113, 69, 23, .16), 0 10px 22px rgba(52, 92, 83, .18);
}
.menu-hero .hero-dialogue::before {
  content: ''; position: absolute; left: -18px; bottom: 20px; border: 10px solid transparent; border-right-color: #f2bd6b;
}
.menu-hero .hero-dialogue::after {
  content: ''; position: absolute; left: -12px; bottom: 22px; border: 8px solid transparent; border-right-color: #fffaf1;
}
.menu-body > .btn-play { margin-top: -4px; }
.menu-row { display: flex; gap: 10px; width: 100%; justify-content: center; }
.btn-small { flex: 1; font-size: 15px; min-height: 58px; padding: 6px 6px; border-radius: 16px; flex-direction: column; gap: 2px; max-width: 150px; }
.btn-small img, .btn-small svg { width: 28px; height: 28px; }
.daily-btn {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 18px 6px 8px;
  background: rgba(255, 255, 255, .85); border-radius: 30px; border: 3px solid #ff9ac4; font-weight: 700; font-size: 17px;
  box-shadow: 0 4px 0 rgba(0,0,0,.15);
}
.daily-btn img { width: 44px; height: 44px; margin: -8px 0; }
.daily-btn.ready img { animation: wiggle 1.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.badge {
  position: absolute; right: -6px; top: -8px; width: 24px; height: 24px; border-radius: 50%; background: #f2213f; color: #fff;
  display: grid; place-items: center; font-style: normal; font-size: 15px; border: 2px solid #fff;
}

/* Compact garden hub: the scene stays clear and every action lives in one dock. */
.menu-hub { width: 100%; padding: 0; gap: 0; }
.menu-topbar {
  z-index: 8; flex: none; gap: 6px; padding: 7px 8px 9px;
  background: linear-gradient(#386aa8, #214b88);
  border-bottom: 4px solid #f6c653;
  box-shadow: inset 0 -3px 0 rgba(10,45,99,.2), inset 0 3px 0 rgba(255,255,255,.24), 0 7px 18px rgba(31,66,70,.28);
}
.menu-topbar .pill {
  min-width: 0; height: 40px; gap: 3px; padding: 0 9px 0 6px;
}
.menu-topbar .pill img { width: 34px; height: 34px; margin-left: -3px; }
.menu-topbar .pill b { font-size: 17px; white-space: nowrap; }
.menu-topbar .pill small { font-size: 10px; white-space: nowrap; }
.menu-topbar .pill .plus {
  width: 20px; height: 20px; margin-left: 2px; font-size: 16px;
}
.scr-map > .topbar {
  z-index: 8; flex: none; gap: 6px; padding: 7px 8px 9px;
  background: linear-gradient(#386aa8, #214b88);
  border-bottom: 4px solid #f6c653;
  box-shadow: inset 0 -3px 0 rgba(10,45,99,.2), inset 0 3px 0 rgba(255,255,255,.24), 0 7px 18px rgba(31,66,70,.28);
}
.scr-map > .topbar .round-btn { width: 40px; height: 40px; }
.scr-map > .topbar .back-btn { font-size: 32px; }
.scr-map > .topbar .gear-btn img { width: 26px; height: 26px; }
.scr-map > .topbar .pill {
  min-width: 0; height: 40px; gap: 3px; padding: 0 9px 0 6px;
}
.scr-map > .topbar .pill img { width: 34px; height: 34px; margin-left: -3px; }
.scr-map > .topbar .pill b { font-size: 17px; white-space: nowrap; }
.scr-map > .topbar .pill small { font-size: 10px; white-space: nowrap; }
.scr-map > .topbar .pill .plus {
  width: 20px; height: 20px; margin-left: 2px; font-size: 16px;
}
.menu-topbar .coins { margin-left: 0; }
.menu-topbar .gear-btn { margin-left: auto; }
.menu-luni-portrait {
  position: relative; z-index: 2; flex: 0 0 64px; width: 64px; height: 64px;
  overflow: hidden; border: 6px solid #ffd45d; border-radius: 50%;
  background: radial-gradient(circle at 42% 32%, #efffc3, #66ce3c 72%);
  box-shadow: inset 0 0 0 3px #fff0a5, 0 4px 0 #a95b10, 0 8px 15px rgba(50,68,28,.32);
}
.menu-luni-portrait::after { content: ''; position: absolute; inset: 2px; border: 2px solid rgba(255,255,255,.66); border-radius: 50%; }
.menu-luni-portrait img { width: 118%; height: 118%; margin: -5% 0 0 -9%; object-fit: cover; }
.menu-daily {
  position: absolute; z-index: 8; top: 10px; right: 10px; min-width: 154px; height: 58px;
  display: flex; align-items: center; gap: 7px; padding: 5px 13px 7px 7px;
  color: #663015; border: 3px solid #ffd66b; border-radius: 20px;
  background: linear-gradient(#fff7dd, #ffd8df);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.7), inset 0 -4px 0 rgba(199,50,111,.12), 0 4px 0 #b56a24, 0 8px 13px rgba(0,0,0,.24);
}
.menu-daily img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.menu-daily span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.menu-daily b { font-size: 13px; white-space: nowrap; }
.menu-daily small { margin-top: 4px; font-size: 11px; font-weight: 700; color: #a33b67; white-space: nowrap; }
.menu-daily .badge { display: none; }
.menu-daily.ready {
  color: #fff; background: linear-gradient(#ff83bd, #dc2f83);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.48), inset 0 -5px 0 rgba(0,0,0,.14), 0 4px 0 #8d1854, 0 8px 13px rgba(0,0,0,.24);
}
.menu-daily.ready img { animation: wiggle 1.2s ease-in-out infinite; }
.menu-daily.ready small { color: #fff7b0; }
.menu-daily.ready .badge { display: grid; }
.garden-world { position: relative; flex: 1; width: 100%; min-height: 0; overflow: hidden; pointer-events: none; }
.garden-layer {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.garden-base-layer { z-index: 0; }
.garden-path-layer { z-index: 1; display: none; }
.garden-flowerbeds-layer { z-index: 2; }
.garden-entrance-layer { z-index: 3; }
.garden-fountain-layer { z-index: 4; }
.garden-bed-layer { z-index: 5; }
.garden-upgrade-shade {
  position: absolute; z-index: 20; inset: 0; opacity: 0; pointer-events: none;
  background: rgba(10, 20, 25, .73); transition: opacity .3s ease;
}
.garden-reveal-active .garden-upgrade-shade { opacity: 1; pointer-events: auto; }
.garden-reveal-active .menu-topbar { filter: brightness(.38) saturate(.65); transition: filter .3s ease; }
.garden-upgrade-target {
  z-index: 21 !important; filter: brightness(1.12) drop-shadow(0 0 10px rgba(255,230,95,.9));
  transform-origin: center; will-change: transform, opacity, filter;
}
.garden-upgrade-removing { animation: gardenOldOut .35s ease-in forwards; }
.garden-upgrade-revealed { animation: gardenNewIn .9s cubic-bezier(.18,1.45,.35,1) both; }
@keyframes gardenOldOut { to { opacity: 0; transform: scale(.92); filter: brightness(2) blur(2px); } }
@keyframes gardenNewIn {
  0% { opacity: 0; transform: scale(.72); filter: brightness(2.2) drop-shadow(0 0 18px #fff4a8); }
  62% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1.12) drop-shadow(0 0 10px rgba(255,230,95,.9)); }
}
.garden-upgrade-fx {
  position: absolute; z-index: 22; left: 50%; width: 180px; height: 130px; opacity: 0;
  transform: translate(-50%, -50%); pointer-events: none;
}
.garden-upgrade-fx-entrance { top: 34%; }
.garden-upgrade-fx-flowerBeds { top: 49%; }
.garden-upgrade-fx-fountain { top: 59%; }
.garden-upgrade-fx-gardenBed { top: 76%; }
.garden-upgrade-fx::before {
  content: ''; position: absolute; inset: 20px 34px; border: 5px solid rgba(255,224,91,.9); border-radius: 50%; opacity: 0;
}
.garden-upgrade-fx::after {
  content: '✦'; position: absolute; left: 50%; top: 50%; color: #fff6a5; font-size: 44px; opacity: 0;
  text-shadow: -48px 14px 0 #ffd84a, 52px -22px 0 #fff, 36px 30px 0 #ffbd32;
}
.garden-upgrade-fx i {
  position: absolute; left: 50%; top: 55%; width: 13px; height: 13px; border-radius: 50%; opacity: 0;
  background: #d8a85d; box-shadow: inset 0 3px 0 rgba(255,241,181,.65), 0 2px 3px rgba(55,35,10,.28);
}
.garden-upgrade-fx.burst { opacity: 1; }
.garden-upgrade-fx.burst::before { animation: gardenRing 1s ease-out both; }
.garden-upgrade-fx.burst::after { animation: gardenSparkle 1.15s .18s ease-out both; }
.garden-upgrade-fx.burst i { animation: gardenDust 1.05s ease-out both; }
.garden-upgrade-fx i:nth-child(1) { --dx:-76px; --dy:-42px; }
.garden-upgrade-fx i:nth-child(2) { --dx:-55px; --dy:35px; animation-delay:.05s; }
.garden-upgrade-fx i:nth-child(3) { --dx:-28px; --dy:-58px; animation-delay:.1s; }
.garden-upgrade-fx i:nth-child(4) { --dx:-12px; --dy:52px; animation-delay:.02s; }
.garden-upgrade-fx i:nth-child(5) { --dx:18px; --dy:-62px; animation-delay:.12s; }
.garden-upgrade-fx i:nth-child(6) { --dx:34px; --dy:48px; animation-delay:.06s; }
.garden-upgrade-fx i:nth-child(7) { --dx:62px; --dy:-37px; animation-delay:.14s; }
.garden-upgrade-fx i:nth-child(8) { --dx:78px; --dy:25px; animation-delay:.03s; }
.garden-upgrade-fx i:nth-child(9) { --dx:-82px; --dy:8px; animation-delay:.16s; }
.garden-upgrade-fx i:nth-child(10) { --dx:5px; --dy:67px; animation-delay:.09s; }
.garden-upgrade-fx i:nth-child(11) { --dx:84px; --dy:-5px; animation-delay:.18s; }
.garden-upgrade-fx i:nth-child(12) { --dx:48px; --dy:60px; animation-delay:.11s; }
@keyframes gardenDust {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.35); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25); }
}
@keyframes gardenRing { 0% { opacity: .95; transform: scale(.25); } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes gardenSparkle {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.3) rotate(-25deg); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.35) rotate(18deg); }
}
.garden-hub {
  position: relative; flex: 1; width: 100%; min-height: 0; display: flex; flex-direction: column;
  align-items: center; padding: 62px 12px 8px; pointer-events: none;
}
.garden-portrait {
  position: absolute; z-index: 5; top: 0; left: 50%; width: 88px; height: 88px; transform: translateX(-50%);
  border: 7px solid #ffd55c; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 45% 35%, #e9ffb4, #58c83b 72%);
  box-shadow: inset 0 0 0 3px #fff2a3, 0 5px 0 #a95a0d, 0 9px 18px rgba(54, 80, 38, .32);
}
.garden-portrait::after {
  content: ''; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid rgba(255,255,255,.65);
}
.garden-portrait img { width: 118%; height: 118%; margin: -5% 0 0 -9%; object-fit: cover; }
.garden-heading {
  position: relative; z-index: 4; display: flex; align-items: baseline; gap: 8px; padding: 7px 18px;
  color: #fff; border: 3px solid #f8cc62; border-radius: 18px;
  background: linear-gradient(#6ccc42, #309a27); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 #1d681d, 0 7px 12px rgba(0,0,0,.2);
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.garden-heading strong { font-size: 18px; }
.garden-heading span { font-size: 11px; font-weight: 700; opacity: .9; }
.garden-scene {
  position: relative; flex: 1; width: min(100%, 455px); min-height: 210px; margin-top: -8px; overflow: hidden;
  border: 4px solid #f4cb69; border-radius: 28px 28px 20px 20px;
  background: linear-gradient(rgba(130,222,255,.12) 0 37%, rgba(126,205,66,.16) 38% 100%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.38), 0 7px 16px rgba(47,94,45,.24);
}
.garden-sunbeam { position: absolute; inset: 0; background: linear-gradient(120deg, transparent 20%, rgba(255,255,210,.28) 45%, transparent 66%); }
.garden-plot {
  position: absolute; left: 14%; right: 14%; bottom: 8%; height: 43%; border: 4px solid #9a5c24; border-radius: 48% 48% 25% 25%;
  background: repeating-linear-gradient(96deg, #a9652e 0 18px, #8e4e23 19px 23px, #bc7736 24px 40px);
  box-shadow: inset 0 7px 0 rgba(255,210,118,.2), 0 7px 0 rgba(65,104,33,.28);
}
.stone { position: absolute; width: 22px; height: 13px; border-radius: 50%; background: #89857b; box-shadow: inset 0 3px 0 #c8c3b7; }
.stone.s1 { left: 18%; bottom: 18%; transform: rotate(-12deg); } .stone.s2 { right: 17%; top: 22%; transform: rotate(9deg); }
.weed { position: absolute; width: 8px; height: 26px; bottom: 22%; border-radius: 100% 0; background: #496f25; transform-origin: bottom; }
.weed::after { content: ''; position: absolute; width: 8px; height: 22px; left: 8px; top: 7px; border-radius: 0 100%; background: #385c1d; transform: rotate(35deg); }
.weed.w1 { left: 30%; transform: rotate(-18deg); } .weed.w2 { left: 55%; bottom: 42%; transform: rotate(8deg); } .weed.w3 { right: 20%; transform: rotate(22deg); }
.sprout { display: none; position: absolute; width: 8px; height: 28px; bottom: 27%; background: #45a72d; border-radius: 6px; }
.sprout::before, .sprout::after { content: ''; position: absolute; top: 4px; width: 17px; height: 11px; background: #79d744; border-radius: 100% 10%; }
.sprout::before { right: 4px; transform: rotate(25deg); } .sprout::after { left: 4px; transform: scaleX(-1) rotate(25deg); }
.sprout.p1 { left: 21%; } .sprout.p2 { left: 40%; bottom: 48%; } .sprout.p3 { right: 37%; } .sprout.p4 { right: 18%; bottom: 45%; }
.flower { display: none; position: absolute; width: 18px; height: 18px; bottom: 29%; border-radius: 50%; background: #ff5f9f; box-shadow: 0 -9px 0 #ff89bd, 0 9px 0 #ff89bd, 9px 0 0 #ff89bd, -9px 0 0 #ff89bd; }
.flower::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #ffe154; }
.flower.f1 { left: 20%; } .flower.f2 { left: 41%; bottom: 52%; } .flower.f3 { right: 34%; } .flower.f4 { right: 15%; bottom: 48%; }
.garden-fence { display: none; position: absolute; left: 4%; right: 4%; bottom: 12%; height: 42%; border-top: 8px solid #f3bd5c; border-bottom: 8px solid #c77b2b; }
.garden-fence i { position: absolute; bottom: -13px; width: 22px; height: 86px; border: 3px solid #9b571f; border-radius: 10px 10px 5px 5px; background: linear-gradient(90deg,#de9134,#ffd477 45%,#bd6b25); }
.garden-fence i:nth-child(1) { left: 2%; } .garden-fence i:nth-child(2) { left: 25%; } .garden-fence i:nth-child(3) { left: 48%; } .garden-fence i:nth-child(4) { left: 71%; } .garden-fence i:nth-child(5) { right: 1%; }
.garden-tree { display: none; position: absolute; bottom: 26%; width: 38px; height: 88px; border-radius: 12px; background: linear-gradient(90deg,#7b3d19,#ba6c2b,#6d3416); }
.garden-tree i { position: absolute; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 35% 28%,#b6f25d,#42a82c 65%,#267923); box-shadow: inset -5px -6px 0 rgba(0,0,0,.12); }
.garden-tree i:nth-child(1) { left: -35px; top: -20px; } .garden-tree i:nth-child(2) { left: 7px; top: -28px; } .garden-tree i:nth-child(3) { left: -14px; top: -55px; }
.tree-left { left: 8%; } .tree-right { right: 8%; transform: scale(.88); }
.garden-gem { display: none; position: absolute; width: 45px; height: 45px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.28)); }
.gem-red { left: 12%; top: 12%; } .gem-blue { right: 11%; top: 15%; } .gem-yellow { left: 46%; top: 5%; }
.garden-fountain { display: none; position: absolute; left: 50%; bottom: 10%; width: 92px; height: 48px; transform: translateX(-50%); border: 5px solid #d18a25; border-radius: 50%; background: radial-gradient(ellipse,#9cf5ff 20%,#28bde1 62%,#167bb6 64%); box-shadow: 0 5px 0 #8b531c; }
.garden-fountain::before { content: ''; position: absolute; left: 33px; bottom: 30px; width: 18px; height: 55px; border-radius: 50% 50% 8px 8px; background: linear-gradient(90deg,#42d7ef,#d9ffff,#28aeda); }
.garden-fountain span { position: absolute; z-index: 2; left: 29px; bottom: 64px; color: #ffd83f; font-size: 30px; text-shadow: 0 2px 0 #b87810; }
.garden-stage-1 .sprout, .garden-stage-2 .sprout { display: block; }
.garden-stage-1 .weed, .garden-stage-2 .weed { display: none; }
.garden-stage-2 .garden-fence, .garden-stage-3 .garden-fence { display: block; }
.garden-stage-3 .flower, .garden-stage-4 .flower, .garden-stage-5 .flower { display: block; }
.garden-stage-3 .weed, .garden-stage-4 .weed, .garden-stage-5 .weed, .garden-stage-3 .stone, .garden-stage-4 .stone, .garden-stage-5 .stone { display: none; }
.garden-stage-4 .garden-tree, .garden-stage-5 .garden-tree { display: block; }
.garden-stage-4 .garden-gem, .garden-stage-5 .garden-gem { display: block; animation: bob 2.4s ease-in-out infinite; }
.garden-stage-5 .garden-fountain { display: block; }
.garden-stage-5 .garden-plot { background: repeating-linear-gradient(96deg,#bc7b38 0 18px,#995326 19px 23px,#d49445 24px 40px); }
.garden-progress { width: min(90%, 360px); margin-top: -4px; z-index: 4; padding: 7px 13px 9px; border: 3px solid #e5b34e; border-radius: 15px; background: rgba(255,248,220,.94); box-shadow: 0 4px 0 rgba(119,73,25,.28); }
.garden-progress-copy { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.garden-progress-copy b { font-size: 13px; color: #754317; } .garden-progress-copy small { font-size: 9px; font-weight: 700; text-align: right; color: #8b612d; }
.garden-progress-track { height: 8px; margin-top: 5px; overflow: hidden; border-radius: 8px; background: #cdb887; box-shadow: inset 0 2px 2px rgba(0,0,0,.2); }
.garden-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(#9ceb4e,#3caf25); box-shadow: inset 0 2px 0 rgba(255,255,255,.5); }
.home-dock {
  position: relative; flex: none; width: 100%; min-height: 112px; display: grid;
  grid-template-columns: 80px 160px 80px; justify-content: center; align-items: end; gap: clamp(12px, 4vw, 30px); padding: 20px 18px 12px;
  background: linear-gradient(#386aa8, #214b88); border-top: 4px solid #f6c653;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.24), 0 -7px 18px rgba(31, 66, 70, .28);
}
.home-nav {
  position: relative; height: 72px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #fff; font-family: inherit; font-size: 12px; font-weight: 700; text-shadow: 0 2px 0 rgba(0,0,0,.35);
  border: 3px solid #ffd866; border-radius: 20px; background: linear-gradient(#6ccaff, #2583dd);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.42), 0 4px 0 #143f80, 0 7px 10px rgba(0,0,0,.25);
}
.home-nav img, .home-nav svg { width: 50px; height: 50px; object-fit: contain; }
.home-shop { background: linear-gradient(#ffc75c, #f07820); box-shadow: inset 0 -5px 0 rgba(0,0,0,.16), inset 0 3px 0 rgba(255,255,255,.42), 0 4px 0 #a44211, 0 7px 10px rgba(0,0,0,.25); }
.home-account { background: linear-gradient(#d17aff, #863bd0); box-shadow: inset 0 -5px 0 rgba(0,0,0,.16), inset 0 3px 0 rgba(255,255,255,.42), 0 4px 0 #4f1988, 0 7px 10px rgba(0,0,0,.25); }
.home-daily { background: linear-gradient(#ff82bd, #d92e82); box-shadow: inset 0 -5px 0 rgba(0,0,0,.16), inset 0 3px 0 rgba(255,255,255,.42), 0 4px 0 #8d1854, 0 7px 10px rgba(0,0,0,.25); }
.home-daily.ready img { animation: wiggle 1.2s ease-in-out infinite; }
.home-play {
  position: relative; align-self: end; width: 100%; min-width: 0; height: 76px; margin-top: -8px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-family: inherit; text-shadow: 0 3px 0 rgba(0,0,0,.3); border: 5px solid #ffe270; border-radius: 24px;
  background: linear-gradient(#ffd85a, #ff9b1f 62%, #f17818);
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.16), inset 0 4px 0 rgba(255,255,255,.58), 0 6px 0 #a7460c, 0 10px 18px rgba(0,0,0,.3);
  animation: pulse 1.8s ease-in-out infinite;
}
.home-play strong { font-size: 22px; line-height: 1; }
.home-play small { margin-top: 5px; font-size: 12px; font-weight: 700; }

/* ---------- map ---------- */
.map-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.map-scroll::-webkit-scrollbar { display: none; }
.map-inner { position: relative; width: 100%; }
.map-chapter { position: absolute; left: 0; right: 0; display: flex; justify-content: center; z-index: 3; pointer-events: none; }
.map-chapter span {
  background: linear-gradient(#ff7ab0, #d4207a); color: #fff; font-weight: 700; padding: 6px 22px; border-radius: 6px;
  text-shadow: 0 2px 0 rgba(0,0,0,.3); box-shadow: 0 4px 0 #7a0a3a, 0 6px 10px rgba(0,0,0,.25); font-size: 16px;
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
  padding-left: 30px; padding-right: 30px;
}
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-path path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.p-shadow { stroke: rgba(80, 50, 20, .35); stroke-width: 30px; }
.p-main { stroke: #f8e2b0; stroke-width: 24px; }
.p-dash { stroke: #d8b070; stroke-width: 4px; stroke-dasharray: 2 14; }
.node {
  position: absolute; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; z-index: 2;
  display: grid; place-items: center;
  background: radial-gradient(circle at 40% 30%, #fff, #b8c4d0 60%, #7a8a9a);
  border: 4px solid #fff; box-shadow: 0 5px 0 rgba(0,0,0,.25), 0 8px 12px rgba(0,0,0,.2);
}
.node-num { font-size: 22px; font-weight: 700; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.node.done { background: radial-gradient(circle at 40% 30%, #c8ff9a, #4fc23a 60%, #1f7a1a); }
.node.current { background: radial-gradient(circle at 40% 30%, #fff3a0, #ffb21a 60%, #e0600a); animation: nodepulse 1.4s ease-in-out infinite; width: 68px; height: 68px; margin: -34px 0 0 -34px; }
.node-avatar {
  position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); z-index: 1;
  object-fit: cover; border-radius: 50%; pointer-events: none;
}
.node.current .node-num {
  position: absolute; right: -11px; bottom: -10px; z-index: 3; width: 29px; height: 29px; display: grid; place-items: center;
  border-radius: 50%; border: 3px solid #fff; background: linear-gradient(#ffcc45, #f28a0b); color: #fff;
  font-size: 14px; line-height: 1; text-shadow: 0 2px 0 rgba(115, 55, 0, .45); box-shadow: 0 3px 0 #a64b08, 0 4px 7px rgba(0,0,0,.28);
}
.node.locked {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  background: radial-gradient(circle at 38% 28%, #d8f7ff, #55baf0 56%, #2674c8 100%);
  border: 5px solid #ffd45d;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), inset 0 -6px 0 rgba(22,75,146,.24), 0 5px 0 #a95b10, 0 9px 13px rgba(0,0,0,.25);
  filter: none; opacity: 1;
}
.node.locked .node-num {
  color: #fff; font-size: 23px; z-index: 1;
  text-shadow: 0 3px 0 #2b68a8, 0 0 4px rgba(20,73,126,.35);
}
.node-lock {
  position: absolute; z-index: 4; right: -11px; bottom: -10px; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 50%; border: 3px solid #fff4bd;
  background: linear-gradient(#ffd95e, #f08b17); box-shadow: 0 3px 0 #9d480c, 0 5px 7px rgba(0,0,0,.28);
}
.node-lock svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 0 rgba(83,35,5,.2)); }
.node.reward { border-color: #ffd23a; }
.node.hard.locked, .node.hard.done { border-color: #ff6a8a; }
@keyframes nodepulse { 0%, 100% { box-shadow: 0 5px 0 rgba(0,0,0,.25), 0 0 0 0 rgba(255,220,80,.8); } 50% { box-shadow: 0 5px 0 rgba(0,0,0,.25), 0 0 0 14px rgba(255,220,80,0); } }
.node-stars { position: absolute; bottom: -16px; display: flex; }
.node-stars img { width: 20px; height: 20px; margin: 0 -1px; }
.node-stars img:nth-child(2) { margin-top: -4px; }
.node-chest { position: absolute; z-index: 5; width: 38px; left: -28px; top: -18px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)); }
.node-garden-reward {
  position: absolute; z-index: 5; right: -34px; top: -25px; width: 50px; height: 50px;
  display: grid; place-items: center; border: 3px solid #fff3a8; border-radius: 15px;
  background: linear-gradient(#fff9cf, #ffd253); box-shadow: inset 0 2px 0 rgba(255,255,255,.75), 0 4px 0 #a85b0d, 0 7px 10px rgba(0,0,0,.25);
  transform: rotate(4deg); pointer-events: none;
}
.node-garden-reward img { width: 45px; height: 45px; object-fit: contain; filter: drop-shadow(0 2px 1px rgba(0,0,0,.24)); }
.node.done .node-garden-reward { filter: saturate(.88); }
.map-play { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0 auto; width: fit-content; z-index: 4; animation: none; }

/* ---------- game screen ---------- */
.scr-game { padding-bottom: env(safe-area-inset-bottom); }
.hud { display: flex; align-items: stretch; gap: 0; padding: 8px 8px 0; position: relative; z-index: 3; }
.hud-panel {
  flex: 1;
  background: linear-gradient(#fffaf0, #f6e6c4);
  border: 4px solid #c98a3a; border-radius: 20px;
  box-shadow: inset 0 0 0 2px #fff4c8, inset 0 3px 0 #fffdf0, 0 4px 0 #8a5418, 0 6px 10px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center; min-height: 74px; padding: 4px 6px;
}
.hud-goals { border-radius: 20px; gap: 6px; }
.hud-score { border-radius: 20px; flex-direction: column; gap: 3px; }
.goal { position: relative; display: flex; flex-direction: column; align-items: center; }
.goal img { width: 42px; height: 42px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.25)); }
.hud-goals.many .goal img { width: 32px; height: 32px; }
.goal b { font-size: 17px; line-height: 1; margin-top: -2px; color: #4a2a10; }
.goal.done::after {
  content: '✓'; position: absolute; right: -4px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(#8de04a, #3fae1e); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px;
  border: 2px solid #fff; animation: popin .35s;
}
.hud-moves {
  flex: none; width: 96px; margin: -8px -10px 0; z-index: 2; text-align: center; color: #fff;
  background: linear-gradient(#ffb04a, #f2701a); border: 4px solid #a8460a; border-top: 0; border-radius: 0 0 22px 22px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.15), 0 5px 0 #7a3000, 0 8px 12px rgba(0,0,0,.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0 6px;
}
.hud-level { font-size: 12px; font-weight: 700; opacity: .95; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.hud-num { font-size: 42px; font-weight: 700; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.hud-sub { font-size: 12px; font-weight: 600; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.hud-moves.low .hud-num { color: #fff3a0; animation: lowpulse .7s ease-in-out infinite; }
@keyframes lowpulse { 50% { transform: scale(1.15); } }
.hud-stars { display: flex; gap: 6px; }
.hud-stars img { width: 26px; height: 26px; }
.hud-stars img.pop { animation: popin .45s; }
@keyframes popin { 0% { transform: scale(0); } 70% { transform: scale(1.35); } 100% { transform: scale(1); } }
.hud-bar { position: relative; width: 92%; height: 13px; border-radius: 8px; background: #8a6a4a; box-shadow: inset 0 2px 3px rgba(0,0,0,.4); overflow: visible; }
.hud-fill { height: 100%; width: 0; border-radius: 8px; background: linear-gradient(#b8ff6a, #4fc23a); box-shadow: inset 0 2px 0 rgba(255,255,255,.5); transition: width .35s; }
.hud-bar i { position: absolute; top: -2px; width: 3px; height: 17px; background: #5a3a1a; border-radius: 2px; }
.hud-val { font-size: 15px; font-weight: 700; color: #5a3a1a; line-height: 1; }

.board-wrap { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; margin: 8px 6px 0; z-index: 2; }
canvas.board { display: block; touch-action: none; filter: drop-shadow(0 10px 14px rgba(0,0,0,.25)); }
.banner {
  position: absolute; left: 50%; top: 12px; z-index: 5; pointer-events: none; white-space: nowrap;
  max-width: calc(100% - 24px); padding: 9px 22px 10px; border: 3px solid #f0b44d; border-radius: 22px;
  font-size: 24px; font-weight: 700; color: #64320f; letter-spacing: .2px; text-align: center;
  background: linear-gradient(#fffdf4, #ffe3a2); box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgba(142, 82, 18, .25), 0 8px 18px rgba(32, 64, 80, .24);
  opacity: 0; transform: translate(-50%, -16px) scale(.88);
}
.banner.show { animation: bannerin 1.1s ease forwards; }
@keyframes bannerin {
  0% { opacity: 0; transform: translate(-50%, -16px) scale(.88); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.04); }
  30%, 78% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(.96); }
}
.bottom-bar {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 46px; align-items: center; gap: 8px;
  min-height: 86px; padding: 8px 10px 12px; position: relative; z-index: 3;
  background: linear-gradient(rgba(255, 250, 231, .94), rgba(239, 216, 164, .96)); border-top: 4px solid #c98a3a;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.9), 0 -6px 16px rgba(35, 73, 70, .18);
}
.hero-mini { position: relative; width: 72px; height: 72px; flex: none; z-index: 4; pointer-events: none; }
.hero-portrait {
  width: 72px; height: 72px; overflow: hidden; border-radius: 50%;
  background: linear-gradient(#c9f58c, #69bd38); border: 4px solid #ffd35a;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.7), 0 4px 0 #9a6719, 0 6px 10px rgba(0,0,0,.24);
}
.hero-portrait img { width: 100%; height: 128%; object-fit: cover; object-position: 50% 4%; transform: scale(1.34); transform-origin: 50% 12%; }
.hero-mini .bubble {
  left: 70px; bottom: 70px; width: max-content; max-width: min(310px, calc(100vw - 112px)); padding: 11px 15px;
  font-size: 15px; line-height: 1.25; background: linear-gradient(#fffdf7, #fff0d4); border-color: #e6ad55;
}
.hero-mini .bubble::after { content: ''; position: absolute; left: -14px; bottom: 14px; border: 8px solid transparent; border-right-color: #e6ad55; }
.pause-btn { gap: 5px; display: flex; align-items: center; justify-content: center; background: linear-gradient(#ff7aa0, #e0205a); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.5), 0 4px 0 #7a0a2a, 0 6px 10px rgba(0,0,0,.25); }
.pause-btn span { width: 7px; height: 20px; background: #fff; border-radius: 3px; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.boosters { display: flex; justify-content: center; gap: 8px; }
.booster {
  position: relative; width: 64px; height: 64px; border-radius: 19px; display: grid; place-items: center;
  overflow: visible; border: 4px solid #ffe171;
  background: linear-gradient(#6fd2ff, #2387df);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.16), inset 0 3px 0 rgba(255,255,255,.5), 0 5px 0 #145493, 0 8px 12px rgba(0,0,0,.25);
}
.booster::before {
  content: ''; position: absolute; z-index: 0; left: 8px; right: 8px; top: 5px; height: 16px;
  border-radius: 12px; background: linear-gradient(rgba(255,255,255,.58), rgba(255,255,255,0)); pointer-events: none;
}
.booster[data-b="shuffle"] {
  background: linear-gradient(#d682ff, #8740db);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.16), inset 0 3px 0 rgba(255,255,255,.5), 0 5px 0 #531d91, 0 8px 12px rgba(0,0,0,.25);
}
.booster[data-b="moves5"] {
  background: linear-gradient(#8ce95b, #3aad2d);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.16), inset 0 3px 0 rgba(255,255,255,.5), 0 5px 0 #1d6d1b, 0 8px 12px rgba(0,0,0,.25);
}
.booster img { position: relative; z-index: 1; width: 47px; height: 47px; object-fit: contain; filter: drop-shadow(0 2px 1px rgba(0,0,0,.3)); }
.booster .cnt {
  position: absolute; z-index: 3; right: -6px; bottom: -7px; min-width: 27px; height: 27px; padding: 0 6px; border-radius: 14px;
  background: #5a3418; color: #fff; font-size: 15px; display: grid; place-items: center; border: 2px solid #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.25); pointer-events: none;
}
.booster.empty .cnt { background: linear-gradient(#8de04a, #3fae1e); font-size: 21px; line-height: 1; }
.booster.locked { filter: none; opacity: 1; }
.booster .lock { display: none; }
.booster.locked .lock {
  display: block; position: absolute; z-index: 4; right: -9px; bottom: -9px; width: 28px; height: 28px;
  border: 3px solid #fff1a9; border-radius: 50%; background: linear-gradient(#ffd95b, #f28b17);
  box-shadow: 0 3px 0 #98450c, 0 5px 7px rgba(0,0,0,.28);
}
.booster.locked .lock::before {
  content: ''; position: absolute; left: 6px; top: 2px; width: 4px; height: 4px;
  border: 3px solid #6b2b0e; border-bottom: 0; border-radius: 7px 7px 0 0;
}
.booster.locked .lock::after {
  content: ''; position: absolute; left: 4px; top: 8px; width: 10px; height: 9px;
  border: 2px solid #6b2b0e; border-radius: 3px; background: linear-gradient(#fff07b, #ffae20);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.55);
}
.booster.locked .cnt { display: none; }
.booster.active { animation: pulse .6s ease-in-out infinite; box-shadow: 0 0 0 4px #fff3a0, 0 0 18px 6px rgba(255,240,120,.9); }

/* ---------- modals ---------- */
#modal-root { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.modal-wrap {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(20, 30, 60, .55); opacity: 0; transition: opacity .2s; pointer-events: auto;
}
.modal-wrap.open { opacity: 1; }
.modal {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column;
  background: linear-gradient(#fffaf0, #f6e6c4); border: 5px solid #c98a3a; border-radius: 26px;
  box-shadow: inset 0 3px 0 #fff, 0 6px 0 #8a5418, 0 14px 30px rgba(0,0,0,.35);
  transform: scale(.7); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
  padding: 34px 18px 18px; margin-top: 20px;
}
.modal-wrap.open .modal { transform: scale(1); }
.modal.small { max-width: 360px; }
.modal-title {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 8px 32px; border-radius: 16px; font-size: 26px; font-weight: 700; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.35);
  background: linear-gradient(#ffb04a, #f2701a); border: 4px solid #a8460a; box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 4px 0 #7a3000;
}
.modal.win .modal-title { background: linear-gradient(#8de04a, #3fae1e); border-color: #276b12; box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 4px 0 #1a4a0a; }
.modal.lose .modal-title { background: linear-gradient(#5cc8ff, #1a7ad6); border-color: #0a4a8a; box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 4px 0 #0a3060; }
.modal-x {
  position: absolute; right: -12px; top: -12px; width: 40px; height: 40px; border-radius: 50%; z-index: 2;
  background: linear-gradient(#ff7a8a, #d4203a); color: #fff; font-size: 20px; font-weight: 700; border: 3px solid #fff;
  box-shadow: 0 3px 0 #7a0a1a, 0 5px 8px rgba(0,0,0,.25);
}
.modal-body {
  overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 12px;
  /* Room for the rounded extrusion and soft shadow of the last button. Without
     it the scroll viewport cuts the shadow into a straight horizontal line. */
  padding: 4px 10px 22px; scrollbar-width: thin;
}
.btn-row { display: flex; gap: 12px; justify-content: center; }
.btn-row .btn { flex: 1; }
.btn-col { display: flex; flex-direction: column; gap: 14px; }
.center { text-align: center; }
p { margin: 0; line-height: 1.3; }
p.big { font-size: 22px; font-weight: 700; }
.small-note { font-size: 13px; opacity: .8; text-align: center; }
.sect { font-weight: 700; font-size: 16px; color: #8a5418; text-transform: uppercase; letter-spacing: .5px; text-align: center; }
.big-icon { width: 90px; height: 90px; }
img.inline { width: 24px; height: 24px; vertical-align: middle; }
.ribbon {
  align-self: center; margin-top: -4px; background: linear-gradient(#ffd23a, #ff9a1a); color: #5a2a00; font-weight: 700; font-size: 14px;
  padding: 4px 16px; border-radius: 12px; box-shadow: 0 3px 0 #a8460a;
}
.ribbon.hard { background: linear-gradient(#ff7a9a, #d4203a); color: #fff; box-shadow: 0 3px 0 #7a0a1a; }
.goal-cards { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.goal-card {
  width: 92px; background: #fff; border-radius: 16px; border: 3px solid #e6c48a; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; box-shadow: 0 3px 0 rgba(0,0,0,.1);
}
.goal-card img { width: 52px; height: 52px; }
.goal-card b { font-size: 22px; line-height: 1.1; }
.goal-card small { font-size: 12px; opacity: .8; text-align: center; }
.goal-card.done { border-color: #8de04a; }
.pre-moves { text-align: center; font-size: 20px; }
.pre-moves b { font-size: 26px; color: #e0600a; }
.tip { background: #e8f8ff; border: 3px dashed #5cc8ff; border-radius: 16px; padding: 8px 12px; font-size: 15px; }
.tip b { color: #1a7ad6; }
.picks { display: flex; gap: 10px; justify-content: center; }
.pick {
  position: relative; width: 92px; padding: 6px 4px; border-radius: 16px; background: #fff; border: 3px solid #e6c48a;
  display: flex; flex-direction: column; align-items: center; box-shadow: 0 3px 0 rgba(0,0,0,.1); transition: transform .1s;
}
.pick img { width: 46px; height: 46px; }
.pick b {
  position: absolute; right: 4px; top: 4px; min-width: 24px; height: 24px; border-radius: 12px; background: #5a1a10; color: #fff;
  font-size: 13px; display: grid; place-items: center; padding: 0 4px;
}
.pick small { font-size: 12px; text-align: center; line-height: 1.1; }
.pick.on { border-color: #3fae1e; background: #eaffd8; transform: scale(1.06); box-shadow: 0 0 0 3px #8de04a, 0 3px 0 rgba(0,0,0,.1); }
.pick.on::after { content: '✓'; position: absolute; left: 6px; top: 2px; color: #3fae1e; font-weight: 700; font-size: 20px; }
.pick.locked { filter: grayscale(1); opacity: .7; }
.pre-stars, .win-stars { display: flex; justify-content: center; gap: 6px; }
.pre-stars img { width: 34px; }
.pre-stars img:nth-child(2) { margin-top: -6px; }
.modal.pre .btn-play { align-self: center; animation: none; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 6px solid #f2d8a0; border-top-color: #ff8a1a; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal.win {
  max-width: 390px; overflow: visible; padding: 0 18px 18px;
  background: linear-gradient(#fff9e9, #ffe8bd); border-color: #35a42c;
  box-shadow: inset 0 3px 0 #fff, 0 7px 0 #176d20, 0 18px 38px rgba(0,0,0,.42);
}
.modal.win .modal-body { overflow: visible; gap: 12px; padding: 0; align-items: stretch; }
.win-level-banner {
  align-self: center; min-width: 82%; margin: -31px auto 0; padding: 12px 24px 14px; text-align: center;
  color: #fff; font-size: 30px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; text-shadow: 0 3px 0 rgba(0,0,0,.3);
  background: linear-gradient(#667df0, #344fc0); border: 5px solid #ffd34e; border-radius: 32px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.38), 0 6px 0 #26358d, 0 10px 18px rgba(0,0,0,.28);
}
.win-ribbon {
  position: relative; align-self: center; min-width: 76%; margin-top: 2px; padding: 9px 28px 11px; text-align: center;
  color: #fff; font-size: 30px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 3px 0 rgba(0,0,0,.3);
  background: linear-gradient(#78e43e, #28a827); border: 4px solid #ffd34e; border-radius: 14px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 5px 0 #166918, 0 8px 14px rgba(0,0,0,.24);
}
.win-ribbon::before, .win-ribbon::after {
  content: ''; position: absolute; z-index: -1; top: 12px; width: 34px; height: 42px;
  background: linear-gradient(#58cb35, #208e25); border: 3px solid #f0b72f;
}
.win-ribbon::before { left: -25px; transform: skewY(14deg); border-radius: 8px 0 0 8px; }
.win-ribbon::after { right: -25px; transform: skewY(-14deg); border-radius: 0 8px 8px 0; }
.win-stars { min-height: 112px; align-items: center; margin-top: 2px; }
.win-stars img { width: 88px; height: 88px; object-fit: contain; opacity: 0; animation: starin .45s forwards; filter: drop-shadow(0 5px 3px rgba(126, 73, 9, .25)); }
.win-stars .ws1 { width: 112px; height: 112px; margin-top: -10px; animation-delay: .6s; }
.win-stars .ws0 { animation-delay: .3s; }
.win-stars .ws2 { animation-delay: .9s; }
@keyframes starin { 0% { opacity: 0; transform: scale(3) rotate(-30deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.win-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px;
  background: #e9c49e; border: 3px solid #c38c57; border-radius: 22px;
  box-shadow: inset 0 3px 4px rgba(101, 57, 24, .2), 0 2px 0 #fff8df;
}
.win-stat {
  min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(#fffdf3, #ffe7ba); border: 3px solid #e4b56e; border-radius: 16px;
  box-shadow: inset 0 2px 0 #fff;
}
.win-stat span { color: #8a633d; font-size: 13px; font-weight: 700; text-transform: uppercase; }
.win-stat b { color: #e35a0b; font-size: 27px; line-height: 1.1; }
.win-coins > div { display: flex; align-items: center; gap: 5px; }
.win-coins img { width: 38px; height: 38px; object-fit: contain; }
.lose-hero, .chapter-hero { display: flex; justify-content: center; }
.lose-hero .mascot-art { width: 160px; height: 160px; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(126, 73, 9, .26)); }
.chapter-hero .mascot-art { width: 170px; height: 170px; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(126, 73, 9, .26)); }
.chapter-hero .hero-svg { height: 170px; }
.win-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.win-actions .btn { min-height: 62px; font-size: 21px; padding-left: 12px; padding-right: 12px; }
.win-actions .btn:only-child { grid-column: 1 / -1; width: 100%; }
.win-double { display: flex; align-items: center; justify-content: center; gap: 7px; }
.win-double > img { width: 31px; height: 31px; object-fit: contain; }
.win-double > b { font-size: 25px; }
.win-ad-mark {
  display: grid; width: 30px; height: 25px; place-items: center; border-radius: 6px;
  background: linear-gradient(#6bcaff, #2384df); color: #fff; font-size: 14px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.55), 0 2px 0 #155ca8;
}
.win-double.claimed { filter: saturate(.65); cursor: default; }
.chest-reward { display: flex; align-items: center; gap: 12px; background: #fff3d0; border: 3px solid #ffd23a; border-radius: 16px; padding: 8px 12px; font-size: 15px; }
.chest-reward .chest-img { width: 70px; animation: wiggle 1s ease-in-out 3; }
.chest-reward img:not(.chest-img) { width: 22px; vertical-align: middle; }
.garden-win-reward {
  position: relative; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 38px 8px 12px;
  color: #603411; border: 3px solid #8fcf35; border-radius: 16px; background: linear-gradient(#f8ffd8, #dff49a);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.8), 0 4px 0 #55951e;
}
.garden-win-reward img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0,0,0,.22)); }
.garden-win-reward div { display: flex; flex-direction: column; gap: 3px; }
.garden-win-reward b { font-size: 16px; }
.garden-win-reward small { font-size: 11px; font-weight: 700; color: #56802a; }
.garden-reward-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-54%); color: #4b8b20; font-size: 34px; font-weight: 700; }
.garden-win-reward:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.8), 0 1px 0 #55951e; }
@media (prefers-reduced-motion: reduce) {
  .garden-upgrade-removing, .garden-upgrade-revealed, .garden-upgrade-fx.burst::before,
  .garden-upgrade-fx.burst::after, .garden-upgrade-fx.burst i { animation-duration: .01ms !important; animation-delay: 0s !important; }
}
.price { display: inline-flex; align-items: center; gap: 2px; font-size: 16px; background: rgba(0,0,0,.2); padding: 2px 10px; border-radius: 12px; }
.price img { width: 22px; }

.set-row { display: flex; align-items: center; justify-content: space-between; font-size: 19px; font-weight: 600; padding: 2px 4px; }
.toggle { width: 62px; height: 34px; border-radius: 17px; background: #c8b8a0; position: relative; box-shadow: inset 0 3px 4px rgba(0,0,0,.25); transition: background .2s; }
.toggle i { position: absolute; left: 3px; top: 3px; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(#fff, #ddd); box-shadow: 0 2px 3px rgba(0,0,0,.3); transition: left .2s; }
.toggle.on { background: #4fc23a; }
.toggle.on i { left: 31px; }
.seg { display: flex; border-radius: 14px; overflow: hidden; border: 3px solid #c98a3a; }
.seg button { padding: 4px 12px; font-size: 15px; font-weight: 600; background: #fff; }
.seg button.on { background: linear-gradient(#ffb04a, #f2701a); color: #fff; }

.shop-coins { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 26px; }
.shop-coins img { width: 40px; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-item {
  background: #fff; border: 3px solid #e6c48a; border-radius: 16px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 3px 0 rgba(0,0,0,.1);
}
.shop-item:active { transform: translateY(2px); }
.shop-item.wide { grid-column: span 2; }
.shop-item > img { width: 48px; height: 48px; }
.shop-item b { font-size: 17px; }
.shop-item small { font-size: 12px; opacity: .8; text-align: center; }
.shop-item .price { background: linear-gradient(#8de04a, #3fae1e); color: #fff; margin-top: 4px; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.shop-item .price.free { background: linear-gradient(#5cc8ff, #1a7ad6); font-size: 13px; }
.ad-rewards .shop-item { background: linear-gradient(#fffef9, #fff0c9); border-color: #f0c05c; }
.ad-rewards .shop-item > img { width: 58px; height: 58px; }
.ad-rewards .shop-item .price { padding-inline: 13px; }
.pack-icons { display: flex; height: 48px; align-items: center; font-size: 30px; color: #8a3ad8; }
.pack-icons img { width: 38px; margin: 0 -8px; }

.modal.account.compact .modal-body { gap: 14px; }
.acc-player-card {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  color: #fff; border: 4px solid #ffd55f; border-radius: 20px;
  background: linear-gradient(145deg, #ca72ff, #8737d4);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 5px 0 #5f219e, 0 8px 12px rgba(78,34,112,.22);
}
.acc-player-card img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(66,27,86,.3)); }
.acc-player-card div { min-width: 0; }
.acc-player-card small { display: block; margin-bottom: 3px; font-size: 13px; font-weight: 700; opacity: .88; }
.acc-player-card b { display: block; overflow: hidden; font-size: 21px; letter-spacing: .5px; text-overflow: ellipsis; white-space: nowrap; }
.acc-wins {
  display: flex; align-items: center; justify-content: space-between; padding: 11px 18px;
  border: 3px solid #e6c48a; border-radius: 17px; background: linear-gradient(#fffdf7, #fff0cf);
  color: #6c3a18; box-shadow: 0 3px 0 rgba(132,77,27,.14);
}
.acc-wins span { font-size: 18px; font-weight: 700; }
.acc-wins b { color: #e0600a; font-size: 30px; }
.acc-star-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.acc-star-stats div {
  display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 10px 4px 9px;
  border: 3px solid #e6c48a; border-radius: 17px; background: linear-gradient(#fffdf8, #ffedc5);
  box-shadow: 0 3px 0 rgba(132,77,27,.14);
}
.acc-star-stats img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(142,82,5,.22)); }
.acc-star-stats b { color: #e0600a; font-size: 25px; line-height: 1; }
.acc-star-stats small { margin-top: 4px; font-size: 10px; font-weight: 700; line-height: 1.15; text-align: center; }
.inp { flex: 1; min-width: 0; font: inherit; font-size: 18px; padding: 8px 12px; border-radius: 14px; border: 3px solid #e6c48a; }
.lbl { font-size: 14px; font-weight: 700; color: #8a5418; }
textarea.code { font: 12px/1.3 ui-monospace, monospace; width: 100%; height: 64px; border-radius: 12px; border: 3px solid #e6c48a; padding: 6px; resize: none; user-select: text; -webkit-user-select: text; }

.days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.day {
  background: #fff; border: 3px solid #e6c48a; border-radius: 14px; padding: 4px; display: flex; flex-direction: column; align-items: center; font-size: 14px;
}
.day small { font-size: 11px; font-weight: 700; color: #8a5418; }
.day img { width: 32px; height: 32px; }
.day.big { grid-column: span 2; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 6px; }
.day.big small { width: 100%; text-align: center; }
.day.got { opacity: .5; background: #eaffd8; }
.day.today { border-color: #ff8a1a; background: #fff3d0; animation: dayGlow 1.2s ease-in-out infinite; }
@keyframes dayGlow {
  50% { border-color: #ffb42d; box-shadow: inset 0 0 0 2px rgba(255,210,74,.55), 0 3px 8px rgba(206,103,15,.22); }
}

/* The claim button must not grow: scaling a full-width child makes the modal
   scroll horizontally. Brightness keeps the call-to-action alive in-place. */
.modal.daily .btn-play { animation: claimGlow 1.8s ease-in-out infinite; }
@keyframes claimGlow {
  50% { filter: brightness(1.08) saturate(1.05); }
}

.ad-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ad-art { height: 156px; background: radial-gradient(circle at 50% 65%, #fff7c9, #ffb3d1 72%); border-radius: 16px; width: 100%; display: flex; justify-content: center; overflow: hidden; }
.ad-art .mascot-art { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(126, 73, 9, .26)); }
.ad-text { font-weight: 600; }

#toast {
  position: fixed; left: 50%; bottom: 18%; transform: translateX(-50%) translateY(20px); z-index: 20; pointer-events: none;
  background: rgba(40, 24, 10, .9); color: #fff; padding: 10px 20px; border-radius: 20px; font-weight: 600; font-size: 17px;
  opacity: 0; transition: opacity .25s, transform .25s; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-height: 700px) {
  .logo-1 { font-size: 50px; }
  .logo-2 { font-size: 28px; }
  .menu-body { gap: 8px; }
  .menu-hub { gap: 0; }
  .garden-hub { padding-top: 51px; padding-bottom: 5px; }
  .garden-portrait { width: 72px; height: 72px; border-width: 6px; }
  .garden-heading { padding: 5px 15px; }
  .garden-heading strong { font-size: 15px; }
  .garden-scene { min-height: 150px; border-radius: 22px 22px 16px 16px; }
  .garden-progress { padding: 5px 10px 7px; }
  .garden-progress-copy b { font-size: 11px; }
  .home-dock { min-height: 94px; padding-top: 16px; padding-bottom: 9px; }
  .home-nav { height: 60px; border-radius: 17px; }
  .home-nav img, .home-nav svg { width: 42px; height: 42px; }
  .home-play { height: 68px; margin-top: -6px; border-radius: 21px; }
  .home-play strong { font-size: 19px; }
  .hud-panel { min-height: 64px; }
  .hud-num { font-size: 36px; }
  .bottom-bar { grid-template-columns: 62px minmax(0, 1fr) 46px; min-height: 74px; padding: 6px 8px 9px; gap: 6px; }
  .booster { width: 54px; height: 54px; }
  .booster img { width: 40px; height: 40px; }
  .boosters { gap: 6px; }
  .hero-mini, .hero-portrait { width: 62px; height: 62px; }
  .hero-mini .bubble { left: 60px; bottom: 60px; }
}
@media (max-width: 380px) {
  .scr-map > .topbar { gap: 4px; padding-left: 5px; padding-right: 5px; }
  .scr-map > .topbar .round-btn { width: 36px; height: 36px; }
  .scr-map > .topbar .back-btn { font-size: 29px; }
  .scr-map > .topbar .gear-btn img { width: 23px; height: 23px; }
  .scr-map > .topbar .pill { height: 36px; gap: 2px; padding: 0 5px; }
  .scr-map > .topbar .pill img { width: 30px; height: 30px; }
  .scr-map > .topbar .pill b { font-size: 15px; }
  .scr-map > .topbar .pill small { font-size: 9px; margin-left: 0; }
  .scr-map > .topbar .pill .plus { width: 18px; height: 18px; margin-left: 1px; font-size: 14px; }
  .menu-topbar { gap: 4px; padding-left: 5px; padding-right: 5px; }
  .menu-topbar .pill { height: 36px; gap: 2px; padding: 0 5px; }
  .menu-topbar .pill img { width: 30px; height: 30px; }
  .menu-topbar .pill b { font-size: 15px; }
  .menu-topbar .pill small { font-size: 9px; margin-left: 0; }
  .menu-topbar .pill .plus { width: 18px; height: 18px; margin-left: 1px; font-size: 14px; }
  .menu-topbar .round-btn { width: 42px; height: 42px; }
  .menu-luni-portrait { flex-basis: 52px; width: 52px; height: 52px; border-width: 5px; }
  .goal img { width: 34px; height: 34px; }
  .hud-moves { width: 84px; }
  .btn { font-size: 19px; }
  .btn-small { font-size: 13px; }
  .goal-card, .pick { width: 80px; }
  .home-dock { gap: 12px; padding-left: 5px; padding-right: 5px; }
  .home-nav { font-size: 10px; border-width: 2px; }
  .home-nav img, .home-nav svg { width: 44px; height: 44px; }
  .home-play { border-width: 4px; }
  .home-play strong { font-size: 18px; }
  .home-play small { font-size: 10px; }
  .bottom-bar { grid-template-columns: 58px minmax(0, 1fr) 46px; gap: 5px; padding-left: 6px; padding-right: 6px; }
  .hero-mini, .hero-portrait { width: 58px; height: 58px; }
  .hero-mini .bubble { left: 56px; bottom: 56px; max-width: calc(100vw - 94px); }
  .booster { width: 52px; height: 52px; }
  .booster img { width: 39px; height: 39px; }
  .boosters { gap: 5px; }
  .banner { font-size: 20px; padding: 8px 16px 9px; }
}
