/* Grow A Valley Encyclopedia - styled after the in-game UI kit (hillstead-design/design/boards/UIKit.html) */
:root {
  --ink: #1E1208;
  --ink2: #2A1609;
  --cream: #FFF8E8;
  --cream2: #E9D6C2;
  --grass: #2E6A2B;
  --panel: #7A3E22;
  --well: #5A2E19;
  --well-edge: #3A1D0E;
  --slot: #2A1609;
  --green: #3CC23A;
  --green-d: #2A8A2A;
  --money: #4CF04A;
  --gold: #F7B21C;
  --gold-l: #FFD23F;
  --blue: #1EA7F0;
  --purple: #9B4BEA;
  --red: #E5262B;
  --wood: #A8714A;
  --robux: #7FD3FF;
  --radius: 12px;
  --head: 'Lilita One', 'Fredoka', system-ui, sans-serif;
  --body: 'Fredoka', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: var(--cream);
  background-color: var(--grass);
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,.14) 0 4px, transparent 4px 46px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.14) 0 4px, transparent 4px 46px);
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--gold-l); }
a:hover { color: #FFE680; }
button, input, select { font: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 400; letter-spacing: .3px; line-height: 1.1; }
p { margin: 0; }

:focus-visible { outline: 4px solid var(--gold-l); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cream); color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* --- kit pieces --- */
.ol {
  color: var(--cream);
  text-shadow: 2.5px 0 0 var(--ink), -2.5px 0 0 var(--ink), 0 2.5px 0 var(--ink), 0 -2.5px 0 var(--ink),
    1.8px 1.8px 0 var(--ink), -1.8px 1.8px 0 var(--ink), 1.8px -1.8px 0 var(--ink), -1.8px -1.8px 0 var(--ink),
    0 4px 0 var(--ink), 1.5px 4px 0 var(--ink), -1.5px 4px 0 var(--ink);
}
.ols {
  color: var(--cream);
  text-shadow: 1.6px 0 0 var(--ink), -1.6px 0 0 var(--ink), 0 1.6px 0 var(--ink), 0 -1.6px 0 var(--ink),
    1.1px 1.1px 0 var(--ink), -1.1px 1.1px 0 var(--ink), 1.1px -1.1px 0 var(--ink), -1.1px -1.1px 0 var(--ink),
    0 2.5px 0 var(--ink);
}
.lat {
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.16) 0 4px, transparent 4px 34px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.16) 0 4px, transparent 4px 34px);
}
.latd {
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,.12) 0 4px, transparent 4px 40px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.12) 0 4px, transparent 4px 40px);
}
.chunk {
  border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.3), inset 0 -5px 0 rgba(0,0,0,.2), 0 4px 0 var(--ink);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 10px;
  font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
  transition: transform .08s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); color: var(--cream); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.2), 0 1px 0 var(--ink); }
.btn-green { background-color: var(--green); }
.btn-discord { background-color: #5865F2; }
.btn-wood { background-color: var(--wood); }

/* --- header --- */
.site-head {
  background: var(--panel);
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
  position: sticky; top: 0; z-index: 20;
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; min-height: 44px; }
.brand-icon { width: 48px; height: 48px; flex: 0 0 48px; filter: drop-shadow(0 2px 0 var(--ink)); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--head); font-size: 30px; line-height: 1.05; white-space: nowrap; }
.brand-sub { font-size: 15px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-l); }
.head-links { display: flex; gap: 10px; flex: 0 0 auto; }

.nav { display: flex; gap: 8px; padding-bottom: 12px; }
.nav a {
  flex: 0 0 auto;
  min-height: 44px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 3px solid var(--ink);
  background-color: var(--well);
  color: var(--cream); text-decoration: none; font-weight: 700; font-size: 17px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), 0 3px 0 var(--ink);
  text-shadow: 0 2px 0 var(--ink);
}
.nav a:hover { background-color: #6B3A22; color: var(--cream); }
.nav a[aria-current="page"] {
  background-color: var(--gold);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 4px, transparent 4px 30px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 4px, transparent 4px 30px);
  text-shadow: 1.4px 0 0 var(--ink), -1.4px 0 0 var(--ink), 0 1.4px 0 var(--ink), 0 -1.4px 0 var(--ink), 0 2.5px 0 var(--ink);
}

main { flex: 1 0 auto; padding-top: 22px; padding-bottom: 32px; outline: none; }
.loading { font-size: 22px; padding: 60px 0; text-align: center; }

