:root {
  color-scheme: light;
  --green-identity: #a8ddb5;
  --green-action: #4caf73;
  --green-deep: #246b45;
  --green-soft: #e9f7ed;
  --blue-water: #8fc7e8;
  --blue-soft: #eaf6fc;
  --gold-xp: #f3c96a;
  --gold-soft: #fff6d9;
  --coral: #f28b82;
  --coral-soft: #ffefed;
  --background: #f7f8f3;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.76);
  --text: #1f2a24;
  --muted: #69746d;
  --line: rgba(31, 42, 36, 0.1);
  --shadow: 0 18px 44px rgba(37, 67, 48, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(168, 221, 181, 0.42), transparent 34rem),
    linear-gradient(180deg, #fbfcf8 0%, var(--background) 100%);
  color: var(--text);
}

button {
  font: inherit;
}

.app-shell {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(247, 248, 243, 0.94));
  box-shadow: 0 0 0 1px rgba(31, 42, 36, 0.04);
}

.screen {
  min-height: 100vh;
  padding: 22px 18px calc(96px + var(--safe-bottom));
}

.screen.garden-screen {
  padding: 0 0 calc(82px + var(--safe-bottom));
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 10vw, 3.25rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.15rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.date-pill,
.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(18px);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(234, 246, 252, 0.96), rgba(255, 255, 255, 0.92)),
    var(--surface);
}

.card-header,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.water-value {
  margin: 14px 0 8px;
  font-size: 2.55rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.unit {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 750;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 42, 36, 0.08);
}

.progress-fill {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-action), var(--blue-water));
}

.progress-fill.gold {
  background: linear-gradient(90deg, var(--gold-xp), #f5da91);
}

.hint {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.42;
}

.primary-action,
.secondary-action,
.quiet-action,
.danger-action,
.chip {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action {
  width: 100%;
  color: white;
  background: linear-gradient(135deg, var(--green-action), var(--green-deep));
  box-shadow: 0 14px 26px rgba(76, 175, 115, 0.26);
}

.secondary-action {
  color: var(--green-deep);
  background: var(--green-soft);
}

.quiet-action {
  color: var(--text);
  background: rgba(31, 42, 36, 0.07);
}

.danger-action {
  width: 100%;
  color: #8a302a;
  background: var(--coral-soft);
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.section {
  margin-top: 18px;
}

.mission-list,
.meal-list,
.history-list,
.settings-list {
  display: grid;
  gap: 10px;
}

.mission,
.meal-item,
.history-item,
.setting-item,
.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.mission-state {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 900;
}

.mission.is-done,
.meal-item.is-done {
  background: rgba(233, 247, 237, 0.76);
}

.mission.is-done .mission-state {
  color: white;
  background: var(--green-action);
}

.mission-copy,
.meal-copy {
  flex: 1;
}

.mission strong,
.meal-item strong,
.history-item strong,
.setting-item strong {
  display: block;
  font-size: 0.95rem;
}

.mission span,
.meal-item span,
.history-item span,
.setting-item span,
.summary-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.xp-badge {
  border-radius: 999px;
  padding: 7px 9px;
  background: var(--gold-soft);
  color: #8a661d;
  font-size: 0.78rem;
  font-weight: 850;
}

.status-pill.done {
  color: var(--green-deep);
  background: var(--green-soft);
}

.section-card {
  padding: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.summary-item {
  display: block;
  min-height: 74px;
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 1.15rem;
}

.tab-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  transform: translateX(-50%);
  padding: 9px 10px calc(9px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px);
}

.tab-button {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.tab-button.is-active {
  color: var(--green-deep);
  background: var(--green-soft);
}

.tab-icon {
  width: 26px;
  height: 26px;
  display: block;
  margin: 0 auto 3px;
  position: relative;
}

.drop-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.drop-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 11px;
  width: 8px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.water-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 14px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: var(--blue-water);
  transform: rotate(-45deg);
  box-shadow: inset -2px -2px 0 rgba(36, 107, 69, 0.08);
}

.water-icon::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  transform: rotate(-45deg);
}

.meal-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 8px;
  height: 20px;
  border-radius: 999px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 3px 0 / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 6px 0 / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 3px 7px / 2px 13px no-repeat;
}

.meal-icon::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 3px;
  width: 3px;
  height: 20px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 -1px 0 0 currentColor;
}

