/* TORCH color palette */
:root {
  --coral:       #ed6767;
  --amber:       #eeb75f;
  --chartreuse:  #eceb67;
  --purple:      #713c97;
  --forest:      #289a48;
  --sage:        #93cc86;
  --soil-dark:   #5c3a1e;
  --soil-mid:    #7a4f2e;
  --soil-light:  #a0673a;
  --near-black:  #2c2c2c;
  --off-white:   #f8f5f0;
  --bg:          #1a3d2b;
  --ring-color:  #289a48;
  --plot-size:   clamp(88px, 28vw, 120px);
  --gap:         12px;
  --font-body:    'Poppins', sans-serif;
  --font-display: 'Playfair Display', serif;
}

/* ── Sky strip ───────────────────────────────────────────────────── */
#sky-strip {
  width: 100%;
  height: 88px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition: background 90s ease;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
#sky-bodies {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sky-body {
  position: absolute;
  font-size: 1.4rem;
  line-height: 1;
  transition: bottom 60s ease, left 60s ease;
  filter: drop-shadow(0 0 6px rgba(255,255,200,0.5));
}
#sky-label {
  font-size: 0.68rem;
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
  padding: 0 12px 8px;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ── Biome theming ───────────────────────────────────────────────── */
body.biome-rainforest {
  --bg:         #1a3d2b;
  --soil-mid:   #7a4f2e;
  --soil-light: #a0673a;
  --ring-color: #289a48;
}
body.biome-savanna {
  --bg:         #2d1f0a;
  --soil-mid:   #8b6535;
  --soil-light: #b07d3a;
  --ring-color: #eeb75f;
}
body.biome-coastal {
  --bg:         #0d2233;
  --soil-mid:   #5a7a8a;
  --soil-light: #7a9aaa;
  --ring-color: #adaed7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--off-white);
  font-family: 'Poppins', sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background 0.8s ease;
}

.hidden { display: none !important; }

/* ── Onboarding ──────────────────────────────────────────────────── */
#onboarding-screen {
  position: fixed;
  inset: 0;
  background: #111d14;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}
#onboarding-screen.visible { opacity: 1; }
#onboarding-screen.ob-fade-out { opacity: 0; }

.ob-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 32px 24px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  animation: ob-slide-up 0.4s ease;
}
@keyframes ob-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ob-welcome .ob-torch-logo {
  height: 40px;
  opacity: 0.75;
  margin-bottom: -8px;
}
.ob-title {
  font-weight: 900;
  font-size: clamp(2.4rem, 10vw, 4rem);
  color: var(--chartreuse);
  letter-spacing: 0.16em;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.ob-tagline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--sage);
  line-height: 1.6;
  max-width: 340px;
}
.ob-question {
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--sage);
  letter-spacing: 0.03em;
}
.ob-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(147, 204, 134, 0.4);
  color: var(--off-white);
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  text-align: center;
  width: 100%;
  max-width: 360px;
  padding: 8px 4px;
  outline: none;
  transition: border-color 0.3s ease;
  caret-color: var(--amber);
}
.ob-input:focus { border-color: var(--amber); }

.ob-btn {
  background: var(--amber);
  color: #1a1a1a;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 100px;
  padding: 14px 36px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.15s ease, background 0.2s ease;
}
.ob-btn:hover { background: #f5c96a; transform: scale(1.03); }
.ob-btn--hidden { opacity: 0; pointer-events: none; }
.ob-btn:not(.ob-btn--hidden) { animation: ob-btn-appear 0.3s ease; }
@keyframes ob-btn-appear {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ob-name-error {
  font-size: 0.78rem;
  color: rgba(255, 120, 100, 0.9);
  margin-top: 6px;
  text-align: center;
  letter-spacing: 0.02em;
}
.ob-name-error.hidden { display: none; }

/* Biome selection */
.ob-biome-screen { gap: 20px; }
.ob-biome-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.ob-biome-card {
  flex: 1 1 130px;
  max-width: 160px;
  border: 2px solid rgba(147, 204, 134, 0.2);
  border-radius: 16px;
  padding: 18px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.25s ease, transform 0.15s ease, background 0.25s ease;
  background: rgba(255,255,255,0.04);
}
.ob-biome-card:hover { transform: scale(1.04); border-color: rgba(238,183,95,0.5); }
.ob-biome-card.selected {
  border-color: var(--amber);
  background: rgba(238,183,95,0.1);
  box-shadow: 0 0 16px rgba(238,183,95,0.2);
}
.ob-biome-emoji { font-size: 2rem; }
.ob-biome-label { font-weight: 900; font-size: 0.85rem; letter-spacing: 0.06em; color: var(--off-white); }
.ob-biome-desc  { font-size: 0.72rem; color: var(--sage); line-height: 1.4; text-align: center; }

/* ── Return overlay ──────────────────────────────────────────────── */
#return-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 29, 20, 0.94);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
#return-overlay.visible { opacity: 1; }
#return-overlay.ob-fade-out { opacity: 0; }
#return-line1 {
  font-weight: 900;
  font-size: clamp(1.6rem, 6vw, 2.8rem);
  color: var(--chartreuse);
  text-align: center;
  padding: 0 24px;
}
#return-line2 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  color: var(--sage);
  text-align: center;
  padding: 0 24px;
}

/* ── Flash overlay ───────────────────────────────────────────────── */
#flash-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 61, 43, 0.88);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
#flash-overlay.visible { opacity: 1; }
#flash-text {
  font-weight: 900;
  font-size: clamp(1.5rem, 6vw, 2.8rem);
  color: var(--chartreuse);
  text-align: center;
  padding: 1rem 2rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}

/* ── Crow gift delivery ──────────────────────────────────────────── */
#crow-container {
  position: fixed;
  top: -100px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.5s ease, top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
#crow-container.visible {
  opacity: 1;
  top: clamp(200px, 35%, 50%);
}
#crow-emoji {
  font-size: 2.4rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  animation: crow-bob 2s ease-in-out infinite alternate;
}
@keyframes crow-bob {
  from { transform: translateY(0) rotate(-5deg); }
  to   { transform: translateY(-8px) rotate(5deg); }
}
#crow-card {
  background: rgba(17, 29, 20, 0.92);
  border: 1px solid var(--amber);
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 170px;
  backdrop-filter: blur(4px);
}
#crow-label {
  font-size: 0.68rem;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}
#crow-seeds {
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--amber);
}

/* ── Butterfly ───────────────────────────────────────────────────── */
#butterfly-container {
  position: fixed;
  top: clamp(200px, 45%, 65%);
  right: -120px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
