/* ─── Reset & Root ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:       #10180f;
  --bark:      #2a1c0f;
  --wood:      #5b3a1f;
  --wood2:     #7a542f;
  --wood3:     #a07848;
  --soil:      #24321f;
  --terra:     #c0614a;
  --terra2:    #d4806a;
  --moss:      #315c36;
  --sage:      #638a5c;
  --leaf:      #86b76a;
  --leaf2:     #c4e69a;
  --cream:     #f5edd8;
  --parchment: #e8d8b8;
  --amber:     #d4a020;
  --amber2:    #f0c840;
  --rust:      #c04020;
  --rust2:     #e06040;
  --sky:       #5090c0;
  --sky2:      #80b8e8;
  --dusk:      #6040a0;
  --dusk2:     #a070d0;
  --blush:     #d06080;
  --blush2:    #f090a8;
  --char:      #081108;
  --panel:     #102014;
  --panel2:    #172b1b;
  --panel3:    #203823;
  --border:    #3c5535;
  --border2:   #6c7f48;
  --muted:     #8fa37a;
  --muted2:    #c1d0a3;
  --wall:      #132313;
  --floor:     #0e1c12;
  --fn: 'Press Start 2P', monospace;
}

html, body {
  height: 100%;
  font-family: var(--fn);
  background: var(--char);
  color: var(--cream);
  font-size: 9.2px;
  line-height: 1.6;
  image-rendering: pixelated;
  overflow: hidden;
}

/* ─── Login ─────────────────────────────────────────────────── */
#login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 24px;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(134,183,106,.18) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(122,84,47,.16) 0%, transparent 50%),
    var(--char);
}

.login-box {
  background: var(--panel2);
  border: 3px solid var(--wood2);
  box-shadow: 6px 6px 0 var(--bark), 0 0 40px rgba(212,160,32,.08);
  padding: 30px 26px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-title {
  font-size: 14px;
  color: var(--leaf2);
  text-align: center;
  text-shadow: 2px 2px 0 var(--moss), 4px 4px 0 var(--bark);
  letter-spacing: 1px;
}

.login-sub { font-size: 6px; color: var(--muted2); text-align: center; line-height: 2.4; }

.px-input {
  font-family: var(--fn);
  font-size: 9px;
  background: var(--panel);
  border: 3px solid var(--border);
  color: var(--cream);
  padding: 9px 10px;
  width: 100%;
  outline: none;
}
.px-input:focus { border-color: var(--sage); }
.px-input::placeholder { color: var(--muted); }

.px-btn {
  font-family: var(--fn);
  font-size: 7px;
  padding: 9px 12px;
  border: 3px solid;
  background: var(--panel3);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--bark);
  color: var(--cream);
  line-height: 1;
  width: 100%;
  position: relative;
  top: 0;
}
.px-btn:hover { filter: brightness(1.15); }
.px-btn:active { top: 3px; box-shadow: 0 1px 0 var(--bark); }
.btn-green { border-color: var(--leaf); color: var(--leaf2); }

.divider { border: none; border-top: 2px solid var(--border); margin: 2px 0; }
.saved-label { font-size: 5.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: 1px; }
.saved-users { display: flex; flex-direction: column; gap: 5px; }

.user-chip {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 2px solid var(--border);
  padding: 7px 10px; cursor: pointer; gap: 8px;
}
.user-chip:hover { border-color: var(--leaf); background: var(--panel2); }
.user-chip-name { font-size: 8px; color: var(--cream); }
.user-chip-info { font-size: 5px; color: var(--muted2); }
.user-del {
  font-size: 6px; color: var(--rust2); cursor: pointer;
  padding: 2px 5px; border: 1px solid var(--rust2); flex-shrink: 0;
}
.user-del:hover { background: var(--rust); color: var(--cream); }

/* ─── Game Shell ─────────────────────────────────────────────── */
#game-screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

header {
  background: #132313;
  border-bottom: 4px solid var(--wood2);
  box-shadow: 0 3px 0 var(--soil);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  z-index: 100;
  background-image: linear-gradient(180deg, #254126 0%, #132313 100%);
}

.logo {
  font-size: 11px;
  color: var(--leaf2);
  text-shadow: 2px 2px 0 var(--moss), 3px 3px 0 var(--bark);
  letter-spacing: 1px;
}
.logo span { color: var(--amber2); }

.hud { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.hud-chip {
  background: var(--panel2);
  border: 2px solid var(--wood2);
  box-shadow: 2px 2px 0 var(--bark);
  padding: 4px 8px;
  font-size: 6px;
  color: var(--amber);
  display: flex; align-items: center; gap: 5px;
}
.hud-val  { color: var(--cream); font-size: 9px; }
.hud-rep  { border-color: var(--dusk2); color: var(--dusk2); }
.hud-user { border-color: var(--leaf);  color: var(--leaf2); }

.rep-bar-outer {
  background: var(--panel2);
  border: 2px solid var(--dusk);
  box-shadow: 2px 2px 0 var(--bark);
  padding: 4px 8px;
  display: flex; align-items: center; gap: 8px;
  min-width: 150px;
}
.rep-label { font-size: 5px; color: var(--dusk2); white-space: nowrap; }
.rep-track {
  flex: 1; height: 7px;
  background: var(--bark);
  border: 1px solid var(--dusk);
  overflow: hidden;
}
.rep-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dusk), var(--dusk2));
  transition: width .6s ease;
}
.rep-pct { font-size: 5px; color: var(--muted2); white-space: nowrap; }

.btn-logout {
  font-family: var(--fn); font-size: 5px; padding: 4px 8px;
  border: 2px solid var(--border); background: transparent; color: var(--muted); cursor: pointer;
}
.btn-logout:hover { border-color: var(--rust2); color: var(--rust2); }

/* ─── Shared labels ──────────────────────────────────────────── */
.sec-label {
  font-size: 5px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-bottom: 7px;
  text-transform: uppercase;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

/* ─── 3-Column Root Layout ───────────────────────────────────── */
.game-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 238px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════
   LEFT — Seed Shop
   ════════════════════════════════════════════════════════════════ */
.panel-left {
  background: var(--panel);
  border-right: 3px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px 10px;
}

.seed-list { display: flex; flex-direction: column; gap: 5px; }

.seed-row {
  display: flex; align-items: center; gap: 8px;
  border: 2px solid var(--border);
  background: var(--panel2);
  padding: 6px 8px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 3px 0 var(--bark);
  top: 0;
}
.seed-row.unlocked:hover {
  border-color: var(--leaf);
  background: var(--panel3);
  filter: brightness(1.08);
}
.seed-row.unlocked:active { top: 2px; box-shadow: 0 1px 0 var(--bark); }
.seed-row.sel-seed {
  border-color: var(--amber);
  background: #2e2408;
  box-shadow: 0 3px 0 var(--bark), 0 0 8px rgba(212,160,32,.3);
}
.seed-row.broke    { opacity: .4; cursor: not-allowed; }
.seed-row.broke:hover { border-color: var(--border); background: var(--panel2); top: 0; box-shadow: 0 3px 0 var(--bark); filter: none; }
.seed-row.locked   { background: var(--panel); border-color: var(--border); cursor: not-allowed; opacity: .55; }

.seed-sprite { font-size: 16px; min-width: 20px; text-align: center; flex-shrink: 0; }
.seed-info   { flex: 1; min-width: 0; }
.seed-name   { font-size: 6px; color: var(--cream); margin-bottom: 2px; }
.seed-sub    { font-size: 4.5px; color: var(--muted2); }
.seed-price  { font-size: 7px; color: var(--amber); white-space: nowrap; text-align: right; }

.lock-badge  { position: absolute; top: 0; right: 0; bottom: 0; display: flex; align-items: center; padding-right: 8px; }
.lock-icon   { font-size: 10px; color: var(--border2); }
.unlock-req  { font-size: 4.5px; color: var(--muted); margin-top: 3px; line-height: 1.8; }

.tier-tag { font-size: 4px; padding: 1px 4px; border: 1px solid; display: inline-block; margin-top: 3px; }
.tier-0 { border-color: var(--sage);  color: var(--leaf2); }
.tier-1 { border-color: var(--sky);   color: var(--sky2); }
.tier-2 { border-color: var(--dusk);  color: var(--dusk2); }
.tier-3 { border-color: var(--amber); color: var(--amber2); }
.tier-4 { border-color: var(--blush); color: var(--blush2); }

/* ════════════════════════════════════════════════════════════════
   CENTRE
   ════════════════════════════════════════════════════════════════ */
.panel-centre {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background: var(--floor);
}

/* ── Display Shelf ── */
.display-shelf-wrap {
  border-bottom: 4px solid var(--wood2);
  padding: 9px 12px 7px;
  flex-shrink: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0, rgba(255,255,255,.035) 2px, transparent 2px, transparent 40px),
    linear-gradient(180deg, #264529 0%, #1c331f 55%, #152615 100%);
}

.display-shelf-label {
  font-size: 5px;
  color: var(--leaf2);
  letter-spacing: 1.5px;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.display-shelf {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.disp-slot {
  width: 80px;
  height: 96px;
  border: 2px solid var(--wood2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 4px 6px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  background: var(--panel);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.4), 2px 2px 0 var(--bark);
  top: 0;
}
.disp-slot:active { top: 2px; box-shadow: inset 0 -1px 0 rgba(0,0,0,.4); }
.disp-empty  { border-color: var(--border); border-style: dashed; opacity: .4; cursor: default; }
.disp-occupied { border-color: var(--wood2); }
.disp-occupied:hover {
  border-color: var(--amber);
  filter: brightness(1.12);
}
.disp-selected {
  border-color: var(--amber2) !important;
  box-shadow: 0 0 0 2px var(--amber2), 2px 4px 0 var(--bark) !important;
}
.disp-slot.disp-wanted {
  animation: wantedGlow 1.8s ease-in-out infinite;
}
@keyframes wantedGlow {
  0%,100% { box-shadow: inset 0 -3px 0 rgba(0,0,0,.4), 2px 2px 0 var(--bark); }
  50%     { box-shadow: inset 0 -3px 0 rgba(0,0,0,.4), 2px 2px 0 var(--bark), 0 0 14px rgba(212,160,32,.55); }
}

.disp-svg { width: 100%; flex: 1; display: flex; align-items: flex-end; }
.disp-svg svg { width: 100%; height: 100%; }
.disp-name  { font-size: 4px; color: var(--muted2); text-align: center; margin-top: 3px; }
.disp-price {
  font-size: 6px; color: var(--amber); text-align: center; margin-top: 2px;
  background: var(--bark); padding: 1px 4px; border: 1px solid var(--wood2);
}
.disp-bonus { color: var(--leaf2); font-size: 4px; }
.disp-empty-label { font-size: 4px; color: var(--border2); margin-bottom: 30px; }

.disp-badge {
  position: absolute; top: -9px; right: -3px;
  font-size: 4px; padding: 2px 5px; border: 2px solid; box-shadow: 2px 2px 0 var(--bark);
}
.disp-badge-req { background: var(--amber); border-color: var(--amber2); color: var(--bark); }

/* ── Centre Lower ── */
.centre-lower {
  flex: 1;
  display: block;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

/* ── Walkway ── */
.walkway {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-top: 3px solid var(--soil);
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(0deg, transparent 0, transparent 15px, rgba(0,0,0,.12) 15px, rgba(0,0,0,.12) 16px),
    radial-gradient(circle at 50% 18%, rgba(196,230,154,.08), transparent 34%),
    linear-gradient(180deg, #172f1d 0%, #132516 58%, #0f1b10 100%);
}

.walkway::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 180px; height: 100%;
  background: linear-gradient(180deg, rgba(255,220,120,.06) 0%, transparent 70%);
  pointer-events: none;
}

.walkway::after {
  content: '🌿';
  position: absolute;
  bottom: 8px; right: 12px;
  font-size: 28px;
  opacity: .09;
}

.walkway-label {
  position: absolute;
  top: 8px; left: 12px;
  font-size: 4.5px;
  color: rgba(255,255,255,.1);
  letter-spacing: 2px;
}

.zogton-guide {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 58;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  width: min(374px, calc(100vw - 28px));
  opacity: 0;
  transform: translateY(18px) scale(.98);
  pointer-events: none;
  transition:
    opacity .28s steps(4, end),
    transform .28s steps(4, end);
}

.zogton-guide.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.zogton-guide.is-hiding {
  opacity: 0;
  transform: translateY(20px) scale(.98);
}

.zogton-bubble {
  max-width: min(258px, calc(100% - 86px));
  min-height: 68px;
  padding: 15px 13px 12px;
  color: #20300f;
  font-size: 6.5px;
  line-height: 1.7;
  background:
    linear-gradient(180deg, rgba(246, 237, 216, .98), rgba(229, 255, 186, .94));
  border: 3px solid rgba(99, 138, 92, .96);
  box-shadow:
    3px 4px 0 rgba(42, 28, 15, .76),
    inset 0 2px 0 rgba(255, 255, 255, .36),
    inset 0 -3px 0 rgba(99, 138, 92, .16);
  position: relative;
}

.zogton-bubble::before {
  content: 'ZOGTON';
  position: absolute;
  left: 9px;
  top: -10px;
  padding: 4px 7px;
  color: #e5ffba;
  font-size: 4.8px;
  line-height: 1;
  letter-spacing: 1px;
  background: #183519;
  border: 2px solid rgba(99, 138, 92, .96);
  box-shadow: 2px 2px 0 rgba(42, 28, 15, .72);
}

.zogton-bubble::after {
  content: '';
  position: absolute;
  right: -12px;
  bottom: 16px;
  width: 14px;
  height: 14px;
  background: #e5ffba;
  border-right: 3px solid rgba(99, 138, 92, .92);
  border-bottom: 3px solid rgba(99, 138, 92, .92);
  transform: rotate(-45deg);
}

.zogton-sprite-wrap {
  width: 78px;
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 auto;
  filter:
    drop-shadow(0 6px 0 rgba(0, 0, 0, .34))
    drop-shadow(0 0 12px rgba(196, 230, 154, .12));
}

.zogton-sprite {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.zogton-fallback {
  padding: 8px 9px;
  color: var(--leaf2);
  font-size: 7px;
  line-height: 1;
  background: rgba(16, 32, 20, .94);
  border: 3px solid var(--leaf);
  box-shadow: 3px 4px 0 rgba(42, 28, 15, .72);
}

.customer {
  position: absolute;
  bottom: 10px; right: -100px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: custWalk 4.5s ease-in-out forwards;
  filter: drop-shadow(2px 4px 0 rgba(0,0,0,.4));
}
@keyframes custWalk {
  0%   { right: -100px; opacity: 0; }
  8%   { opacity: 1; }
  35%  { right: 42%; }
  55%  { right: 42%; }
  90%  { right: 110%; opacity: 1; }
  100% { right: 110%; opacity: 0; }
}
.customer-happy .cust-sprite { animation: happyBounce .35s steps(2) infinite; }
@keyframes happyBounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

.cust-bubble {
  background: var(--cream); color: var(--ink);
  font-size: 5px; padding: 4px 8px;
  border: 2px solid var(--muted); box-shadow: 2px 3px 0 var(--bark);
  white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis;
  position: relative; line-height: 1.8;
}
.cust-bubble::after {
  content: '';
  position: absolute; bottom: -7px; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--muted);
}
.cust-sprite { font-size: 26px; }
.cust-plant  { font-size: 16px; margin-top: -5px; }

/* ── Info Panel ── */
.info-panel {
  position: relative;
  z-index: 2;
  height: calc(100% - 22px);
  margin: 11px 12px;
  background: transparent;
  border-left: 0;
  display: grid;
  grid-template-columns: minmax(218px, 0.86fr) minmax(286px, 1.14fr);
  grid-template-rows: minmax(330px, auto) auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.info-section {
  min-height: 0;
  padding: 10px 11px;
  border: 2px solid rgba(84, 114, 74, 0.82);
  background:
    linear-gradient(180deg, rgba(20, 42, 22, 0.94), rgba(10, 23, 12, 0.94));
  box-shadow:
    3px 4px 0 rgba(42, 28, 15, 0.46),
    inset 0 1px 0 rgba(246, 237, 216, 0.05);
  overflow: hidden;
}

.info-panel > .info-section:first-child {
  grid-column: 1;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
}

.info-panel > .info-section:first-child #request-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.info-detail {
  grid-column: 2;
  grid-row: 1;
  padding: 0;
  min-height: 330px;
}

.info-panel > .info-section:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
  min-height: 188px;
}

.info-log {
  grid-column: 2;
  grid-row: 3;
  min-height: 0;
  display: flex; flex-direction: column;
  padding: 10px 11px;
}
.info-log .log-box { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }

/* Customer Requests */
.req-hint-inline { font-size: 4px; color: var(--amber); margin-left: 5px; }

.req-empty {
  font-size: 5px; color: var(--muted); text-align: center;
  padding: 12px 8px; line-height: 2.4;
  background: var(--panel2); border: 2px dashed var(--border);
  white-space: pre-line;
}

.req-card {
  background: var(--panel2); border: 2px solid var(--border);
  box-shadow: 0 2px 0 var(--bark);
  padding: 8px 9px; display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 6px;
}
.req-card:last-child { margin-bottom: 0; }
.req-card.req-fillable {
  border-color: var(--amber);
  animation: req-pulse 2s ease-in-out infinite;
}
@keyframes req-pulse {
  0%,100% { box-shadow: 0 2px 0 var(--bark), 0 0 4px rgba(212,160,32,.1); }
  50%     { box-shadow: 0 2px 0 var(--bark), 0 0 14px rgba(212,160,32,.45); }
}
.req-card.req-warn   { border-color: var(--rust2); }
.req-card.req-urgent { border-color: var(--rust); animation: req-urgent .6s step-end infinite; }
@keyframes req-urgent { 0%,100%{border-color:var(--rust)} 50%{border-color:var(--panel2)} }

.req-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1px; }
.req-name   { font-size: 7px; color: var(--cream); }
.req-timer  { font-size: 5.5px; color: var(--muted2); }
.req-timer-urgent { color: var(--rust2); animation: blink-text .5s step-end infinite; }
@keyframes blink-text { 0%,100%{opacity:1} 50%{opacity:.3} }
.req-msg    { font-size: 5px; color: var(--muted2); line-height: 2; }

.req-plant {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel3); padding: 6px 7px; border: 1px solid var(--border2);
  position: relative;
}
.req-sprite      { font-size: 16px; flex-shrink: 0; }
.req-plant-info  { flex: 1; min-width: 0; }
.req-plant-name  { font-size: 6.5px; color: var(--cream); margin-bottom: 3px; }
.req-pay         { font-size: 4.5px; color: var(--muted2); margin-bottom: 2px; }
.req-bonus       { color: var(--leaf2); }
.req-total       { font-size: 7px; color: var(--amber); }
.req-ready-badge {
  position: absolute; top: -8px; right: -3px;
  background: var(--amber); border: 2px solid var(--amber2);
  box-shadow: 2px 2px 0 var(--bark); color: var(--bark);
  font-size: 4.5px; padding: 2px 5px;
}

/* Detail Panel */
.detail-wrap {
  background: var(--panel);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}
.detail-head {
  background: var(--panel2); border-bottom: 2px solid var(--border);
  padding: 7px 12px; font-size: 6px; color: var(--leaf2); letter-spacing: .5px;
}
.detail-body { padding: 12px; }
.detail-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; color: var(--muted);
  font-size: 5.5px; padding: 16px; text-align: center; line-height: 2.2;
}
.detail-name  { font-size: 9px; color: var(--cream); margin-bottom: 3px; line-height: 1.4; }
.detail-stage { font-size: 6px; margin-bottom: 2px; }

