@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

:root {
  font-family: "Courier New", ui-monospace, monospace;
  color: #2f2117;
  background: #efe2c5;
  font-synthesis: none;
  --ink: #2f2117;
  --paper: #f8edd9;
  --paper-2: #ead8b8;
  --brown: #8b5a3c;
  --dark-brown: #5c3a22;
  --green: #4a7a2a;
  --grass: #76aa3a;
  --gold: #e8b84b;
  --red: #df5360;
  --blue: #4f91c8;
  --teal: #4d9b8e;
  --muted: #b9aa92;
  --shadow: 4px 4px 0 var(--ink);
}
* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: hidden; overflow-y: auto; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at top, #fff7e5 0, #efe2c5 48%, #dbc5a4 100%);
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 4px solid var(--blue); outline-offset: 2px; }
a { color: inherit; }
.hidden { display: none !important; }
.app-shell { width: min(1440px, calc(100% - 22px)); margin: 0 auto; padding: 12px 0 30px; }
.pixel-panel { border: 4px solid var(--ink); box-shadow: var(--shadow); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brown);
  color: var(--paper);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; background: #6d9638; border: 3px solid var(--ink); flex: 0 0 auto; }
.brand { font-weight: 900; font-size: clamp(16px, 3vw, 24px); letter-spacing: 2px; text-shadow: 2px 2px 0 var(--ink); }
.tagline { font-size: 9px; opacity: .88; margin-top: 3px; }
.hud-cluster { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.badge, .wallet-pill, .level-box { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); }
.badge { padding: 6px 8px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.badge.demo { background: #b9dcf4; }
.badge.warn { background: #ffe49a; }
.level-box { min-width: 148px; padding: 5px 8px; }
.level-box strong, .level-box small { display: block; }
.level-box strong { font-size: 10px; }
.level-box small { font-size: 8px; margin-top: 2px; }
.track { height: 7px; background: var(--ink); overflow: hidden; border: 1px solid var(--ink); }
.track > span { display: block; height: 100%; background: var(--gold); }
.wallet-pill { padding: 6px 8px; font-size: 9px; text-align: left; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.wallet-pill span, .wallet-pill strong { display: block; }
.wallet-pill span { opacity: .7; }
.pixel-btn, .tab-btn, .plot, .card-btn {
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.pixel-btn:hover, .tab-btn:hover, .card-btn:hover { filter: brightness(1.04); }
.pixel-btn:active, .tab-btn:active, .plot:active, .card-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.pixel-btn { background: var(--gold); padding: 9px 11px; font-weight: 900; font-size: 10px; letter-spacing: .4px; }
.pixel-btn.primary { background: var(--gold); }
.pixel-btn.demo { background: #77b6e2; }
.pixel-btn.success { background: #89c55c; }
.pixel-btn.danger { background: #ef8991; }
.pixel-btn.muted { background: #c9bba4; }
.pixel-btn.dark { background: var(--dark-brown); color: var(--paper); }
.pixel-btn.small { padding: 7px 8px; font-size: 9px; }
.pixel-btn.tiny { padding: 5px 6px; font-size: 8px; }
.pixel-btn:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.pixel-sprite { display: inline-grid; image-rendering: pixelated; flex: 0 0 auto; }
.pixel-sprite > i { display: block; }
.landing { padding: 28px 0 16px; }
.hero { background: var(--paper); display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; }
.hero-copy { padding: clamp(24px, 5vw, 64px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.eyebrow { color: var(--green); font-weight: 900; letter-spacing: 2px; font-size: 10px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { max-width: 760px; font-size: clamp(34px, 7vw, 72px); line-height: .98; letter-spacing: -3px; margin: 14px 0 18px; }
.hero-copy p { font-family: Arial, sans-serif; line-height: 1.58; color: #594837; max-width: 700px; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mode-note { font: 11px/1.55 Arial, sans-serif; color: #6f5a47; margin-top: 14px; }
.hero-art { background: linear-gradient(#83b94b 0 63%, #9c6b40 63%); border-left: 4px solid var(--ink); padding: 24px; display: grid; place-items: center; position: relative; min-height: 460px; }
.hero-art::before { content: ""; position: absolute; inset: 18px; border: 4px dashed rgba(47,33,23,.35); }
.preview-grid { z-index: 1; display: grid; grid-template-columns: repeat(3, 80px); gap: 12px; transform: rotate(-2deg); }
.preview-plot { width: 80px; height: 80px; display: grid; place-items: center; background: var(--grass); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.hero-strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 4px solid var(--ink); }
.hero-strip > div { padding: 12px; text-align: center; background: var(--paper-2); border-right: 4px solid var(--ink); }
.hero-strip > div:last-child { border-right: 0; }
.hero-strip strong, .hero-strip span { display: block; }
.hero-strip strong { font-size: 21px; }
.hero-strip span { font-size: 8px; margin-top: 3px; }
.main-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 18px; padding: 18px 0; align-items: start; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-heading h2 { margin: 4px 0 0; font-size: clamp(20px, 3vw, 29px); }
.farm-panel { background: #5a8c2d; padding: 14px; }
.farm-grid { display: grid; grid-template-columns: repeat(4, minmax(84px, 1fr)); gap: 10px; }
.plot { min-height: 122px; position: relative; display: flex; align-items: center; justify-content: center; background: #7cb342; padding: 8px; }
.plot.locked { background: #82906e; filter: grayscale(.45); }
.plot.ready { box-shadow: inset 0 0 0 5px var(--gold), 3px 3px 0 var(--ink); }
.plot.rwa { background: #4d9b8e; }
.plot-tag, .plot-timer, .plot-lock, .plot-cost, .rwa-tag { position: absolute; font-size: 8px; font-weight: 900; padding: 2px 4px; border: 2px solid var(--ink); }
.plot-tag { bottom: 6px; background: var(--paper); }
.plot-timer { top: 5px; right: 5px; background: var(--paper); }
.plot-lock { top: 5px; left: 5px; background: #d2c4ab; }
.plot-cost { bottom: 6px; background: #ffe6a3; }
.rwa-tag { top: 5px; left: 5px; background: #bce3dc; }
.growth { position: absolute; left: 8px; right: 8px; bottom: 7px; height: 7px; background: var(--ink); border: 1px solid var(--ink); }
.growth > span { display: block; height: 100%; background: var(--gold); }
.bounce { animation: bounce .75s steps(2,end) infinite; }
@keyframes bounce { 50% { transform: translateY(-4px); } }
.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 12px; }
.stat-card { background: var(--paper); padding: 10px; }
.stat-card span, .stat-card strong { display: block; }
.stat-card span { font-size: 8px; opacity: .72; }
.stat-card strong { font-size: 19px; margin-top: 5px; }
.side-panel { background: var(--brown); padding: 10px; min-width: 0; }
.tabs-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.tabs { display: flex; gap: 6px; min-width: max-content; }
.tab-btn { background: #c8a77c; padding: 8px 9px; font-size: 8px; font-weight: 900; }
.tab-btn.active { background: var(--gold); }
.tab-content { background: var(--paper); border: 3px solid var(--ink); padding: 11px; margin-top: 7px; min-width: 0; }
.panel-intro { margin-bottom: 9px; }
.panel-intro p { margin: 5px 0 0; font: 11px/1.45 Arial, sans-serif; color: #655241; }
.notice { border: 3px solid var(--ink); background: #fff1b8; padding: 9px; font: 10px/1.45 Arial, sans-serif; margin-bottom: 9px; }
.notice.blue { background: #d9edf9; }
.notice.red { background: #ffd8dc; }
.notice.green { background: #dff2d2; }
.card-grid { display: grid; gap: 9px; }
.info-card, .crop-card, .quest-card, .campaign-card, .position-card, .lp-card, .activity-row { border: 3px solid var(--ink); background: var(--paper-2); padding: 9px; }
.info-card h3, .campaign-card h3, .position-card h3, .lp-card h3 { margin: 0 0 5px; font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.metric { border: 2px solid var(--ink); background: var(--paper); padding: 7px; min-width: 0; }
.metric span, .metric strong { display: block; overflow-wrap: anywhere; }
.metric span { font-size: 8px; opacity: .72; }
.metric strong { font-size: 12px; margin-top: 4px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.crop-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; }
.crop-card.selected { background: #ffe89a; outline: 3px solid var(--gold); }
.crop-card.locked { opacity: .55; }
.crop-main strong, .crop-main small { display: block; }
.crop-main strong { font-size: 10px; }
.crop-main small { font-size: 8px; opacity: .72; margin-top: 3px; }
.card-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.quest-top, .quest-bottom, .campaign-head, .campaign-meta, .position-head, .activity-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.quest-top strong { font-size: 10px; }
.quest-top span, .quest-bottom small { font-size: 8px; }
.quest-track, .campaign-track { height: 7px; background: var(--ink); margin: 7px 0; }
.quest-track > span, .campaign-track > span { display: block; height: 100%; background: var(--gold); }
.campaign-head { align-items: flex-start; }
.campaign-title { display: flex; gap: 8px; align-items: center; min-width: 0; }
.campaign-title strong, .campaign-title small { display: block; overflow-wrap: anywhere; }
.campaign-title strong { font-size: 10px; }
.campaign-title small { font-size: 8px; opacity: .72; margin-top: 3px; }
.risk { border: 2px solid var(--ink); padding: 3px 5px; font-size: 7px; font-weight: 900; white-space: nowrap; }
.risk.low { background: #bce8a6; }
.risk.medium { background: #ffe396; }
.risk.high { background: #f3a2a9; }
.campaign-meta { font-size: 8px; }
.detail-list { display: grid; gap: 4px; font: 9px/1.35 Arial, sans-serif; margin: 7px 0; }
.detail-list span { display: block; }
.quote-box { border: 3px solid var(--ink); background: #dceef6; padding: 8px; margin: 8px 0; }
.quote-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.quote-grid span { display: block; font: 8px/1.35 Arial, sans-serif; }
.quote-grid b { display: block; font: 11px/1.2 "Courier New", monospace; margin-top: 2px; }
.buy-row { display: grid; grid-template-columns: minmax(100px,1fr) auto; gap: 7px; margin-top: 8px; }
.input { width: 100%; background: var(--paper); border: 3px solid var(--ink); padding: 8px; min-width: 0; }
.position-card { background: #dce9c7; }
.position-card.awaiting { background: #f3e4ae; }
.position-card.ready { background: #c9eed2; }
.position-head { align-items: flex-start; }
.position-head small { display: block; margin-top: 3px; opacity: .75; font-size: 8px; }
.status-pill { border: 2px solid var(--ink); background: var(--paper); padding: 3px 5px; font-size: 7px; font-weight: 900; }
.progress-note { font: 9px/1.4 Arial, sans-serif; margin: 7px 0; color: #594837; }
.action-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.lp-pool { background: #d9edf9; }
.warning-list { margin: 7px 0 0; padding-left: 18px; font: 10px/1.45 Arial, sans-serif; }
.activity-row { font: 9px/1.35 Arial, sans-serif; align-items: flex-start; }
.activity-row small { white-space: nowrap; opacity: .7; }
.empty-state { border: 3px dashed var(--ink); padding: 18px; text-align: center; font: 11px/1.5 Arial, sans-serif; color: #665342; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(34,24,16,.72); display: grid; place-items: center; padding: 18px; }
.modal { width: min(560px,100%); background: var(--paper); padding: 14px; }
.modal h3 { margin: 0 0 8px; }
.modal p { font: 11px/1.5 Arial, sans-serif; }
.toast { position: fixed; z-index: 110; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); background: var(--ink); color: var(--paper); border: 3px solid var(--gold); padding: 10px 12px; font-size: 10px; text-align: center; box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
.how-to-play { margin-top: 18px; background: var(--paper); padding: clamp(14px, 3vw, 24px); }
.how-to-play.compact { margin: 0; padding: 0; background: transparent; }
.guide-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.guide-heading h2 { margin: 4px 0 0; font-size: clamp(20px, 4vw, 34px); }
.guide-language { border: 3px solid var(--ink); background: var(--gold); padding: 6px 8px; font-size: 9px; font-weight: 900; white-space: nowrap; }
.guide-intro { margin: 0 0 14px; max-width: 900px; font: 11px/1.55 Arial, sans-serif; color: #5f4c3a; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.guide-step { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; border: 3px solid var(--ink); background: var(--paper-2); padding: 10px; }
.guide-number { display: grid; place-items: center; width: 30px; height: 30px; border: 3px solid var(--ink); background: var(--green); color: white; font-size: 14px; font-weight: 900; }
.guide-step h3 { margin: 1px 0 5px; font-size: 11px; }
.guide-step p { margin: 0; font: 10px/1.45 Arial, sans-serif; color: #5f4c3a; }
.guide-notes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 10px; }
.guide-notes > div { border: 2px solid var(--ink); background: #fff1b8; padding: 9px; }
.guide-notes strong, .guide-notes span { display: block; }
.guide-notes strong { font-size: 9px; }
.guide-notes span { margin-top: 4px; font: 9px/1.4 Arial, sans-serif; }
.guide-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; background: var(--paper); }
.site-footer { margin-top: 18px; padding: 14px; text-align: left; background: var(--dark-brown); color: var(--paper); font: 9px/1.55 Arial, sans-serif; }
.footer-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 2px solid rgba(248,237,217,.35); }
.footer-brand strong { font: 900 14px/1 "Courier New", monospace; letter-spacing: 1px; }
.footer-brand span { opacity: .8; }
.footer-links { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0; }
.footer-links a { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); padding: 6px 8px; text-decoration: none; font-weight: 900; }
.site-footer p { margin: 8px 0; opacity: .9; }
.site-footer small { display: block; opacity: .7; }
.dev-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.docs-links { display: grid; gap: 6px; }
.docs-links a { border: 2px solid var(--ink); background: var(--paper); padding: 7px; font-size: 9px; text-decoration: none; }
@media (max-width: 1040px) {
  .main-layout { grid-template-columns: 1fr; }
  .side-panel { order: 2; }
  .tab-content { min-height: 220px; }
}
@media (max-width: 760px) {
  .app-shell { width: min(100% - 12px, 1440px); padding-top: 6px; }
  .topbar { position: relative; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { border-left: 0; border-top: 4px solid var(--ink); min-height: 330px; }
  .hero-strip { grid-template-columns: repeat(2, 1fr); }
  .hero-strip > div:nth-child(2) { border-right: 0; }
  .hero-strip > div:nth-child(-n+2) { border-bottom: 4px solid var(--ink); }
  .farm-grid { grid-template-columns: repeat(3, minmax(82px,1fr)); }
  .quick-stats { grid-template-columns: repeat(2, 1fr); }
  .metric-grid, .quote-grid { grid-template-columns: 1fr; }
  .guide-grid, .guide-notes { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .brand-mark { width: 38px; height: 38px; }
  .hud-cluster { width: 100%; }
  .level-box { flex: 1 1 140px; }
  .farm-panel { padding: 9px; }
  .farm-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .plot { min-height: 116px; }
  .preview-grid { grid-template-columns: repeat(3, 62px); }
  .preview-plot { width: 62px; height: 62px; }
  .buy-row { grid-template-columns: 1fr; }
  h1 { letter-spacing: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* v0.6.1 presentation polish — visual only; gameplay logic is untouched. */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: clamp(18px, 3vw, 28px);
  background: linear-gradient(145deg, #4d321f 0%, #382518 58%, #2e2017 100%);
  color: var(--paper);
  font: 11px/1.6 Arial, sans-serif;
}
.site-footer::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -54px;
  bottom: -78px;
  opacity: .12;
  background: radial-gradient(circle, var(--gold) 0 4px, transparent 5px);
  background-size: 18px 18px;
  transform: rotate(12deg);
}
.footer-brand {
  position: relative;
  z-index: 1;
  align-items: flex-end;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(248,237,217,.28);
}
.footer-brand strong { font-size: clamp(17px, 3vw, 24px); letter-spacing: 2px; }
.footer-brand span { padding: 5px 8px; border: 2px solid rgba(248,237,217,.45); background: rgba(0,0,0,.16); font: 900 9px/1 "Courier New", monospace; }
.footer-links { position: relative; z-index: 1; gap: 9px; margin: 16px 0 14px; }
.footer-links a {
  min-width: 108px;
  border: 2px solid var(--ink);
  background: linear-gradient(#fff4df,#e9d7b5);
  color: var(--ink);
  padding: 9px 11px;
  text-align: center;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, filter .15s ease;
}
.footer-links a:hover { filter: brightness(1.05); transform: translateY(-1px); }
.site-footer p { position: relative; z-index: 1; max-width: 920px; margin: 10px 0; font-size: 11px; opacity: .92; }
.site-footer small { position: relative; z-index: 1; padding-top: 10px; border-top: 1px solid rgba(248,237,217,.18); }
.docs-links { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.docs-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 2px solid var(--ink);
  background: linear-gradient(145deg,var(--paper),var(--paper-2));
  padding: 10px;
  font-size: 9px;
  line-height: 1.4;
  box-shadow: 2px 2px 0 var(--ink);
}
.docs-links a:hover { background: #fff0b4; }
@media (max-width: 620px) {
  .footer-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-links a { min-width: 0; }
  .docs-links { grid-template-columns: 1fr; }
}


/* v0.6.1 logo consistency patch */
.brand-mark { width: 44px; height: 44px; display: block; flex: 0 0 auto; background: none; border: 0; box-shadow: none; }
.brand-mark .pixel-logo-svg, .footer-mark .pixel-logo-svg { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.footer-brand { align-items: center; }
.footer-brand-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.footer-mark { width: 36px; height: 36px; display: block; flex: 0 0 auto; }
.footer-version { padding: 5px 8px; border: 2px solid rgba(248,237,217,.45); background: rgba(0,0,0,.16); font: 900 9px/1 "Courier New", monospace; }
@media (max-width: 760px) { .footer-mark { width: 32px; height: 32px; } }

/* =========================================================
   FARM INDEX — DEPLOY UI/UX REVAMP
   Presentation-only overrides. Gameplay and wallet logic are unchanged.
   ========================================================= */
:root {
  --ink: #173321;
  --ink-soft: #385642;
  --paper: #ffffff;
  --paper-2: #f4f8ec;
  --brown: #784c2c;
  --dark-brown: #153420;
  --green: #16a53a;
  --grass: #72bd45;
  --green-bright: #00c92f;
  --green-deep: #0d7f2b;
  --green-pale: #e7f3d9;
  --green-line: #c9dcb9;
  --gold: #f3c64f;
  --red: #df5360;
  --blue: #55a6d7;
  --teal: #4d9b8e;
  --muted: #8da18c;
  --shadow: 5px 5px 0 rgba(31, 67, 38, .16);
  color: var(--ink);
  background: #f2f6eb;
}

html { background: #f2f6eb; }
body {
  color: var(--ink);
  background:
    linear-gradient(rgba(247,250,241,.92), rgba(238,246,228,.94)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(80,125,72,.045) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(80,125,72,.045) 31px 32px);
  font-family: Arial, Helvetica, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.98), transparent 27%),
    radial-gradient(circle at 88% 4%, rgba(211,239,188,.55), transparent 24%);
}

button, input, select { font-family: "Courier New", ui-monospace, monospace; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 4px solid rgba(0,201,47,.26);
  outline-offset: 3px;
}

.app-shell { width: min(100% - 28px, 1400px); padding: 14px 0 34px; }
.pixel-panel {
  border: 2px solid var(--green-line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* Header and brand */
.topbar {
  position: sticky;
  top: 10px;
  z-index: 80;
  min-height: 76px;
  padding: 10px 12px 10px 16px;
  margin-bottom: 14px;
  border-color: #d4e2c8;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(32,71,39,.10), 4px 4px 0 rgba(44,88,46,.12);
  flex-wrap: nowrap;
}

.brand-wrap {
  min-width: 0;
  text-decoration: none;
  flex: 0 1 auto;
}
.brand-logo {
  display: block;
  width: clamp(168px, 19vw, 236px);
  height: 54px;
  object-fit: contain;
  object-position: left center;
  image-rendering: auto;
  transition: transform .16s ease;
}
.brand-wrap:hover .brand-logo { transform: translateY(-2px); }
.brand-mark, .brand, .tagline { display: none; }

.landing-nav, .hud-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.landing-nav { flex-wrap: nowrap; }
.header-link, .header-demo, .header-connect {
  min-height: 44px;
  border: 2px solid var(--green-line);
  padding: 10px 14px;
  background: #f8fbf3;
  color: var(--ink);
  text-decoration: none;
  font: 900 11px/1 "Courier New", monospace;
  letter-spacing: .4px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #dce8d3;
}
.header-connect {
  border-color: #087a24;
  background: linear-gradient(#10d83b, #00ba2d);
  color: #fff;
  text-shadow: 1px 1px 0 #087a24;
  box-shadow: 4px 4px 0 #087a24;
}
.header-link:hover, .header-demo:hover, .header-connect:hover { transform: translateY(-1px); filter: brightness(1.02); }

/* X (formerly Twitter) link — header icon + footer pill. */
.header-x {
  min-height: 44px;
  width: 44px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--green-line);
  background: #f8fbf3;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 3px 3px 0 #dce8d3;
}
.header-x:hover { transform: translateY(-1px); background: var(--ink); color: #f8fbf3; }
.x-glyph { width: 15px; height: 15px; display: block; }
.footer-x { display: inline-flex; align-items: center; gap: 6px; }
.footer-x:hover { background: var(--ink); color: var(--paper); }
.footer-x .x-glyph { width: 11px; height: 11px; }

/* Wallet Mode parked: keep the button clickable (it starts Demo Mode) but
   stop it reading as the primary live action. */
.header-connect.is-soon {
  border-color: #6b7a63;
  background: linear-gradient(#9fb094, #86997a);
  color: #f3f7ef;
  text-shadow: 1px 1px 0 #55624e;
  box-shadow: 4px 4px 0 #6b7a63;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.header-connect.is-soon .soon-pill {
  border: 1px solid #f3f7ef;
  padding: 2px 4px;
  font: 900 8px/1 "Courier New", monospace;
  letter-spacing: .5px;
}

.badge, .wallet-pill, .level-box {
  border: 1px solid #cadabb;
  border-radius: 10px;
  background: #f7faef;
  color: var(--ink);
  box-shadow: none;
}
.badge { padding: 8px 10px; font-size: 9px; }
.badge.demo { background: #e7f3ff; border-color: #b8d9ed; }
.badge.warn { background: #fff0bc; border-color: #e5bd43; }
.coin-badge { background: #fff8d9; border-color: #ead379; }
.level-box { min-width: 156px; padding: 7px 9px; }
.level-box strong { font-size: 10px; }
.level-box small { font-size: 7px; color: #687d69; }
.track { height: 8px; border: 1px solid #b9cda9; background: #eef4e8; border-radius: 999px; }
.track > span { background: linear-gradient(90deg,#0ac535,#78c943); border-radius: inherit; }
.wallet-pill {
  border: 1px solid #b8ccb0;
  padding: 8px 10px;
  box-shadow: 3px 3px 0 #d9e4d2;
  background: #fff;
}

/* Buttons */
.pixel-btn, .tab-btn, .plot, .card-btn {
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(23,51,33,.18);
}
.pixel-btn {
  min-height: 43px;
  padding: 11px 15px;
  background: #fff;
  font-size: 10px;
  letter-spacing: .5px;
}
.pixel-btn.primary, .connect-cta {
  border-color: #087a24;
  background: linear-gradient(#0bdc39,#00b82b);
  color: #fff;
  text-shadow: 1px 1px 0 #087a24;
  box-shadow: 5px 5px 0 #087a24;
}
.pixel-btn.demo { border-color: #8ba181; background: #f8fbf3; color: var(--ink); }
.pixel-btn.success { border-color: #357d31; background: #bce78c; }
.pixel-btn.danger { border-color: #a73542; background: #f4a2a9; }
.pixel-btn.muted { border-color: #9ca898; background: #e8eee1; }
.pixel-btn.dark { border-color: #0e2718; background: #173a24; color: #fff; }
.pixel-btn:active, .tab-btn:active, .plot:active, .card-btn:active {
  transform: translate(3px,3px);
  box-shadow: 1px 1px 0 rgba(23,51,33,.18);
}
.guide-link { border-color: #a8bd9d; }

/* Landing */
.landing { padding: 0 0 18px; }
.hero {
  min-height: 690px;
  grid-template-columns: 1.02fr .98fr;
  overflow: hidden;
  background: #fff;
  border-radius: 26px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(38px, 6vw, 82px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,252,241,.94)),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(78,125,67,.05) 15px 16px);
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #c9dcb9;
  background: #f6faef;
  color: #486c47;
  font: 900 9px/1 "Courier New", monospace;
  letter-spacing: 1.1px;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #00c92f;
  box-shadow: 0 0 0 4px rgba(0,201,47,.13);
  animation: statusPulse 1.8s steps(2,end) infinite;
}
.hero h1 {
  max-width: 680px;
  margin: 24px 0 20px;
  color: #15351e;
  font-family: "Courier New", monospace;
  font-size: clamp(40px, 6vw, 76px);
  line-height: .98;
  letter-spacing: -4px;
  text-shadow: none;
}
.hero h1 span { color: #19a739; }
.hero-lead {
  max-width: 650px;
  margin-bottom: 20px;
  color: #4d6251 !important;
  font: 16px/1.7 Arial, sans-serif !important;
}
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-pills span {
  border: 1px solid #cedfc1;
  background: #f7fbf1;
  padding: 8px 10px;
  color: #36523b;
  font: 700 11px/1 Arial, sans-serif;
}
.auth-actions { gap: 12px; }
.mode-note {
  max-width: 700px;
  margin-top: 24px;
  padding: 14px 16px;
  border-left: 4px solid #85b865;
  background: #f5f9ef;
  color: #627466;
  font-size: 11px;
}

.hero-art {
  min-height: 610px;
  overflow: hidden;
  border-left: 2px solid #d3e2c8;
  background:
    linear-gradient(180deg, #c7f2ea 0 58%, #a8dd72 58% 76%, #7fb44e 76% 100%);
  isolation: isolate;
}
.hero-art::before {
  inset: 16px;
  border: 1px solid rgba(49,104,59,.16);
  border-radius: 20px;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: auto -10% 0;
  height: 27%;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(64,119,47,.18) 0 2px, transparent 2px 18px),
    linear-gradient(#9bd265,#73ad45);
  clip-path: polygon(0 27%,8% 18%,15% 31%,25% 12%,34% 30%,43% 15%,53% 33%,63% 13%,74% 28%,84% 9%,100% 27%,100% 100%,0 100%);
}
.scene-sun {
  position: absolute;
  top: 74px;
  right: 74px;
  width: 52px;
  height: 52px;
  z-index: 0;
  background: #ffe279;
  box-shadow: 0 0 0 12px rgba(255,226,121,.22), 0 0 45px rgba(255,227,98,.7);
  animation: sunPulse 2.6s steps(3,end) infinite;
}
.scene-cloud {
  position: absolute;
  z-index: 0;
  width: 94px;
  height: 18px;
  background: rgba(255,255,255,.86);
  box-shadow: 24px -12px 0 rgba(255,255,255,.86), 54px 0 0 rgba(255,255,255,.86);
}
.cloud-one { top: 120px; left: 38px; animation: cloudDrift 13s linear infinite alternate; }
.cloud-two { top: 220px; right: 5px; transform: scale(.72); animation: cloudDriftSmall 16s linear infinite alternate-reverse; }
.scene-leaf {
  position: absolute;
  z-index: 3;
  width: 17px;
  height: 10px;
  background: #63bb36;
  border: 2px solid #317629;
  transform: rotate(-25deg);
}
.leaf-one { top: 140px; left: 30%; animation: leafFloat 4.5s ease-in-out infinite; }
.leaf-two { top: 250px; right: 14%; animation: leafFloat 5.4s ease-in-out -1.8s infinite; }
.leaf-three { top: 330px; left: 15%; animation: leafFloat 4.9s ease-in-out -3s infinite; }
.hero-crop-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  margin-top: 20px;
  filter: drop-shadow(0 18px 12px rgba(47,79,34,.25));
  animation: cropBreathe 2.4s steps(4,end) infinite;
}
.hero-crop-sprite { transform-origin: center bottom; }
.scene-ground {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 300px;
  height: 82px;
  z-index: 1;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center,#855128 0 38%,#62391e 39% 58%,transparent 60%);
  opacity: .45;
}
.season-card {
  position: absolute;
  z-index: 5;
  right: 24px;
  bottom: 124px;
  width: min(250px, calc(100% - 48px));
  padding: 15px;
  border: 2px solid #254c2e;
  background: rgba(255,255,255,.94);
  box-shadow: 5px 5px 0 rgba(29,75,35,.22);
}
.season-card span, .season-card strong, .season-card small { display: block; }
.season-card span { color: #68816a; font: 900 8px/1 "Courier New", monospace; }
.season-card strong { margin-top: 8px; color: #08b72f; font: 900 30px/1 "Courier New", monospace; }
.season-card small { margin-top: 7px; color: #506653; font-size: 10px; }
.growth-steps {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(34,82,40,.22);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
}
.growth-steps div { display: flex; align-items: center; justify-content: center; gap: 8px; }
.growth-steps span { color: #3e6043; font: 900 8px/1 "Courier New", monospace; }
.growth-steps i { color: #3c773f; font: 900 24px/1 Arial; }
.hero-strip {
  border-top: 2px solid #d3e2c8;
  background: #f8fbf3;
}
.hero-strip > div { border-right: 1px solid #d3e2c8; background: transparent; padding: 16px 12px; }
.hero-strip strong { color: #168f34; font: 900 20px/1 "Courier New", monospace; }
.hero-strip span { margin-top: 5px; color: #687d69; font: 800 8px/1.2 "Courier New", monospace; }

/* Player guide on landing */
.how-to-play {
  margin-top: 20px;
  padding: clamp(22px,4vw,42px);
  border-radius: 24px;
  background: #fff;
}
.guide-heading { align-items: center; }
.guide-heading h2 { margin: 5px 0 0; color: #173b22; font: 900 clamp(25px,4vw,40px)/1 "Courier New", monospace; }
.guide-language { border: 1px solid #bfd3b2; background: #eff7e8; color: #4b6b4e; }
.guide-intro { color: #586d5c; }
.guide-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.guide-step {
  min-height: 140px;
  border: 1px solid #cedfc2;
  border-radius: 14px;
  background: linear-gradient(#fbfdf8,#f2f8ea);
  padding: 15px;
  box-shadow: 0 7px 20px rgba(37,78,43,.06);
}
.guide-number { background: #11bd35; color: #fff; border-color: #087927; }
.guide-step h3 { color: #22452a; font-size: 12px; }
.guide-step p { color: #5c6f5e; }
.guide-notes > div { border: 1px solid #d8dfad; border-radius: 12px; background: #fff9d8; }

/* Authenticated game */
.main-layout {
  grid-template-columns: minmax(0,1.18fr) minmax(360px,.82fr);
  gap: 16px;
  padding-top: 4px;
}
.section-heading {
  align-items: center;
  padding: 8px 4px 4px;
}
.section-heading h2 { color: #173b22; font: 900 clamp(22px,3vw,34px)/1.1 "Courier New", monospace; }
.eyebrow { color: #21913a; font-family: "Courier New", monospace; }
.farm-panel {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-color: #5b8c45;
  border-radius: 22px;
  background:
    linear-gradient(rgba(112,176,65,.88),rgba(84,143,48,.92)),
    repeating-linear-gradient(0deg,transparent 0 23px,rgba(255,255,255,.09) 23px 24px);
  box-shadow: 0 16px 35px rgba(45,92,43,.18), 5px 5px 0 rgba(38,83,37,.18);
}
.farm-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px dashed rgba(238,255,221,.28);
  border-radius: 14px;
}
.farm-grid { position: relative; z-index: 1; gap: 12px; }
.plot {
  min-height: 132px;
  overflow: hidden;
  border-color: #2d5f2d;
  border-radius: 12px;
  background: linear-gradient(145deg,#9bd55e,#6db63e);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.12), 4px 4px 0 rgba(26,72,31,.33);
}
.plot::before {
  content: "";
  position: absolute;
  inset: auto 8px 8px;
  height: 24%;
  border-radius: 50%;
  background: rgba(83,52,28,.24);
}
.plot.locked { background: #9ba994; }
.plot.rwa { background: linear-gradient(145deg,#79c9b8,#4aa492); }
.plot.ready {
  box-shadow: inset 0 0 0 5px #ffe272, 4px 4px 0 rgba(26,72,31,.33), 0 0 0 5px rgba(255,221,77,.18);
  animation: readyGlow 1.1s steps(2,end) infinite;
}
.plot .pixel-sprite { position: relative; z-index: 2; filter: drop-shadow(0 6px 3px rgba(42,68,31,.2)); }
.plot-tag, .plot-timer, .plot-lock, .plot-cost, .rwa-tag {
  z-index: 4;
  border: 1px solid #294e2e;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 7px;
}
.plot-tag { bottom: 8px; background: #fff; }
.plot-timer { top: 7px; right: 7px; background: rgba(255,255,255,.94); }
.plot-lock { top: 7px; left: 7px; background: #e8eee3; }
.plot-cost { bottom: 8px; background: #ffefb0; }
.rwa-tag { top: 7px; left: 7px; background: #d9f4ec; }
.growth { left: 8px; right: 8px; bottom: 8px; height: 7px; border-color: #315c31; border-radius: 999px; background: rgba(255,255,255,.72); z-index: 3; }
.growth > span { background: #ffe064; border-radius: inherit; }

.quick-stats { gap: 10px; }
.stat-card {
  border: 1px solid #cedfc2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(35,75,42,.07);
  padding: 14px;
}
.stat-card span { color: #718573; }
.stat-card strong { color: #168e33; }

.side-panel {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 120px);
  overflow: hidden;
  padding: 9px;
  border-color: #c4d7b7;
  border-radius: 20px;
  background: #eef5e6;
  box-shadow: 0 14px 36px rgba(30,68,36,.12), 5px 5px 0 rgba(44,88,46,.12);
}
.tabs-wrap { padding: 2px 2px 7px; }
.tabs { gap: 5px; }
.tab-btn {
  min-height: 38px;
  border: 1px solid #bfd0b4;
  border-radius: 7px;
  background: #fff;
  color: #476149;
  box-shadow: none;
}
.tab-btn.active {
  border-color: #168f34;
  background: #17b83a;
  color: #fff;
  text-shadow: 1px 1px 0 #0a7c27;
}
.tab-content {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid #ccddc0;
  border-radius: 14px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #9ebd8e transparent;
}
.panel-intro p { color: #667869; }
.notice {
  border: 1px solid #dccb7d;
  border-radius: 10px;
  background: #fff7d2;
  color: #5f5c42;
}
.notice.blue { border-color: #bad9e8; background: #eff9fd; }
.notice.red { border-color: #e2a5a9; background: #fff0f1; }
.notice.green { border-color: #b9d9aa; background: #eff9e9; }
.info-card, .crop-card, .quest-card, .campaign-card, .position-card, .lp-card, .activity-row {
  border: 1px solid #cadbbb;
  border-radius: 12px;
  background: linear-gradient(#fbfdf8,#f3f8ed);
  box-shadow: 0 5px 15px rgba(33,73,40,.05);
}
.crop-card.selected { outline: 3px solid rgba(20,184,57,.23); background: #f0fbdc; }
.metric { border: 1px solid #d2dfc7; border-radius: 9px; background: #fbfdf8; }
.metric span { color: #738576; }
.metric strong { color: #21472b; }
.quest-track, .campaign-track { height: 8px; border-radius: 99px; background: #e3eadc; }
.quest-track > span, .campaign-track > span { border-radius: inherit; background: linear-gradient(90deg,#0ec936,#8bcf4c); }
.quote-box { border: 1px solid #b8d9e7; border-radius: 10px; background: #eff9fd; }
.risk { border-width: 1px; border-radius: 5px; }
.docs-links a {
  border: 1px solid #cadbbb;
  border-radius: 9px;
  background: #f8fbf4;
  color: #20512e;
}
.docs-links a:hover { border-color: #65aa54; background: #eff9e7; }
.dev-tools { padding-top: 9px; border-top: 1px dashed #cadbbb; }

/* Footer */
.site-footer {
  margin-top: 22px;
  padding: 24px;
  border-color: #bdd0b2;
  border-radius: 20px;
  background: #173a24;
  color: #e9f4e4;
  box-shadow: 5px 5px 0 rgba(30,70,37,.18);
}
.footer-brand { align-items: center; border-color: rgba(226,244,216,.18); }
.footer-logo { width: min(235px, 58vw); height: 54px; object-fit: contain; object-position: left; filter: brightness(0) invert(1); }
.footer-version { padding: 6px 9px; border: 1px solid rgba(231,244,222,.28); background: rgba(255,255,255,.05); color: #fff; }
.footer-links a {
  border: 1px solid rgba(219,239,207,.28);
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: #f4f9ef;
  box-shadow: none;
}
.footer-links a:hover { border-color: #8dd873; background: rgba(141,216,115,.12); }
.site-footer p, .site-footer small { color: #bcd1bc; }

/* Motion */
.sprout-sway { transform-origin: center bottom; animation: sproutSway 1.7s steps(4,end) infinite; }
@keyframes statusPulse { 50% { opacity: .45; transform: scale(.8); } }
@keyframes sunPulse { 50% { transform: scale(1.1); box-shadow: 0 0 0 17px rgba(255,226,121,.16),0 0 55px rgba(255,227,98,.8); } }
@keyframes cloudDrift { from { transform: translateX(-16px); } to { transform: translateX(35px); } }
@keyframes cloudDriftSmall { from { transform: translateX(-28px) scale(.72); } to { transform: translateX(20px) scale(.72); } }
@keyframes leafFloat {
  0%,100% { transform: translate(0,0) rotate(-25deg); }
  35% { transform: translate(18px,14px) rotate(25deg); }
  70% { transform: translate(-8px,30px) rotate(75deg); }
}
@keyframes cropBreathe { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes sproutSway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-2px); } }
@keyframes readyGlow { 50% { filter: brightness(1.08); } }

/* Tablet and mobile */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 500px; border-left: 0; border-top: 2px solid #d3e2c8; }
  .main-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; max-height: none; }
  .tab-content { max-height: none; }
}

@media (max-width: 760px) {
  .app-shell { width: min(100% - 14px, 1400px); padding-top: 7px; }
  .topbar { top: 6px; min-height: 62px; padding: 7px 8px 7px 10px; border-radius: 14px; }
  .brand-logo { width: 142px; height: 44px; }
  .header-link, .header-demo { display: none; }
  .header-x { min-height: 40px; width: 40px; }
  .header-connect { min-height: 40px; padding: 9px 11px; font-size: 9px; }
  .hud-cluster { flex: 1; overflow-x: auto; justify-content: flex-end; flex-wrap: nowrap; scrollbar-width: none; }
  .hud-cluster::-webkit-scrollbar { display: none; }
  .wallet-balance, .level-box { display: none; }
  .badge, .wallet-pill { flex: 0 0 auto; font-size: 8px; padding: 7px 8px; }

  .hero { min-height: 0; border-radius: 18px; }
  .hero-copy { padding: 30px 22px 34px; }
  .hero h1 { margin-top: 20px; font-size: clamp(38px,12vw,58px); letter-spacing: -3px; }
  .hero-lead { font-size: 14px !important; }
  .hero-pills { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .hero-pills span:last-child { grid-column: 1 / -1; }
  .auth-actions { display: grid; width: 100%; grid-template-columns: 1fr; }
  .auth-actions .pixel-btn { width: 100%; justify-content: center; text-align: center; }
  .hero-art { min-height: 450px; }
  .scene-sun { top: 42px; right: 38px; width: 42px; height: 42px; }
  .hero-crop-wrap { transform: scale(.82); }
  .season-card { right: 16px; bottom: 104px; width: 205px; }
  .growth-steps { left: 12px; right: 12px; bottom: 12px; }
  .growth-steps div { gap: 3px; }
  .growth-steps span { display: none; }
  .hero-strip { grid-template-columns: repeat(2,1fr); }
  .hero-strip > div:nth-child(2) { border-right: 0; }
  .hero-strip > div:nth-child(-n+2) { border-bottom: 1px solid #d3e2c8; }

  .how-to-play { padding: 22px 14px; border-radius: 18px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-step { min-height: 0; }
  .guide-notes { grid-template-columns: 1fr; }

  .main-layout { padding-top: 0; }
  .section-heading { align-items: flex-start; }
  .farm-panel { padding: 10px; border-radius: 16px; }
  .farm-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .plot { min-height: 126px; }
  .quick-stats { grid-template-columns: repeat(2,1fr); }
  .side-panel { border-radius: 16px; padding: 7px; }
  .tabs-wrap { margin: 0 -2px; }
  .tab-btn { min-height: 40px; padding: 8px 10px; }
  .tab-content { padding: 10px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crop-card { grid-template-columns: auto minmax(0,1fr); }
  .crop-card .card-actions { grid-column: 1 / -1; justify-content: stretch; }
  .crop-card .card-actions button { flex: 1; }
  .docs-links { grid-template-columns: 1fr; }
  .site-footer { padding: 18px 14px; }
}

@media (max-width: 430px) {
  .brand-logo { width: 125px; }
  .header-connect { padding: 8px 9px; }
  .hero-kicker { font-size: 7px; letter-spacing: .7px; }
  .hero h1 { font-size: 39px; }
  .hero-pills span { font-size: 10px; }
  .hero-art { min-height: 420px; }
  .hero-crop-wrap { margin-top: 5px; transform: scale(.7); }
  .season-card { width: 190px; bottom: 95px; }
  .season-card strong { font-size: 24px; }
  .farm-grid { gap: 7px; }
  .plot { min-height: 116px; }
  .quick-stats { gap: 7px; }
  .stat-card { padding: 10px; }
  .stat-card strong { font-size: 16px; }
  .metric-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot, .scene-sun, .scene-cloud, .scene-leaf, .hero-crop-wrap, .sprout-sway, .plot.ready, .bounce { animation: none !important; }
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* Farm Index UI fix 2: safe header, centered pixel-graffiti title, consistent corner branding. */
:root { --safe-top: env(safe-area-inset-top, 0px); --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px); --pixel-font: "Courier New", ui-monospace, monospace; }
html { background: #eef6e9; }
body { padding-left: var(--safe-left); padding-right: var(--safe-right); }
.app-shell { padding-top: max(12px, var(--safe-top)); }
.topbar { top: max(8px, var(--safe-top)); overflow: visible; }
.brand-logo { max-width: 100%; height: auto; aspect-ratio: 520 / 112; image-rendering: pixelated; }

.hero { position: relative; isolation: isolate; }
.hero-copy { align-items: center; text-align: center; }
.hero-kicker { position: relative; z-index: 4; }
.hero-graffiti {
  position: relative;
  z-index: 5;
  width: 100%;
  margin: clamp(22px,4vw,38px) auto 7px;
  color: #efffcf;
  font-family: var(--pixel-font);
  font-size: clamp(48px,8vw,112px);
  font-weight: 900;
  line-height: .78;
  letter-spacing: .055em;
  text-align: center;
  white-space: nowrap;
  transform: rotate(-1.4deg) skewX(-4deg);
  -webkit-text-stroke: clamp(2px,.24vw,4px) #143a20;
  paint-order: stroke fill;
  text-shadow:
    3px 3px 0 #62cf3d,
    6px 6px 0 #1c9d37,
    9px 9px 0 #0c6928,
    -2px -2px 0 #fff7a5;
  filter: drop-shadow(0 13px 10px rgba(23,77,34,.18));
}
.hero-graffiti::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(10,85,31,.32);
  transform: translate(12px,12px);
  clip-path: polygon(0 54%,100% 34%,100% 100%,0 100%);
}
.hero-graffiti-tag {
  position: relative;
  z-index: 5;
  display: inline-block;
  margin: 2px auto 18px;
  padding: 7px 13px;
  border: 2px solid #173d22;
  background: #fff6a4;
  color: #173d22;
  box-shadow: 4px 4px 0 #1c8d35;
  font: 900 clamp(8px,1.1vw,12px)/1 var(--pixel-font);
  letter-spacing: .22em;
  transform: rotate(.8deg);
}
.hero h1.hero-subtitle {
  max-width: 760px;
  margin: 20px auto 18px;
  color: #173b22;
  font: 900 clamp(28px,4.5vw,58px)/.98 var(--pixel-font);
  letter-spacing: -.055em;
  text-align: center;
  text-shadow: 2px 2px 0 #d9efc5;
}
.hero h1.hero-subtitle span { color: #12a837; }
.hero-lead, .mode-note { margin-left: auto; margin-right: auto; text-align: center; }
.hero-pills, .auth-actions { justify-content: center; }

.brand-corner {
  position: absolute;
  z-index: 6;
  width: clamp(30px,4vw,52px);
  height: clamp(30px,4vw,52px);
  opacity: .30;
  image-rendering: pixelated;
  pointer-events: none;
  filter: saturate(.9);
}
.brand-corner-tl { top: 14px; left: 14px; }
.brand-corner-tr { top: 14px; right: 14px; transform: scaleX(-1); }
.brand-corner-bl { bottom: 84px; left: 14px; transform: scaleY(-1); }
.brand-corner-br { bottom: 84px; right: 14px; transform: scale(-1); }

.farm-panel, .side-panel { position: relative; }
.panel-corner-logo {
  position: absolute;
  z-index: 5;
  width: 38px;
  height: 38px;
  opacity: .22;
  pointer-events: none;
  image-rendering: pixelated;
}
.farm-corner-logo { top: 10px; right: 10px; }
.side-corner-logo { right: 12px; bottom: 12px; opacity: .10; }

/* Prevent the authenticated HUD and logo from being clipped on narrow screens. */
@media (max-width: 760px) {
  .app-shell { width: min(100% - 12px, 1400px); padding-top: max(8px, var(--safe-top)); }
  .topbar { top: max(4px, var(--safe-top)); min-width: 0; width: 100%; }
  .landing-topbar { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }
  .landing-topbar .brand-wrap { min-width: 0; overflow: visible; }
  .landing-topbar .brand-logo { width: min(132px, calc(100vw - 152px)); min-width: 104px; }
  .landing-nav { min-width: 0; }
  .header-connect { min-width: 104px; white-space: nowrap; }

  .topbar:not(.landing-topbar) { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 8px; }
  .topbar:not(.landing-topbar) .brand-wrap { justify-self: center; width: min(176px,62vw); }
  .topbar:not(.landing-topbar) .brand-logo { width: 100%; }
  .topbar:not(.landing-topbar) .hud-cluster {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 5px;
    scroll-snap-type: x proximity;
  }
  .topbar:not(.landing-topbar) .hud-cluster > * { scroll-snap-align: start; }

  .hero-copy { padding: 34px 16px 36px; }
  .hero-graffiti { font-size: clamp(43px,15vw,72px); letter-spacing: .025em; text-shadow: 2px 2px 0 #62cf3d,4px 4px 0 #1c9d37,7px 7px 0 #0c6928,-1px -1px 0 #fff7a5; }
  .hero-graffiti::after { transform: translate(8px,8px); }
  .hero-graffiti-tag { letter-spacing: .12em; }
  .hero h1.hero-subtitle { font-size: clamp(27px,8.8vw,42px); letter-spacing: -.045em; }
  .brand-corner { width: 32px; height: 32px; opacity: .22; }
  .brand-corner-bl, .brand-corner-br { bottom: 134px; }
}

@media (max-width: 430px) {
  .landing-topbar .brand-logo { width: min(118px, calc(100vw - 142px)); }
  .header-connect { min-width: 100px; padding: 8px 8px; font-size: 8px; }
  .hero-graffiti { font-size: clamp(39px,14.2vw,60px); -webkit-text-stroke-width: 2px; }
  .hero-graffiti-tag { font-size: 7px; padding: 6px 9px; }
  .hero h1.hero-subtitle { font-size: 30px; }
  .brand-corner { display: none; }
}


/* UI fix 2.1: stronger mobile wordmark and visible corner marks. */
.footer-logo { filter: none; background: #f8fbef; border: 1px solid rgba(226,244,216,.45); border-radius: 8px; padding: 4px 7px; }
@media (max-width: 760px) {
  .landing-topbar .brand-logo { width: min(152px, calc(100vw - 144px)); min-width: 132px; }
}
@media (max-width: 430px) {
  .landing-topbar .brand-logo { width: min(148px, calc(100vw - 136px)); min-width: 128px; }
  .brand-corner { display: block; width: 24px; height: 24px; opacity: .16; }
  .brand-corner-tl, .brand-corner-tr { top: 8px; }
  .brand-corner-tl, .brand-corner-bl { left: 8px; }
  .brand-corner-tr, .brand-corner-br { right: 8px; }
  .brand-corner-bl, .brand-corner-br { bottom: 130px; }
}


/* Farm Index typography fix 3: actual Press Start 2P text, not an image wordmark. */
:root { --pixel-font: "Press Start 2P", "Courier New", ui-monospace, monospace; }

button, input, select, .pixel-btn, .tab-btn, .badge, .wallet-pill,
.eyebrow, .guide-language, .hero-graffiti-tag, .brand-wordmark,
.footer-wordmark, .section-heading h2, .card-title, .plot-title {
  font-family: var(--pixel-font);
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #173721;
}
.brand-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: block;
  image-rendering: pixelated;
}
.brand-wordmark {
  display: grid;
  gap: 5px;
  font-family: var(--pixel-font);
  font-size: clamp(10px, 1.25vw, 14px);
  line-height: 1;
  letter-spacing: .06em;
  text-align: left;
  text-shadow: 2px 2px 0 #d7ebc8;
  white-space: nowrap;
}
.brand-wordmark span:last-child { color: #2f9a3d; }
.brand-wrap:hover .brand-icon { transform: translateY(-2px); }

/* Exact live-text display wordmark: max 64 px, centered, crisp and selectable. */
.hero-graffiti {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  margin: clamp(24px, 4vw, 38px) auto 14px;
  padding: 0 .1em .22em;
  color: #f5ffd8;
  font-family: var(--pixel-font);
  font-size: clamp(30px, 6.8vw, 64px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .035em;
  text-align: center;
  white-space: nowrap;
  transform: none;
  -webkit-text-stroke: 2px #143a20;
  paint-order: stroke fill;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: none;
  text-shadow:
    2px 2px 0 #8de25d,
    4px 4px 0 #45b646,
    6px 6px 0 #228739,
    8px 8px 0 #0e5f2a,
    10px 12px 0 rgba(19,58,31,.16);
  filter: none;
}
.hero-graffiti::after { content: none; display: none; }
.hero-graffiti-tag {
  transform: none;
  font-weight: 400;
  text-rendering: geometricPrecision;
}
.hero h1.hero-subtitle {
  font-family: var(--pixel-font);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
}

.footer-brand { align-items: center; }
.footer-brand-main { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.footer-icon { width: 42px; height: 42px; flex: 0 0 42px; image-rendering: pixelated; }
.footer-wordmark {
  display: grid;
  gap: 5px;
  color: #f5ffe8;
  font-family: var(--pixel-font);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .06em;
}
.footer-wordmark span:last-child { color: #82e35e; }

/* Retire the previous SVG wordmark classes without affecting the icon assets. */
.brand-logo, .footer-logo { display: none !important; }

@media (max-width: 760px) {
  .landing-topbar .brand-wrap { width: auto; overflow: visible; }
  .topbar:not(.landing-topbar) .brand-wrap { width: auto; }
  .brand-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .brand-wordmark { font-size: 9px; gap: 4px; }
  .hero-graffiti {
    font-size: clamp(28px, 8.1vw, 44px);
    letter-spacing: .015em;
    -webkit-text-stroke-width: 1.5px;
    text-shadow: 2px 2px 0 #8de25d, 4px 4px 0 #45b646, 6px 6px 0 #0e6d31;
  }
}
@media (max-width: 430px) {
  .landing-topbar { grid-template-columns: minmax(0,1fr) auto; }
  .brand-wrap { gap: 7px; }
  .brand-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .brand-wordmark { font-size: 8px; letter-spacing: .025em; }
  .hero-graffiti { font-size: clamp(27px, 7.8vw, 34px); padding-inline: 0; }
  .hero h1.hero-subtitle { font-size: clamp(22px, 6.7vw, 29px); }
}

/* Farm Index typography system 4: every visible interface label uses Press Start 2P. */
:root {
  --pixel-font: "Press Start 2P", "Courier New", ui-monospace, monospace;
  font-family: var(--pixel-font);
}
html,
body,
body *,
button,
input,
select,
textarea,
option,
code,
pre {
  font-family: var(--pixel-font) !important;
  font-synthesis: none;
}
body {
  font-size: 10px;
  line-height: 1.75;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: none;
}
p,
li,
small,
.tagline,
.hero-copy p,
.guide-step p,
.guide-notes span,
.site-footer,
.panel-intro p,
.activity-list,
.campaign-copy,
.card-copy {
  line-height: 1.85 !important;
  letter-spacing: 0 !important;
}
button,
input,
select,
textarea,
.pixel-btn,
.tab-btn,
.card-btn,
.wallet-pill,
.badge {
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}
input,
select,
textarea { min-width: 0; }
.hero-copy p { font-size: clamp(8px, 1.15vw, 11px); }
.tagline { font-size: 7px; line-height: 1.65 !important; }
.site-footer p,
.site-footer small { font-size: 8px; }
.docs-links a { line-height: 1.65; }
.card p,
.card li,
.panel-intro p,
.guide-step p,
.guide-notes span { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  body { font-size: 9px; }
  .hero-copy p { font-size: 8px; line-height: 1.9 !important; }
  .tagline { font-size: 6px; }
  .site-footer p,
  .site-footer small { font-size: 7px; }
  .pixel-btn,
  .tab-btn,
  .card-btn { line-height: 1.5 !important; }
}


/* v0.6.1 landing RWA and wallet-only footer revision */
.coin-badge { display: inline-flex; align-items: center; gap: 7px; }
.coin-badge .badge-sprite { width: 18px; height: 18px; }
.hero-pills span { display: inline-flex; align-items: center; gap: 8px; }
.hero-pills .pill-sprite { width: 22px; height: 22px; }
.hero-pills b { font: inherit; }
.growth-steps .step-connector { width: 28px; height: 3px; background: #1f592b; box-shadow: 0 -5px 0 -1px #1f592b, 0 5px 0 -1px #1f592b; }

.landing-rwa-showcase {
  margin: 24px 0;
  padding: clamp(22px,4vw,42px);
  border-radius: 22px;
  border-color: #c2d9b6;
  background: linear-gradient(180deg,#fbfff6,#edf7e7);
  box-shadow: 0 18px 42px rgba(34,82,43,.10), 5px 5px 0 rgba(45,91,48,.13);
}
.landing-rwa-heading { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,.75fr); gap: 28px; align-items: end; margin-bottom: 22px; }
.landing-rwa-heading h2 { margin: 10px 0 0; font-size: clamp(22px,3.8vw,42px); line-height: 1.28; color: #183d24; }
.landing-rwa-heading p { margin: 0; color: #607264; font-size: 9px; line-height: 1.9; }
.landing-rwa-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.landing-rwa-card {
  min-width: 0;
  overflow: hidden;
  border: 2px solid #b8d2aa;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(33,76,40,.08);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.landing-rwa-card:hover { transform: translateY(-4px); border-color: #24a441; box-shadow: 0 16px 30px rgba(31,110,47,.14); }
.landing-rwa-art { min-height: 154px; display: grid; place-items: center; background: linear-gradient(#cceca1 0 62%,#a36c3e 62%); border-bottom: 2px solid #b8d2aa; }
.landing-rwa-art .pixel-sprite { filter: drop-shadow(0 9px 0 rgba(52,88,35,.15)); animation: cropBreathe 2.2s steps(4,end) infinite; }
.landing-rwa-copy { padding: 16px 15px 13px; }
.landing-rwa-type { color: #1a9c39; font-size: 7px; letter-spacing: .6px; }
.landing-rwa-copy h3 { margin: 11px 0 8px; color: #183d24; font-size: 13px; line-height: 1.45; }
.landing-rwa-copy p { min-height: 29px; margin: 0; color: #728176; font-size: 7px; line-height: 1.75; }
.landing-rwa-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }
.landing-rwa-facts span { padding: 9px 8px; border: 1px solid #d1e2c8; border-radius: 8px; background: #f4faef; color: #728176; font-size: 6px; line-height: 1.5; }
.landing-rwa-facts strong { display: block; margin-top: 7px; color: #21472b; font-size: 8px; }
.landing-rwa-price {
  width: 100%; min-height: 86px; display: grid; place-items: center; gap: 4px;
  border: 0; border-top: 2px solid #b8d2aa; background: linear-gradient(180deg,#25d84b,#14b638);
  color: #fff; cursor: pointer; text-shadow: 2px 2px 0 #087326;
}
.landing-rwa-price:hover { filter: brightness(1.04); }
.landing-rwa-price:active { transform: translateY(2px); }
.landing-rwa-price span { font-size: 6px; opacity: .86; }
.landing-rwa-price strong { font-size: 13px; }
.landing-rwa-price small { font-size: 6px; }
.landing-rwa-disclaimer { margin-top: 16px; padding: 12px 14px; border: 1px dashed #a9c99b; border-radius: 10px; color: #657668; font-size: 7px; line-height: 1.85; text-align: center; }
.campaign-card.focus-campaign { outline: 4px solid rgba(35,207,69,.32); border-color: #1ab23b; box-shadow: 0 0 0 6px rgba(35,207,69,.10),0 12px 28px rgba(25,107,42,.12); }


@media (max-width: 1080px) {
  .landing-rwa-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .landing-rwa-showcase { margin: 16px 0; padding: 20px 12px; border-radius: 18px; }
  .landing-rwa-heading { grid-template-columns: 1fr; gap: 12px; }
  .landing-rwa-heading h2 { font-size: clamp(20px,7.2vw,30px); }
  .landing-rwa-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .landing-rwa-art { min-height: 120px; }
  .landing-rwa-copy { padding: 12px 10px 10px; }
  .landing-rwa-copy h3 { font-size: 9px; }
  .landing-rwa-facts { grid-template-columns: 1fr; }
  .landing-rwa-facts span { font-size: 5px; }
  .landing-rwa-price { min-height: 76px; }
  .landing-rwa-price strong { font-size: 10px; }
}
@media (max-width: 390px) {
  .landing-rwa-grid { grid-template-columns: 1fr; }
  .landing-rwa-art { min-height: 142px; }
}

/* Farm Index dashboard panel + landing-only footer revision */
.game-view { padding: 18px 0; }
.game-view .main-layout { padding-top: 14px; }
.dashboard-launch-panel {
  display: grid;
  grid-template-columns: minmax(220px,1fr) minmax(420px,1.45fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 2px solid #a9c99b;
  border-radius: 18px;
  background: linear-gradient(135deg,#f8fce8 0%,#e8f6d7 48%,#d5edbd 100%);
  box-shadow: 0 12px 28px rgba(33,76,40,.09),4px 4px 0 rgba(50,94,48,.12);
}
.dashboard-launch-copy h2 { margin: 8px 0 7px; color: #193f25; font-size: clamp(16px,2vw,24px); line-height: 1.35; }
.dashboard-launch-copy p { margin: 0; color: #667968; font-size: 7px; line-height: 1.8; }
.dashboard-launch-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.dashboard-launch-stats > div {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid #bad3ab;
  border-radius: 10px;
  background: rgba(255,255,255,.76);
  text-align: center;
}
.dashboard-launch-stats span,.dashboard-launch-stats strong { display: block; }
.dashboard-launch-stats span { color: #738477; font-size: 5px; line-height: 1.55; }
.dashboard-launch-stats strong { margin-top: 8px; overflow: hidden; color: #168f34; font-size: 13px; line-height: 1.25; text-overflow: ellipsis; }
.dashboard-open-button { min-height: 52px; white-space: nowrap; }

.dashboard-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: max(18px,var(--safe-top)) max(18px,var(--safe-right)) max(18px,var(--safe-bottom)) max(18px,var(--safe-left));
  background: rgba(18,39,23,.72);
  backdrop-filter: blur(7px);
  animation: dashboardFade .14s steps(3,end) both;
}
.dashboard-modal {
  width: min(1040px,100%);
  max-height: min(88vh,860px);
  overflow: auto;
  padding: 22px;
  border: 2px solid #a9c99b;
  border-radius: 20px;
  background: #f5faef;
  box-shadow: 0 24px 70px rgba(9,30,15,.35),6px 6px 0 rgba(18,73,30,.25);
  animation: dashboardRise .16s steps(4,end) both;
}
.dashboard-popup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid #c9dcc0; }
.dashboard-popup-head h2 { margin: 9px 0 8px; color: #173e23; font-size: clamp(20px,3vw,32px); line-height: 1.35; }
.dashboard-popup-head p { max-width: 700px; margin: 0; color: #687a6b; font-size: 7px; line-height: 1.9; }
.dashboard-close { min-height: 42px; padding: 9px 12px; border: 1px solid #9fbaa0; border-radius: 7px; background: #fff; color: #315b38; cursor: pointer; font-size: 7px; box-shadow: 3px 3px 0 rgba(50,94,48,.14); }
.dashboard-close:hover { border-color: #1ca63b; color: #168f34; }
.dashboard-popup-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.dashboard-primary-stat { min-width: 0; padding: 16px 14px; border: 1px solid #bed5b2; border-radius: 12px; background: linear-gradient(#fff,#eff8e7); }
.dashboard-primary-stat span,.dashboard-primary-stat strong,.dashboard-primary-stat small { display: block; }
.dashboard-primary-stat span { color: #6e8171; font-size: 6px; line-height: 1.5; }
.dashboard-primary-stat strong { margin-top: 10px; overflow: hidden; color: #168f34; font-size: clamp(16px,2.4vw,26px); line-height: 1.2; text-overflow: ellipsis; }
.dashboard-primary-stat small { margin-top: 9px; color: #718275; font-size: 5px; line-height: 1.65; }
.dashboard-popup-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dashboard-detail-panel { min-width: 0; padding: 15px; border: 1px solid #c6d9bd; border-radius: 12px; background: #fff; }
.dashboard-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #dbe8d5; }
.dashboard-panel-title > span { color: #214b2c; font-size: 7px; line-height: 1.5; }
.dashboard-panel-title button { padding: 7px 8px; border: 1px solid #bdd3b4; border-radius: 6px; background: #eff8e8; color: #168f34; cursor: pointer; font-size: 5px; }
.dashboard-detail-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(100px,1fr); gap: 12px; align-items: start; padding: 9px 0; border-bottom: 1px dashed #dbe7d5; }
.dashboard-detail-row:last-child { border-bottom: 0; }
.dashboard-detail-row span { color: #718274; font-size: 6px; line-height: 1.65; }
.dashboard-detail-row strong { overflow-wrap: anywhere; color: #274d30; font-size: 6px; line-height: 1.65; text-align: right; }
.dashboard-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.dashboard-action-grid .pixel-btn { width: 100%; }
.dashboard-demo-tools { margin-top: 12px; padding: 13px; border: 1px dashed #a9c99b; border-radius: 10px; background: #edf8e7; }
.dashboard-demo-tools > span { display: block; color: #54705a; font-size: 6px; }
.dashboard-demo-tools .dev-tools { margin-top: 10px; border-top: 0; }

.landing-only-footer { width: min(1400px,calc(100% - 28px)); margin: 4px auto max(26px,var(--safe-bottom)); }
.app-shell + .landing-only-footer { margin-top: 0; }

@keyframes dashboardFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dashboardRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) {
  .dashboard-launch-panel { grid-template-columns: 1fr auto; }
  .dashboard-launch-stats { grid-column: 1 / -1; grid-row: 2; }
  .dashboard-open-button { grid-column: 2; grid-row: 1; }
}
@media (max-width: 760px) {
  .game-view { padding-top: 12px; }
  .dashboard-launch-panel { grid-template-columns: 1fr; gap: 13px; padding: 16px 13px; border-radius: 15px; }
  .dashboard-launch-stats { grid-column: auto; grid-row: auto; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-open-button { grid-column: auto; grid-row: auto; width: 100%; }
  .dashboard-modal-backdrop { align-items: end; padding: max(10px,var(--safe-top)) 7px max(7px,var(--safe-bottom)); }
  .dashboard-modal { width: 100%; max-height: 92vh; padding: 16px 12px; border-radius: 18px 18px 10px 10px; }
  .dashboard-popup-head { position: sticky; top: -16px; z-index: 4; margin: -16px -12px 0; padding: 15px 12px 13px; background: #f5faef; border-radius: 18px 18px 0 0; }
  .dashboard-popup-head p { display: none; }
  .dashboard-popup-summary,.dashboard-popup-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-detail-row { grid-template-columns: 1fr; gap: 4px; }
  .dashboard-detail-row strong { text-align: left; }
  .landing-only-footer { width: min(100% - 14px,1400px); margin-bottom: max(14px,var(--safe-bottom)); }
}
@media (max-width: 430px) {
  .dashboard-popup-summary,.dashboard-popup-grid { grid-template-columns: 1fr; }
  .dashboard-action-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-modal-backdrop,.dashboard-modal { animation: none !important; }
}


/* v0.6.1 dashboard scroll stability patch */
:root { --safe-bottom: env(safe-area-inset-bottom, 0px); }
html.dashboard-open,
body.dashboard-open {
  width: 100%;
  max-width: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}
.dashboard-modal-backdrop {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  contain: layout paint;
}
.dashboard-modal {
  width: min(1040px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.dashboard-modal,
.dashboard-modal * { min-width: 0; }
.dashboard-modal img,
.dashboard-modal svg,
.dashboard-modal canvas,
.dashboard-modal video { max-width: 100%; }
.dashboard-popup-head > div { min-width: 0; }
.dashboard-close { flex: 0 0 auto; }
.dashboard-panel-title { flex-wrap: wrap; }
.dashboard-panel-title > span,
.dashboard-panel-title button,
.dashboard-detail-row span,
.dashboard-detail-row strong,
.dashboard-primary-stat small {
  overflow-wrap: anywhere;
  word-break: normal;
}
.dashboard-panel-title button {
  max-width: 100%;
  white-space: normal;
}
.dashboard-action-grid .pixel-btn,
.dashboard-demo-tools .pixel-btn {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.dashboard-demo-tools .dev-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  width: 100%;
}
@media (max-width: 760px) {
  .dashboard-modal-backdrop {
    width: 100dvw;
    height: 100dvh;
    max-width: 100dvw;
    max-height: 100dvh;
  }
  .dashboard-modal {
    width: calc(100dvw - 14px);
    max-width: calc(100dvw - 14px);
    max-height: calc(100dvh - max(17px,var(--safe-top)) - max(14px,var(--safe-bottom)));
    margin: 0;
  }
  .dashboard-popup-head {
    width: auto;
    max-width: none;
  }
}
@media (max-width: 540px) {
  .dashboard-popup-summary,
  .dashboard-popup-grid,
  .dashboard-demo-tools .dev-tools { grid-template-columns: 1fr; }
}


/* v0.6.1 player-action navigation fix */
[data-game-action-panel] {
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 82px);
  outline: none;
}
[data-game-action-panel]:focus-visible {
  box-shadow: 0 0 0 4px rgba(33, 151, 54, .22), var(--panel-shadow, 4px 4px 0 rgba(31, 69, 38, .2));
}
.tab-btn[aria-selected="true"] {
  position: relative;
}
.tab-btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 3px;
  height: 3px;
  background: #24a43e;
}
@media (max-width: 760px) {
  [data-game-action-panel] { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 16px); }
}