/* Per-animal entry animations */
#butterfly-container[data-animal="monarch"].visible {
  opacity: 1;
  animation: monarch-float 8s ease-in-out forwards;
}
#butterfly-container[data-animal="bee"].visible {
  opacity: 1;
  animation: bee-visit 5.5s ease-in-out forwards;
}
#butterfly-container[data-animal="ladybug"].visible {
  opacity: 1;
  animation: ladybug-crawl 7s linear forwards;
}
#butterfly-container[data-animal="hummingbird"].visible {
  opacity: 1;
  animation: hummingbird-dart 6.5s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}
#butterfly-container[data-animal="firefly"].visible {
  animation: firefly-fade 8s ease-in-out forwards;
}

/* Per-animal emoji movement */
#butterfly {
  font-size: 3rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
#butterfly-container[data-animal="monarch"] #butterfly { animation: flutter 0.4s ease-in-out infinite alternate; }
#butterfly-container[data-animal="bee"] #butterfly      { animation: buzz 0.12s ease-in-out infinite alternate; }
#butterfly-container[data-animal="ladybug"] #butterfly  { animation: ladybug-step 0.5s ease-in-out infinite alternate; }
#butterfly-container[data-animal="hummingbird"] #butterfly { animation: hum-wings 0.07s linear infinite alternate; }
#butterfly-container[data-animal="firefly"] #butterfly  { animation: firefly-blink 1.4s ease-in-out infinite; }
#wildlife-card {
  background: rgba(26, 61, 43, 0.92);
  border: 1px solid var(--sage);
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 180px;
  backdrop-filter: blur(4px);
}
#wildlife-name {
  font-weight: 900;
  font-size: 0.75rem;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
#wildlife-desc {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--off-white);
  line-height: 1.4;
}

/* Inspecting state — freezes position, expands card, enables pointer events */
#butterfly-container.inspecting {
  animation: none !important;
  pointer-events: auto;
  cursor: pointer;
  position: fixed;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%);
  transition: top 0.4s ease, left 0.4s ease, transform 0.4s ease;
  flex-direction: column;
  gap: 16px;
  opacity: 1;
}
#butterfly-container.inspecting #butterfly {
  font-size: 4.5rem;
  animation: none !important;
  filter: drop-shadow(0 0 20px rgba(147,204,134,0.5));
}
#butterfly-container.inspecting #wildlife-card {
  max-width: 240px;
  text-align: center;
  border-color: var(--amber);
  box-shadow: 0 0 24px rgba(238,183,95,0.25);
}
#butterfly-container.inspecting #wildlife-name {
  font-size: 0.9rem;
}
#butterfly-container.inspecting #wildlife-desc {
  font-size: 0.95rem;
}
#butterfly-container:not(.inspecting).visible {
  pointer-events: auto;
  cursor: zoom-in;
}

/* ── Per-animal travel animations ────────────────────────────────── */
@keyframes monarch-float {
  0%   { opacity: 0; transform: translateX(0) translateY(0); }
  8%   { opacity: 1; }
  20%  { transform: translateX(-230px) translateY(-20px); }
  50%  { transform: translateX(-270px) translateY(28px); }
  80%  { transform: translateX(-210px) translateY(-12px); }
  92%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(0) translateY(0); }
}
@keyframes bee-visit {
  0%   { opacity: 0; transform: translateY(0) translateX(0); }
  10%  { opacity: 1; transform: translateY(110px) translateX(18px); }
  28%  { transform: translateY(190px) translateX(-26px); }
  45%  { transform: translateY(260px) translateX(22px); }
  60%  { transform: translateY(220px) translateX(-18px); }
  75%  { transform: translateY(160px) translateX(10px); }
  88%  { opacity: 1; transform: translateY(80px) translateX(0); }
  100% { opacity: 0; transform: translateY(0); }
}
@keyframes ladybug-crawl {
  0%   { opacity: 0; transform: translate(0, 0); }
  12%  { opacity: 1; transform: translate(90px, -50px); }
  30%  { transform: translate(130px, -130px); }
  50%  { transform: translate(170px, -200px); }
  65%  { transform: translate(155px, -175px); }
  80%  { transform: translate(175px, -220px); }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translate(80px, -280px); }
}
@keyframes hummingbird-dart {
  0%   { opacity: 0; transform: translate(0, 0); }
  6%   { opacity: 1; transform: translate(-170px, 130px); }
  18%  { transform: translate(-210px, 165px); }
  48%  { transform: translate(-210px, 158px); }  /* hover pause */
  68%  { transform: translate(-210px, 170px); }
  82%  { transform: translate(-130px, 110px); }
  92%  { transform: translate(0, 0); opacity: 0.4; }
  100% { opacity: 0; }
}
@keyframes firefly-fade {
  0%   { opacity: 0;   transform: scale(0.85) translateY(0); }
  15%  { opacity: 1;   transform: scale(1) translateY(-6px); }
  30%  { opacity: 0.3; transform: scale(0.92) translateY(0); }
  48%  { opacity: 1;   transform: scale(1.08) translateY(-10px); }
  64%  { opacity: 0.4; transform: scale(0.94) translateY(-2px); }
  78%  { opacity: 1;   transform: scale(1.04) translateY(-8px); }
  92%  { opacity: 0.2; }
  100% { opacity: 0;   transform: scale(0.85); }
}

/* ── Per-animal emoji animations ─────────────────────────────────── */
@keyframes flutter       { from { transform: scaleX(1) rotate(-8deg); } to { transform: scaleX(0.7) rotate(8deg); } }
@keyframes buzz          { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(4deg) translateY(-3px); } }
@keyframes ladybug-step  { from { transform: rotate(-6deg); } to { transform: rotate(6deg) translateY(-2px); } }
@keyframes hum-wings     { from { transform: scaleX(1); } to { transform: scaleX(0.45); } }
@keyframes firefly-blink {
  0%,100% { filter: drop-shadow(0 0 2px rgba(255,255,120,0.4)); opacity: 0.7; }
  50%     { filter: drop-shadow(0 0 14px rgba(255,255,80,1)); opacity: 1; }
}

/* ── Weather overlay ─────────────────────────────────────────────── */
#weather-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  transition: opacity 2s ease;
  overflow: hidden;
}

/* Rain */
#weather-overlay.rain::before {
  content: '';
  position: absolute;
  inset: -60px 0 0;
  background: repeating-linear-gradient(
    165deg,
    transparent 0,
    transparent 4px,
    rgba(140, 200, 255, 0.12) 4px,
    rgba(140, 200, 255, 0.12) 5px
  );
  background-size: 18px 60px;
  animation: rain-fall 0.45s linear infinite;
}
#weather-overlay.rain::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(100, 140, 200, 0.06);
}
@keyframes rain-fall {
  from { transform: translateY(-60px); }
  to   { transform: translateY(0); }
}