.detail-svg-big {
  width: 56px; height: 72px; flex-shrink: 0;
  background: var(--panel2); border: 2px solid var(--border);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.3);
}
.detail-svg-big svg { width: 100%; height: 100%; }

.px-bar-label { font-size: 4.5px; color: var(--muted); margin-bottom: 2px; letter-spacing: .5px; }
.px-bar-wrap {
  background: var(--bark); border: 1px solid var(--border);
  height: 8px; position: relative; overflow: hidden; margin-bottom: 6px;
}
.px-bar-fill { height: 100%; transition: width .6s ease; }
.px-bar-pct { position: absolute; right: 3px; top: 1px; font-size: 5px; color: rgba(255,255,255,.7); }

.detail-chips { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; margin: 8px 0; }
.dchip { background: var(--panel2); border: 1px solid var(--border2); padding: 5px 6px; font-size: 4.5px; color: var(--muted2); text-align: center; }
.dchip strong { display: block; font-size: 9px; color: var(--cream); margin-bottom: 2px; line-height: 1; }

.action-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.px-btn-sm {
  font-family: var(--fn); font-size: 6px; padding: 7px 10px;
  border: 2px solid; background: var(--panel3); cursor: pointer;
  box-shadow: 0 3px 0 var(--bark); color: var(--cream); line-height: 1;
  position: relative; top: 0;
}
.px-btn-sm:hover  { filter: brightness(1.15); }
.px-btn-sm:active { top: 2px; box-shadow: 0 1px 0 var(--bark); }
.px-btn-sm:disabled { opacity: .3; cursor: not-allowed; top: 0; box-shadow: 0 3px 0 var(--bark); }

