:root {
  --app-safe-top: 0px;
  --app-safe-right: 0px;
  --app-safe-bottom: 0px;
  --app-safe-left: 0px;
  --app-content-top: 0px;
  --app-content-right: 0px;
  --app-content-bottom: 0px;
  --app-content-left: 0px;
  --mochi-bg-top: #fff4c9;
  --mochi-bg-bottom: #c7dea5;
  --mochi-text: #4a392d;
  --mochi-text-muted: #766251;
  --mochi-card: #fffdf4;
  --mochi-card-secondary: #f4edd7;
  --mochi-primary: #345f3d;
  --mochi-primary-text: #ffffff;
  --mochi-destructive: #7d352e;
  --mochi-border: #d9c9a8;
  --mochi-soil: #9b6548;
  --mochi-soil-dark: #704633;
  --mochi-header: #d6e5b5;
  --sun: #f6c95d;
  --peach: #f7aa83;
  --shadow: rgba(83, 55, 38, .16);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  color: var(--mochi-text);
  background: var(--mochi-bg-bottom);
  color-scheme: light;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background:
    radial-gradient(circle at 12% 12%, rgba(255,255,255,.45) 0 5%, transparent 6%),
    linear-gradient(145deg, #b8d59e, #e7d99c);
}

button { font: inherit; }

.app-shell {
  width: min(100%, 480px);
  min-height: var(--app-stable-height, 100dvh);
  margin: 0 auto;
  padding-top: calc(max(env(safe-area-inset-top, 0px), var(--app-content-top), var(--app-safe-top)) + 12px);
  padding-right: calc(max(env(safe-area-inset-right, 0px), var(--app-content-right), var(--app-safe-right)) + 16px);
  padding-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--app-content-bottom), var(--app-safe-bottom)) + 16px);
  padding-left: calc(max(env(safe-area-inset-left, 0px), var(--app-content-left), var(--app-safe-left)) + 16px);
  color: var(--mochi-text);
  color-scheme: light;
  background: linear-gradient(var(--mochi-bg-top) 0 26%, #e6efbf 62%, var(--mochi-bg-bottom) 100%);
  box-shadow: 0 0 40px var(--shadow);
  overflow: hidden;
}