/* Mist */
#weather-overlay.mist::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(180,210,230,0.12) 0%, transparent 65%),
              radial-gradient(ellipse at 70% 30%, rgba(180,210,230,0.08) 0%, transparent 60%);
  animation: mist-drift 12s ease-in-out infinite alternate;
}
@keyframes mist-drift {
  from { transform: translateX(-12px) translateY(0); opacity: 0.7; }
  to   { transform: translateX(12px) translateY(-8px); opacity: 1; }
}

/* ── Status bar ──────────────────────────────────────────────────── */
#status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  z-index: 60;
}
#status-text {
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--sage);
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
}
#status-text.visible { opacity: 1; }

/* ── Sticky chrome wrapper ───────────────────────────────────────── */
#game-chrome {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ── Homestead horizon — inside sky strip, at the bottom ─────────── */
#homestead-horizon {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  z-index: 3;
  white-space: nowrap;
}
.horizon-tree {
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.45));
  flex-shrink: 0;
}
.horizon-tree:last-child {
  font-size: 0.75rem; /* small plant/leaves on right side */
}
.horizon-home {
  font-size: 1.5rem;
  filter: drop-shadow(0 1px 5px rgba(0,0,0,0.5));
  flex-shrink: 0;
}
#horizon-garden-name {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: clamp(0.72rem, 2.5vw, 0.9rem);
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 5px rgba(0,0,0,0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* ── Earthkin logo in identity bar ───────────────────────────────── */
.earthkin-logo-bar {
  height: 22px;
  width: auto;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35));
  flex-shrink: 0;
}
.torch-logo {
  height: 36px;
  width: auto;
  opacity: 0.88;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
}
@media (min-width: 640px) { .torch-logo { height: 44px; } }

/* ── Menu pill button (replaces gear icon) ───────────────────────── */
.menu-pill-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  padding: 4px 12px 4px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.menu-pill-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}

/* ── Garden identity bar ─────────────────────────────────────────── */
#garden-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 12px;
  border-bottom: 1px solid rgba(147, 204, 134, 0.1);
  flex-shrink: 0;
  flex-wrap: nowrap;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.id-cluster {
  display: flex;
  align-items: center;
  gap: 2px;
}
.id-center {
  flex: 1;
  justify-content: center;
  gap: 6px;
}

/* Narrow screens: hide labels, tighten gaps */
@media (max-width: 480px) {
  .icon-btn { padding: 2px 3px; }
  .icon-btn-label { display: none; }
  .menu-pill-btn { padding: 4px 8px !important; font-size: 0.72rem !important; }
}
#weather-badge {
  background: none;
  border: none;
  padding: 2px 8px 4px;
  border-radius: 10px;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 0.68rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
#weather-badge:hover { background: rgba(255,255,255,0.12); }

/* ── Header sound button ─────────────────────────────────────────── */
/* ── Weather tooltip card ────────────────────────────────────────── */
#weather-tooltip {
  position: fixed;
  z-index: 300;
  background: #111d14;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 14px 16px;
  width: 210px;
  transform: translateX(-50%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.2s;
}
#weather-tooltip.visible { opacity: 1; }
#wt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 4px;
}
#wt-cond {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--off-white);
}
#wt-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  transition: color 0.2s;
}
#wt-close:hover { color: var(--sage); }
#wt-temp {
  font-size: 0.8rem;
  color: var(--amber);
  margin: 0 0 8px;
}
#wt-growth {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.6);
  margin: 0 0 12px;
  line-height: 1.45;
}
#wt-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 10px;
}
#wt-real-toggle { accent-color: var(--sage); cursor: pointer; }

#wt-forecast {
  margin: 0 0 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
#wt-forecast-summary {
  font-size: 0.76rem;
  color: var(--off-white);
  margin: 0 0 8px;
  line-height: 1.4;
}
#wt-hours {
  display: flex;
  gap: 4px;
}
.wt-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.wt-hour-label {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}
.wt-hour-icon { font-size: 0.95rem; line-height: 1; }
.wt-hour-prob {
  font-size: 0.62rem;
  color: var(--amber);
  min-height: 0.9em;
}
#wt-location-blocked {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

#identity-garden-name {
  font-weight: 900;
  font-size: 0.82rem;
  color: var(--off-white);
  letter-spacing: 0.04em;
}
#identity-season, #identity-player-name {
  font-weight: 300;
  font-size: 0.78rem;
  color: var(--sage);
}
.identity-sep {
  font-size: 0.7rem;
  color: rgba(147, 204, 134, 0.35);
}

/* ── Main layout ─────────────────────────────────────────────────── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 10px 16px 80px;
}
@media (min-width: 640px) {
  main {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 24px 80px;
    gap: 40px;
  }
}

/* ── Garden grid ─────────────────────────────────────────────────── */
#garden-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
#garden-grid {
  display: grid;
  grid-template-columns: repeat(3, var(--plot-size));
  gap: var(--gap);
}

/* ── Individual plot ─────────────────────────────────────────────── */
.plot {
  width: var(--plot-size);
  height: var(--plot-size);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  background: radial-gradient(circle at 40% 35%, var(--soil-light), var(--soil-mid) 60%, var(--soil-dark));
  border: 2px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.plot:hover { transform: scale(1.04); border-color: rgba(238, 183, 95, 0.5); }
.plot.can-plant {
  cursor: crosshair;
  box-shadow: 0 0 0 2px rgba(238, 183, 95, 0.35);
}
.plot.can-plant:hover { box-shadow: 0 0 0 3px rgba(238, 183, 95, 0.7); }
.plot.stage-4 {
  border-color: var(--amber);
  box-shadow: 0 0 20px rgba(238, 183, 95, 0.45), 0 0 40px rgba(238, 183, 95, 0.15);
}

.plot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    var(--ring-color) calc(var(--progress, 0) * 1%),
    transparent 0
  );
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.plot.growing::before { opacity: 1; }

.plot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--soil-light), var(--soil-mid) 60%, var(--soil-dark));
  z-index: 1;
}