.btn-water { border-color: var(--sky2); color: var(--sky2); background: #1a2a38; }
.btn-water:hover { background: #1e3040; }
.btn-sell  { border-color: var(--amber2); color: var(--amber2); background: #2a2008; }
.btn-sell:hover { background: #302808; }
.btn-move  { border-color: var(--leaf2); color: var(--leaf2); background: #1a2c10; }
.btn-move:hover { background: #203614; }
.btn-clear { border-color: var(--rust2); color: var(--rust2); background: #2a1010; }

.req-match-banner {
  background: #1e1800; border: 2px solid var(--amber);
  color: var(--amber2); font-size: 5.5px; padding: 5px 8px;
  text-align: center; margin: 6px 0;
  animation: req-pulse 2s ease-in-out infinite;
}

/* Rank */
.rank-display {
  background: var(--panel2); border: 2px solid var(--border2);
  box-shadow: 0 2px 0 var(--bark); padding: 10px;
}
.rank-name { font-size: 9px; margin-bottom: 4px; line-height: 1.4; }
.rank-sub  { font-size: 5px; color: var(--muted2); line-height: 2.2; white-space: pre-line; }
.rank-next {
  font-size: 4.5px; color: var(--muted); margin-top: 7px; line-height: 2;
  border-top: 1px solid var(--border); padding-top: 6px;
}
.rank-next span { color: var(--amber2); }

/* Log */
.log-box {
  background: var(--panel2); border: 1px solid var(--border);
  padding: 7px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
}
.log-entry      { font-size: 4.5px; color: var(--muted); line-height: 1.9; }
.log-entry.good { color: var(--leaf2); }
.log-entry.warn { color: var(--amber2); }
.log-entry.bad  { color: var(--rust2); }
.log-entry.rep  { color: var(--dusk2); }

/* ════════════════════════════════════════════════════════════════
   RIGHT — Grow Shelf
   ════════════════════════════════════════════════════════════════ */
.panel-right {
  background: var(--panel);
  border-left: 3px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}

.grow-shelf-header {
  border-bottom: 4px solid var(--wood2);
  padding: 7px 10px; font-size: 7px; color: var(--cream);
  text-shadow: 1px 1px 0 var(--bark);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
  background-image: linear-gradient(180deg, #28482b 0%, #183018 100%);
}
.shelf-hint { font-size: 5px; color: var(--leaf2); }

.grow-shelf {
  flex: 1; overflow-y: auto;
  background-image:
    repeating-linear-gradient(180deg, transparent 0px, transparent 118px, rgba(122,84,47,.85) 118px, rgba(122,84,47,.85) 124px),
    linear-gradient(180deg, #203c21 0%, #162d18 100%);
}

.grow-shelf-row {
  display: flex; gap: 0;
  border-bottom: 6px solid var(--wood2);
  padding: 5px 3px 3px;
  margin-bottom: 2px;
  background-image: linear-gradient(180deg, #315635 0%, #234225 54%, #173018 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06);
}

.grow-slot {
  width: 90px; height: 108px; border: 2px solid;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 3px 3px 5px; cursor: pointer; position: relative;
  flex-shrink: 0; margin: 2px 3px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.3);
}
.grow-slot:hover { filter: brightness(1.08); }
.grow-slot:active { filter: brightness(1.18); transform: translate(1px,1px); }

.grow-empty    { border-color: var(--border); background: #14100a; border-style: dashed; opacity: .6; }
.grow-empty:hover { border-color: var(--sage); background: #0e1408; opacity: 1; filter: none; }
.grow-planting { border-color: var(--sky); background: #0c1018; border-style: dashed; animation: blink-slot .7s step-end infinite; }
.grow-seed     { border-color: var(--wood2); background: #1c1006; }
.grow-growing  { border-color: var(--moss); background: #0c1808; }
.grow-thirsty  { border-color: var(--amber); background: #1c1606; animation: blink-slot 1.1s step-end infinite; }
.grow-dry      { border-color: var(--rust); background: #1c0c06; animation: blink-slot .75s step-end infinite; }
.grow-dead     { border-color: var(--rust2); background: #180808; filter: saturate(.4); }
.grow-mature   { border-color: var(--amber2); background: #181a06; animation: mature-glow 1.5s ease-in-out infinite; }
.grow-selected {
  box-shadow: 0 0 0 2px var(--amber2), 0 0 0 4px var(--bark), inset 0 -2px 0 rgba(0,0,0,.3) !important;
  filter: brightness(1.12);
}

@keyframes blink-slot { 0%,100%{opacity:1} 50%{opacity:.55} }
@keyframes mature-glow {
  0%,100% { border-color: var(--amber2); }
  50%     { border-color: var(--leaf2); box-shadow: inset 0 -2px 0 rgba(0,0,0,.3), 0 0 10px rgba(168,204,128,.3); }
}

.gslot-svg {
  flex: 1; width: 100%;
  display: flex; align-items: flex-end; justify-content: center;
}
.gslot-svg svg { width: 86px; height: 90px; }

.gslot-hint {
  font-size: 14px; color: rgba(90,128,80,.35);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1; width: 100%; gap: 5px;
}
.gslot-hint span { font-size: 4.5px; color: var(--muted); }

.gslot-empty {
  font-size: 20px; color: rgba(92,88,70,.2);
  display: flex; align-items: center; justify-content: center;
  flex: 1; width: 100%;
}

.gslot-bars {
  position: absolute; bottom: 3px; left: 3px; right: 3px;
  display: flex; flex-direction: column; gap: 2px;
}
.mini-bar  { height: 4px; background: rgba(0,0,0,.5); border: 1px solid rgba(0,0,0,.4); overflow: hidden; }
.mini-fill { height: 100%; transition: width .5s ease; }

.gslot-badge {
  position: absolute; top: -9px; right: -3px;
  font-size: 4px; padding: 2px 5px; border: 2px solid; box-shadow: 2px 2px 0 var(--bark);
}
.badge-ready   { background: var(--amber2); border-color: var(--amber);  color: var(--bark); }
.badge-thirsty { background: var(--amber);  border-color: var(--wood2);  color: var(--bark); }
.badge-dry     { background: var(--rust);   border-color: var(--rust2);  color: var(--cream); }
.badge-dead    { background: var(--panel2); border-color: var(--rust2);  color: var(--rust2); }

/* ─── Toasts ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column;
  gap: 5px; pointer-events: none; align-items: center;
}
.toast {
  background: var(--panel2); border: 2px solid var(--sage);
  box-shadow: 4px 4px 0 var(--bark); color: var(--cream);
  font-family: var(--fn); font-size: 6.5px; padding: 7px 14px;
  opacity: 0; animation: toastIn 3s ease forwards; white-space: nowrap;
}
.toast.tw { border-color: var(--amber); }
.toast.te { border-color: var(--rust); }
.toast.tp { border-color: var(--dusk2); }
@keyframes toastIn {
  0%   { opacity:0; transform:translateY(6px); }
  10%  { opacity:1; transform:translateY(0); }
  78%  { opacity:1; }
  100% { opacity:0; transform:translateY(-2px); }
}

.money-pop { animation: mpop .5s ease; }
@keyframes mpop {
  0%  { transform:scale(1); }
  40% { transform:scale(1.5); color:var(--amber2); }
  70% { transform:scale(1.1); }
  100%{ transform:scale(1); }
}

/* ─── Overlays ───────────────────────────────────────────────── */
.unlock-flash {
  position: fixed; inset: 0; background: rgba(30,25,10,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; pointer-events: none;
  animation: ufade 2.8s ease forwards;
}
@keyframes ufade { 0%{opacity:0} 10%{opacity:1} 75%{opacity:1} 100%{opacity:0} }

.unlock-box {
  background: var(--panel2); border: 4px solid var(--dusk2);
  box-shadow: 8px 8px 0 var(--bark), 0 0 40px rgba(96,64,160,.3);
  padding: 26px 32px; text-align: center;
  display: flex; flex-direction: column; gap: 10px;
}
.unlock-title { font-size: 10px; color: var(--dusk2); letter-spacing: 1px; }
.unlock-plant { font-size: 42px; }
.unlock-desc  { font-size: 6px; color: var(--muted2); line-height: 2.2; white-space: pre-line; }

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes ripple {
  0%   { transform:scale(0); opacity:.8; }
  100% { transform:scale(3); opacity:0; }
}
.water-ripple {
  position: absolute; width: 30px; height: 30px;
  border: 3px solid var(--sky2); border-radius: 50%;
  pointer-events: none; animation: ripple .6s ease-out forwards;
  margin-left: -15px; margin-top: -15px;
}

@keyframes sparkle {
  0%   { transform:scale(0) rotate(0deg); opacity:1; }
  50%  { transform:scale(1.2) rotate(180deg); opacity:1; }
  100% { transform:scale(0) rotate(360deg); opacity:0; }
}
.sparkle {
  position: fixed; font-size: 18px; pointer-events: none;
  animation: sparkle .8s ease-out forwards; z-index: 999;
}

/* ─── Scrollbars ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bark); }
::-webkit-scrollbar-thumb { background: var(--border2); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Wrapper-controlled interface zoom. Reflows the game instead of scaling the iframe. */
html.plantlyfe-ui-zoomed,
html.plantlyfe-ui-zoomed body {
  font-size: 10.4px;
}

html.plantlyfe-ui-zoomed header {
  min-height: 54px;
  padding: 9px 14px;
}

html.plantlyfe-ui-zoomed .logo {
  font-size: 12px;
}

html.plantlyfe-ui-zoomed .hud {
  gap: 7px;
}

html.plantlyfe-ui-zoomed .hud-chip,
html.plantlyfe-ui-zoomed .rep-bar-outer {
  padding: 5px 8px;
}

html.plantlyfe-ui-zoomed .game-layout {
  grid-template-columns: 265px minmax(0, 1fr) 274px;
}

html.plantlyfe-ui-zoomed .panel-left {
  padding: 12px 9px;
}

html.plantlyfe-ui-zoomed .seed-row {
  gap: 7px;
  padding: 7px 8px;
}

html.plantlyfe-ui-zoomed .seed-sprite {
  min-width: 22px;
  font-size: 18px;
}

html.plantlyfe-ui-zoomed .display-shelf-wrap {
  padding: 9px 12px 8px;
}

html.plantlyfe-ui-zoomed .display-shelf {
  gap: 9px;
}

html.plantlyfe-ui-zoomed .disp-slot {
  width: 86px;
  height: 104px;
}

html.plantlyfe-ui-zoomed .centre-lower {
  grid-template-columns: minmax(188px, 0.58fr) minmax(416px, 1.42fr);
}

html.plantlyfe-ui-zoomed .walkway::before {
  width: 140px;
}

html.plantlyfe-ui-zoomed .info-section,
html.plantlyfe-ui-zoomed .info-log {
  padding: 12px 13px;
}

html.plantlyfe-ui-zoomed .req-card {
  gap: 6px;
  padding: 9px 10px;
}

html.plantlyfe-ui-zoomed .req-plant {
  gap: 9px;
  padding: 7px 8px;
}

html.plantlyfe-ui-zoomed .detail-body {
  padding: 13px;
}

html.plantlyfe-ui-zoomed .detail-svg-big {
  width: 62px;
  height: 78px;
}

html.plantlyfe-ui-zoomed .px-bar-wrap {
  height: 9px;
}

html.plantlyfe-ui-zoomed .detail-chips {
  gap: 6px;
}

html.plantlyfe-ui-zoomed .grow-shelf-row {
  padding: 5px 3px 4px;
}

html.plantlyfe-ui-zoomed .grow-slot {
  width: 98px;
  height: 116px;
  margin: 2px 4px;
}

html.plantlyfe-ui-zoomed .gslot-svg svg {
  width: 90px;
  height: 94px;
}

html.plantlyfe-ui-zoomed .gslot-hint {
  font-size: 16px;
}

html.plantlyfe-ui-zoomed .gslot-empty {
  font-size: 22px;
}

html.plantlyfe-ui-zoomed .mini-bar {
  height: 5px;
}

/* ─── Cozy shop polish pass ─────────────────────────────────── */
:root {
  --glow-soft: rgba(196, 230, 154, 0.18);
  --glow-warm: rgba(212, 160, 32, 0.24);
  --panel-deep: #0b180e;
  --panel-leafy: #152a18;
  --panel-raised: #1c351f;
  --edge-leaf: #54724a;
}

#login-screen {
  background:
    radial-gradient(ellipse at 34% 30%, rgba(196,230,154,.16) 0%, transparent 42%),
    radial-gradient(ellipse at 78% 72%, rgba(122,84,47,.18) 0%, transparent 44%),
    linear-gradient(180deg, #0a140a 0%, #061006 100%);
}

.login-box,
.unlock-box {
  border-color: var(--edge-leaf);
  background:
    linear-gradient(180deg, rgba(31, 55, 31, 0.98), rgba(13, 28, 15, 0.98));
  box-shadow:
    6px 6px 0 rgba(42, 28, 15, 0.78),
    0 0 0 1px rgba(196,230,154,.08) inset,
    0 0 44px rgba(196,230,154,.08);
}

header {
  background-image:
    linear-gradient(180deg, rgba(55, 84, 43, 0.96) 0%, rgba(20, 42, 22, 0.98) 72%, rgba(10, 23, 12, 0.98) 100%);
}

.logo {
  color: #d8f2b0;
  text-shadow:
    1px 1px 0 #315c36,
    3px 3px 0 rgba(42, 28, 15, .86),
    0 0 14px rgba(196,230,154,.12);
}

.hud-chip,
.rep-bar-outer,
.rank-display,
.req-card,
.log-box,
.detail-svg-big,
.dchip {
  background:
    linear-gradient(180deg, rgba(32, 56, 35, 0.98), rgba(16, 32, 20, 0.98));
  border-color: var(--edge-leaf);
  box-shadow:
    2px 2px 0 rgba(42, 28, 15, 0.72),
    inset 0 1px 0 rgba(246, 237, 216, 0.06);
}

.hud-chip {
  color: #d9bc69;
}

.hud-val {
  color: #fff6d8;
  text-shadow: 0 0 8px rgba(240, 200, 64, 0.16);
}

.rep-track,
.px-bar-wrap,
.mini-bar {
  background: #081108;
  border-color: rgba(108, 127, 72, 0.66);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.54);
}

.rep-fill,
.px-bar-fill,
.mini-fill {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 8px currentColor;
}

.sec-label,
.display-shelf-label,
.walkway-label {
  color: rgba(196, 230, 154, 0.72);
  text-shadow: 0 0 8px rgba(196,230,154,.12);
}

.panel-left,
.info-panel,
.panel-right {
  background:
    radial-gradient(circle at 50% 0%, rgba(196,230,154,.06), transparent 32%),
    linear-gradient(180deg, var(--panel-leafy), var(--panel-deep));
}

.panel-left,
.info-panel {
  border-color: rgba(84, 114, 74, 0.9);
}

.panel-centre {
  background:
    radial-gradient(circle at 50% 20%, rgba(196,230,154,.05), transparent 42%),
    linear-gradient(180deg, #102315, #0c1710);
}

.display-shelf-wrap {
  border-bottom-color: rgba(122, 84, 47, 0.95);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #2f5631 0%, #213c22 52%, #172c18 100%);
  box-shadow: inset 0 -8px 14px rgba(42, 28, 15, 0.32);
}

.display-shelf {
  padding: 2px 2px 6px;
}

.disp-slot,
.grow-slot {
  border-color: rgba(108, 127, 72, 0.9);
  border-radius: 2px;
  background:
    radial-gradient(circle at 50% 18%, rgba(196,230,154,.08), transparent 34%),
    linear-gradient(180deg, #162a19, #0c180e);
  box-shadow:
    inset 0 -4px 0 rgba(0,0,0,.28),
    2px 3px 0 rgba(42, 28, 15, .66);
  transition: border-color .16s ease, filter .16s ease, transform .12s ease, box-shadow .16s ease;
}

.disp-slot:hover,
.grow-slot:hover,
.seed-row.unlocked:hover,
.user-chip:hover {
  border-color: var(--leaf2);
  filter: brightness(1.12) saturate(1.05);
  box-shadow:
    inset 0 -4px 0 rgba(0,0,0,.22),
    2px 3px 0 rgba(42, 28, 15, .66),
    0 0 14px rgba(196,230,154,.14);
}

.disp-slot:active,
.grow-slot:active,
.seed-row.unlocked:active,
.px-btn:active,
.px-btn-sm:active {
  transform: translate(1px, 2px);
}

.disp-empty,
.grow-empty {
  background:
    linear-gradient(180deg, rgba(18, 33, 19, .82), rgba(8, 17, 8, .9));
  opacity: .68;
}

.disp-empty-label,
.gslot-empty,
.gslot-hint {
  color: rgba(196,230,154,.34);
  text-shadow: 0 0 12px rgba(196,230,154,.08);
}

.disp-occupied,
.grow-growing,
.grow-seed {
  animation: plantBreath 3.8s ease-in-out infinite;
}

.grow-mature,
.disp-wanted {
  animation: matureGlow 1.9s ease-in-out infinite;
}

.grow-thirsty {
  animation: thirstyPulse 1.25s ease-in-out infinite;
}

.grow-dry,
.req-card.req-urgent {
  animation: dryWarn .72s step-end infinite;
}

.grow-selected,
.disp-selected,
.seed-row.sel-seed {
  border-color: var(--amber2) !important;
  box-shadow:
    0 0 0 2px rgba(240, 200, 64, 0.9),
    0 0 18px rgba(240, 200, 64, 0.24),
    2px 4px 0 rgba(42, 28, 15, .72) !important;
}

.gslot-svg,
.disp-svg,
.detail-svg-big {
  filter: drop-shadow(0 7px 0 rgba(0,0,0,.22)) drop-shadow(0 0 8px rgba(196,230,154,.08));
}

.gslot-svg svg,
.disp-svg svg,
.detail-svg-big svg {
  overflow: visible;
}

.grow-mature .gslot-svg,
.disp-wanted .disp-svg {
  animation: leafLift 1.8s ease-in-out infinite;
}

.grow-shelf {
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(180deg, transparent 0px, transparent 118px, rgba(122,84,47,.88) 118px, rgba(122,84,47,.88) 124px),
    linear-gradient(180deg, #203c21 0%, #132914 100%);
}

.grow-shelf-row {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 20%),
    linear-gradient(180deg, #335c37 0%, #234225 54%, #173018 100%);
}

.walkway {
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 48px),
    linear-gradient(0deg, transparent 0, transparent 15px, rgba(0,0,0,.13) 15px, rgba(0,0,0,.13) 16px),
    radial-gradient(circle at 50% 18%, rgba(196,230,154,.11), transparent 34%),
    linear-gradient(180deg, #19351f 0%, #142816 58%, #0c170d 100%);
}

.walkway::before {
  opacity: .8;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(240,200,64,.1), transparent 58%);
}

.walkway::after {
  opacity: .12;
  filter: blur(.5px);
}

.cust-bubble {
  border-color: rgba(84,114,74,.85);
  background: #f3ead0;
  box-shadow: 2px 3px 0 rgba(42, 28, 15, 0.72), 0 0 12px rgba(246,237,216,.12);
}

.req-card {
  position: relative;
  overflow: hidden;
}

.req-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(196,230,154,.45);
  content: "";
}

.req-card.req-fillable::before {
  background: var(--amber2);
}

.req-plant {
  border-color: rgba(108,127,72,.78);
  background:
    linear-gradient(180deg, rgba(34, 61, 37, .98), rgba(20, 38, 23, .98));
}

.detail-wrap {
  background: linear-gradient(180deg, rgba(19, 38, 22, .98), rgba(10, 24, 13, .98));
  border-color: rgba(84, 114, 74, 0.9);
}

.detail-head,
.grow-shelf-header {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 24%),
    linear-gradient(180deg, #2a4f2d 0%, #173018 100%);
}

.detail-body > div:first-child {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(108,127,72,.5);
}

.dchip {
  border-color: rgba(108,127,72,.78);
}

.dchip strong {
  text-shadow: 0 0 8px rgba(246,237,216,.12);
}

.px-btn,
.px-btn-sm {
  border-color: var(--edge-leaf);
  background:
    linear-gradient(180deg, rgba(36, 65, 39, .98), rgba(19, 38, 22, .98));
  box-shadow:
    0 3px 0 rgba(42, 28, 15, 0.78),
    inset 0 1px 0 rgba(246,237,216,.08);
  transition: filter .14s ease, transform .12s ease, box-shadow .14s ease, border-color .14s ease;
}

.px-btn:hover,
.px-btn:focus-visible,
.px-btn-sm:hover,
.px-btn-sm:focus-visible {
  border-color: var(--leaf2);
  filter: brightness(1.16) saturate(1.08);
  outline: none;
  box-shadow:
    0 3px 0 rgba(42, 28, 15, 0.78),
    0 0 14px rgba(196,230,154,.14),
    inset 0 1px 0 rgba(246,237,216,.1);
}

.btn-green,
.btn-move {
  color: #d7f2ae;
}

.btn-water {
  color: #a9dcff;
  border-color: #517996;
  background: linear-gradient(180deg, #1e3b4a, #132733);
}

.btn-sell {
  color: #f6d77a;
  border-color: #9d7430;
  background: linear-gradient(180deg, #3c2e10, #201909);
}

.btn-clear {
  color: #ff987d;
  border-color: #9b4b35;
  background: linear-gradient(180deg, #3d1712, #200b09);
}

.log-entry {
  padding: 1px 0;
}

.toast {
  border-color: var(--leaf2);
  background:
    linear-gradient(180deg, rgba(32, 56, 35, .98), rgba(14, 28, 16, .98));
  box-shadow:
    4px 4px 0 rgba(42, 28, 15, 0.78),
    0 0 24px rgba(196,230,154,.16);
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(8,17,8,.92);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(8,17,8,.92);
  background: var(--edge-leaf);
}

@keyframes plantBreath {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.055); }
}

@keyframes leafLift {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 7px 0 rgba(0,0,0,.22)); }
  50% { transform: translateY(-2px); filter: drop-shadow(0 9px 0 rgba(0,0,0,.2)) drop-shadow(0 0 12px rgba(196,230,154,.18)); }
}

@keyframes matureGlow {
  0%, 100% {
    border-color: var(--amber2);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.24), 2px 3px 0 rgba(42,28,15,.66), 0 0 8px rgba(240,200,64,.18);
  }
  50% {
    border-color: var(--leaf2);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), 2px 3px 0 rgba(42,28,15,.66), 0 0 18px rgba(196,230,154,.24);
  }
}

@keyframes thirstyPulse {
  0%, 100% { border-color: var(--amber); }
  50% { border-color: var(--amber2); box-shadow: inset 0 -4px 0 rgba(0,0,0,.22), 2px 3px 0 rgba(42,28,15,.66), 0 0 14px rgba(240,200,64,.2); }
}

@keyframes dryWarn {
  0%, 100% { border-color: var(--rust); }
  50% { border-color: var(--rust2); }
}

@media (prefers-reduced-motion: reduce) {
  .disp-occupied,
  .grow-growing,
  .grow-seed,
  .grow-mature,
  .disp-wanted,
  .grow-thirsty,
  .grow-dry,
  .req-card.req-urgent,
  .grow-mature .gslot-svg,
  .disp-wanted .disp-svg {
    animation: none !important;
  }
}

/* ─── Store floor space pass ────────────────────────────────── */
.info-panel {
  background: transparent;
  border: 0;
}

.info-panel > .info-section {
  backdrop-filter: blur(1px);
}

.info-panel > .info-section:first-child {
  background:
    radial-gradient(circle at 18% 8%, rgba(240, 200, 64, .08), transparent 34%),
    linear-gradient(180deg, rgba(22, 47, 25, .93), rgba(9, 22, 11, .93));
}

.info-panel > .info-section:nth-child(3),
.info-log {
  background:
    linear-gradient(180deg, rgba(19, 40, 22, .9), rgba(9, 22, 11, .9));
}

.info-detail .detail-wrap {
  height: 100%;
}

.req-card {
  margin-bottom: 8px;
}

html.plantlyfe-ui-zoomed .game-layout {
  grid-template-columns: 232px minmax(0, 1fr) 244px;
}

html.plantlyfe-ui-zoomed .info-panel {
  grid-template-columns: minmax(220px, 0.88fr) minmax(292px, 1.12fr);
  margin: 10px 11px;
  height: calc(100% - 20px);
  gap: 9px;
}

/* ─── Layered shop depth pass ───────────────────────────────── */
.display-shelf-wrap,
.panel-right,
.info-panel > .info-section,
.info-detail .detail-wrap {
  position: relative;
}

.display-shelf-wrap {
  border-bottom-color: #704c27;
  box-shadow:
    inset 0 2px 0 rgba(246, 237, 216, 0.08),
    inset 0 -8px 0 rgba(42, 28, 15, 0.34),
    0 8px 0 rgba(42, 28, 15, 0.4),
    0 18px 28px rgba(0, 0, 0, 0.22);
}

.display-shelf-wrap::after,
.grow-shelf-header::after {
  position: absolute;
  right: 10px;
  bottom: 5px;
  left: 10px;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(246,237,216,.22) 0 5px, transparent 5px 10px);
  opacity: .42;
  content: "";
  pointer-events: none;
}

.display-shelf {
  border: 1px solid rgba(108, 127, 72, 0.34);
  border-top-color: rgba(246, 237, 216, 0.1);
  padding: 7px 7px 8px;
  background:
    linear-gradient(180deg, rgba(6, 17, 8, .28), rgba(8, 17, 8, .5)),
    linear-gradient(90deg, rgba(246,237,216,.035) 0 1px, transparent 1px 42px);
  box-shadow:
    inset 0 3px 7px rgba(0,0,0,.38),
    inset 0 -1px 0 rgba(246,237,216,.06);
}

.disp-slot,
.grow-slot {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 0 rgba(246,237,216,.08),
    inset 0 -5px 0 rgba(0,0,0,.26),
    3px 4px 0 rgba(42,28,15,.72),
    0 10px 14px rgba(0,0,0,.18);
}

.disp-slot::before,
.grow-slot::before {
  position: absolute;
  top: 3px;
  right: 4px;
  left: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246,237,216,.28), transparent);
  content: "";
  pointer-events: none;
}

.disp-slot:hover,
.grow-slot:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 0 rgba(246,237,216,.1),
    inset 0 -5px 0 rgba(0,0,0,.22),
    3px 6px 0 rgba(42,28,15,.72),
    0 14px 18px rgba(0,0,0,.22),
    0 0 16px rgba(196,230,154,.16);
}

.disp-slot:active,
.grow-slot:active {
  transform: translate(1px, 1px);
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.06),
    inset 0 -2px 0 rgba(0,0,0,.3),
    1px 2px 0 rgba(42,28,15,.78);
}

.panel-right {
  box-shadow:
    inset 3px 0 0 rgba(246,237,216,.04),
    -8px 0 18px rgba(0,0,0,.18);
}

.grow-shelf-header {
  position: relative;
  border-bottom-color: #704c27;
  box-shadow:
    inset 0 2px 0 rgba(246,237,216,.08),
    inset 0 -5px 0 rgba(42,28,15,.28),
    0 5px 0 rgba(42,28,15,.42);
}

.grow-shelf {
  border-left: 1px solid rgba(246,237,216,.045);
  background-image:
    radial-gradient(circle at 20% 8%, rgba(196,230,154,.07), transparent 24%),
    linear-gradient(90deg, rgba(0,0,0,.26), transparent 13%, transparent 88%, rgba(0,0,0,.22)),
    repeating-linear-gradient(180deg, transparent 0px, transparent 118px, rgba(122,84,47,.92) 118px, rgba(122,84,47,.92) 124px),
    linear-gradient(180deg, #203c21 0%, #132914 100%);
  box-shadow:
    inset 6px 0 10px rgba(0,0,0,.22),
    inset 0 8px 16px rgba(0,0,0,.2);
}

.grow-shelf-row {
  position: relative;
  border-bottom-color: #704c27;
  box-shadow:
    inset 0 2px 0 rgba(246,237,216,.08),
    inset 0 -5px 0 rgba(42,28,15,.25),
    0 5px 0 rgba(42,28,15,.36);
}

.grow-shelf-row::after {
  position: absolute;
  right: 4px;
  bottom: -5px;
  left: 4px;
  height: 1px;
  background: rgba(246,237,216,.18);
  content: "";
  pointer-events: none;
}

.info-panel > .info-section,
.info-detail .detail-wrap {
  border-color: rgba(114, 143, 84, 0.78);
  box-shadow:
    inset 0 2px 0 rgba(246,237,216,.07),
    inset 0 -4px 0 rgba(0,0,0,.18),
    4px 5px 0 rgba(42,28,15,.52),
    0 13px 18px rgba(0,0,0,.2);
}

.info-panel > .info-section::after,
.info-detail .detail-wrap::after {
  position: absolute;
  top: 5px;
  right: 7px;
  left: 7px;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(246,237,216,.16) 0 4px, transparent 4px 9px);
  opacity: .5;
  content: "";
  pointer-events: none;
}

.req-card,
.rank-display,
.log-box {
  position: relative;
  border-color: rgba(124, 153, 92, .72);
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.08),
    inset 0 -3px 0 rgba(0,0,0,.18),
    3px 4px 0 rgba(42,28,15,.55),
    0 9px 12px rgba(0,0,0,.18);
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.req-card::after,
.rank-display::after,
.log-box::after {
  position: absolute;
  top: 3px;
  right: 5px;
  left: 5px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246,237,216,.18), transparent);
  content: "";
  pointer-events: none;
}

.req-card:hover {
  border-color: rgba(196,230,154,.78);
  filter: brightness(1.045);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.1),
    inset 0 -3px 0 rgba(0,0,0,.16),
    3px 5px 0 rgba(42,28,15,.58),
    0 12px 16px rgba(0,0,0,.22);
}

.rank-display {
  background:
    radial-gradient(circle at 92% 18%, rgba(240,200,64,.08), transparent 28%),
    linear-gradient(180deg, rgba(34, 60, 37, .98), rgba(14, 29, 16, .98));
}

.log-box {
  background:
    linear-gradient(90deg, rgba(196,230,154,.035) 0 1px, transparent 1px 38px),
    linear-gradient(180deg, rgba(20, 38, 23, .98), rgba(8, 18, 10, .98));
}

.log-entry {
  border-bottom: 1px solid rgba(108,127,72,.18);
}

.log-entry:last-child {
  border-bottom: 0;
}

/* ─── Short action feedback pass ────────────────────────────── */
.fx-buy-seed {
  animation: fxBuySeed .46s steps(4, end);
}

.fx-shop-pulse {
  animation: fxPanelPulse .52s steps(3, end);
}

.fx-plant-pop {
  animation: fxPlantPop .58s steps(5, end);
}

.fx-watered {
  animation: fxWatered .52s steps(4, end);
}

.fx-watered .gslot-svg {
  animation: fxLeafBob .52s steps(3, end);
}

.fx-stage-change {
  animation: fxStageChange .72s steps(5, end);
}

.fx-stage-change .gslot-svg,
.fx-display-stocked .disp-svg {
  animation: fxLeafBob .62s steps(4, end);
}

.fx-display-stocked {
  animation: fxDisplayStocked .58s steps(4, end);
}

.fx-shelf-pulse {
  animation: fxShelfPulse .58s steps(4, end);
}

.fx-sold-shelf {
  animation: fxSoldShelf .52s steps(4, end);
}

.fx-sale-hud {
  animation: fxSaleHud .52s steps(4, end);
}

.fx-request-complete {
  animation: fxRequestComplete .76s steps(5, end);
}

.fx-rank-pop {
  animation: fxRankPop .68s steps(5, end);
}

@keyframes fxBuySeed {
  0% {
    transform: translateY(0);
    filter: brightness(1);
  }
  35% {
    transform: translateY(-2px);
    border-color: var(--amber2);
    filter: brightness(1.18);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.16),
      0 0 14px rgba(240,200,64,.26),
      2px 4px 0 rgba(42,28,15,.78);
  }
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }
}

@keyframes fxPlantPop {
  0% {
    transform: translateY(2px) scale(.96);
    filter: brightness(.92);
  }
  45% {
    transform: translateY(-3px) scale(1.03);
    border-color: var(--leaf2);
    filter: brightness(1.18);
    box-shadow:
      inset 0 2px 0 rgba(246,237,216,.12),
      inset 0 -5px 0 rgba(0,0,0,.2),
      3px 6px 0 rgba(42,28,15,.72),
      0 0 18px rgba(196,230,154,.28);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes fxWatered {
  0%, 100% {
    border-color: inherit;
    filter: brightness(1);
  }
  38% {
    border-color: var(--sky2);
    filter: brightness(1.16) saturate(1.08);
    box-shadow:
      inset 0 2px 0 rgba(246,237,216,.12),
      inset 0 -5px 0 rgba(0,0,0,.2),
      3px 5px 0 rgba(42,28,15,.7),
      0 0 16px rgba(128,184,232,.32);
  }
}

@keyframes fxLeafBob {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-3px); }
}

@keyframes fxStageChange {
  0% {
    filter: brightness(1);
  }
  32% {
    border-color: var(--leaf2);
    filter: brightness(1.22);
    box-shadow:
      inset 0 2px 0 rgba(246,237,216,.14),
      inset 0 -5px 0 rgba(0,0,0,.2),
      3px 6px 0 rgba(42,28,15,.72),
      0 0 18px rgba(196,230,154,.3);
  }
  68% {
    filter: brightness(1.08);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes fxDisplayStocked {
  0% {
    transform: translateY(3px);
    opacity: .72;
  }
  45% {
    transform: translateY(-2px);
    opacity: 1;
    border-color: var(--amber2);
    filter: brightness(1.18);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fxShelfPulse {
  0%, 100% {
    filter: brightness(1);
  }
  42% {
    filter: brightness(1.1);
    box-shadow:
      inset 0 2px 0 rgba(246,237,216,.1),
      inset 0 -8px 0 rgba(42,28,15,.28),
      0 8px 0 rgba(42,28,15,.4),
      0 0 20px rgba(196,230,154,.16);
  }
}

@keyframes fxSoldShelf {
  0%, 100% {
    filter: brightness(1);
  }
  35% {
    filter: brightness(1.18);
    box-shadow:
      inset 0 2px 0 rgba(246,237,216,.12),
      inset 0 -8px 0 rgba(42,28,15,.3),
      0 8px 0 rgba(42,28,15,.4),
      0 0 22px rgba(240,200,64,.26);
  }
}

@keyframes fxSaleHud {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(1.15); }
}

@keyframes fxPanelPulse {
  0%, 100% { filter: brightness(1); }
  42% { filter: brightness(1.1); }
}

@keyframes fxRequestComplete {
  0%, 100% {
    filter: brightness(1);
  }
  34% {
    border-color: var(--amber2);
    filter: brightness(1.14);
    box-shadow:
      inset 0 2px 0 rgba(246,237,216,.12),
      inset 0 -4px 0 rgba(0,0,0,.15),
      4px 5px 0 rgba(42,28,15,.52),
      0 0 22px rgba(240,200,64,.22);
  }
}

@keyframes fxRankPop {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  42% {
    transform: scale(1.015);
    border-color: var(--leaf2);
    filter: brightness(1.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-buy-seed,
  .fx-shop-pulse,
  .fx-plant-pop,
  .fx-watered,
  .fx-watered .gslot-svg,
  .fx-stage-change,
  .fx-stage-change .gslot-svg,
  .fx-display-stocked,
  .fx-display-stocked .disp-svg,
  .fx-shelf-pulse,
  .fx-sold-shelf,
  .fx-sale-hud,
  .fx-request-complete,
  .fx-rank-pop {
    animation: none !important;
  }
}

/* ─── Readability scale pass ────────────────────────────────── */
html,
body {
  font-size: clamp(11.4px, 1.04vw, 12.4px);
}

header {
  min-height: 60px;
  padding: 10px 16px;
  gap: 10px;
}

.logo {
  font-size: 14px;
}

.hud {
  gap: 8px;
}

.hud-chip,
.rep-bar-outer {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 7.5px;
}

.hud-val {
  font-size: 11px;
}

.rep-bar-outer {
  min-width: 190px;
}

.rep-label,
.rep-pct,
.btn-logout {
  font-size: 6.4px;
}

.rep-track {
  height: 10px;
}

.btn-logout {
  min-height: 30px;
  padding: 6px 10px;
}

.btn-encyclopedia {
  min-height: 30px;
  padding: 6px 10px;
  font-family: var(--fn);
  font-size: 6.4px;
  color: var(--leaf2);
  background: rgba(13, 31, 15, .9);
  border: 2px solid rgba(157, 209, 128, .8);
  box-shadow: 0 3px 0 var(--bark);
  cursor: pointer;
}

.btn-encyclopedia:hover {
  filter: brightness(1.14);
}

.game-layout {
  grid-template-columns: 270px minmax(0, 1fr) 302px;
}

.panel-left {
  padding: 14px 12px;
}

.sec-label,
.display-shelf-label {
  font-size: 6.4px;
  margin-bottom: 10px;
  padding-bottom: 6px;
}

.seed-list {
  gap: 8px;
}

.seed-row {
  min-height: 76px;
  gap: 10px;
  padding: 9px 10px;
}

.seed-pack-row {
  border-color: var(--amber2) !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 226, 138, .2), transparent 36%),
    linear-gradient(180deg, rgba(50, 44, 15, .98), rgba(17, 31, 14, .98)) !important;
  box-shadow:
    0 0 0 2px rgba(255, 226, 138, .16),
    0 5px 0 rgba(42, 28, 15, .62),
    inset 0 1px 0 rgba(255, 255, 255, .12) !important;
}

.seed-pack-row .seed-name,
.seed-pack-row .seed-price {
  color: #ffe28a;
}

.seed-sprite {
  min-width: 28px;
  font-size: 22px;
}

.seed-name {
  font-size: 8px;
  line-height: 1.45;
  margin-bottom: 4px;
}

.seed-sub {
  font-size: 6px;
  line-height: 1.75;
}

.seed-price {
  font-size: 9px;
}

.tier-tag,
.unlock-req {
  font-size: 5.4px;
  line-height: 1.7;
}

.display-shelf-wrap {
  padding: 12px 14px 10px;
}

.display-shelf {
  gap: 12px;
  padding: 9px 9px 10px;
}

.disp-slot {
  width: 100px;
  height: 124px;
  padding: 6px 6px 8px;
}

.disp-name {
  font-size: 5.8px;
  line-height: 1.35;
  margin-top: 5px;
}

.disp-price {
  font-size: 8px;
  margin-top: 4px;
  padding: 2px 5px;
}

.disp-empty-label {
  font-size: 5.8px;
  margin-bottom: 38px;
}

.disp-badge,
.gslot-badge,
.req-ready-badge {
  font-size: 5.4px;
  padding: 3px 6px;
}

.info-panel {
  grid-template-columns: minmax(290px, 0.92fr) minmax(340px, 1.08fr);
  gap: 12px;
  height: calc(100% - 24px);
  margin: 12px 14px;
}

.info-section,
.info-log,
.info-panel > .info-section,
.info-panel > .info-section:first-child,
.info-panel > .info-section:nth-child(3) {
  padding: 13px 14px;
}

.req-empty {
  font-size: 6.6px;
  padding: 16px 10px;
}

.req-card {
  gap: 8px;
  margin-bottom: 10px;
  padding: 11px 12px;
}

.req-header {
  gap: 8px;
}

.req-name {
  font-size: 8.5px;
  line-height: 1.45;
}

.req-timer {
  font-size: 7px;
}

.req-msg {
  font-size: 6.5px;
  line-height: 1.95;
}

.req-plant {
  gap: 10px;
  padding: 8px 9px;
}

.req-sprite {
  font-size: 22px;
}

.req-plant-name {
  font-size: 7.8px;
  line-height: 1.45;
}

.req-pay {
  font-size: 5.8px;
}

.req-total {
  font-size: 8.5px;
}

.detail-head {
  min-height: 34px;
  padding: 9px 14px;
  font-size: 7.6px;
  line-height: 1.4;
}

.detail-body {
  padding: 14px;
}

.detail-name {
  font-size: 11px;
}

.detail-stage {
  font-size: 7.5px;
}

.detail-empty {
  gap: 10px;
  font-size: 7px;
  padding: 18px;
}

.detail-svg-big {
  width: 72px;
  height: 92px;
}

.px-bar-label {
  font-size: 6px;
  margin-bottom: 4px;
}

.px-bar-wrap {
  height: 12px;
  margin-bottom: 8px;
}

.px-bar-pct {
  top: 2px;
  font-size: 6.4px;
}

.detail-chips {
  gap: 7px;
  margin: 11px 0;
}

.dchip {
  padding: 7px 8px;
  font-size: 5.8px;
  line-height: 1.55;
}

.dchip strong {
  font-size: 11px;
}

.action-row {
  gap: 8px;
  margin-top: 7px;
}

.px-btn-sm {
  min-height: 34px;
  padding: 9px 12px;
  font-size: 7.4px;
}

.rank-display {
  padding: 12px;
}

.rank-name {
  font-size: 10.5px;
}

.rank-sub {
  font-size: 6.5px;
  line-height: 2;
}

.rank-next {
  font-size: 6px;
}

.log-box {
  gap: 4px;
  padding: 9px;
}

.log-entry {
  font-size: 5.8px;
  line-height: 1.85;
}

.grow-shelf-header {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 8.5px;
}

.shelf-hint {
  font-size: 6px;
}

.grow-shelf-row {
  padding: 7px 5px 5px;
  margin-bottom: 3px;
}

.grow-slot {
  width: 116px;
  height: 136px;
  margin: 3px 4px;
  padding: 5px 5px 7px;
}

.gslot-svg svg {
  width: 106px;
  height: 110px;
}

.gslot-hint {
  gap: 6px;
  font-size: 18px;
}

.gslot-hint span {
  font-size: 5.8px;
}

.gslot-empty {
  font-size: 26px;
}

.gslot-bars {
  right: 5px;
  bottom: 5px;
  left: 5px;
  gap: 3px;
}

.mini-bar {
  height: 6px;
}

.toast {
  font-size: 8px;
  padding: 9px 16px;
}

.encyclopedia-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 36%, rgba(72, 104, 43, .24), transparent 34%),
    rgba(0, 0, 0, .72);
}

.encyclopedia-modal.is-open {
  display: flex;
}

.encyclopedia-panel {
  width: min(820px, 94vw);
  max-height: min(720px, 90vh);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow: hidden;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(22, 49, 26, .98), rgba(8, 22, 10, .98));
  border: 3px solid rgba(157, 209, 128, .85);
  box-shadow:
    0 10px 0 rgba(42, 28, 15, .8),
    0 28px 60px rgba(0, 0, 0, .58),
    inset 0 2px 0 rgba(246, 237, 216, .12);
}

.encyclopedia-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(157, 209, 128, .42);
}

.encyclopedia-kicker {
  margin-bottom: 7px;
  color: rgba(255, 226, 138, .78);
  font-size: 6px;
  letter-spacing: .8px;
}

.encyclopedia-title {
  font-size: 15px;
  color: #d5f5bd;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .65);
}

.encyclopedia-close {
  min-height: 34px;
  padding: 8px 11px;
  font-family: var(--fn);
  font-size: 7px;
  color: var(--cream);
  background: rgba(0, 0, 0, .32);
  border: 2px solid rgba(246, 237, 216, .42);
  box-shadow: 0 3px 0 var(--bark);
  cursor: pointer;
}

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

.encyclopedia-stats > div {
  padding: 12px;
  background: rgba(5, 16, 7, .66);
  border: 2px solid rgba(157, 209, 128, .38);
  box-shadow: inset 0 1px 0 rgba(246, 237, 216, .08);
}

.encyclopedia-stats strong {
  display: block;
  margin-bottom: 5px;
  color: #ffe28a;
  font-size: 16px;
  line-height: 1;
}

.encyclopedia-stats span {
  color: rgba(246, 237, 216, .6);
  font-size: 6px;
}

.encyclopedia-grid {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding-right: 4px;
}

.encyclopedia-card {
  min-height: 148px;
  padding: 10px 8px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(23, 47, 25, .95), rgba(9, 22, 11, .96));
  border: 2px solid rgba(114, 143, 84, .74);
  box-shadow:
    3px 4px 0 rgba(42, 28, 15, .55),
    inset 0 1px 0 rgba(246, 237, 216, .08);
}

.encyclopedia-card.undiscovered {
  opacity: .72;
  border-style: dashed;
  background:
    linear-gradient(180deg, rgba(18, 29, 18, .95), rgba(6, 13, 7, .96));
}

.encyclopedia-art {
  height: 82px;
  display: flex;
  align-items: end;
  justify-content: center;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(157, 209, 128, .22);
}

.encyclopedia-art svg {
  width: 76px;
  height: 80px;
}

.encyclopedia-silhouette {
  font-size: 44px;
  line-height: 1;
  filter: grayscale(1) brightness(0);
  opacity: .78;
  text-shadow: 0 0 10px rgba(157, 209, 128, .24);
}

.encyclopedia-name {
  margin-bottom: 6px;
  color: var(--cream);
  font-size: 7px;
  line-height: 1.45;
}

.encyclopedia-meta {
  color: rgba(246, 237, 216, .6);
  font-size: 5.2px;
  line-height: 1.8;
}

.discovery-box {
  border-color: var(--leaf2);
  box-shadow:
    0 0 0 3px rgba(255, 226, 138, .18),
    0 14px 0 rgba(42, 28, 15, .8),
    0 28px 50px rgba(0, 0, 0, .5);
}

.grow-mutated,
.disp-mutated {
  border-color: var(--amber2) !important;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 226, 138, .18), transparent 48%),
    linear-gradient(180deg, rgba(39, 56, 20, .96), rgba(12, 23, 10, .96)) !important;
  box-shadow:
    0 0 0 2px rgba(255, 226, 138, .24),
    0 0 16px rgba(255, 226, 138, .22),
    inset 0 -2px 0 rgba(0, 0, 0, .38) !important;
}

.mutated-plant {
  position: relative;
  filter: saturate(1.28) brightness(1.08);
}

.mut-golden svg,
.mut-solar svg {
  filter: sepia(.75) saturate(1.8) hue-rotate(350deg) brightness(1.24) drop-shadow(0 0 5px rgba(255, 226, 138, .72));
}

.mut-crystal svg,
.mut-moon svg {
  filter: saturate(1.45) hue-rotate(145deg) brightness(1.18) drop-shadow(0 0 5px rgba(159, 233, 255, .65));
}

.mut-giant svg {
  transform: scale(1.16);
  transform-origin: bottom center;
  filter: saturate(1.18) brightness(1.1) drop-shadow(0 0 5px rgba(189, 241, 159, .55));
}

.mut-rainbow svg,
.mut-glow svg {
  filter: saturate(2.1) hue-rotate(55deg) brightness(1.22) drop-shadow(0 0 6px rgba(255, 130, 214, .65));
  animation: mutationHue 2.8s steps(5) infinite;
}

.mut-twin svg {
  filter: saturate(1.45) brightness(1.16) drop-shadow(-5px 0 0 rgba(255, 226, 138, .25)) drop-shadow(5px 0 0 rgba(159, 233, 255, .22));
}

.mutation-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 4;
  max-width: calc(100% - 8px);
  padding: 2px 5px;
  box-sizing: border-box;
  color: #2a1c0f;
  background: #ffe28a;
  border: 2px solid var(--amber2);
  box-shadow: 2px 2px 0 var(--bark);
  font-size: 4.8px;
  line-height: 1.2;
}

.mutation-box {
  border-color: var(--amber2);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 226, 138, .24), transparent 42%),
    linear-gradient(180deg, rgba(42, 45, 13, .98), rgba(10, 24, 11, .98));
  box-shadow:
    0 0 0 3px rgba(255, 226, 138, .2),
    0 14px 0 rgba(42, 28, 15, .8),
    0 30px 58px rgba(0, 0, 0, .58);
}

