:root {
  --bg-top: #fbf7ed;
  --bg-mid: #e4f2df;
  --bg-bottom: #f7e7cf;
  --card: rgba(255, 255, 255, 0.72);
  --card-strong: rgba(255, 255, 255, 0.88);
  --text: #22311f;
  --muted: #5f6f5b;
  --accent: #4ca95b;
  --accent-deep: #2f7938;
  --border: rgba(255, 255, 255, 0.55);
  --shadow: 0 22px 50px rgba(61, 78, 54, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.65), transparent 26%),
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 52%, var(--bg-bottom));
}

button {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.top-nav {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.98;
}

.subtitle {
  margin-top: 12px;
  max-width: 540px;
  color: var(--muted);
  font-size: 18px;
}

.layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.plant-card {
  grid-column: span 7;
  background:
    linear-gradient(140deg, rgba(244, 250, 228, 0.95), rgba(217, 241, 215, 0.82) 52%, rgba(251, 230, 202, 0.92));
}

.action-card,
.progress-card,
.unlock-card,
.collection-card {
  background: var(--card-strong);
}

.action-card {
  grid-column: span 5;
}

.progress-card,
.unlock-card {
  grid-column: span 6;
}

.collection-card {
  grid-column: span 12;
}

.badges {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #365033;
  font-size: 13px;
  font-weight: 700;
}

.plant-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 290px;
  margin: 12px 0 10px;
  text-align: center;
}

.plant-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.44);
  filter: blur(2px);
}

.plant-emoji {
  position: relative;
  font-size: 92px;
  z-index: 1;
  transform-origin: bottom center;
  transition: transform 320ms ease;
}

.plant-emoji.bounce {
  transform: scale(1.12) rotate(-6deg);
}

.stage-copy {
  position: relative;
  z-index: 1;
  margin-top: 12px;
}

.stage-copy p {
  margin-top: 8px;
  color: var(--muted);
}

.stats,
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-pill,
.mini-pill {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.55);
}

.stat-pill span,
.mini-pill span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-pill strong,
.mini-pill strong {
  font-size: 18px;
}

.action-copy p,
.section-heading p,
.progress-text {
  color: var(--muted);
}

.primary-button,
.secondary-button,
.ghost-button,
.collection-item {
  border: 0;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  margin: 18px 0 16px;
  padding: 16px 18px;
  border-radius: 20px;
  color: white;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  box-shadow: 0 14px 24px rgba(60, 134, 72, 0.22);
  transition: transform 180ms ease, opacity 180ms ease;
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-button:not(:disabled):active,
.ghost-button:active,
.collection-item:active {
  transform: translateY(1px);
}

.ghost-button {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.58);
  color: var(--text);
  font-weight: 700;
}

.secondary-button {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(84, 146, 92, 0.12);
  color: var(--accent-deep);
  font-weight: 800;
}

.auth-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.62);
}

.auth-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-copy span {
  color: var(--muted);
  font-size: 13px;
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

.hidden {
  display: none;
}

.progress-track {
  width: 100%;
  height: 14px;
  margin: 18px 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.62);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #69bf75, #378841);
  transition: width 280ms ease;
}

.reward-list,
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.reward-item,
.collection-item {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.66);
  text-align: left;
}

.reward-item.locked,
.collection-item.locked {
  opacity: 0.58;
}

.reward-item strong,
.collection-item strong {
  display: block;
  margin-bottom: 6px;
}

.reward-item span,
.collection-item span {
  color: var(--muted);
  font-size: 13px;
}

.collection-group + .collection-group {
  margin-top: 22px;
}

.collection-group h4 {
  margin-bottom: 12px;
}

.collection-item.selected {
  outline: 2px solid rgba(72, 150, 82, 0.42);
  background: rgba(227, 245, 226, 0.88);
}

.login-dialog {
  width: min(520px, calc(100% - 24px));
  border: 0;
  padding: 0;
  border-radius: 28px;
  background: transparent;
}

.login-dialog::backdrop {
  background: rgba(28, 34, 31, 0.34);
  backdrop-filter: blur(4px);
}

.login-panel {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 24px 46px rgba(44, 58, 41, 0.18);
}

.login-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.login-copy,
.login-message {
  color: var(--muted);
}

.login-copy {
  margin: 16px 0;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(53, 79, 55, 0.12);
  background: rgba(245, 249, 242, 0.9);
  font: inherit;
}

.login-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.split-actions {
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 920px) {
  .plant-card,
  .action-card,
  .progress-card,
  .unlock-card,
  .collection-card {
    grid-column: span 12;
  }

  .hero {
    flex-direction: column;
  }

  .hero-actions,
  .auth-banner {
    width: 100%;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .stats,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .reward-list,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .auth-box,
  .auth-banner,
  .login-header {
    flex-direction: column;
    align-items: stretch;
  }
}