.plant-render {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  user-select: none;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.plant-render svg { width: 100%; height: 100%; display: block; overflow: visible; }
.stage-1 .plant-render { width: calc(var(--plot-size) * 0.40); height: calc(var(--plot-size) * 0.53); filter: drop-shadow(0 0 4px rgba(255,255,200,0.5)); }
.stage-2 .plant-render { width: calc(var(--plot-size) * 0.52); height: calc(var(--plot-size) * 0.69); }
.stage-3 .plant-render { width: calc(var(--plot-size) * 0.62); height: calc(var(--plot-size) * 0.83); }
.stage-4 .plant-render { width: calc(var(--plot-size) * 0.72); height: calc(var(--plot-size) * 0.96); }
.plant-render.mystery { filter: brightness(0.2) saturate(0); }

@keyframes pop {
  0%   { transform: translate(-50%, -50%) scale(0.7); }
  60%  { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1.0); }
}
.plot.just-grew .plant-render { animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes plant-drop {
  0%   { opacity: 0; transform: translate(-50%, -60%) scale(0); }
  70%  { transform: translate(-50%, -48%) scale(1.15); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.plot.just-planted .plant-render { animation: plant-drop 0.5s ease-out; }

.plot.harvestable { cursor: grab; }
.plot.harvestable:hover {
  box-shadow: 0 0 0 3px rgba(238, 183, 95, 0.8), 0 0 24px rgba(238, 183, 95, 0.3);
  transform: scale(1.06);
}
.plot.harvestable .plant-render {
  animation: breathe 2.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    filter: drop-shadow(0 0 0px rgba(238,183,95,0)); }
  50%       { transform: translate(-50%, -54%) scale(1.1); filter: drop-shadow(0 0 8px rgba(238,183,95,0.6)); }
}

@keyframes harvest-burst {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50%  { transform: translate(-50%, -60%) scale(1.3); opacity: 0.6; }
  100% { transform: translate(-50%, -80%) scale(0); opacity: 0; }
}
.plot.just-harvested .plant-render { animation: harvest-burst 0.45s ease-in forwards; }

/* ── Seed panel ──────────────────────────────────────────────────── */
#seed-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 280px;
}
#seed-panel h2 {
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--sage);
  text-transform: uppercase;
}
#inventory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.seed-item {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(147, 204, 134, 0.2);
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  user-select: none;
}
.seed-item:hover { transform: scale(1.04); border-color: rgba(238, 183, 95, 0.5); }
.seed-item.selected {
  background: rgba(238, 183, 95, 0.15);
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(238, 183, 95, 0.2);
}
.seed-item.empty {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.seed-item.locked {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
  filter: grayscale(1);
}
.seed-emoji  { font-size: 1.8rem; }
.seed-name   { font-weight: 900; font-size: 0.65rem; letter-spacing: 0.06em; color: var(--off-white); text-align: center; }
.seed-count  { font-size: 0.75rem; color: var(--amber); font-weight: 400; }

/* ── Drag-and-drop ───────────────────────────────────────────────── */
.plot.drop-target {
  box-shadow: 0 0 0 4px var(--amber), 0 0 24px rgba(238,183,95,0.5);
  transform: scale(1.06);
  border-color: var(--amber);
}
.drag-ghost {
  position: fixed;
  z-index: 999;
  font-size: 2.8rem;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transform: rotate(-8deg) scale(1.1);
  transition: none;
  user-select: none;
}

.hint-text {
  font-size: 0.75rem;
  color: rgba(147, 204, 134, 0.6);
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

/* ── Homestead strip ─────────────────────────────────────────────── */
#homestead-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 10px;
  width: 100%;
  max-width: calc(3 * var(--plot-size) + 2 * var(--gap));
}
#homestead-home {
  font-size: 2rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  flex-shrink: 0;
}
#homestead-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
#homestead-garden-name {
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--off-white);
  letter-spacing: 0.04em;
}
#homestead-season-label {
  font-size: 0.72rem;
  color: var(--sage);
  font-weight: 300;
}

/* ── Garden scene (position context for character + grid) ────────── */
#garden-scene {
  position: relative;
  width: calc(3 * var(--plot-size) + 2 * var(--gap));
}

/* ── Player character ────────────────────────────────────────────── */
.character {
  position: absolute;
  font-size: 2rem;
  z-index: 10;
  top: 0;
  left: 0;
  pointer-events: none;
  transform: translate(0, 0);
  transition: none;
  user-select: none;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.character[data-facing="left"] { transform-origin: center; }

@keyframes char-walk-bob {
  0%, 100% { margin-top: 0; }
  50%       { margin-top: -4px; }
}
.character.char-walking {
  animation: char-walk-bob 0.28s ease-in-out infinite;
}

@keyframes char-act {
  0%   { transform: scale(1) rotate(0deg); }
  30%  { transform: scale(1.25) rotate(-12deg); }
  60%  { transform: scale(0.9) rotate(8deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.character.char-act {
  animation: char-act 0.38s ease-in-out;
}

@keyframes char-idle-breathe {
  0%, 100% { margin-top: 0; }
  50%       { margin-top: -4px; }
}
.character.char-idle {
  animation: char-idle-breathe 3s ease-in-out infinite;
}

/* ── Resident animals (wandering through garden) ─────────────────── */
.resident-animal {
  position: absolute;
  font-size: 1.6rem;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  line-height: 1;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35));
}
.resident-animal.resident-visible { opacity: 0.85; }

/* ── Rarity color variables ──────────────────────────────────────── */
:root {
  --rarity-common:   #289a48;
  --rarity-rare:     #d4a843;
  --rarity-legendary:#8b3fcf;
  --rarity-seasonal: #e06030;
}

/* ── Identity bar extras (tokens + new icon buttons) ─────────────── */
#token-display {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--amber);
  letter-spacing: 0.03em;
  text-align: center;
  flex-shrink: 0;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.icon-btn-icon { font-size: 0.88rem; line-height: 1; }
.icon-svg { width: 18px; height: 18px; display: block; color: rgba(255,255,255,0.75); }
.icon-btn-label {
  font-size: 0.5rem;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.icon-btn:hover { opacity: 1; transform: scale(1.1); }
.icon-btn:focus-visible {
  outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 4px; opacity: 1;
}

/* ── Mystery packet cards in inventory ───────────────────────────── */
.seed-item.packet {
  cursor: pointer;
  pointer-events: all;
  opacity: 1;
  filter: none;
  animation: packet-shimmer 2.4s ease-in-out infinite alternate;
}
.seed-item.packet-common  { border-color: var(--rarity-common);    box-shadow: 0 0 10px rgba(40,154,72,0.3); }
.seed-item.packet-rare    { border-color: var(--rarity-rare);      box-shadow: 0 0 14px rgba(212,168,67,0.4); }
.seed-item.packet-legendary { border-color: var(--rarity-legendary); box-shadow: 0 0 18px rgba(139,63,207,0.4); }
.seed-item.packet .seed-name  { color: var(--amber); }
.seed-item.packet .seed-count { color: var(--sage); font-style: italic; font-size: 0.65rem; }
@keyframes packet-shimmer {
  from { transform: scale(1); }
  to   { transform: scale(1.03); }
}

/* ── Mystery plant silhouette ────────────────────────────────────── */
.plant-emoji.mystery {
  filter: drop-shadow(0 0 10px rgba(160, 60, 255, 0.9));
  animation: mystery-pulse 3s ease-in-out infinite;
}
@keyframes mystery-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 0 6px rgba(140, 50, 255, 0.55));
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
    filter: drop-shadow(0 0 18px rgba(190, 90, 255, 1.0));
  }
}