.mutation-box .unlock-title {
  color: #ffe28a;
}

@keyframes mutationHue {
  0%, 100% { filter: saturate(2.1) hue-rotate(25deg) brightness(1.22) drop-shadow(0 0 6px rgba(255, 130, 214, .65)); }
  50% { filter: saturate(2.1) hue-rotate(145deg) brightness(1.22) drop-shadow(0 0 6px rgba(159, 233, 255, .65)); }
}

html.plantlyfe-ui-zoomed,
html.plantlyfe-ui-zoomed body {
  font-size: clamp(11.8px, 1.08vw, 12.8px);
}

html.plantlyfe-ui-zoomed .game-layout {
  grid-template-columns: 282px minmax(0, 1fr) 314px;
}

html.plantlyfe-ui-zoomed .info-panel {
  grid-template-columns: minmax(296px, 0.94fr) minmax(346px, 1.06fr);
}

html.plantlyfe-ui-zoomed .disp-slot {
  width: 106px;
  height: 132px;
}

html.plantlyfe-ui-zoomed .grow-slot {
  width: 122px;
  height: 144px;
}

html.plantlyfe-ui-zoomed .gslot-svg svg {
  width: 112px;
  height: 116px;
}

@media (max-width: 1100px) {
  html,
  body {
    font-size: 11px;
  }

  .game-layout,
  html.plantlyfe-ui-zoomed .game-layout {
    grid-template-columns: 240px minmax(0, 1fr) 264px;
  }

  .info-panel,
  html.plantlyfe-ui-zoomed .info-panel {
    grid-template-columns: minmax(220px, 0.9fr) minmax(250px, 1.1fr);
    gap: 10px;
    margin: 10px 11px;
    height: calc(100% - 20px);
  }

  .seed-row {
    min-height: 66px;
  }

  .disp-slot,
  html.plantlyfe-ui-zoomed .disp-slot {
    width: 78px;
    height: 108px;
  }

  .grow-slot,
  html.plantlyfe-ui-zoomed .grow-slot {
    width: 102px;
    height: 128px;
    margin: 3px;
  }

  .gslot-svg svg,
  html.plantlyfe-ui-zoomed .gslot-svg svg {
    width: 94px;
    height: 100px;
  }
}