.leaf-icon::before {
  content: "";
  position: absolute;
  inset: 4px 5px;
  border-radius: 70% 0 70% 0;
  background: var(--green-action);
  transform: rotate(-18deg);
}

.profile-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 11px 0 5px currentColor;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.shortcut {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  padding: 12px;
}

.shortcut strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green-deep);
}

.time-blocks {
  display: grid;
  gap: 10px;
}

.time-block {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 10px;
}

.mini-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 42, 36, 0.08);
}

.mini-track span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--green-action);
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.balance-card {
  min-height: 92px;
  border-radius: 20px;
  padding: 13px;
  background: var(--green-soft);
}

.balance-card:nth-child(2) {
  background: #fff5e4;
}

.balance-card:nth-child(3) {
  background: #f2efff;
}

.balance-card:nth-child(4) {
  background: var(--blue-soft);
}

.selector-panel {
  display: grid;
  gap: 14px;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chip {
  color: var(--text);
  background: rgba(31, 42, 36, 0.07);
}

.chip.is-selected {
  color: var(--green-deep);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 2px rgba(76, 175, 115, 0.22);
}

.garden-hero {
  min-height: calc(100vh - 82px - var(--safe-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 22px 18px 18px;
  background:
    linear-gradient(180deg, rgba(234, 246, 252, 0.92), rgba(247, 248, 243, 0.96) 54%),
    var(--background);
}

.garden-scene {
  min-height: 48vh;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
  background:
    linear-gradient(180deg, #dff2fb 0%, #eff9f0 44%, #dbedc9 45%, #b9dc94 100%);
  box-shadow: inset 0 -18px 40px rgba(36, 107, 69, 0.12);
}

.garden-scene.tranquila {
  filter: saturate(0.92);
}

.sun {
  position: absolute;
  top: 26px;
  right: 32px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ffe39b;
  box-shadow: 0 0 40px rgba(243, 201, 106, 0.58);
}

.hill {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 46%;
  border-radius: 50% 50% 0 0;
  background: #9fcd7c;
}

.plot {
  position: absolute;
  bottom: 18px;
  width: 116px;
  height: 44px;
  border-radius: 50%;
  background: #8b6d48;
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.12);
}

.plot.one {
  left: 28px;
}

.plot.two {
  right: 34px;
}

.plant {
  position: absolute;
  bottom: 44px;
  width: 58px;
  height: 96px;
}

.plant.one {
  left: 56px;
}

.plant.two {
  right: 62px;
  bottom: 42px;
  transform: scale(0.82);
}

.plant.is-grown {
  transform: scale(1.06);
}

.plant.two.is-grown {
  transform: scale(0.94);
}

.stem {
  position: absolute;
  left: 27px;
  bottom: 0;
  width: 6px;
  height: 66px;
  border-radius: 999px;
  background: var(--green-deep);
}

.leaf {
  position: absolute;
  width: 28px;
  height: 18px;
  border-radius: 80% 0 80% 0;
  background: var(--green-action);
}

.leaf.left {
  left: 5px;
  bottom: 32px;
  transform: rotate(20deg);
}

.leaf.right {
  right: 2px;
  bottom: 44px;
  transform: rotate(-22deg) scaleX(-1);
}

.flower {
  position: absolute;
  left: 16px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow:
    -17px 0 0 #ffd0cb,
    17px 0 0 #ffd0cb,
    0 -17px 0 #ffd0cb,
    0 17px 0 #ffd0cb;
}

.garden-panel {
  margin-top: -34px;
  position: relative;
  z-index: 2;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
}

.garden-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.stat-card {
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + var(--safe-bottom));
  z-index: 40;
  width: min(420px, calc(100% - 32px));
  transform: translateX(-50%);
  border: 1px solid rgba(36, 107, 69, 0.14);
  border-radius: 999px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--green-deep);
  box-shadow: var(--shadow);
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(20px);
}

@media (min-width: 720px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    border-radius: 34px;
    overflow: hidden;
  }

  .screen {
    min-height: calc(100vh - 48px);
  }

  .garden-hero {
    min-height: calc(100vh - 130px);
  }
}