/* ── Shared modal backdrop + panel ───────────────────────────────── */
#wildlife-modal, #badges-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 29, 20, 0.88);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(4px);
}
#wildlife-modal.visible, #badges-modal.visible { opacity: 1; }

#wildlife-panel, #badges-panel {
  background: #111d14;
  border: 1px solid rgba(147, 204, 134, 0.25);
  border-radius: 20px;
  width: min(440px, 92vw);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#wildlife-header, #badges-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(147, 204, 134, 0.12);
  gap: 12px;
}
#wildlife-title, #badges-title {
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--sage);
  text-transform: uppercase;
}
#wildlife-count {
  font-size: 0.72rem;
  color: rgba(147, 204, 134, 0.5);
  flex: 1;
  text-align: right;
  margin-right: 8px;
}
#wildlife-close, #badges-close {
  background: none;
  border: none;
  color: rgba(147, 204, 134, 0.5);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.2s ease;
  line-height: 1;
}
#wildlife-close:hover, #badges-close:hover { color: var(--sage); }

/* ── Wildlife collection grid ────────────────────────────────────── */
#wildlife-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 20px 24px;
  overflow-y: auto;
}
.wildlife-item {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(147, 204, 134, 0.15);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  transition: border-color 0.2s ease;
}
.wildlife-item.met { border-color: rgba(147, 204, 134, 0.35); }
.wildlife-item.rarity-rare.met  { border-color: rgba(212,168,67,0.4); }
.wildlife-item.rarity-legendary.met { border-color: rgba(139,63,207,0.4); }
.wildlife-coll-emoji { font-size: 1.8rem; line-height: 1; }
.wildlife-item.unmet .wildlife-coll-emoji { filter: brightness(0) opacity(0.4); }
.wildlife-coll-name {
  font-weight: 900;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--off-white);
}
.wildlife-item.unmet .wildlife-coll-name { color: rgba(147, 204, 134, 0.4); }
.wildlife-coll-desc {
  font-size: 0.6rem;
  color: rgba(147, 204, 134, 0.55);
  font-style: italic;
  line-height: 1.3;
}

/* ── Trophy wall (badges) grid ───────────────────────────────────── */
#badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 20px 24px;
  overflow-y: auto;
}
.badge-item {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(147, 204, 134, 0.15);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.badge-item.earned { border-color: rgba(147, 204, 134, 0.3); }
.badge-item.rarity-rare.earned     { border-color: rgba(212,168,67,0.45); }
.badge-item.rarity-legendary.earned { border-color: rgba(139,63,207,0.5); box-shadow: 0 0 14px rgba(139,63,207,0.2); }
.badge-item.rarity-seasonal.earned { border-color: rgba(224,96,48,0.45); }
.badge-item.locked { opacity: 0.38; filter: grayscale(0.8); }
.badge-emoji { font-size: 1.8rem; line-height: 1; }
.badge-name  { font-weight: 900; font-size: 0.62rem; letter-spacing: 0.05em; color: var(--off-white); }
.badge-desc  { font-size: 0.58rem; color: rgba(147, 204, 134, 0.55); font-style: italic; line-height: 1.3; }

/* ── Badge earned toast (top-right) ──────────────────────────────── */
#badge-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 140;
  border-radius: 12px;
  padding: 12px 16px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  max-width: 220px;
  background: rgba(26, 61, 43, 0.95);
  border: 1px solid rgba(147, 204, 134, 0.3);
  backdrop-filter: blur(6px);
}
#badge-toast.visible {
  opacity: 1;
  transform: translateY(0);
}
#badge-toast.rarity-common    { border-color: var(--rarity-common);    box-shadow: 0 0 16px rgba(40,154,72,0.35); }
#badge-toast.rarity-rare      { border-color: var(--rarity-rare);      box-shadow: 0 0 20px rgba(212,168,67,0.4); }
#badge-toast.rarity-legendary { border-color: var(--rarity-legendary); box-shadow: 0 0 24px rgba(139,63,207,0.45); }
#badge-toast.rarity-seasonal  { border-color: var(--rarity-seasonal);  box-shadow: 0 0 18px rgba(224,96,48,0.35); }

/* ── Ecological fact card ─────────────────────────────────────────── */
#fact-card {
  position: fixed;
  background: rgba(10, 28, 16, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(147, 204, 134, 0.25);
  border-radius: 14px;
  padding: 12px 16px;
  max-width: 300px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 55;
  cursor: pointer;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
#fact-card.visible {
  opacity: 1;
  pointer-events: auto;
}
#fact-plant-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1.1;
}
#fact-text {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  margin: 0;
  font-style: italic;
}
#badge-toast-text {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--off-white);
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge-toast-emoji { font-size: 1.2rem; }

/* ── Mute button ─────────────────────────────────────────────────── */
#mute-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.15s ease;
  line-height: 1;
}
#mute-btn:hover { opacity: 1; transform: scale(1.15); }

/* ── Skin tone picker (onboarding) ───────────────────────────────── */
.ob-skin-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.ob-skin-btn {
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(147,204,134,0.2);
  border-radius: 12px;
  padding: 10px;
  font-size: 2rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
  line-height: 1;
}
.ob-skin-btn:hover { transform: scale(1.1); border-color: rgba(238,183,95,0.5); }
.ob-skin-btn.selected {
  border-color: var(--amber);
  background: rgba(238,183,95,0.12);
  box-shadow: 0 0 12px rgba(238,183,95,0.25);
}

/* ── Discoveries button (✦ in identity bar) ──────────────────────── */
#discoveries-btn {
  background: none;
  border: none;
  color: var(--amber);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.15s ease;
  line-height: 1;
}
#discoveries-btn:hover { opacity: 1; transform: scale(1.2); }

/* ── Discoveries modal ───────────────────────────────────────────── */
#discoveries-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 29, 20, 0.88);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(4px);
}
#discoveries-modal.visible { opacity: 1; }