.site-foot { padding-bottom: 24px; text-align: center; font-size: 14px; color: var(--cream2); }
.site-foot p { text-shadow: 0 1.5px 0 var(--ink); }

/* --- panels --- */
.panel { border-radius: 16px; background: var(--panel); overflow: hidden; margin-bottom: 22px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px;
  padding: 10px 18px; border-bottom: 4px solid var(--ink2); background-color: var(--gold);
}
.panel-head h2 { font-size: 30px; }
.panel-body { padding: 16px 18px 18px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(30,18,8,.55); border-radius: 999px; padding: 4px 12px;
  font-weight: 700; font-size: 15px; white-space: nowrap;
}
.pill b { font-family: var(--head); font-weight: 400; font-size: 18px; color: var(--gold-l); letter-spacing: .5px; }

.page-title { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 16px; }
.page-title h1 { font-size: 46px; }
.page-title p { font-size: 17px; max-width: 640px; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.grid2 > * { min-width: 0; }

/* --- rows (live lists) --- */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; gap: 12px;
  background: var(--well); border: 3px solid var(--well-edge); border-radius: 10px; padding: 8px 10px;
  color: var(--cream); text-decoration: none; min-height: 64px;
}
a.row:hover { background: #6A361D; color: var(--cream); }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-name { font-family: var(--head); font-size: 21px; line-height: 1.1; overflow-wrap: anywhere; }
.row-sub { font-size: 14px; color: var(--cream2); overflow-wrap: anywhere; }
.row-end { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.count { font-family: var(--head); font-size: 24px; color: var(--money); text-shadow: 0 2px 0 var(--ink); white-space: nowrap; }

/* --- icon slot --- */
.slot {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 8px; background: var(--slot);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border: 3px solid var(--slot);
}
.slot img { width: 100%; height: 100%; object-fit: contain; }
.slot.lg { width: 96px; height: 96px; }
.slot.xl { width: 180px; height: 180px; border-radius: 14px; }
.slot.sm { width: 40px; height: 40px; border-radius: 6px; border-width: 2px; }
.slot .ph, .ph-box {
  width: 60%; height: 60%; border-radius: 30%; background: #6B4A33; border: 3px solid rgba(0,0,0,.35);
}
.slot.broken img { display: none; }

/* --- tags & chips --- */
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 7px; border: 2.5px solid var(--ink);
  font-family: var(--head); font-size: 15px; letter-spacing: .4px; line-height: 1.35; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3), 0 2px 0 var(--ink);
}
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; border: 2.5px solid var(--ink2);
  font-weight: 700; font-size: 14px; line-height: 1.4; white-space: nowrap; text-decoration: none;
}
a.chip:hover { filter: brightness(1.12); color: var(--cream); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-stock { background: var(--green-d); }
.badge-new { background: var(--red); }
.badge-out { background: #6E6A66; }
.badge-ltd { background: var(--purple); }

/* --- toolbar --- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--panel); border: 3px solid var(--ink); border-radius: 14px; padding: 10px;
  margin-bottom: 18px; box-shadow: 0 4px 0 var(--ink);
}
.field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--cream2); padding-left: 4px; }
.toolbar .search { flex: 1 1 240px; }
.toolbar input, .toolbar select, .sel {
  height: 44px; border-radius: 10px; border: 3px solid var(--ink); background: var(--cream); color: var(--ink);
  padding: 0 12px; font-weight: 600; font-size: 16px; width: 100%; min-width: 0;
  box-shadow: inset 0 3px 0 rgba(0,0,0,.12);
}
.toolbar select, .sel { padding-right: 30px; cursor: pointer; }
.result-count { font-size: 14px; color: var(--cream2); margin: -8px 0 12px 4px; text-shadow: 0 1.5px 0 var(--ink); }

/* --- cards --- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 3px solid var(--ink); border-radius: 14px; padding: 12px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12), 0 4px 0 var(--ink);
  color: var(--cream); text-decoration: none; min-width: 0;
  transition: transform .1s ease;
}
.card:hover { transform: translateY(-3px); color: var(--cream); }
.card:active { transform: translateY(1px); }
.card-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.card-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-name { font-family: var(--head); font-size: 23px; line-height: 1.05; overflow-wrap: anywhere; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.stat { background: var(--well); border: 2.5px solid var(--well-edge); border-radius: 8px; padding: 4px 8px; min-width: 0; }
.stat.wide { grid-column: 1 / -1; }
.stat-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--cream2); }
.stat-v { display: block; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.money { color: var(--money); }
.robux { color: var(--robux); }
.muted { color: var(--cream2); }
.card-note { font-size: 14px; color: var(--cream2); }

/* --- live page --- */
.cd { font-family: var(--head); font-weight: 400; letter-spacing: .5px; }
.weather-box {
  display: flex; align-items: center; gap: 16px; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
}
.weather-dot {
  width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; border: 4px solid var(--ink2);
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18);
}
.weather-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; }
.weather-name { font-family: var(--head); font-size: 30px; line-height: 1.05; }
.weather-sub { font-size: 16px; }
.next-weather { display: flex; align-items: center; gap: 12px; background: var(--well); border: 3px solid var(--well-edge); border-radius: 10px; padding: 10px 12px; }
.empty {
  background: var(--well); border: 3px dashed #9A6A4A; border-radius: 10px; padding: 18px; text-align: center;
  color: var(--cream2); font-size: 16px;
}
.stale-note { font-size: 13px; color: var(--cream2); margin-top: 10px; }
.updated { font-size: 14px; color: var(--cream2); text-shadow: 0 1.5px 0 var(--ink); }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--money); border: 2px solid var(--ink); margin-right: 6px; vertical-align: 0; }
.live-dot.off { background: #9AA3A8; }
.section-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-tools .sel { width: auto; height: 40px; font-size: 15px; }
.bar { height: 14px; border-radius: 999px; background: var(--slot); padding: 2px; margin-top: 4px; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--green); min-width: 6px; }