.loading-screen, .login-screen {
  min-height: calc(var(--app-stable-height, 100dvh) - 48px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.loading-mochi { font-size: 68px; animation: bob 1.8s ease-in-out infinite; }
.loading-screen p, .login-screen p { color: var(--mochi-text-muted); margin: 0; max-width: 280px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.brand { margin: 0; font-size: 25px; letter-spacing: -.5px; }
.farm-title { min-width: 0; }
.daily-goal { width: min(175px, 44vw); margin-top: 4px; }
.daily-goal p { margin: 0; color: var(--mochi-text-muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.daily-goal small { display: block; min-height: 14px; margin-top: 3px; color: var(--mochi-text-muted); font-size: 9px; font-weight: 750; line-height: 1.25; }
.unallocated-steps { display: block; margin-top: 4px; color: var(--mochi-primary); font-size: 9px; font-style: normal; font-weight: 850; line-height: 1.25; }
.daily-goal button { border: 0; padding: 0 2px; background: transparent; color: var(--mochi-primary); font-size: inherit; font-weight: 900; text-decoration: underline; cursor: pointer; }
.daily-progress { height: 5px; margin-top: 3px; overflow: hidden; border-radius: 99px; background: rgba(74,57,45,.14); }
.daily-progress span { display: block; height: 100%; border-radius: inherit; background: var(--mochi-primary); }
.coins {
  border: 0; color: var(--mochi-text); cursor: pointer;
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 9px 11px; border-radius: 999px; background: var(--mochi-card);
  font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 0 rgba(126,91,53,.13);
}
.coins:active { transform: translateY(2px); }
.coin-mark { position: relative; width: 17px; height: 17px; border: 2px solid #a96d18; border-radius: 50%; background: linear-gradient(135deg, #ffe67b, #e6a82d); box-shadow: inset 0 0 0 2px rgba(255,248,184,.55), 0 1px 0 rgba(83,55,38,.18); }
.coin-mark::after { content: ""; position: absolute; width: 3px; height: 7px; border-radius: 99px; top: 2px; left: 3px; background: rgba(255,255,255,.65); transform: rotate(35deg); }
.coin-amount { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.coin-mark-small { width: 13px; height: 13px; border-width: 1px; vertical-align: -2px; }
.coin-mark-small::after { width: 2px; height: 5px; top: 2px; left: 3px; }
.refresh-button, .icon-button {
  border: 0; background: rgba(255,255,255,.6); color: var(--mochi-primary); min-height: 44px;
  border-radius: 14px; padding: 0 13px; cursor: pointer; font-weight: 750;
}
.refresh-button { background: rgba(255,255,255,.38); color: var(--mochi-text-muted); font-size: 12px; font-weight: 700; }
.nav-icon-button, .back-button {
  border: 0; min-width: 44px; min-height: 44px; border-radius: 14px; background: rgba(255,255,255,.72);
  color: var(--mochi-text); cursor: pointer; font-size: 20px; box-shadow: 0 3px 0 rgba(126,91,53,.12);
}
.nav-icon-button { display: inline-grid; place-items: center; padding: 0; color: var(--mochi-primary); }
.nav-svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.refresh-button:active, .primary-button:active, .plot:active { transform: translateY(2px); }

.hero { text-align: center; padding: 20px 4px 14px; }
.weekly-order {
  margin: 0 0 16px; padding: 12px 13px 10px; border: 1px solid #d6c795;
  border-radius: 18px; background: linear-gradient(135deg, #fffdf1, #f7edca);
  box-shadow: 0 4px 0 rgba(126,91,53,.1);
}
.weekly-order.completed { border-color: #a8c28b; background: linear-gradient(135deg, #f8ffeb, #e6f1cf); }
.weekly-order.waiting { padding-bottom: 12px; }
.weekly-order.waiting p { margin: 5px 0 0; font-size: 12px; color: var(--mochi-text-muted); }
.weekly-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.weekly-heading h2, .weekly-heading span:first-child { margin: 0; font-size: 15px; font-weight: 900; }
.weekly-heading small { font-size: 11px; color: var(--mochi-text-muted); }
.weekly-bonus { padding: 5px 8px; border-radius: 999px; background: #f6df9e; color: #6a4c1b; white-space: nowrap; font-size: 11px; font-weight: 900; }
.weekly-description { margin: 5px 0 9px; color: var(--mochi-text-muted); font-size: 11px; line-height: 1.3; }
.weekly-ingredients { display: flex; gap: 6px; }
.weekly-ingredient { flex: 1; padding: 6px 3px; border-radius: 10px; background: rgba(255,255,255,.7); text-align: center; white-space: nowrap; font-size: 17px; }
.weekly-ingredient strong { font-size: 12px; color: var(--mochi-text); }
.weekly-ingredient.done { background: #dceacb; }
.weekly-progress-line { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.weekly-progress-line strong { font-size: 11px; color: var(--mochi-primary); white-space: nowrap; }
.weekly-progress { flex: 1; height: 7px; overflow: hidden; border-radius: 99px; background: #dfd9b8; }
.weekly-progress span { display: block; height: 100%; border-radius: inherit; background: #6b995a; transition: width .35s ease; }
.weekly-deadline { display: block; margin-top: 6px; color: var(--mochi-text-muted); font-size: 10px; font-weight: 750; }
.unallocated-hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -2px 0 13px; padding: 7px 9px; border-radius: 12px; background: #e4eed2; color: var(--mochi-primary); font-size: 11px; font-weight: 800; }
.unallocated-hint button { border: 0; border-radius: 9px; padding: 7px 9px; background: var(--mochi-primary); color: white; font-size: 11px; font-weight: 850; white-space: nowrap; }
.weekly-celebration { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(54,70,42,.42); animation: weeklyFade .25s ease-out; }
.weekly-celebration-card { width: min(100%, 330px); padding: 26px 20px 20px; border-radius: 26px; background: #fffdf1; box-shadow: 0 16px 50px rgba(43,51,27,.28); text-align: center; animation: weeklyPop .45s cubic-bezier(.2,1.5,.5,1); }
.weekly-celebration-card span { display: block; margin-bottom: 8px; font-size: 49px; }
.weekly-celebration-card strong { font-size: 20px; }
.weekly-celebration-card p { color: var(--mochi-primary); font-weight: 900; }
.weekly-celebration-card button { border: 0; border-radius: 13px; padding: 11px 27px; background: var(--mochi-primary); color: white; font-weight: 900; }
@keyframes weeklyFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes weeklyPop { from { opacity: 0; transform: translateY(30px) scale(.75) rotate(-8deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
@media (max-width: 360px) { .weekly-order { padding: 10px; } .weekly-heading h2 { font-size: 14px; } .weekly-ingredient { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .weekly-celebration, .weekly-celebration-card { animation: none; } }
.sky-label { font-weight: 750; color: #80643e; margin: 0 0 8px; }
.mochi-wrap { position: relative; width: 136px; height: 136px; margin: 0 auto 8px; }
.mochi-shadow { position: absolute; width: 100px; height: 15px; border-radius: 50%; background: rgba(77,65,44,.15); left: 18px; bottom: 0; }
.mochi-character {
  --mochi-bob-distance: -5px; position: absolute; inset: 0; transform-origin: bottom center;
  animation: mochiBob 3s ease-in-out infinite;
}
.pet-layer { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; pointer-events: none; }
.pet-legacy-overlay { position: absolute; left: 50%; top: 9%; transform: translateX(-50%); font-size: 35px; line-height: 1; filter: drop-shadow(0 2px 1px rgba(74,57,45,.2)); pointer-events: none; }
.shop-pet-preview { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 16px; padding: 6px 12px; border-radius: 18px; background: rgba(255,253,244,.9); font-weight: 800; }
.shop-pet-preview .mochi-wrap { margin: 0; width: 104px; height: 104px; flex: 0 0 auto; }
.shop-pet-preview .mochi-shadow { width: 76px; left: 14px; }
.pet-name-row { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; margin: 0 0 8px; }
.pet-name-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.pet-name-action { flex: 0 0 auto; border: 0; background: transparent; color: var(--mochi-primary); font-size: 11px; font-weight: 850; text-decoration: underline; cursor: pointer; padding: 7px 3px; }
.pet-name-overlay { position: fixed; z-index: 40; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: rgba(54,70,42,.45); }
.pet-name-dialog { width: min(100%, 380px); max-height: min(90dvh, 530px); overflow-y: auto; padding: 20px; border-radius: 22px; background: var(--mochi-card); box-shadow: 0 16px 50px rgba(43,51,27,.3); text-align: left; }
.pet-name-emoji { display: block; text-align: center; font-size: 37px; }
.pet-name-dialog h2 { margin: 5px 0 17px; font-size: 20px; text-align: center; }
.pet-name-dialog label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 850; }
.pet-name-dialog input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--mochi-border); border-radius: 12px; background: white; color: var(--mochi-text); font: inherit; }
.pet-name-dialog small { display: block; margin-top: 6px; color: var(--mochi-text-muted); font-size: 11px; }
.pet-name-error { min-height: 17px; margin: 5px 0; color: var(--mochi-destructive); font-size: 11px; font-weight: 750; }
.pet-name-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pet-name-buttons button { min-height: 46px; padding: 0 8px; }
@media (min-width: 480px) { .pet-name-overlay { align-items: center; } }
.speech {
  display: inline-block; margin: 0; padding: 9px 14px; max-width: 340px; background: rgba(255,255,255,.72);
  border-radius: 16px 16px 16px 5px; color: #6c5848; font-weight: 650; line-height: 1.35;
}

.section-title { display: flex; justify-content: space-between; align-items: end; margin: 8px 2px 10px; }
.section-title h2 { margin: 0; font-size: 18px; }
.section-title span { color: var(--mochi-text-muted); font-size: 12px; }
.plots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.farm-area { position: relative; }
.farm-decor { position: absolute; z-index: 0; inset: 31px 0 auto; display: flex; justify-content: space-around; align-items: center; pointer-events: none; font-size: 24px; }
.farm-decor-flowers { position: absolute; left: 4px; top: 11px; letter-spacing: 8px; }
.farm-decor-flowers::after { content: "🌸"; }
.farm-decor-wood_fence { position: absolute; right: 5px; top: 14px; font-size: 22px; }
.farm-decor-lanterns { position: absolute; left: 50%; top: -28px; transform: translateX(-50%); font-size: 23px; }
.farm-area .section-title, .farm-area .plots { position: relative; z-index: 1; }
.plot {
  position: relative; min-height: 190px; padding: 12px 8px 11px; border: 0; border-radius: 20px;
  color: var(--mochi-text); background: linear-gradient(#d9edb5 0 28%, var(--mochi-soil) 29% 100%);
  box-shadow: 0 5px 0 var(--mochi-soil-dark), 0 10px 18px rgba(82,58,38,.12); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden;
}
.plot::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 10px; height: 5px; border-radius: 50%; background: rgba(66,39,29,.18); }
.plot.empty { justify-content: center; border: 2px dashed rgba(255,255,255,.5); }
.plot.ready { background: linear-gradient(#fff0a6 0 28%, #ae714b 29% 100%); animation: readyGlow 1.8s ease-in-out infinite; }
.plot.active { box-shadow: 0 5px 0 var(--mochi-soil-dark), 0 0 0 4px #fff0a6, 0 12px 22px rgba(82,58,38,.2); }
.plot-icon { font-size: 38px; line-height: 1; margin: 1px 0 9px; filter: drop-shadow(0 3px 0 rgba(70,45,20,.15)); }
.plot-name { color: #fffaf0; font-weight: 850; font-size: 14px; }
.plot-numbers { color: #f9e8d6; font-size: 11px; margin-top: 5px; }
.plot-remaining { color: white; font-size: 11px; font-weight: 800; line-height: 1.2; margin-top: 7px; }
.plot.active .plot-numbers { color: rgba(255,250,240,.76); font-weight: 650; }
.plot.active .plot-remaining { padding: 4px 6px; border-radius: 9px; background: rgba(70,46,31,.3); font-size: 14px; font-weight: 900; }
.empty .plot-name { font-size: 13px; }
.empty .plot-icon { font-size: 34px; }
.ready-badge { font-size: 11px; font-weight: 900; color: #654222; background: #fff1a1; padding: 3px 6px; border-radius: 999px; margin-bottom: 4px; }
.active-badge { margin-bottom: 4px; padding: 3px 6px; border-radius: 999px; background: #fff8c8; color: #513a25; font-size: 10px; font-weight: 900; }
.progress { width: 100%; height: 9px; margin-top: 8px; border-radius: 99px; background: rgba(58,39,29,.3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: #f4dc79; transition: width .45s ease; }
.harvest-button { z-index: 1; border: 0; margin-top: 8px; min-height: 36px; border-radius: 11px; padding: 0 10px; color: #513a25; background: #fff8c8; font-weight: 900; cursor: pointer; }
.activate-button { z-index: 1; border: 1px solid rgba(255,255,255,.7); margin-top: 8px; min-height: 34px; border-radius: 11px; padding: 0 10px; color: #fffaf0; background: rgba(74,57,45,.28); font-size: 11px; font-weight: 900; cursor: pointer; }

.dev-panel {
  margin-top: 24px; padding: 12px; border: 2px dashed #987e58; border-radius: 16px;
  background: rgba(255,255,255,.46);
}
.dev-label { display: flex; justify-content: space-between; font: 800 11px ui-monospace, monospace; color: #755e45; margin-bottom: 9px; }
.dev-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.dev-actions button { border: 0; min-height: 42px; border-radius: 11px; background: #765a43; color: white; font-weight: 800; cursor: pointer; }

.primary-button {
  border: 0; min-height: 50px; border-radius: 16px; padding: 0 20px; background: var(--mochi-primary);
  color: var(--mochi-primary-text); font-weight: 850; box-shadow: 0 5px 0 #244a30; cursor: pointer;
}
.secondary-button { border: 1px solid var(--mochi-border); min-height: 48px; border-radius: 15px; padding: 0 18px; background: var(--mochi-card-secondary); color: var(--mochi-text); font-weight: 850; cursor: pointer; }
.secondary-button.full { width: 100%; }
.primary-button[disabled], button[disabled] { opacity: .65; cursor: wait; }
.primary-button.full { width: 100%; }

.settings-screen { background: linear-gradient(var(--mochi-bg-top), #e8efc5 55%, #d3e3b5); overflow: visible; }
.settings-header { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.nested-heading { margin: 8px 0 0; font-size: 23px; letter-spacing: -.35px; }
.settings-header p { margin: 4px 0 0; color: var(--mochi-text-muted); font-size: 13px; }
.settings-card {
  margin-bottom: 13px; padding: 17px; border-radius: 20px; background: rgba(255,253,244,.88);
  box-shadow: 0 5px 0 rgba(126,91,53,.1); line-height: 1.45;
}
.settings-card h2 { margin: 0 0 8px; font-size: 18px; }
.settings-card p { margin: 8px 0; color: var(--mochi-text-muted); }
.settings-card-title { display: flex; gap: 12px; align-items: center; }
.settings-card-title > span { font-size: 32px; }
.settings-card-title h2, .settings-card-title p { margin: 0; }
.connection-status { font-weight: 850; }
.connection-status.connected, .check-success { color: var(--mochi-primary) !important; font-weight: 850; }
.settings-detail { padding: 12px; border-radius: 14px; background: var(--mochi-card-secondary); }
.settings-actions { display: grid; gap: 9px; margin-top: 13px; }
.notification-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.notification-card h2, .notification-card p { margin: 0; }
.toggle-button { width: 52px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 99px; padding: 3px; background: #cfc6b4; cursor: pointer; transition: background .2s ease; }
.toggle-button span { display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(60,45,30,.22); transition: transform .2s ease; }
.toggle-button.active { background: var(--mochi-primary); }
.toggle-button.active span { transform: translateX(22px); }
.danger-button { border: 0; min-height: 48px; border-radius: 15px; background: #f3d5ce; color: var(--mochi-destructive); font-weight: 850; cursor: pointer; }
.beta-card { border: 1px solid #e3c873; background: #fff8d7; }
.compact-steps { margin: 10px 0; padding-left: 22px; color: var(--mochi-text-muted); }
.compact-steps li { margin: 5px 0; }
.onboarding-step { position: relative; padding-top: 20px; }
.step-number { display: inline-block; margin-bottom: 8px; padding: 4px 9px; border-radius: 999px; background: #dceabf; color: var(--mochi-primary); font-size: 12px; font-weight: 900; }
.secret-key { display: block; overflow-wrap: anywhere; margin: 13px 0; padding: 13px; border: 1px dashed #9b8266; border-radius: 13px; background: #f8f1dd; color: #49372c; font-size: 14px; user-select: all; }
.warning-text { font-size: 13px; color: #7d4a32 !important; }

.stats-screen { padding-bottom: 28px; }
.today-card {
  margin-bottom: 14px; padding: 18px; border-radius: 22px; color: var(--mochi-primary-text);
  background: linear-gradient(135deg, #4b7652, var(--mochi-primary)); box-shadow: 0 6px 0 #244a30;
}
.today-card span, .today-card strong { display: block; }
.today-card span { margin-bottom: 4px; font-size: 14px; opacity: .88; }
.today-card strong { font-size: 31px; line-height: 1.1; }
.today-card small { font-size: 15px; font-weight: 750; }
.stats-card-heading { display: grid; gap: 11px; margin-bottom: 16px; }
.stats-card-heading h2 { margin: 0; }
.period-switcher { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 13px; background: var(--mochi-card-secondary); }
.period-button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--mochi-text-muted); font-size: 12px; font-weight: 850; cursor: pointer; }
.period-button.active { background: var(--mochi-card); color: var(--mochi-primary); box-shadow: 0 2px 6px var(--shadow); }
.bar-chart { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 46px minmax(48px, 1fr) 58px; align-items: center; gap: 8px; font-size: 12px; }
.bar-row time { color: var(--mochi-text-muted); text-transform: lowercase; }
.bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { height: 12px; overflow: hidden; border-radius: 99px; background: #e7dfc9; }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8fb866, var(--mochi-primary)); }
.stats-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.summary-card { min-width: 0; padding: 14px; border: 1px solid var(--mochi-border); border-radius: 18px; background: rgba(255,253,244,.82); }
.summary-card span, .summary-card strong, .summary-card small { display: block; }
.summary-card span { min-height: 34px; color: var(--mochi-text-muted); font-size: 12px; }
.summary-card strong { overflow-wrap: anywhere; font-size: 21px; }
.summary-card small { margin-top: 2px; color: var(--mochi-text-muted); }
.lifetime-note { margin: 18px 0 0; color: var(--mochi-text-muted); text-align: center; font-size: 13px; }

.telegram-context body { background-color: var(--mochi-header); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 10; background: rgba(48,38,30,.42); display: grid; align-items: end; }
.sheet { width: min(100%, 480px); margin: 0 auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; background: var(--mochi-card); color: var(--mochi-text); color-scheme: light; animation: sheetUp .22s ease-out; }
.sheet-handle { width: 42px; height: 5px; border-radius: 99px; margin: 2px auto 13px; background: #d8cdbf; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; }
.sheet-header h2 { margin: 0; font-size: 20px; }
.sheet-unallocated { margin: 10px 0 0; padding: 8px 10px; border-radius: 11px; background: #e8efcf; color: var(--mochi-primary); font-size: 12px; font-weight: 850; }
.icon-button { font-size: 20px; }
.crop-list { display: grid; gap: 8px; margin-top: 13px; }
.collection-link { display: block; border: 0; padding: 4px 0 0; background: transparent; color: var(--mochi-primary); font-size: 12px; font-weight: 850; cursor: pointer; }
.crop-choice { border: 0; border-radius: 15px; background: #f3ecd4; padding: 10px 12px; min-height: 68px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 8px; text-align: left; color: var(--mochi-text); }
.crop-choice.locked { border: 1px solid var(--mochi-border); background: #eee8d8; }
.crop-choice .emoji { font-size: 29px; }
.crop-choice strong, .crop-choice small, .crop-choice em { display: block; }
.crop-choice small { color: var(--mochi-text-muted); margin-top: 2px; }
.crop-choice em { margin-top: 5px; color: #725d47; font-size: 11px; font-style: normal; font-weight: 800; }
.reward { font-weight: 850; color: var(--mochi-primary); }
.crop-action { border: 0; min-height: 38px; border-radius: 11px; padding: 0 11px; color: var(--mochi-primary-text); background: var(--mochi-primary); font-size: 11px; font-weight: 900; cursor: pointer; }
.crop-action.unlock { color: #5d452f; background: #f3d982; }
.crop-actions { display: grid; justify-items: stretch; gap: 5px; width: 104px; }
.crop-unlock-link { border: 0; padding: 0; background: transparent; color: #725d47; font-size: 9px; font-weight: 800; text-decoration: underline; cursor: pointer; }
.crops-screen { padding-bottom: 28px; }
.collection-list { display: grid; gap: 10px; }
.collection-card { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 11px; padding: 14px; border-radius: 18px; background: rgba(255,253,244,.9); box-shadow: 0 4px 0 rgba(126,91,53,.1); }
.collection-card.locked { border: 1px solid var(--mochi-border); background: rgba(241,235,217,.92); }
.collection-emoji { font-size: 34px; }
.collection-card h2 { margin: 0; font-size: 16px; }
.collection-card p { margin: 3px 0; color: var(--mochi-text-muted); font-size: 12px; }
.collection-card strong { display: inline-flex; align-items: center; gap: 4px; color: #725d47; font-size: 12px; }
.collection-card .collection-open { color: var(--mochi-primary); }
.seed-count { display: block; margin-top: 4px; color: var(--mochi-primary); font-size: 11px; font-weight: 850; }

.shop-screen { padding-bottom: 28px; }
.shop-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 16px; padding: 4px; border-radius: 15px; background: rgba(255,253,244,.64); }
.shop-tab { min-height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--mochi-text-muted); font-weight: 850; cursor: pointer; }
.shop-tab.active { background: var(--mochi-card); color: var(--mochi-primary); box-shadow: 0 2px 8px var(--shadow); }
.shop-progress { margin: 0 2px 10px; color: var(--mochi-text-muted); font-size: 13px; font-weight: 800; }
.shop-section { margin-bottom: 20px; }
.shop-section > h2 { margin: 0 2px 10px; font-size: 17px; }
.shop-list { display: grid; gap: 10px; }
.shop-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px; border-radius: 18px; background: rgba(255,253,244,.9); box-shadow: 0 4px 0 rgba(126,91,53,.1); }
.shop-card.equipped { box-shadow: 0 0 0 2px #91b96a, 0 4px 0 rgba(126,91,53,.1); }
.shop-visual { font-size: 34px; text-align: center; }
.shop-visual img { display: block; width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.shop-card h3 { margin: 0; font-size: 15px; }
.shop-card p { margin: 4px 0 2px; color: var(--mochi-text-muted); font-size: 12px; }
.shop-card small { color: var(--mochi-primary); font-weight: 800; }
.shop-card em { display: block; margin-top: 3px; color: #725d47; font-size: 11px; font-style: normal; font-weight: 800; }
.crop-shop-card.locked { border: 1px solid var(--mochi-border); background: rgba(241,235,217,.92); }
.shop-action { min-width: 74px; min-height: 40px; padding: 0 10px; font-size: 11px; }
.wearable-shop-card { grid-template-columns: minmax(0, 1fr) auto; }
.shop-preview-trigger { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 11px; min-width: 0; min-height: 52px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.shop-preview-trigger:focus-visible, .dressing-choice:focus-visible { outline: 3px solid var(--mochi-primary); outline-offset: 3px; }
.shop-copy { min-width: 0; }
.shop-copy strong, .shop-copy small, .shop-copy > span { display: block; }
.shop-copy strong { font-size: 15px; }
.shop-copy > span { margin: 4px 0 2px; color: var(--mochi-text-muted); font-size: 12px; }
.shop-copy small { color: var(--mochi-primary); font-weight: 800; }

.dressing-backdrop { z-index: 20; }
.dressing-sheet { max-height: min(88dvh, calc(var(--app-stable-height, 100dvh) - 12px)); overflow-y: auto; overscroll-behavior: contain; }
.dressing-sheet .sheet-header { position: sticky; top: -10px; z-index: 2; padding: 8px 0; background: var(--mochi-card); }
.dressing-state { margin: 7px 0 9px; color: var(--mochi-primary); font-size: 13px; font-weight: 850; text-align: center; }
.dressing-stage { display: grid; place-items: center; min-height: 218px; border-radius: 20px; background: linear-gradient(#fffdf4, #f5efd9); }
.dressing-stage .mochi-wrap { width: clamp(200px, 56vw, 240px); height: clamp(200px, 56vw, 240px); margin: 0; }
.dressing-stage .mochi-shadow { width: 68%; left: 16%; }
.dressing-stage .mochi-character { animation: none; }
.dressing-choices { display: flex; gap: 8px; margin: 12px -2px; padding: 3px 2px 9px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.dressing-choice { display: grid; place-items: center; align-content: center; gap: 3px; flex: 0 0 82px; min-height: 76px; padding: 5px; border: 1px solid var(--mochi-border); border-radius: 13px; background: var(--mochi-card-secondary); color: var(--mochi-text); font-size: 10px; font-weight: 800; text-align: center; cursor: pointer; }
.dressing-choice.active { border: 2px solid var(--mochi-primary); background: #e7efcf; }
.dressing-choice-visual { height: 43px; display: grid; place-items: center; font-size: 26px; }
.dressing-choice-visual img { width: 43px; height: 43px; object-fit: contain; image-rendering: pixelated; }
.dressing-footer { position: sticky; bottom: -1px; display: grid; gap: 8px; padding: 10px 1px 1px; background: var(--mochi-card); }
.dressing-footer > strong { font-size: 16px; }
.dressing-footer > span { color: var(--mochi-text-muted); font-size: 13px; }
.dressing-help { margin: 0; color: var(--mochi-text-muted); font-size: 12px; }
.dressing-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dressing-confirm-actions button, .dressing-footer > button { min-height: 48px; }
.dressing-footer button[disabled] { opacity: .8; cursor: not-allowed; }

.reward-sheet { padding: 24px 22px calc(24px + env(safe-area-inset-bottom)); text-align: center; }
.reward-sheet h2 { margin: 4px 0 8px; }
.reward-sheet p { margin: 0 0 12px; color: var(--mochi-text-muted); }
.reward-pop { font-size: 60px; animation: rewardPop .42s ease-out; }
.reward-coins, .reward-seed { display: flex; justify-content: center; align-items: center; margin: 9px 0; font-size: 22px; }
.reward-seed { margin-bottom: 20px; font-size: 17px; }
.reward-coins + .primary-button { margin-top: 20px; }

.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); width: min(calc(100% - 32px), 420px); padding: 12px 15px; border-radius: 14px; background: #3f352e; color: white; text-align: center; opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #873f37; }

@keyframes bob { 50% { transform: translateY(-5px) rotate(1deg); } }
@keyframes mochiBob { 50% { transform: translateY(var(--mochi-bob-distance)) rotate(1deg); } }
@keyframes readyGlow { 50% { box-shadow: 0 5px 0 var(--mochi-soil-dark), 0 0 0 5px rgba(255,234,113,.6); } }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes rewardPop { from { opacity: 0; transform: scale(.55) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }

@media (min-width: 600px) { .app-shell { min-height: calc(var(--app-stable-height, 100dvh) - 28px); margin-top: 14px; margin-bottom: 14px; border-radius: 28px; } }
@media (max-width: 350px) { .plots { gap: 6px; } .plot { padding-inline: 5px; } .plot-name { font-size: 12px; } }
@media (max-width: 390px) { .coins { font-size: 11px; padding-inline: 9px; } .nav-icon-button { min-width: 40px; padding-inline: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