#discoveries-panel {
  background: #111d14;
  border: 1px solid rgba(147, 204, 134, 0.25);
  border-radius: 20px;
  width: min(420px, 90vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#discoveries-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(147, 204, 134, 0.12);
}

#discoveries-title {
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--sage);
  text-transform: uppercase;
}

#discoveries-close {
  background: none;
  border: none;
  color: rgba(147, 204, 134, 0.5);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.2s ease;
  line-height: 1;
}
#discoveries-close:hover { color: var(--sage); }

#discoveries-list {
  list-style: none;
  overflow-y: auto;
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.disc-entry {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.disc-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--off-white);
  line-height: 1.5;
}
.disc-date {
  font-size: 0.7rem;
  color: rgba(147, 204, 134, 0.45);
  letter-spacing: 0.04em;
}
.disc-empty {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(147, 204, 134, 0.4);
  text-align: center;
  padding: 12px 0;
}

/* ── Unlock toast ────────────────────────────────────────────────── */
#unlock-toast {
  position: fixed;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(17, 29, 20, 0.92);
  border: 1px solid rgba(238, 183, 95, 0.4);
  border-radius: 100px;
  padding: 10px 20px;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}
#unlock-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#unlock-toast-text {
  font-size: 0.82rem;
  color: var(--amber);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ── Settings modal ──────────────────────────────────────────────── */
#settings-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
  padding: 2px 4px;
}
#settings-btn:hover { opacity: 1; transform: rotate(30deg); }

#settings-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#settings-modal.visible { opacity: 1; pointer-events: all; }

#settings-panel {
  background: #111d14;
  border: 1px solid rgba(238,183,95,0.3);
  border-radius: 18px;
  width: min(420px, 90vw);
  padding: 0;
  overflow: hidden;
}
#settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  color: var(--chartreuse);
  letter-spacing: 0.04em;
}
#settings-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.2s ease;
}
#settings-close:hover { color: var(--sage); }

#settings-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--sage);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.settings-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f8f5f0;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  outline: none;
  transition: border-color 0.2s;
}
.settings-input:focus { border-color: var(--amber); }

#settings-biome-row {
  display: flex;
  gap: 8px;
}
.settings-biome-btn {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 4px;
  color: rgba(255,255,255,0.6);
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.settings-biome-btn.selected {
  background: rgba(238,183,95,0.15);
  border-color: var(--amber);
  color: var(--amber);
}
.settings-save-btn {
  background: var(--amber);
  color: #111;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.settings-save-btn:hover { opacity: 0.85; }
.settings-reset-btn {
  background: none;
  border: 1px solid rgba(255,80,80,0.3);
  border-radius: 12px;
  padding: 10px;
  color: rgba(255,100,100,0.6);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.settings-reset-btn:hover { border-color: rgba(255,80,80,0.7); color: rgba(255,100,100,0.9); }
.settings-action-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px;
  color: rgba(255,255,255,0.65);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.settings-action-btn:hover { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.9); }

/* ── Garden expand button ────────────────────────────────────────── */
#expand-btn {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: 1px solid rgba(147, 204, 134, 0.3);
  border-radius: 100px;
  color: rgba(147, 204, 134, 0.55);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 6px 18px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
#expand-btn:not(:disabled):hover,
#expand-btn.expand-btn-ready {
  border-color: var(--amber);
  color: var(--amber);
}
#expand-btn:disabled { opacity: 0.38; cursor: default; }

/* ── Settings about link + divider ───────────────────────────────── */
.settings-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin: 4px 0;
}
.settings-about-link {
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 7px 18px;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.2s, color 0.2s;
}
.settings-about-link:hover { border-color: var(--sage); color: var(--sage); }

/* ── Footer ──────────────────────────────────────────────────────── */
#game-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 22px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.05em;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.footer-torch-logo { height: 42px; opacity: 0.85; }
.footer-about-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.55);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.footer-about-btn:hover { border-color: var(--sage); color: var(--sage); }
.footer-donate-link {
  background: var(--amber);
  color: #1a1a0a !important;
  text-decoration: none !important;
  font-weight: 900;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 20px;
  border-radius: 20px;
  transition: opacity 0.2s, transform 0.15s;
}
.footer-donate-link:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── About / Mission modal ───────────────────────────────────────── */
#about-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.35s;
  padding: 16px;
}
#about-modal.visible { opacity: 1; }
#about-panel {
  background: #111d14;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 28px 32px;
  position: relative;
}
#about-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
#about-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
#about-close:hover { color: rgba(255,255,255,0.8); }
#about-torch-logo {
  display: block;
  height: 32px;
  margin: 0 auto 18px;
  opacity: 0.85;
}
#about-title {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 2rem;
  color: var(--chartreuse);
  text-align: center;
  margin: 0 0 6px;
  letter-spacing: 0.08em;
}
#about-tagline {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  margin: 0 0 22px;
}
.about-p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  margin: 0 0 14px;
}
.about-p strong { color: var(--sage); }
#about-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 20px;
  justify-content: center;
}
.about-pillar {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 0.75rem;
  padding: 4px 12px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
}
#about-educator {
  background: rgba(41,154,72,0.1);
  border: 1px solid rgba(41,154,72,0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}
#about-educator p { margin: 0 0 6px; }
#about-educator p:last-child { margin: 0; }
#about-educator strong { color: var(--sage); }
#about-educator a { color: var(--amber); }
#about-donate-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--amber);
  color: #1a1a0a;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 12px;
  transition: opacity 0.2s, transform 0.15s;
  margin-bottom: 10px;
}
#about-donate-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.about-fine {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  margin: 0;
}
#about-legal {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.about-legal-head {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin: 0 0 8px;
}
.about-legal-body {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
  margin: 0 0 6px;
}
.about-legal-body a { color: rgba(255,255,255,0.4); }
.about-legal-body a:hover { color: var(--sage); }

.settings-full-reset-btn { border-color: rgba(255,60,60,0.4); color: rgba(255,80,80,0.7); }
.settings-full-reset-btn:hover { border-color: rgba(255,60,60,0.8); color: rgba(255,80,80,1); }