@media (max-width: 920px) {
  html,
  body {
    font-size: 10.4px;
  }

  .game-layout,
  html.plantlyfe-ui-zoomed .game-layout {
    grid-template-columns: 212px minmax(0, 1fr) 230px;
  }

  .panel-left {
    padding: 10px 8px;
  }

  .info-panel,
  html.plantlyfe-ui-zoomed .info-panel {
    grid-template-columns: minmax(160px, 0.9fr) minmax(180px, 1.1fr);
    gap: 8px;
  }

  .info-section,
  .info-log,
  .info-panel > .info-section,
  .info-panel > .info-section:first-child,
  .info-panel > .info-section:nth-child(3) {
    padding: 10px;
  }

  .seed-row {
    gap: 8px;
    padding: 8px;
  }

  .seed-sprite {
    min-width: 24px;
    font-size: 20px;
  }

  .disp-slot,
  html.plantlyfe-ui-zoomed .disp-slot {
    width: 72px;
    height: 98px;
  }

  .grow-slot,
  html.plantlyfe-ui-zoomed .grow-slot {
    width: 88px;
    height: 116px;
  }

  .gslot-svg svg,
  html.plantlyfe-ui-zoomed .gslot-svg svg {
    width: 82px;
    height: 88px;
  }
}

/* ─── Information clarity pass ──────────────────────────────── */
header {
  background:
    linear-gradient(180deg, rgba(21, 49, 29, .96), rgba(9, 24, 13, .98));
}

.hud {
  align-items: stretch;
}

.hud-chip {
  color: rgba(246, 237, 216, .78);
}

.hud-label {
  display: block;
  margin-bottom: 3px;
  font-size: 5.4px;
  color: rgba(246, 237, 216, .62);
  letter-spacing: .7px;
}

.hud-money,
.hud-rep {
  min-width: 98px;
  border-width: 3px;
  background:
    linear-gradient(180deg, rgba(31, 49, 21, .98), rgba(11, 23, 10, .98));
  box-shadow:
    0 4px 0 rgba(0, 0, 0, .55),
    inset 0 2px 0 rgba(255, 255, 255, .1);
}

.hud-money {
  border-color: var(--amber2);
}

.hud-money .hud-val,
.hud-money::first-letter {
  color: #ffe28a;
}

.hud-rep {
  border-color: var(--leaf2);
}

.hud-rep .hud-val {
  color: #bdf19f;
}

.hud-money .hud-val,
.hud-rep .hud-val {
  font-size: 15px;
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
}

.hud-user,
.hud-chip:not(.hud-money):not(.hud-rep):not(.hud-user) {
  opacity: .72;
}

.rep-bar-outer {
  border-color: rgba(157, 209, 128, .8);
  background: rgba(13, 31, 15, .9);
}

.rep-label {
  color: #bdf19f;
}

.panel-left,
.walkway,
.info-log,
.seed-row.locked,
.grow-empty {
  filter: saturate(.86);
}

.panel-left::before,
.walkway::before,
.display-shelf-wrap::before,
.info-section::after,
.info-detail .detail-wrap::after,
.rank-display::after,
.log-box::after {
  opacity: .32;
}

.info-panel > .info-section:first-child {
  border-color: rgba(255, 226, 138, .78);
  box-shadow:
    0 5px 0 rgba(0, 0, 0, .42),
    0 0 18px rgba(212, 160, 32, .12),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.info-panel > .info-section:first-child .sec-label {
  color: #ffe28a;
  font-size: 7.4px;
}

.req-hint-inline {
  color: rgba(255, 226, 138, .72);
}

.req-card {
  opacity: .82;
  border-color: rgba(110, 139, 94, .55);
}

.req-card.req-active,
.req-card.req-fillable {
  opacity: 1;
}

.req-card.req-active {
  border-color: var(--amber2);
  background:
    linear-gradient(180deg, rgba(46, 45, 20, .98), rgba(17, 31, 14, .98));
  box-shadow:
    0 4px 0 rgba(0, 0, 0, .55),
    0 0 16px rgba(255, 226, 138, .16),
    inset 0 1px 0 rgba(255, 255, 255, .1);
}

.req-card.req-active .req-name b {
  display: inline-block;
  margin-right: 6px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 226, 138, .8);
  background: rgba(255, 226, 138, .15);
  color: #ffe28a;
  font-size: 5.3px;
  vertical-align: middle;
}

.req-name {
  color: var(--cream);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .5);
}

.req-timer {
  padding: 3px 5px;
  border: 1px solid rgba(246, 237, 216, .18);
  background: rgba(0, 0, 0, .24);
}

.req-msg {
  color: rgba(246, 237, 216, .78);
}

.req-plant {
  border-color: rgba(255, 226, 138, .38);
  background: rgba(6, 17, 8, .62);
}

.req-plant-name {
  color: #fff4c4;
}

.req-plant-name span {
  color: rgba(246, 237, 216, .55);
  font-size: 5.2px;
  margin-right: 4px;
}

.req-total {
  color: #ffe28a;
  font-size: 10px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .65);
}

.req-ready-badge {
  font-size: 6px;
  animation: req-pulse 1.2s ease-in-out infinite;
}

.detail-head {
  color: #d5f5bd;
  background:
    linear-gradient(180deg, rgba(29, 59, 31, .98), rgba(14, 34, 15, .98));
}

.detail-stage {
  display: inline-block;
  padding: 4px 6px;
  border: 1px solid currentColor;
  background: rgba(0, 0, 0, .18);
}

.detail-body {
  padding: 10px 12px;
}

.detail-svg-big {
  width: 62px;
  height: 76px;
}

.px-bar-label {
  display: flex;
  justify-content: space-between;
  color: rgba(246, 237, 216, .74);
  font-size: 6.2px;
  margin-bottom: 2px;
}

.px-bar-wrap {
  height: 16px;
  border-width: 2px;
  background: rgba(0, 0, 0, .58);
  margin-bottom: 5px;
}

.px-bar-wrap::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 12px);
  pointer-events: none;
  z-index: 1;
}

.px-bar-fill {
  position: relative;
  z-index: 0;
}

.px-bar-pct {
  top: 3px;
  right: 6px;
  z-index: 2;
  color: #fff7d8;
  font-size: 7px;
  text-shadow: 1px 1px 0 #000;
}