/* --- detail --- */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 10px; font-weight: 700; color: var(--cream); text-decoration: none; text-shadow: 0 2px 0 var(--ink); }
.back:hover { color: var(--gold-l); }
.hero { display: flex; gap: 20px; align-items: center; }
.hero-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hero h1 { font-size: 46px; overflow-wrap: anywhere; }
.hero .desc { font-size: 18px; max-width: 640px; }
.hero-icons { display: flex; gap: 10px; flex: 0 0 auto; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.facts .stat { padding: 8px 12px; }
.facts .stat-v { font-size: 18px; }
.trade { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--well); border: 3px solid var(--well-edge); border-radius: 10px; padding: 8px 10px; }
.trade-side { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 140px; min-width: 0; }
.trade-arrow { flex: 0 0 auto; }
.trade-time { flex: 1 0 100%; font-size: 13px; color: var(--cream2); }
.petchip { display: inline-flex; align-items: center; gap: 6px; background: var(--slot); border-radius: 8px; padding: 3px 8px 3px 3px; font-weight: 700; font-size: 14px; color: var(--cream); text-decoration: none; min-height: 36px; }
.petchip img { width: 30px; height: 30px; object-fit: contain; }
.petchip.broken img { visibility: hidden; }
.sub-h { font-family: var(--head); font-size: 22px; margin: 18px 0 10px; }
.sub-h:first-child { margin-top: 0; }
.big-num { font-family: var(--head); font-size: 40px; color: var(--money); text-shadow: 0 3px 0 var(--ink); line-height: 1; }

.notfound { text-align: center; padding: 40px 0; }
.notfound h1 { font-size: 40px; margin-bottom: 12px; }

/* --- responsive --- */
@media (max-width: 900px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .page-title h1, .hero h1 { font-size: 38px; }
}
@media (max-width: 680px) {
  .hide-sm { display: none; }
  .btn-discord { width: 44px; padding: 0; }
  .brand-name { font-size: 24px; }
  .brand-sub { font-size: 12px; }
  .brand-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding-bottom: 10px; }
  .nav a { padding: 0 2px; font-size: 14px; min-width: 0; }
  .panel-head { padding: 8px 12px; }
  .panel-head h2 { font-size: 24px; }
  .panel-body { padding: 12px; }
  .page-title h1, .hero h1 { font-size: 32px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .slot.xl { width: 128px; height: 128px; }
  .site-head { position: static; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .facts .stat-v { font-size: 16px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .toolbar .field { flex: 1 1 calc(50% - 5px); }
  .toolbar .search { flex-basis: 100%; }
  .weather-name { font-size: 24px; }
  .weather-dot { width: 52px; height: 52px; flex-basis: 52px; }
  .row-name { font-size: 18px; }
  .count { font-size: 21px; }
  .big-num { font-size: 32px; }
}
@media (max-width: 400px) {
  .hide-xs { display: none; }
  .head-links { gap: 6px; }
  .btn-green { padding: 0 12px; }
  .brand-name { font-size: 21px; }
  .nav a { font-size: 13px; }
  .slot { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