/* ── Feedback form (in Settings) ─────────────────────────────────── */
.settings-feedback-section { display: flex; flex-direction: column; gap: 8px; }
.settings-feedback-label {
  font-size: 0.7rem; font-weight: 900; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,0.4); margin: 0;
}
#settings-feedback-types { display: flex; gap: 6px; flex-wrap: wrap; }
.feedback-type-btn {
  background: transparent;
  border: 1px solid rgba(147,204,134,0.3);
  border-radius: 20px;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.feedback-type-btn.active,
.feedback-type-btn:hover {
  border-color: var(--sage);
  color: var(--sage);
}
.settings-feedback-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 10px 12px;
  resize: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.settings-feedback-input:focus { outline: none; border-color: var(--sage); }

/* ── Community board modal ───────────────────────────────────────── */
#community-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#community-modal.visible { opacity: 1; pointer-events: auto; }
#community-modal.hidden { display: none; }
#community-panel {
  background: #111d14;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}
#community-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky; top: 0;
  background: #111d14;
  z-index: 2;
}
#community-title {
  font-weight: 900; font-size: 1rem; letter-spacing: 0.05em; color: var(--sage);
}
#community-close {
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 1.1rem; cursor: pointer; padding: 4px 8px;
  transition: color 0.2s;
}
#community-close:hover { color: var(--sage); }

/* Collective score strip */
#community-score {
  display: flex; gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.15);
}
.cs-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 10px 8px; gap: 2px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.cs-item:last-child { border-right: none; }
.cs-icon { font-size: 1.1rem; line-height: 1; }
.cs-label {
  font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); text-align: center; line-height: 1.2;
}
.cs-val {
  font-size: 0.85rem; font-weight: 900; color: var(--sage);
}

/* Community goal bar */
#community-goal {
  padding: 12px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#cg-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
#cg-seats {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sage);
}
#cg-next {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}
#cg-bar-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
#cg-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sage), #a8d88a);
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
#cg-donate {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.38);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  align-self: flex-end;
}
#cg-donate:hover { color: var(--sage); }

/* Daily question */
#community-question-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column; gap: 8px;
}
#community-question-label {
  font-size: 0.65rem; font-weight: 900; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.35); margin: 0;
}
#community-question-text {
  font-family: var(--font-display); font-style: italic;
  font-size: 0.95rem; color: rgba(255,255,255,0.85);
  line-height: 1.5; margin: 0;
}
#community-response {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 10px 12px;
  resize: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
#community-response:focus { outline: none; border-color: var(--sage); }
#community-submit {
  background: var(--sage);
  border: none; border-radius: 10px;
  color: #0f1f10; font-family: var(--font-body);
  font-weight: 900; font-size: 0.85rem;
  padding: 10px 16px; cursor: pointer;
  align-self: flex-end;
  transition: opacity 0.2s;
}
#community-submit:hover { opacity: 0.85; }
#community-submit-status {
  font-size: 0.75rem; color: var(--sage); margin: 0;
  font-style: italic;
}

/* Posts feed */
#community-posts-section { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
#community-posts-label {
  font-size: 0.65rem; font-weight: 900; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.35); margin: 0;
}
#community-posts-list { display: flex; flex-direction: column; gap: 10px; }
.community-post {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(147,204,134,0.12);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.community-post-meta {
  font-size: 0.65rem; color: rgba(255,255,255,0.35);
  display: flex; justify-content: space-between; align-items: baseline;
}
.community-post-name { font-weight: 700; color: var(--sage); }
.community-post-text {
  font-size: 0.85rem; color: rgba(255,255,255,0.8);
  line-height: 1.5; font-style: italic;
}
.community-post-question {
  font-size: 0.65rem; color: rgba(255,255,255,0.25);
  line-height: 1.4;
}
.community-empty {
  font-size: 0.82rem; color: rgba(255,255,255,0.3);
  text-align: center; padding: 20px 0; font-style: italic;
}

/* ── Audio panel ─────────────────────────────────────────────── */
#audio-panel {
  position: fixed;
  z-index: 65;
  background: #111d14;
  border: 1px solid rgba(147,204,134,0.18);
  border-radius: 16px;
  padding: 14px;
  width: 240px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 6px 32px rgba(0,0,0,0.55);
  scrollbar-width: none;
}
#audio-panel::-webkit-scrollbar { display: none; }
.audio-panel-label {
  font-size: 0.55rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: rgba(255,255,255,0.3); margin: 0 0 7px 0;
}
.audio-mode-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5px; margin-bottom: 12px;
}
.audio-mode-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 7px 4px;
  color: rgba(255,255,255,0.65);
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: var(--font-body);
}
.audio-mode-btn.active {
  background: rgba(147,204,134,0.14);
  border-color: var(--sage);
  color: var(--sage);
}
.audio-mode-btn:hover:not(.active) { background: rgba(255,255,255,0.1); }
.audio-src-tabs {
  display: flex; gap: 4px; margin-bottom: 0;
}
.audio-src-btn {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 5px 2px;
  color: rgba(255,255,255,0.55);
  font-size: 0.62rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: var(--font-body);
  white-space: nowrap;
}
.audio-src-btn.active {
  background: rgba(147,204,134,0.14);
  border-color: var(--sage);
  color: var(--sage);
}
.audio-src-btn:hover:not(.active) { background: rgba(255,255,255,0.1); }
.audio-iframe-wrap {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,0.12);
}
.audio-suggest-link {
  display: block;
  margin-top: 7px;
  font-size: 0.58rem;
  color: rgba(147,204,134,0.55);
  text-decoration: none;
  text-align: right;
  letter-spacing: 0.02em;
}
.audio-suggest-link:hover { color: var(--sage); }
.audio-panel-divider {
  border: none; border-top: 1px solid rgba(255,255,255,0.07);
  margin: 10px 0 8px;
}
.audio-mute-btn {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 7px;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-body);
}
.audio-mute-btn:hover { background: rgba(255,255,255,0.1); }

/* ── Seasonal Particles ──────────────────────────────────────── */
#season-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  overflow: hidden;
}
.season-particle {
  position: absolute;
  top: -2em;
  font-size: 1.1rem;
  line-height: 1;
  will-change: transform, opacity;
  user-select: none;
}

@keyframes sp-fall {
  0%   { transform: translateY(0)    rotate(0deg)   translateX(0);    opacity: 0.9; }
  25%  { transform: translateY(25vh) rotate(45deg)  translateX(15px); }
  50%  { transform: translateY(50vh) rotate(90deg)  translateX(-10px); }
  75%  { transform: translateY(75vh) rotate(135deg) translateX(12px); }
  100% { transform: translateY(110vh) rotate(180deg) translateX(-8px); opacity: 0; }
}
@keyframes sp-drift {
  0%   { transform: translateY(0)    rotate(0deg)   translateX(0);    opacity: 0.7; }
  33%  { transform: translateY(30vh) rotate(20deg)  translateX(20px); }
  66%  { transform: translateY(65vh) rotate(-10deg) translateX(-15px); }
  100% { transform: translateY(110vh) rotate(30deg) translateX(8px);  opacity: 0; }
}
@keyframes sp-snow {
  0%   { transform: translateY(0)    translateX(0)   rotate(0deg);   opacity: 0.8; }
  50%  { transform: translateY(50vh) translateX(12px) rotate(180deg); }
  100% { transform: translateY(110vh) translateX(-8px) rotate(360deg); opacity: 0.2; }
}