.detail-chips {
  margin: 7px 0;
}

.dchip {
  padding: 5px 6px;
}

.dchip strong {
  font-size: 10px;
}

.action-row {
  margin-top: 4px;
}

.mini-bar {
  position: relative;
  height: 10px;
  border-color: rgba(0, 0, 0, .62);
}

.mini-bar span {
  position: absolute;
  left: 2px;
  top: 0;
  z-index: 2;
  font-size: 4.4px;
  line-height: 9px;
  color: rgba(255, 255, 255, .72);
  text-shadow: 1px 1px 0 #000;
}

.mini-fill {
  position: relative;
  z-index: 1;
}

.gslot-badge {
  top: 3px;
  right: 3px;
  max-width: calc(100% - 8px);
  box-sizing: border-box;
}

.grow-thirsty,
.grow-dry {
  box-shadow:
    0 0 0 2px rgba(224, 123, 55, .32),
    inset 0 -2px 0 rgba(0, 0, 0, .35);
}

.grow-mature {
  box-shadow:
    0 0 0 2px rgba(255, 226, 138, .28),
    inset 0 -2px 0 rgba(0, 0, 0, .35);
}

.grow-selected,
.disp-selected {
  outline: 3px solid rgba(255, 226, 138, .9);
  outline-offset: 2px;
}

.display-shelf-wrap {
  border-color: rgba(255, 226, 138, .38);
}

.disp-wanted {
  border-color: var(--amber2);
  box-shadow:
    0 0 0 2px rgba(255, 226, 138, .22),
    0 4px 0 rgba(0, 0, 0, .46),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.disp-price {
  color: #ffe28a;
  border-color: rgba(255, 226, 138, .45);
  background: rgba(0, 0, 0, .3);
}

.rank-display,
.log-box {
  opacity: .76;
}

.rank-name {
  color: #bdf19f !important;
}

.log-entry {
  color: rgba(214, 224, 190, .62);
}

.btn-water,
.btn-move,
.btn-sell {
  min-height: 36px;
  border-width: 3px;
  font-size: 8px;
}

.btn-water {
  color: #9fe9ff;
  background: #0e2735;
}

.btn-move {
  color: #d8ff9c;
  background: #172b0d;
}

.btn-sell {
  color: #ffe28a;
  background: #2d2407;
}

@media (max-width: 1100px) {
  .hud-money,
  .hud-rep {
    min-width: 84px;
  }

  .hud-money .hud-val,
  .hud-rep .hud-val {
    font-size: 13px;
  }

  .mini-bar {
    height: 9px;
  }
}

@media (max-width: 920px) {
  .encyclopedia-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .encyclopedia-title {
    font-size: 12px;
  }

  .zogton-guide {
    right: 14px;
    bottom: 44px;
    width: min(346px, calc(100% - 28px));
    gap: 9px;
  }

  .zogton-bubble {
    max-width: min(220px, calc(100% - 78px));
    min-height: 64px;
    padding: 13px 11px 10px;
    font-size: 6px;
    line-height: 1.65;
  }

  .zogton-sprite-wrap {
    width: 72px;
    height: 84px;
  }
}

/* ─── Pause State ───────────────────────────────────────────── */
.btn-pause {
  min-height: 30px;
  padding: 6px 10px;
  font-family: var(--fn);
  font-size: 6.4px;
  color: #ffe28a;
  background: rgba(42, 32, 8, .92);
  border: 2px solid var(--amber2);
  box-shadow: 0 3px 0 var(--bark);
  cursor: pointer;
}

.btn-pause:hover {
  filter: brightness(1.14);
}

.pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 12px),
    rgba(0, 0, 0, .62);
}

.pause-overlay.is-open {
  display: flex;
}

.pause-box {
  width: min(520px, 90vw);
  padding: 24px 22px;
  text-align: center;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 226, 138, .2), transparent 38%),
    linear-gradient(180deg, rgba(37, 45, 18, .98), rgba(8, 20, 9, .98));
  border: 3px solid var(--amber2);
  box-shadow:
    0 12px 0 rgba(42, 28, 15, .8),
    0 28px 58px rgba(0,0,0,.54),
    inset 0 2px 0 rgba(246,237,216,.1);
}

.pause-title {
  margin-bottom: 12px;
  color: #ffe28a;
  font-size: 22px;
  line-height: 1;
  text-shadow: 3px 3px 0 rgba(0,0,0,.6);
}

.pause-sub {
  margin-bottom: 18px;
  color: rgba(246,237,216,.72);
  font-size: 7px;
  line-height: 2;
}

.pause-resume {
  min-height: 42px;
  padding: 10px 18px;
  font-family: var(--fn);
  font-size: 8px;
  color: #20300f;
  background: #d8ff9c;
  border: 3px solid var(--leaf2);
  box-shadow: 0 4px 0 var(--bark);
  cursor: pointer;
}

body.plantlyfe-paused #game-screen {
  filter: saturate(.78) brightness(.72);
}

body.plantlyfe-paused .grow-slot,
body.plantlyfe-paused .disp-slot,
body.plantlyfe-paused .seed-row,
body.plantlyfe-paused .px-btn-sm,
body.plantlyfe-paused .btn-encyclopedia {
  cursor: not-allowed;
}

body.plantlyfe-paused .grow-slot,
body.plantlyfe-paused .disp-slot,
body.plantlyfe-paused .seed-row,
body.plantlyfe-paused .px-btn-sm {
  filter: grayscale(.2) brightness(.78);
}

/* ─── Unified greenhouse console fit pass ───────────────────── */
:root {
  --console-border: 2px;
  --console-gap: 10px;
  --console-pad: 12px;
  --console-head: 34px;
  --console-line: rgba(124, 153, 92, .82);
  --console-line-soft: rgba(124, 153, 92, .42);
  --console-rail: rgba(42, 28, 15, .72);
  --console-surface: linear-gradient(180deg, rgba(25, 49, 28, .98), rgba(9, 21, 11, .98));
  --console-header: linear-gradient(180deg, rgba(47, 84, 49, .98), rgba(20, 42, 22, .98));
}

header {
  min-height: 58px;
  padding: 9px 12px;
  gap: 10px;
  border-bottom: var(--console-border) solid #704c27;
  box-shadow:
    inset 0 1px 0 rgba(246, 237, 216, .08),
    0 4px 0 var(--console-rail);
}

.logo {
  min-height: 38px;
  display: flex;
  align-items: center;
}

.hud {
  flex: 1 1 560px;
  justify-content: flex-end;
  gap: 0;
  min-height: 38px;
  padding: 4px;
  overflow: hidden;
  border: var(--console-border) solid var(--console-line);
  background:
    linear-gradient(90deg, rgba(196,230,154,.04) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, rgba(15, 33, 17, .94), rgba(6, 16, 8, .94));
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.08),
    inset 0 -3px 0 rgba(0,0,0,.18);
}

.hud-chip,
.rep-bar-outer,
.btn-encyclopedia,
.btn-pause,
.btn-logout {
  min-height: 30px;
  margin: 0;
  border-width: 0;
  border-right: 1px solid var(--console-line-soft);
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

.hud-chip:first-child {
  border-left: 0;
}

.btn-logout {
  border-right: 0;
}

.hud-chip,
.rep-bar-outer {
  padding: 6px 9px;
}

.hud-money,
.hud-rep {
  min-width: 100px;
}

.rep-bar-outer {
  min-width: 176px;
}

.btn-encyclopedia,
.btn-pause,
.btn-logout {
  padding: 6px 9px;
}

.hud-chip:hover,
.btn-encyclopedia:hover,
.btn-pause:hover,
.btn-logout:hover {
  background: rgba(196,230,154,.06);
  filter: none;
}

.game-layout {
  grid-template-columns: 242px minmax(0, 1fr) 252px;
  gap: 0;
  border-top: 1px solid rgba(246,237,216,.04);
  background:
    linear-gradient(90deg, rgba(196,230,154,.025) 0 1px, transparent 1px 44px),
    #0a160c;
}

.panel-left,
.panel-centre,
.panel-right {
  min-height: 0;
  background: var(--console-surface);
}

.panel-left,
.panel-right {
  padding: var(--console-pad);
}

.panel-left {
  border-right: var(--console-border) solid var(--console-line);
}

.panel-right {
  border-left: var(--console-border) solid var(--console-line);
}

.panel-centre {
  border-inline: 0;
}

.sec-label,
.display-shelf-label,
.grow-shelf-header,
.detail-head {
  min-height: var(--console-head);
  display: flex;
  align-items: center;
  margin: 0 0 var(--console-gap);
  padding: 8px 10px;
  color: #d8f2b0;
  border: var(--console-border) solid var(--console-line);
  background: var(--console-header);
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.08),
    inset 0 -3px 0 rgba(0,0,0,.16);
}

.display-shelf-label,
.grow-shelf-header,
.detail-head {
  justify-content: space-between;
}

.display-shelf-wrap {
  padding: 10px var(--console-pad);
  border-bottom: var(--console-border) solid var(--console-line);
  background:
    radial-gradient(circle at 24% 10%, rgba(196,230,154,.08), transparent 28%),
    linear-gradient(180deg, rgba(20,42,22,.98), rgba(11,24,13,.98));
  box-shadow:
    inset 0 -3px 0 rgba(0,0,0,.18),
    0 4px 0 rgba(42,28,15,.42);
}

.display-shelf {
  gap: 10px;
  padding: 7px 8px;
  border: var(--console-border) solid var(--console-line-soft);
  background:
    linear-gradient(90deg, rgba(246,237,216,.03) 0 1px, transparent 1px 36px),
    rgba(7, 17, 8, .62);
}

.disp-slot {
  width: 88px;
  height: 104px;
}

.centre-lower {
  background:
    radial-gradient(circle at 50% 20%, rgba(196,230,154,.08), transparent 36%),
    linear-gradient(180deg, rgba(15,32,17,.94), rgba(7,16,8,.96));
}

.info-panel {
  height: calc(100% - 2 * var(--console-pad));
  margin: var(--console-pad);
  grid-template-columns: minmax(220px, .9fr) minmax(268px, 1.1fr);
  grid-template-rows: minmax(210px, auto) auto minmax(160px, 1fr);
  gap: var(--console-gap);
}

.info-panel > .info-section,
.info-detail .detail-wrap {
  padding: var(--console-pad);
  border: var(--console-border) solid var(--console-line);
  background: var(--console-surface);
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.07),
    inset 0 -3px 0 rgba(0,0,0,.18),
    3px 4px 0 rgba(42,28,15,.46);
}

.info-panel > .info-section:first-child {
  grid-row: 1 / 4;
}

.info-detail {
  min-height: 236px;
}

.info-detail,
.info-log {
  padding: 0;
}

.info-log {
  display: flex;
  flex-direction: column;
}

.info-log .log-box,
.rank-display,
#request-list,
.detail-body {
  min-height: 0;
}

.detail-wrap {
  display: flex;
  flex-direction: column;
}

.detail-head {
  flex: 0 0 auto;
  margin: 0 0 var(--console-gap);
}

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.req-card,
.seed-row,
.rank-display,
.log-box,
.detail-svg-big,
.dchip,
.req-plant {
  border-width: var(--console-border);
  border-color: var(--console-line-soft);
}

.seed-list,
#request-list {
  gap: 8px;
}

.seed-row {
  min-height: 72px;
  padding: 9px 10px;
}

.req-card {
  padding: 10px;
  margin-bottom: 8px;
}

.req-card.req-active {
  border-color: var(--leaf2);
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.09),
    inset 0 -3px 0 rgba(0,0,0,.16),
    0 0 0 2px rgba(196,230,154,.12),
    3px 4px 0 rgba(42,28,15,.5);
}

.req-card.req-active::before {
  width: 5px;
  background: var(--leaf2);
}

.rank-display,
.log-box {
  flex: 1;
}

.panel-right {
  padding: 0;
}

.grow-shelf-header {
  margin: var(--console-pad) var(--console-pad) var(--console-gap);
  border-bottom-width: var(--console-border);
}

.grow-shelf {
  margin: 0 var(--console-pad) var(--console-pad);
  border: var(--console-border) solid var(--console-line);
  background-image:
    linear-gradient(90deg, rgba(246,237,216,.025) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(180deg, transparent 0px, transparent 110px, rgba(112,76,39,.88) 110px, rgba(112,76,39,.88) 116px),
    linear-gradient(180deg, #1b351f, #0c1b0e);
}

.grow-shelf-row {
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 8px 6px 10px;
  border-bottom: var(--console-border) solid #704c27;
}

.grow-slot {
  width: 94px;
  height: 114px;
  margin: 0;
}

.grow-selected,
.disp-selected,
.seed-row.sel-seed,
.req-card.req-fillable {
  outline: 2px solid rgba(240,200,64,.72);
  outline-offset: 2px;
}

.zogton-guide {
  right: 18px;
}

@media (max-width: 1180px) {
  .game-layout {
    grid-template-columns: 232px minmax(0, 1fr) 238px;
  }

  .info-panel {
    grid-template-columns: minmax(204px, .88fr) minmax(250px, 1.12fr);
    gap: 9px;
  }

  .disp-slot {
    width: 86px;
  }

  .grow-slot {
    width: 88px;
  }

  .zogton-guide {
    right: 14px;
    width: min(294px, calc(100vw - 24px));
  }
}

@media (max-width: 980px) {
  .hud {
    justify-content: flex-start;
  }

  .game-layout {
    grid-template-columns: 220px minmax(0, 1fr) 220px;
  }

  .info-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(270px, auto) auto minmax(140px, 1fr);
    overflow-y: auto;
  }

  .info-panel > .info-section:first-child,
  .info-detail,
  .info-panel > .info-section:nth-child(3),
  .info-log {
    grid-column: 1;
    grid-row: auto;
  }

  .zogton-guide {
    right: 10px;
    bottom: 10px;
    width: min(348px, calc(100vw - 20px));
    gap: 9px;
  }

  .zogton-bubble {
    max-width: min(240px, calc(100% - 76px));
    min-height: 64px;
    font-size: 5.8px;
    line-height: 1.65;
  }

  .zogton-sprite-wrap {
    width: 70px;
    height: 82px;
  }
}

/* ─── Subtle greenhouse motion pass ─────────────────────────── */
#game-screen::before {
  position: absolute;
  inset: 62px 0 0;
  z-index: 1;
  pointer-events: none;
  opacity: .34;
  background:
    linear-gradient(180deg, transparent 0 28%, rgba(196,230,154,.045) 45%, transparent 68%),
    repeating-linear-gradient(180deg, rgba(246,237,216,.045) 0 1px, transparent 1px 13px);
  mix-blend-mode: screen;
  animation: greenhouseScan 18s steps(18, end) infinite;
}

#game-screen::after {
  position: absolute;
  inset: 62px 0 0;
  z-index: 1;
  pointer-events: none;
  opacity: .26;
  background:
    radial-gradient(circle at 18% 22%, rgba(196,230,154,.13), transparent 30%),
    radial-gradient(circle at 78% 62%, rgba(240,200,64,.08), transparent 34%);
  animation: greenhouseGlow 16s ease-in-out infinite;
}

header,
.game-layout,
.pause-overlay,
.encyclopedia-modal,
#toast-container {
  position: relative;
  z-index: 2;
}

.panel-left,
.panel-centre,
.panel-right {
  position: relative;
  z-index: 2;
}

.seed-row.unlocked,
.req-card,
.disp-slot,
.grow-slot,
.px-btn-sm,
.btn-encyclopedia,
.btn-pause,
.btn-logout {
  will-change: transform, filter;
}

.seed-row.unlocked:hover,
.req-card:hover,
.disp-slot:hover,
.grow-slot:hover {
  transform: translateY(-2px);
}

.seed-row.unlocked:active,
.req-card:active,
.disp-slot:active,
.grow-slot:active {
  transform: translate(1px, 1px);
}

.grow-seed .gslot-svg,
.grow-growing .gslot-svg,
.grow-thirsty .gslot-svg,
.grow-dry .gslot-svg {
  transform-origin: 50% 100%;
  animation: plantIdleSway 5.6s steps(8, end) infinite;
}

.grow-thirsty .gslot-svg,
.grow-dry .gslot-svg {
  animation-duration: 4.2s;
}

.fx-stage-change {
  position: relative;
}

.fx-stage-change::after,
.grow-mature::after {
  position: absolute;
  inset: 8px 10px auto auto;
  width: 20px;
  height: 20px;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle, rgba(255,226,138,.95) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 25%, rgba(216,255,156,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 25% 78%, rgba(255,226,138,.75) 0 1px, transparent 2px);
  image-rendering: pixelated;
  opacity: 0;
}

.fx-stage-change::after {
  animation: matureSparkleBurst .76s steps(5, end) forwards;
}

.grow-mature::after {
  animation: matureSparkleIdle 3.8s steps(6, end) infinite;
}

.money-pop {
  animation: moneyPopPixel .52s steps(5, end);
}

.fx-sale-hud .hud-money,
.fx-sale-hud .hud-rep {
  animation: hudValuePulse .52s steps(4, end);
}

.fx-watered {
  animation: waterGlowPixel .62s steps(5, end);
}

.fx-watered::after {
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(128,184,232,.72);
  opacity: 0;
  pointer-events: none;
  content: "";
  animation: waterPanelRipple .62s steps(5, end);
}

.water-ripple {
  border-radius: 0;
  box-shadow: 0 0 12px rgba(128,184,232,.3);
}

.req-card.req-warn {
  animation: requestWarnPulse 2.2s steps(6, end) infinite;
}

.req-card.req-urgent {
  animation: requestUrgentPulse .9s steps(4, end) infinite;
}

@keyframes greenhouseScan {
  0% { background-position: 0 -120px, 0 0; }
  100% { background-position: 0 520px, 0 26px; }
}

@keyframes greenhouseGlow {
  0%, 100% {
    opacity: .2;
    transform: translate3d(0, 0, 0);
  }
  50% {
    opacity: .34;
    transform: translate3d(10px, -6px, 0);
  }
}

@keyframes plantIdleSway {
  0%, 100% { transform: translateY(0) skewX(0deg); }
  30% { transform: translateY(-1px) skewX(-1deg); }
  62% { transform: translateY(0) skewX(1deg); }
}

@keyframes matureSparkleBurst {
  0% { opacity: 0; transform: translate(0, 6px) scale(.7); }
  30% { opacity: 1; transform: translate(-2px, -2px) scale(1); }
  70% { opacity: .75; transform: translate(2px, -7px) scale(1.1); }
  100% { opacity: 0; transform: translate(5px, -10px) scale(.8); }
}

@keyframes matureSparkleIdle {
  0%, 78%, 100% { opacity: 0; transform: translateY(0) scale(.8); }
  84% { opacity: .8; transform: translateY(-3px) scale(1); }
  92% { opacity: .42; transform: translateY(-6px) scale(1.05); }
}

@keyframes moneyPopPixel {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.16); color: #ffe28a; filter: brightness(1.25); }
  68% { transform: scale(1.06); }
}

@keyframes hudValuePulse {
  0%, 100% { filter: brightness(1); }
  44% { filter: brightness(1.24); }
}

@keyframes waterGlowPixel {
  0%, 100% { filter: brightness(1); }
  36% {
    border-color: var(--sky2);
    filter: brightness(1.18) saturate(1.08);
    box-shadow:
      inset 0 2px 0 rgba(246,237,216,.12),
      inset 0 -5px 0 rgba(0,0,0,.2),
      3px 5px 0 rgba(42,28,15,.7),
      0 0 18px rgba(128,184,232,.34);
  }
}

@keyframes waterPanelRipple {
  0% { opacity: 0; transform: scale(.7); }
  35% { opacity: .8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}

@keyframes requestWarnPulse {
  0%, 100% { border-color: var(--amber); filter: brightness(1); }
  50% {
    border-color: var(--amber2);
    filter: brightness(1.08);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.1),
      inset 0 -3px 0 rgba(0,0,0,.16),
      3px 5px 0 rgba(42,28,15,.58),
      0 0 16px rgba(240,200,64,.16);
  }
}

@keyframes requestUrgentPulse {
  0%, 100% { border-color: var(--rust); filter: brightness(1); }
  50% {
    border-color: var(--rust2);
    filter: brightness(1.12);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.08),
      inset 0 -3px 0 rgba(0,0,0,.16),
      3px 5px 0 rgba(42,28,15,.58),
      0 0 16px rgba(224,96,64,.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  #game-screen::before,
  #game-screen::after,
  .grow-seed .gslot-svg,
  .grow-growing .gslot-svg,
  .grow-thirsty .gslot-svg,
  .grow-dry .gslot-svg,
  .grow-mature::after,
  .req-card.req-warn,
  .req-card.req-urgent {
    animation: none !important;
  }
}

/* ─── Middle console panel overhaul ─────────────────────────── */
.info-panel {
  --info-panel-gap: clamp(8px, 1.25vw, 12px);
  --info-tab-height: clamp(48px, 6.2vh, 58px);
  display: flex;
  flex-wrap: wrap;
  align-content: stretch;
  gap: var(--info-panel-gap);
  grid-template-columns: none;
  grid-template-rows: none;
  overflow: hidden;
}

.info-panel > .info-section,
.info-panel > .info-section:first-child,
.info-panel > .info-section:nth-child(3),
.info-detail,
.info-log {
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
}

.info-panel > .info-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    flex-basis .22s ease,
    height .22s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.info-panel.expanded-count-2 > .info-section.is-expanded {
  flex: 1 1 calc(50% - (var(--info-panel-gap) / 2));
  height: calc(100% - var(--info-tab-height) - var(--info-panel-gap));
}

.info-panel.expanded-count-1 > .info-section.is-expanded {
  flex: 1 1 100%;
  height: calc(100% - var(--info-tab-height) - var(--info-tab-height) - var(--info-panel-gap) - var(--info-panel-gap));
}

.info-panel > .info-section.is-collapsed {
  flex: 1 1 calc(50% - (var(--info-panel-gap) / 2));
  height: var(--info-tab-height);
}

.panel-toggle,
.panel-toggle.sec-label,
.info-detail .panel-toggle.sec-label {
  width: 100%;
  min-height: var(--console-head);
  margin: 0;
  padding: 9px 11px;
  border: 0;
  border-bottom: var(--console-border) solid rgba(143, 191, 104, .42);
  background:
    linear-gradient(90deg, rgba(216,255,156,.075) 0 1px, transparent 1px 32px),
    linear-gradient(180deg, rgba(31, 58, 32, .98), rgba(15, 32, 17, .98));
  box-shadow:
    inset 0 1px 0 rgba(246, 237, 216, .08),
    inset 0 -3px 0 rgba(0, 0, 0, .18);
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr) auto;
  align-items: center;
}

.panel-title {
  color: #f6efd8;
  font-size: 7.2px;
  letter-spacing: .12em;
}

.panel-summary {
  max-width: none;
  color: rgba(216, 255, 156, .86);
  font-size: 5.8px;
  letter-spacing: .03em;
  text-align: right;
}

.panel-caret {
  min-width: 18px;
  color: #ffe28a;
  font-size: 10px;
  text-align: right;
}

.info-panel > .info-section.is-collapsed .panel-toggle,
.info-panel > .info-section.is-collapsed .panel-toggle.sec-label {
  height: 100%;
  border-bottom: 0;
  background:
    linear-gradient(90deg, rgba(196,230,154,.05) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, rgba(18, 39, 20, .98), rgba(8, 20, 10, .98));
}

.info-panel > .info-section.is-collapsed .panel-title {
  color: rgba(246, 239, 216, .86);
}

.info-panel > .info-section.is-collapsed .panel-summary {
  color: rgba(183, 217, 154, .76);
}

.panel-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

#request-list,
.rank-display,
.log-box,
.detail-wrap {
  min-height: 0;
  max-height: none;
}

#request-list,
.rank-display,
.log-box {
  padding: var(--console-pad);
}

.detail-wrap {
  flex: 1;
  border: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(196,230,154,.07), transparent 32%),
    linear-gradient(180deg, rgba(12, 27, 14, .96), rgba(7, 17, 8, .98));
  box-shadow: none;
}

.detail-head {
  border-inline: 0;
  border-top: 0;
}

.detail-body {
  padding: var(--console-pad);
}

.req-hint-inline {
  display: none;
}

.rank-display {
  display: grid;
  align-content: center;
  gap: 8px;
}

.log-box {
  line-height: 1.8;
}

@media (max-width: 980px) {
  .info-panel,
  html.plantlyfe-ui-zoomed .info-panel {
    display: flex;
    grid-template-columns: none;
    grid-template-rows: none;
    overflow: hidden;
  }

  .info-panel.expanded-count-2 > .info-section.is-expanded,
  .info-panel.expanded-count-1 > .info-section.is-expanded {
    flex-basis: 100%;
    height: calc(100% - var(--info-tab-height) - var(--info-tab-height) - var(--info-tab-height) - var(--info-panel-gap) - var(--info-panel-gap) - var(--info-panel-gap));
  }

  .info-panel > .info-section.is-collapsed {
    flex-basis: 100%;
  }
}

/* ─── Frame header command bar cleanup ─────────────────────── */
#game-screen > header {
  min-height: 64px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  background:
    linear-gradient(90deg, rgba(196,230,154,.035) 0 1px, transparent 1px 40px),
    linear-gradient(180deg, rgba(24, 47, 26, .98), rgba(8, 21, 10, .99));
}

.logo {
  display: none;
}

.game-frame-title {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #e8ffd3;
  font-size: 14px;
  line-height: 1;
  letter-spacing: .02em;
  border: var(--console-border) solid var(--console-line);
  background:
    linear-gradient(180deg, rgba(42, 72, 39, .96), rgba(16, 35, 18, .98));
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.1),
    inset 0 -3px 0 rgba(0,0,0,.2),
    3px 4px 0 rgba(42,28,15,.48);
  white-space: nowrap;
}

.hud {
  min-width: 0;
  min-height: 42px;
  justify-content: stretch;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: var(--console-border) solid var(--console-line);
  background:
    linear-gradient(90deg, rgba(246,237,216,.035) 0 1px, transparent 1px 36px),
    linear-gradient(180deg, rgba(17, 36, 18, .98), rgba(6, 16, 8, .98));
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.08),
    inset 0 -3px 0 rgba(0,0,0,.2),
    3px 4px 0 rgba(42,28,15,.44);
  overflow: hidden;
}

.hud-chip,
.rep-bar-outer,
.btn-encyclopedia,
.btn-pause,
.btn-logout {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-right: 1px solid var(--console-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hud-chip:last-child,
.btn-logout {
  border-right: 0;
}

.hud-user {
  min-width: 92px;
  justify-content: flex-start;
  color: #d8ff9c;
}

.hud-money,
.hud-rep {
  min-width: 112px;
}

.rep-bar-outer {
  min-width: 210px;
  flex: 1 1 210px;
  align-items: stretch;
  justify-content: center;
  padding-block: 6px;
}

.hud-chip:not(.hud-user),
.btn-encyclopedia,
.btn-pause,
.btn-logout {
  flex: 0 0 auto;
}

.btn-encyclopedia {
  color: #ccefb2;
}

.btn-pause {
  color: #ffe28a;
}

.btn-logout {
  color: rgba(246, 237, 216, .76);
}

.btn-encyclopedia:hover,
.btn-pause:hover,
.btn-logout:hover,
.hud-chip:hover {
  background: rgba(196,230,154,.07);
}

@media (max-width: 1180px) {
  #game-screen > header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .game-frame-title {
    justify-content: center;
    min-height: 34px;
    font-size: 12px;
  }

  .hud {
    min-height: 40px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

@media (max-width: 760px) {
  .hud-user {
    min-width: 76px;
  }

  .hud-money,
  .hud-rep {
    min-width: 96px;
  }

  .rep-bar-outer {
    min-width: 174px;
  }
}

/* Wrapper-integrated HUD: outer Plant Lyfe page mirrors this header. */
html.plantlyfe-outer-hud #game-screen > header {
  display: none;
}

html.plantlyfe-outer-hud #game-screen::before,
html.plantlyfe-outer-hud #game-screen::after {
  inset: 0;
}

html.plantlyfe-outer-hud .game-layout {
  border-top: 0;
}

/* ─── Collapsible info console panels ───────────────────────── */
.collapsible-panel {
  transition: min-height .18s ease, filter .18s ease;
}

.collapsible-panel .panel-toggle {
  transition: border-color .18s ease, box-shadow .18s ease, filter .18s ease;
}

.panel-flash-new .panel-toggle {
  animation: panelFlashLeaf 1.1s steps(4, end) 2;
}

.panel-flash-log .panel-toggle {
  animation: panelFlashSky 1s steps(3, end) 2;
}

.panel-flash-rank .panel-toggle {
  animation: panelFlashStar 1.1s steps(4, end) 2;
}

.panel-attn-ready .panel-toggle {
  border-color: rgba(196, 230, 154, .92);
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.1),
    inset 0 -3px 0 rgba(0,0,0,.16),
    0 0 0 2px rgba(196,230,154,.12),
    0 0 14px rgba(196,230,154,.16);
}

.panel-attn-urgent .panel-toggle {
  animation: panelUrgentPulse 1.7s steps(3, end) infinite;
}

.panel-attn-water .panel-toggle {
  animation: panelWaterPulse 1.9s steps(3, end) infinite;
}

.panel-attn-mature .panel-toggle {
  animation: panelMaturePulse 2.2s steps(4, end) infinite;
}

.panel-attn-dead .panel-toggle {
  animation: panelDeadPulse 1.55s steps(3, end) infinite;
}

.panel-attn-ready.panel-attn-urgent .panel-toggle {
  animation: panelUrgentPulse 1.7s steps(3, end) infinite;
}