/* ── Decoration Shop ─────────────────────────────────────────── */
.deco-shop-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 1px 3px;
  opacity: 0.65;
  transition: opacity 0.15s, transform 0.15s;
  line-height: 1;
}
.deco-shop-btn:hover { opacity: 1; transform: scale(1.15); }

.horizon-deco { font-size: 0.9rem; line-height: 1; }

#deco-shop-popover {
  position: fixed;
  z-index: 75;
  width: 260px;
  background: rgba(15, 30, 20, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(147, 204, 134, 0.25);
  border-radius: 14px;
  padding: 14px 14px 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#deco-shop-popover.visible { opacity: 1; }

#deco-shop-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.deco-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.deco-item.deco-owned { opacity: 0.55; }
.deco-emoji { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.deco-info { flex: 1; min-width: 0; }
.deco-name  { display: block; font-size: 0.8rem; font-weight: 700; color: rgba(255,255,255,0.9); }
.deco-effect { display: block; font-size: 0.62rem; color: rgba(255,255,255,0.45); margin-top: 1px; line-height: 1.3; }
.deco-buy-btn {
  flex-shrink: 0;
  background: var(--sage);
  color: #0f230a;
  border: none;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.deco-buy-btn.deco-cant-afford { opacity: 0.4; cursor: not-allowed; }
.deco-buy-btn:not(.deco-cant-afford):hover { opacity: 0.8; }
.deco-complete {
  font-size: 0.72rem;
  color: var(--sage);
  text-align: center;
  padding: 8px 0 2px;
  letter-spacing: 0.03em;
}

/* ── House Upgrade Popover ───────────────────────────────────── */
#house-upgrade-popover {
  position: fixed;
  z-index: 75;
  width: 230px;
  background: rgba(15, 30, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(147, 204, 134, 0.25);
  border-radius: 14px;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#house-upgrade-popover.visible { opacity: 1; }
.hup-title {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 4px;
}
#hup-levels { display: flex; flex-direction: column; gap: 4px; }
.hup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.hup-row-current {
  background: rgba(147,204,134,0.12);
  border: 1px solid rgba(147,204,134,0.25);
}
.hup-row-locked { opacity: 0.45; }
.hup-emoji { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.hup-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hup-row-name { font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.9); }
.hup-badge {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  width: fit-content;
}
.hup-owned   { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.45); }
.hup-current { background: rgba(147,204,134,0.25); color: var(--sage); }
.hup-locked  { background: rgba(255,200,100,0.15); color: var(--amber); }
.hup-btn {
  background: var(--sage);
  color: #0f230a;
  border: none;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.hup-btn:disabled { opacity: 0.45; cursor: not-allowed; background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); }
.hup-btn:not(:disabled):hover { opacity: 0.85; }
.hup-close-btn {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
}
.hup-close-btn:hover { color: rgba(255,255,255,0.7); }
#horizon-home-emoji {
  cursor: pointer;
  transition: transform 0.15s ease;
  display: inline-block;
}
#horizon-home-emoji:hover { transform: scale(1.2); }

/* ── Garden Card ─────────────────────────────────────────────── */
#garden-card-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
#garden-card-modal.visible { opacity: 1; pointer-events: auto; }
#garden-card-overlay {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 20px; max-height: 100vh; overflow-y: auto;
}
#garden-card-inner {
  width: 340px;
  border-radius: 20px;
  padding: 22px 20px 18px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
  position: relative; overflow: hidden;
}
.gc-header {
  display: flex; align-items: center; justify-content: space-between;
}
.gc-logo { height: 22px; width: auto; opacity: 0.9; }
#gc-biome-badge {
  font-size: 0.65rem; color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
}
#gc-garden-name {
  font-family: var(--font-display); font-size: 1.45rem;
  color: #fff; line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
#gc-byline {
  font-size: 0.65rem; color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em; text-transform: uppercase;
}
#gc-plot-grid {
  display: grid; gap: 6px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px; padding: 10px;
  margin: 2px 0;
}
.gc-plot {
  font-size: 1.5rem; text-align: center; line-height: 1.1;
  background: rgba(255,255,255,0.06); border-radius: 8px;
  padding: 6px 4px;
}
.gc-plot-empty { color: rgba(255,255,255,0.15); font-size: 0.85rem; }
#gc-stats {
  display: flex; gap: 0;
  background: rgba(0,0,0,0.2); border-radius: 10px;
}
.gc-stat {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 7px 4px; gap: 1px;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.gc-stat:last-child { border-right: none; }
.gc-stat span:first-child {
  font-size: 0.9rem; font-weight: 900; color: #93cc86;
}
.gc-stat span:last-child {
  font-size: 0.52rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.3);
}
#gc-badge-row {
  display: flex; flex-wrap: wrap; gap: 4px; min-height: 28px;
  align-items: center;
}
.gc-badge-icon { font-size: 1.2rem; }
.gc-no-badges { font-size: 0.65rem; color: rgba(255,255,255,0.25); font-style: italic; }
.gc-footer {
  font-size: 0.55rem; color: rgba(255,255,255,0.25);
  text-align: center; letter-spacing: 0.05em;
  border-top: 1px solid rgba(255,255,255,0.07); padding-top: 8px; margin-top: 2px;
}
#garden-card-actions {
  display: flex; gap: 10px; width: 340px;
}
#gc-save-btn, #gc-close-btn {
  flex: 1; padding: 12px; border-radius: 12px; border: none;
  font-size: 0.82rem; font-family: var(--font-body);
  cursor: pointer; font-weight: 700;
}
#gc-save-btn {
  background: var(--sage); color: #0f1f10;
}
#gc-save-btn:hover { background: #a8dd94; }
#gc-close-btn {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.15);
}
#gc-close-btn:hover { background: rgba(255,255,255,0.15); }

/* Settings garden card button */
.settings-garden-card-btn {
  width: 100%; padding: 11px;
  background: rgba(147,204,134,0.12);
  border: 1px solid rgba(147,204,134,0.25);
  border-radius: 10px;
  color: var(--sage); font-size: 0.82rem;
  font-family: var(--font-body); font-weight: 700;
  cursor: pointer; margin-bottom: 6px;
  transition: background 0.15s;
}
.settings-garden-card-btn:hover { background: rgba(147,204,134,0.2); }