.panel-toggle {
  width: 100%;
  min-width: 0;
  appearance: none;
  cursor: pointer;
  font-family: var(--fn);
  line-height: 1.2;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.panel-toggle.sec-label {
  margin-bottom: var(--console-gap);
}

.info-detail .panel-toggle.sec-label {
  margin: var(--console-pad) var(--console-pad) var(--console-gap);
  width: calc(100% - 2 * var(--console-pad));
}

.panel-toggle:hover,
.panel-toggle:focus-visible {
  filter: brightness(1.12);
  border-color: var(--leaf2);
}

.panel-toggle:focus-visible {
  outline: 2px solid rgba(196, 230, 154, .68);
  outline-offset: 2px;
}

.panel-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-summary {
  max-width: 190px;
  overflow: hidden;
  color: #eefbd2;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .82;
  font-size: .86em;
}

.panel-caret {
  color: var(--amber2);
  font-size: 1.2em;
  line-height: 1;
}

.panel-content[hidden] {
  display: none !important;
}

.collapsible-panel.is-collapsed {
  min-height: 0 !important;
}

.info-panel:has(.collapsible-panel.is-collapsed) {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.collapsible-panel.is-collapsed .panel-toggle.sec-label {
  margin-bottom: 0;
  border-color: rgba(84, 114, 74, .72);
  background:
    linear-gradient(90deg, rgba(196,230,154,.055) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, rgba(22, 45, 24, .94), rgba(9, 22, 11, .96));
}

.info-panel > .info-section:first-child.is-collapsed {
  grid-row: 1;
}

.info-detail.is-collapsed,
.info-log.is-collapsed {
  min-height: 0;
}

.info-detail.is-collapsed .panel-toggle.sec-label {
  margin-bottom: var(--console-pad);
}

@media (max-width: 980px) {
  .panel-summary {
    max-width: 150px;
  }

  .panel-toggle {
    gap: 6px;
  }

  .info-panel:has(.collapsible-panel.is-collapsed) {
    grid-template-rows: repeat(4, auto);
    align-content: start;
  }
}

@keyframes panelFlashLeaf {
  0%, 100% {
    border-color: var(--console-line);
    box-shadow: inset 0 1px 0 rgba(246,237,216,.08), inset 0 -3px 0 rgba(0,0,0,.16);
  }
  45% {
    border-color: var(--leaf2);
    filter: brightness(1.16);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.12),
      inset 0 -3px 0 rgba(0,0,0,.16),
      0 0 0 2px rgba(196,230,154,.16),
      0 0 18px rgba(196,230,154,.2);
  }
}

@keyframes panelFlashSky {
  0%, 100% {
    border-color: var(--console-line);
    box-shadow: inset 0 1px 0 rgba(246,237,216,.08), inset 0 -3px 0 rgba(0,0,0,.16);
  }
  45% {
    border-color: var(--sky2);
    filter: brightness(1.14);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.12),
      inset 0 -3px 0 rgba(0,0,0,.16),
      0 0 0 2px rgba(128,184,232,.14),
      0 0 16px rgba(128,184,232,.18);
  }
}

@keyframes panelFlashStar {
  0%, 100% {
    border-color: var(--console-line);
    box-shadow: inset 0 1px 0 rgba(246,237,216,.08), inset 0 -3px 0 rgba(0,0,0,.16);
  }
  45% {
    border-color: var(--amber2);
    filter: brightness(1.15);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.12),
      inset 0 -3px 0 rgba(0,0,0,.16),
      0 0 0 2px rgba(240,200,64,.14),
      0 0 18px rgba(240,200,64,.18);
  }
}

@keyframes panelUrgentPulse {
  0%, 100% {
    border-color: var(--amber);
    box-shadow: inset 0 1px 0 rgba(246,237,216,.08), inset 0 -3px 0 rgba(0,0,0,.16);
  }
  50% {
    border-color: var(--rust2);
    filter: brightness(1.1);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.1),
      inset 0 -3px 0 rgba(0,0,0,.16),
      0 0 0 2px rgba(224,96,64,.12),
      0 0 16px rgba(224,96,64,.16);
  }
}

@keyframes panelWaterPulse {
  0%, 100% {
    border-color: var(--sky2);
    box-shadow: inset 0 1px 0 rgba(246,237,216,.08), inset 0 -3px 0 rgba(0,0,0,.16);
  }
  50% {
    filter: brightness(1.1);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.1),
      inset 0 -3px 0 rgba(0,0,0,.16),
      0 0 0 2px rgba(128,184,232,.12),
      0 0 15px rgba(128,184,232,.16);
  }
}

@keyframes panelMaturePulse {
  0%, 100% {
    border-color: var(--leaf2);
    box-shadow: inset 0 1px 0 rgba(246,237,216,.08), inset 0 -3px 0 rgba(0,0,0,.16);
  }
  50% {
    border-color: var(--amber2);
    filter: brightness(1.12);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.1),
      inset 0 -3px 0 rgba(0,0,0,.16),
      0 0 0 2px rgba(240,200,64,.13),
      0 0 16px rgba(196,230,154,.14);
  }
}

@keyframes panelDeadPulse {
  0%, 100% {
    border-color: var(--rust);
    box-shadow: inset 0 1px 0 rgba(246,237,216,.06), inset 0 -3px 0 rgba(0,0,0,.16);
  }
  50% {
    border-color: var(--rust2);
    filter: brightness(1.09);
    box-shadow:
      inset 0 1px 0 rgba(246,237,216,.08),
      inset 0 -3px 0 rgba(0,0,0,.16),
      0 0 0 2px rgba(224,96,64,.12),
      0 0 14px rgba(224,96,64,.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-flash-new .panel-toggle,
  .panel-flash-log .panel-toggle,
  .panel-flash-rank .panel-toggle,
  .panel-attn-urgent .panel-toggle,
  .panel-attn-water .panel-toggle,
  .panel-attn-mature .panel-toggle,
  .panel-attn-dead .panel-toggle {
    animation: none !important;
  }
}

/* ─── Greenhouse ambience polish: CSS-only ──────────────────── */
#game-screen {
  background:
    radial-gradient(circle at 50% -10%, rgba(196,230,154,.075), transparent 32%),
    linear-gradient(180deg, #071108, #0b190d 52%, #061006);
}

#game-screen::before {
  opacity: .44;
  background:
    linear-gradient(108deg, transparent 0 18%, rgba(216,255,156,.075) 24%, transparent 34%),
    linear-gradient(108deg, transparent 0 52%, rgba(128,184,232,.045) 59%, transparent 70%),
    linear-gradient(180deg, transparent 0 24%, rgba(196,230,154,.036) 42%, transparent 62%),
    repeating-linear-gradient(180deg, rgba(246,237,216,.038) 0 1px, transparent 1px 13px);
  background-size: 620px 100%, 760px 100%, 100% 560px, 100% 26px;
  mix-blend-mode: screen;
  animation: greenhouseLightBands 24s steps(32, end) infinite;
}

#game-screen::after {
  opacity: .32;
  background:
    radial-gradient(circle, rgba(246,237,216,.23) 0 1px, transparent 1.6px) 7% 18% / 97px 83px,
    radial-gradient(circle, rgba(196,230,154,.2) 0 1px, transparent 1.7px) 31% 43% / 131px 109px,
    radial-gradient(circle, rgba(240,200,64,.18) 0 1px, transparent 1.8px) 71% 28% / 151px 127px,
    radial-gradient(circle at 18% 22%, rgba(196,230,154,.12), transparent 30%),
    radial-gradient(circle at 78% 62%, rgba(240,200,64,.07), transparent 34%);
  animation:
    greenhousePollenDrift 34s steps(40, end) infinite,
    greenhouseGlow 16s ease-in-out infinite;
}

.info-panel > .info-section,
.info-detail .detail-wrap,
.display-shelf-wrap,
.grow-shelf {
  transition: box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}

.info-panel > .info-section:hover,
.info-detail:not(.is-collapsed):hover .detail-wrap,
.display-shelf-wrap:hover,
.grow-shelf:hover {
  border-color: rgba(196,230,154,.74);
  box-shadow:
    inset 0 1px 0 rgba(246,237,216,.08),
    inset 0 -3px 0 rgba(0,0,0,.18),
    3px 4px 0 rgba(42,28,15,.46),
    0 0 20px rgba(196,230,154,.09);
}

.panel-attn-ready,
.panel-attn-urgent,
.panel-attn-water,
.panel-attn-mature,
.panel-attn-dead {
  filter: saturate(1.04);
}

/* Plant Lyfe tab artwork: expanded panels keep two steady art-backed spaces. */
.info-panel > .info-section {
  position: relative;
  isolation: isolate;
}

.info-panel > .info-section::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(7, 18, 9, .34), rgba(7, 18, 9, .62)),
    var(--plantlyfe-panel-art, none);
  background-size: cover;
  background-position: center;
  filter: saturate(.92) contrast(1.02) brightness(.82);
  transition: opacity .22s ease, filter .22s ease;
}

.info-panel > .info-section > * {
  position: relative;
  z-index: 1;
}

.info-panel > .info-section.is-expanded::before {
  opacity: .72;
}

.info-panel > .info-section[data-panel-key="requests"] {
  --plantlyfe-panel-art: url("../../assets/plantlyfe_customerrequests_background.png");
}

.info-panel > .info-section[data-panel-key="details"] {
  --plantlyfe-panel-art: url("../../assets/plantlyfe_growthdata_background.png");
}

.info-panel > .info-section[data-panel-key="rank"] {
  --plantlyfe-panel-art: url("../../assets/plantlyfe_bank_background.jpeg");
}

.info-panel > .info-section[data-panel-key="log"] {
  --plantlyfe-panel-art: url("../../assets/plantlyfe_activitylog_background.png");
}

.info-panel > .info-section.is-expanded .panel-toggle[aria-disabled="true"] {
  cursor: default;
  pointer-events: none;
}

.info-panel > .info-section.is-expanded .panel-caret {
  display: none;
}

.info-panel > .info-section.is-expanded .detail-wrap {
  background: transparent;
}

.info-panel > .info-section.is-expanded .panel-content,
.info-panel > .info-section.is-expanded .rank-display,
.info-panel > .info-section.is-expanded .log-box,
.info-panel > .info-section.is-expanded .detail-wrap {
  border-color: rgba(196, 230, 154, .18);
  background: transparent;
  box-shadow: none;
}

.info-panel > .info-section.is-expanded .detail-head {
  border-color: rgba(196, 230, 154, .2);
  background:
    linear-gradient(90deg, rgba(7, 18, 9, .64), rgba(7, 18, 9, .36));
}

.info-panel > .info-section.is-expanded .req-empty,
.info-panel > .info-section.is-expanded .detail-empty {
  border-color: rgba(196, 230, 154, .24);
  background: rgba(7, 18, 9, .34);
}

.info-panel > .info-section.is-expanded .rank-name,
.info-panel > .info-section.is-expanded .rank-sub,
.info-panel > .info-section.is-expanded .rank-next,
.info-panel > .info-section.is-expanded .log-entry,
.info-panel > .info-section.is-expanded .detail-body,
.info-panel > .info-section.is-expanded .detail-head,
.info-panel > .info-section.is-expanded .panel-title,
.info-panel > .info-section.is-expanded .panel-summary {
  text-shadow:
    0 2px 0 rgba(0, 0, 0, .82),
    0 0 8px rgba(0, 0, 0, .72);
}

/* Readability pass: lift tiny HUD text without changing the greenhouse layout. */
#game-screen {
  font-size: 10.8px;
  line-height: 1.65;
}

#game-screen .info-panel {
  --info-tab-height: clamp(58px, 6.6vh, 66px);
}

#game-screen .game-frame-title {
  font-size: clamp(14px, 1.6vw, 18px);
}

#game-screen .hud-chip,
#game-screen .btn-logout,
#game-screen .btn-encyclopedia {
  min-height: 34px;
  font-size: 8.6px;
  line-height: 1.25;
}

#game-screen .hud-label,
#game-screen .rep-label,
#game-screen .rep-pct {
  font-size: 7.6px;
  line-height: 1.25;
}

#game-screen .hud-val,
#game-screen .hud-money .hud-val,
#game-screen .hud-rep .hud-val {
  font-size: 16px;
  line-height: 1;
}

#game-screen .sec-label,
#game-screen .display-shelf-label,
#game-screen .grow-shelf-header,
#game-screen .detail-head,
#game-screen .panel-title {
  font-size: 9.4px;
  line-height: 1.35;
}

#game-screen .panel-summary {
  grid-column: 1 / -1;
  text-align: left;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  font-size: 8.2px;
  line-height: 1.35;
}

#game-screen .panel-toggle,
#game-screen .panel-toggle.sec-label,
#game-screen .info-detail .panel-toggle.sec-label {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  row-gap: 5px;
}

#game-screen .panel-caret {
  grid-column: 2;
  grid-row: 1;
}

#game-screen .seed-name,
#game-screen .req-name,
#game-screen .detail-name,
#game-screen .rank-name {
  font-size: 10px;
  line-height: 1.45;
}

#game-screen .seed-sub,
#game-screen .unlock-req,
#game-screen .req-msg,
#game-screen .req-pay,
#game-screen .detail-stage,
#game-screen .rank-sub,
#game-screen .rank-next,
#game-screen .log-entry,
#game-screen .detail-empty,
#game-screen .gslot-hint span {
  font-size: 7.8px;
  line-height: 1.75;
}

#game-screen .seed-price,
#game-screen .req-total,
#game-screen .req-timer,
#game-screen .disp-price,
#game-screen .dchip strong {
  font-size: 10px;
  line-height: 1.25;
}

#game-screen .tier-tag,
#game-screen .disp-name,
#game-screen .disp-empty-label,
#game-screen .disp-badge,
#game-screen .req-ready-badge,
#game-screen .px-bar-label,
#game-screen .px-bar-pct,
#game-screen .dchip {
  font-size: 7.2px;
  line-height: 1.45;
}

#game-screen .px-btn-sm {
  min-height: 30px;
  padding: 8px 10px;
  font-size: 8.4px;
  line-height: 1.15;
}

#game-screen .req-card,
#game-screen .seed-row {
  gap: 10px;
}

#game-screen .req-plant {
  gap: 10px;
}

#game-screen .detail-chips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#game-screen .dchip {
  padding: 7px 8px;
}

.grow-seed .gslot-svg,
.grow-growing .gslot-svg,
.grow-thirsty .gslot-svg,
.grow-dry .gslot-svg,
.grow-mature .gslot-svg {
  transform-origin: 50% 100%;
  animation: plantIdleSwayPlus 6.8s steps(10, end) infinite;
}

.grow-thirsty .gslot-svg,
.grow-dry .gslot-svg {
  animation-duration: 4.8s;
}

.grow-mature .gslot-svg {
  animation-duration: 7.6s;
}

.fx-stage-change::after,
.grow-mature::after {
  width: 24px;
  height: 24px;
  background:
    radial-gradient(circle, rgba(255,226,138,.96) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 22%, rgba(216,255,156,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 78%, rgba(255,226,138,.72) 0 1px, transparent 2px),
    linear-gradient(45deg, transparent 0 42%, rgba(255,255,220,.55) 42% 56%, transparent 56%),
    linear-gradient(-45deg, transparent 0 44%, rgba(216,255,156,.42) 44% 56%, transparent 56%);
}

.fx-stage-change::before {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  content: "";
  border: 2px solid rgba(240,200,64,.42);
  opacity: 0;
  animation: maturePixelRing .76s steps(5, end) forwards;
}

@keyframes greenhouseLightBands {
  0% {
    background-position: -280px 0, 360px 0, 0 -120px, 0 0;
  }
  100% {
    background-position: 420px 0, -260px 0, 0 520px, 0 26px;
  }
}

@keyframes greenhousePollenDrift {
  0% {
    background-position: 7% 18%, 31% 43%, 71% 28%, 18% 22%, 78% 62%;
  }
  100% {
    background-position: 15% 28%, 25% 55%, 78% 42%, 19% 20%, 76% 64%;
  }
}

@keyframes plantIdleSwayPlus {
  0%, 100% { transform: translateY(0) skewX(0deg) scale(1); }
  24% { transform: translateY(-1px) skewX(-.8deg) scale(1.01); }
  48% { transform: translateY(0) skewX(.65deg) scale(1); }
  72% { transform: translateY(-1px) skewX(.35deg) scale(1.006); }
}

@keyframes maturePixelRing {
  0% { opacity: 0; transform: scale(.82); }
  34% { opacity: .58; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.16); }
}

@media (prefers-reduced-motion: reduce) {
  #game-screen::before,
  #game-screen::after,
  .grow-seed .gslot-svg,
  .grow-growing .gslot-svg,
  .grow-thirsty .gslot-svg,
  .grow-dry .gslot-svg,
  .grow-mature .gslot-svg,
  .fx-stage-change::before {
    animation: none !important;
  }
}
