:root {
  --bg: #0c1410;
  --surface: #121c16;
  --surface-2: #17231c;
  --surface-3: #1e2d24;
  --line: #26372d;
  --line-2: #35493c;
  --text: #eaf2ec;
  --muted: #8fa397;
  --accent: #a3e65d;
  --accent-2: #c5f594;
  --accent-ink: #062014;
  --gold: #f5c451;
  --ok: #4ade80;
  --err: #ff6b6b;
  --warn: #f5c451;
  --radius: 14px;
  --radius-sm: 9px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 750; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0 0 12px; }
code, pre, .mono { font-family: var(--mono); font-size: 0.93em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; }
.wrap-narrow { max-width: 820px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.min0 { min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.big { font-size: 22px; font-weight: 700; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lede { font-size: 17px; color: #c5d3ca; max-width: 62ch; }
.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.hint.err, .err { color: var(--err); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.opt { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; text-transform: none; letter-spacing: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-3); border-color: #48604f; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.btn-row.end { justify-content: flex-end; }
.addr-row .btn-row, .wallet-addr .btn-row, .config-row .btn-row { margin-top: 0; }

.nav { position: sticky; top: 0; z-index: 30; background: rgba(12, 20, 16, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand:hover { color: var(--text); }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #65b53b); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; left: 6px; right: 6px; top: 5px; bottom: 5px; background: var(--accent-ink); clip-path: polygon(44% 100%, 44% 55%, 14% 50%, 0 12%, 33% 16%, 51% 42%, 68% 0, 100% 0, 95% 35%, 58% 58%, 58% 100%); }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.brand-name b { color: var(--accent); font-weight: 800; }
.nav-links { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav-links a:hover, .nav-links a.on { color: var(--text); background: var(--surface-2); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.ca { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; white-space: nowrap; }
.ca b { color: var(--accent); }
.ca-none .ca-v { color: var(--warn); font-weight: 700; letter-spacing: 0.04em; }
.ca-copy { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 12px; }
.ca-copy:hover { color: var(--text); }
.banner { background: #2a1f08; color: var(--warn); border-bottom: 1px solid #4a3710; padding: 9px 20px; text-align: center; font-size: 13px; }

.wallet-wrap { position: relative; display: inline-block; }
.wallet-btn { gap: 8px; }
.wallet-icon { width: 18px; height: 18px; border-radius: 5px; }
.wallet-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.wallet-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.wallet-addr { word-break: break-all; font-size: 12px; }
.wallet-picker { position: fixed; inset: 0; z-index: 60; background: rgba(4, 5, 7, .72); display: grid; place-items: center; padding: 20px; }
.wp-box { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px; }
.wp-list { display: grid; gap: 8px; margin: 14px 0; }
.wp-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; width: 100%; text-align: left; }
.wp-item:hover { border-color: var(--accent); color: var(--text); }
.wp-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3); flex: none; }
.wp-name { font-weight: 650; }

.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; align-items: center; padding: 48px 0 28px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); margin-bottom: 18px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.stat-k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-v { font-size: 24px; font-weight: 750; margin-top: 4px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; min-height: 1em; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }

.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: flex; gap: 26px; width: max-content; animation: ticker 70s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.ticker-item img { width: 20px; height: 20px; border-radius: 50%; }
.ticker-item span { color: var(--muted); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; flex-wrap: wrap; width: auto; } html { scroll-behavior: auto; } }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head { padding: 44px 0 20px; }
.page-head h1 { margin-bottom: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.tab.on, .tab:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager a { min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.pager a.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

input[type=text], input[type=search], input[type=password], input[type=number], select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 230, 168, .18); }
textarea { resize: vertical; }
.filters input[type=search] { width: 240px; }
.filters select { width: auto; }
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: span 2; }
.prefixed { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.prefixed span { padding: 10px 0 10px 12px; color: var(--muted); white-space: nowrap; }
.prefixed input { border: 0; padding-left: 2px; box-shadow: none !important; }
.prefixed:focus-within { border-color: var(--accent); }
.drop-row { display: flex; gap: 12px; align-items: stretch; }
.drop { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); color: var(--muted); cursor: pointer; }
.drop:hover { border-color: var(--accent); color: var(--text); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop-prev { width: 84px; height: 84px; flex: none; border-radius: var(--radius-sm); background: var(--surface-3) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
details.more { border-top: 1px solid var(--line); padding-top: 14px; }
details.more summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--accent); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.amount-row { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg); }
.amount-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 230, 168, .18); }
.amount-row input { border: 0; background: none; font-size: 20px; padding: 12px; box-shadow: none !important; min-width: 0; }
.amount-unit { padding: 0 14px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.estimate { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(94, 230, 168, .08); border: 1px solid rgba(94, 230, 168, .28); font-size: 14px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel-no { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-size: 12px; }
.note { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface-2); margin-bottom: 14px; font-size: 14px; }
.note-err { border-color: #5a2424; background: #241213; color: #ffb4b4; }
.note-warn { border-color: #4a3710; background: #221a08; color: #f8d58a; }
.note-ok { border-color: #1b4a36; background: #0d2019; color: #a6f0cd; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--muted); }
.pill-ok { color: var(--ok); border-color: #1b4a36; background: #0d2019; }
.pill-warn { color: var(--warn); border-color: #4a3710; background: #221a08; }
.pill-err { color: var(--err); border-color: #5a2424; background: #241213; }
.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); margin-bottom: 16px; }
.empty h3 { margin-bottom: 8px; font-size: 18px; }
.logbox { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin: 12px 0 0; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; color: #c5d3ca; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }

.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color .15s, transform .15s; }
.tcard:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.tcard-top { display: flex; align-items: center; gap: 12px; }
.tcard-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-3); }
.tcard-logo-blank { display: grid; place-items: center; font-weight: 800; color: var(--accent); }
.tcard-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-sym { color: var(--muted); font-size: 13px; }
.tcard-top .stock-badge, .tcard-top > .btn { margin-left: auto; flex: none; }
.tcard-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 12px; }
.tcard-stats .k { display: block; font-size: 11px; }
.tcard-stats .v { font-weight: 700; }
.tcard-bar, .progress { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.tcard-bar span, .progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.tcard-bar.done span, .progress.done span { background: var(--ok); }
.tcard-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.stock-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.stock-badge img { width: 18px; height: 18px; border-radius: 50%; }
.mine { margin-bottom: 14px; }
.reward-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.reward-stats > div { display: grid; gap: 2px; }
.reward-stats .v { font-weight: 700; overflow-wrap: anywhere; }
.reward-mine { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.reward-rows { display: grid; gap: 6px; margin-bottom: 10px; }
.reward-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding-top: 6px; border-top: 1px solid var(--line); }
.reward-row a { min-width: 0; overflow-wrap: anywhere; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step-no { font-family: var(--mono); color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.step h3 { margin-bottom: 8px; }
.step p { color: #b4c4ba; font-size: 14px; margin: 0; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: baseline; font-size: 14px; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transform: translateY(-1px); }
.feed-launched { background: var(--accent); }
.feed-migrated { background: var(--ok); }
.feed-migrationfeecollected { background: var(--accent-2); }
.feed-feescollected { background: #6aa8ff; }
.feed-treasuryfunded { background: var(--gold); }
.feed-harvestshared, .feed-harvestpaid, .feed-harvest-crop { background: var(--gold); }
.feed-harvest-tree { background: #b07a3f; }
.feed-harvest-bush { background: #e2574c; }
.feed-text { min-width: 0; overflow-wrap: anywhere; }
.feed-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.pair-tabs { display: flex; flex-wrap: wrap; gap: 3px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); margin-bottom: 10px; }
.pair-tab { padding: 7px 9px; border-radius: 8px; border: 0; background: none; color: var(--muted); font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; }
.pair-tab span { font-weight: 500; font-size: 12px; opacity: .75; margin-left: 3px; }
.pair-tab:hover { color: var(--text); }
.pair-tab.on { background: var(--surface-3); color: var(--text); }
#pair-search { margin-bottom: 12px; }
.custom-box { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; }
.custom-box label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.custom-box .note { margin: 10px 0 0; }
.stock-opt[hidden] { display: none; }
.stock-opt-blank { width: 28px; height: 28px; border-radius: 50%; grid-row: span 3; background: var(--surface-3); display: grid; place-items: center; font-weight: 800; color: var(--accent); font-size: 13px; }
.stat-plus { font-size: 14px; font-weight: 600; color: var(--muted); }
.pair-admin { margin-top: 12px; }
.pair-admin .config-list { margin-top: 12px; max-height: 420px; overflow: auto; padding-right: 6px; }
select { cursor: pointer; }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 8px; max-height: 420px; overflow: auto; padding: 2px 4px 2px 2px; }
.stock-opt { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.stock-opt:hover { border-color: var(--line-2); }
.stock-opt.on { border-color: var(--accent); background: rgba(94, 230, 168, .09); box-shadow: 0 0 0 1px var(--accent) inset; }
.stock-opt img { width: 28px; height: 28px; border-radius: 50%; grid-row: span 3; }
.stock-opt-s { font-weight: 700; font-size: 14px; }
.stock-opt-n { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-opt-p { font-size: 12px; color: #c5d3ca; }

.token-head { display: flex; align-items: center; gap: 18px; padding: 34px 0 6px; flex-wrap: wrap; }
.token-logo { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; flex: none; background: var(--surface-3); font-size: 24px; }
.token-head h1 { font-size: clamp(24px, 3.6vw, 34px); }
.token-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; color: var(--muted); }
.token-ca { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.progress-panel .progress { height: 10px; margin: 12px 0; }
.progress-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.deck { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.deck-side { position: sticky; top: 76px; }
.chart { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.chart iframe { width: 100%; height: 440px; border: 0; display: block; }
.addr-list, .config-list, .wallet-list { display: grid; gap: 10px; }
.addr-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; font-size: 14px; }
.addr-k { color: var(--muted); font-size: 13px; }
.addr-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.config-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.config-row:last-child { border-bottom: 0; padding-bottom: 0; }
.wallet-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.wallet-role { font-weight: 700; margin-bottom: 4px; }
.wallet-row .wallet-addr { display: grid; gap: 8px; justify-items: end; text-align: right; font-size: 13px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.seg button { padding: 9px 10px; border-radius: 9px; border: 0; background: none; color: var(--muted); font-weight: 650; cursor: pointer; }
.seg button[aria-selected=true] { background: var(--surface-3); color: var(--text); }
.seg [data-side=buy][aria-selected=true] { background: rgba(43, 217, 139, .16); color: var(--ok); }
.seg [data-side=sell][aria-selected=true] { background: rgba(255, 97, 97, .16); color: var(--err); }
.seg-sm { margin: 0; padding: 3px; border-radius: 10px; }
.seg-sm button { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.swap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.swap-k { font-size: 13px; color: var(--muted); }
.swap-field { margin-bottom: 14px; }
.swap-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; gap: 10px; }
.swap-out { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }

.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.foot-inner { max-width: 1180px; margin: 0 auto; padding: 28px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 28px; }
.foot-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.foot-links { display: grid; gap: 8px; align-content: start; font-size: 14px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .deck { grid-template-columns: 1fr; }
  .deck-side { position: static; order: -1; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; }
  .nav-right .ca { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px 48px; }
  .nav-inner { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .nav-links { order: 3; flex-basis: 100%; }
  .nav-right { margin-left: auto; }
  .brand-name { font-size: 15px; }
  .steps, .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dd { margin-bottom: 10px; }
  .addr-row { grid-template-columns: 1fr auto auto; }
  .addr-row .addr-k { grid-column: 1 / -1; }
  .wallet-row { grid-template-columns: 1fr; }
  .wallet-row .wallet-addr { justify-items: start; text-align: left; }
  .wallet-row code { word-break: break-all; }
  .token-ca { margin-left: 0; }
  .filters input[type=search] { width: 100%; }
  .chart iframe { height: 340px; }
  .wallet-menu { width: min(300px, calc(100vw - 28px)); }
  .panel { padding: 16px; }
  .stat { padding: 14px; }
  .stat-v { font-size: 19px; }
}

.panel-accent { border-color: rgba(94, 230, 168, .5); box-shadow: 0 0 0 1px rgba(94, 230, 168, .18) inset; }
.token-facts { grid-template-columns: 70px 1fr; align-items: center; }
.pill-founder { color: var(--gold); border-color: rgba(245, 196, 81, .45); background: rgba(245, 196, 81, .1); }
.pop-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(94, 230, 168, .1); border: 1px solid rgba(94, 230, 168, .4); color: var(--accent); font-size: 12px; font-weight: 650; white-space: nowrap; }
.pop-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(94, 230, 168, .2); }
.tcard-top .pop-badge { margin-left: auto; flex: none; }
.tcard-foot { align-items: center; gap: 8px; }

.village { position: relative; border-radius: 3px; overflow: hidden; border: 2px solid #52644a; background: #3d8fc4; line-height: 0; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.village-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1152 / 640; image-rendering: pixelated; image-rendering: crisp-edges; }
.village-hud { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; line-height: 1.3; pointer-events: none; }
.vchip { padding: 4px 10px; border-radius: 999px; background: rgba(12, 20, 16, .82); border: 1px solid rgba(255, 255, 255, .14); color: #d6e4da; font-size: 12px; white-space: nowrap; }
.vchip b { color: var(--accent); font-variant-numeric: tabular-nums; }
.village-ticker { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 6px 10px; border-radius: 9px; background: rgba(12, 20, 16, .82); border: 1px solid rgba(255, 255, 255, .14); color: #d6e4da; font-size: 12px; line-height: 1.35; pointer-events: none; }
.village-ticker:empty { display: none; }
.village-you { position: absolute; left: 10px; right: 10px; bottom: 44px; padding: 6px 10px; border-radius: 9px; background: rgba(245, 196, 81, .92); color: #2a1e02; font-size: 12px; font-weight: 600; line-height: 1.35; pointer-events: none; }
.village-card { position: absolute; right: 10px; top: 10px; width: 210px; padding: 12px; border-radius: 12px; background: rgba(12, 20, 16, .94); border: 1px solid var(--line-2); line-height: 1.4; display: grid; gap: 6px; font-size: 13px; }
.village-card-row { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.village-card-row b { color: var(--text); font-weight: 650; text-align: right; }
.village-card-x { position: absolute; right: 6px; top: 2px; background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; padding: 2px 6px; }
.village-card-x:hover { color: var(--text); }
.village-wrap { margin: 18px 0 4px; }
.village-note { margin: 10px 2px 0; }
.village-compact .village-ticker { display: none; }
.hero-village { min-width: 0; }
.hero-village-link { display: block; margin: 10px 2px 0; font-size: 14px; }
.villager-table { max-height: 420px; overflow: auto; }
.villager-table thead th { position: sticky; top: 0; background: var(--surface); }

.splitbar { margin: 6px 0 4px; }
.splitbar-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.splitbar-track { display: flex; gap: 3px; border-radius: 12px; overflow: hidden; }
.splitbar-track span { padding: 10px 12px; font-size: 13px; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d6e4da; }
.splitbar-track b { font-size: 16px; margin-right: 4px; color: var(--text); }
.sb-protocol { background: #24352c; }
.sb-creator { background: #2d4a3a; }
.sb-treasury { background: rgba(94, 230, 168, .22); box-shadow: 0 0 0 1px rgba(94, 230, 168, .5) inset; border-radius: 0 12px 12px 0; }
.sb-treasury b { color: var(--accent); }
.splitbar-form { margin-bottom: 16px; }

@media (max-width: 980px) {
  .hero { padding-top: 28px; }
  .village-card { width: 190px; }
}
@media (max-width: 640px) {
  .splitbar-track { flex-direction: column; }
  .splitbar-track span { width: auto !important; white-space: normal; }
  .sb-treasury { border-radius: 0 0 12px 12px; }
  .village-hud { left: 6px; top: 6px; gap: 4px; }
  .vchip { font-size: 11px; padding: 3px 8px; }
  .village-ticker, .village-you { left: 6px; right: 6px; font-size: 11px; }
  .village-ticker { bottom: 6px; }
  .village-you { bottom: 38px; }
  .village-card { left: 6px; right: 6px; top: auto; bottom: 6px; width: auto; }
  .token-facts { grid-template-columns: 1fr; }
}

.vchip-preview { background: rgba(245, 196, 81, .92); border-color: rgba(245, 196, 81, .92); color: #2a1e02; }
.vchip-preview b { color: #2a1e02; }
.village-card-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.villager-table tr[data-villager] { cursor: pointer; }
.villager-table tr[data-villager]:hover td { background: var(--surface-2); }
.villager-table tr.on td { background: rgba(94, 230, 168, .12); }
.villager-table tr[data-villager]:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.preview-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.hero-village-open { display: block; color: inherit; }
.hero-village-open:hover { color: inherit; }
.hero-village-open:hover .village { border-color: var(--accent); }
.tcard-preview { border-style: dashed; border-color: rgba(245, 196, 81, .5); }
.tcard-preview .tcard-top .pill { margin-left: auto; flex: none; }
.section-link { font-size: 14px; color: var(--accent); }
.tgrid + .empty { margin-top: 14px; }

/* RPG camera and per-villager inventory. */
.village-camera-controls { position:absolute; bottom:10px; left:10px; display:flex; align-items:center; gap:3px; line-height:1; z-index:3; padding:3px; background:#262e24ed; border:2px solid #977b48; box-shadow:2px 2px 0 #10190f; }
.village-camera-controls button { border:1px solid #8a7652; border-radius:0; background:#443e2d; color:#f3dfae; cursor:pointer; padding:6px 9px; font:11px var(--mono); }
.village-camera-controls button:hover { background:#79633c; }
.village-zoom { color:#f3dfae; min-width:27px; text-align:center; font:11px var(--mono); }
.village-minimap { position:absolute; bottom:48px; right:10px; width:144px; height:96px; border:2px solid #b59657; image-rendering:pixelated; background:#203e2a; box-shadow:2px 2px 0 #10190f; pointer-events:auto; z-index:4; }
.village-ticker { bottom:48px; right:134px; }
.village-you { bottom:88px; }
.village .village-card { z-index:4; width:245px; max-height:calc(100% - 20px); overflow:auto; padding:15px; border-radius:0; border:3px solid #b79a61; background:#252a22f5; box-shadow:inset 0 0 0 1px #5c5137,3px 3px 0 #10190f; font:12px/1.5 var(--mono); }
.v-person-name { color:#ffe4a1; font-size:15px; line-height:1.35; padding-right:5px; }
.v-character-identity { display:grid; grid-template-columns:64px 1fr; align-items:center; gap:10px; padding:8px 0; }
.v-character-identity>div { min-width:0; }
.v-character-portrait { display:block; width:64px; height:auto; image-rendering:pixelated; background:#192b2c; border:1px solid #87734d; box-shadow:inset 0 -12px #354135; }
.v-profession { color:#d1b478; font-size:10px; margin:5px 0; }
.v-character-identity .mono { font-size:9px; color:#a3b5a3; overflow-wrap:anywhere; }
.v-character-identity .v-activity { font-size:9px; margin-top:5px; }
.v-follow { float:right; color:#a3ca7a; font-size:9px; padding-right:12px; }
.v-activity { color:#a3ca7a; font-size:10px; }
.v-inventory-title { color:#f3dfae; border-top:1px solid #756340; padding-top:8px; margin-top:3px; }
.v-inventory-title span { display:block; font-size:9px; color:#a9b398; }
.v-inventory { display:grid; grid-template-columns:repeat(3,1fr); gap:5px; }
.v-item { position:relative; display:flex; align-items:center; flex-direction:column; justify-content:center; gap:5px; min-height:64px; background:#171e17; border:2px solid #665c3b; box-shadow:inset 1px 1px #8b79514d; }
.v-item span { font-size:9px; color:#c1c6aa; }
.v-item b { position:absolute; top:2px; right:4px; color:#f4db97; font-size:10px; }
.v-item-empty { opacity:.35; }
.v-icon { display:block; width:20px; height:22px; position:relative; image-rendering:pixelated; }
.v-icon-wood { background:linear-gradient(90deg,#b07c40 0 20%,#674328 20% 35%,#a06c39 35% 65%,#ca9d5b 65% 80%,#674328 80%); width:22px; height:11px; box-shadow:0 2px #382c21; transform:rotate(-25deg); }
.v-icon-berries { width:8px; height:8px; background:#e87a70; box-shadow:8px 2px #be5553,3px 8px #de686b,5px -5px #6da342; }
.v-icon-wheat { width:3px; height:21px; background:#948248; box-shadow:6px 0 #948248; }
.v-icon-wheat:before { content:''; position:absolute; top:1px; left:-3px; width:8px; height:11px; background:#e6c56d; box-shadow:6px 2px #cfa655; }
.v-icon-axe { width:3px; height:22px; background:#a87843; }
.v-icon-axe:before { content:''; position:absolute; width:12px; height:9px; top:0; left:0; background:#bac8c5; border-right:3px solid #e7eee1; box-shadow:0 2px #65726f; }
.v-icon-sickle { width:3px; height:13px; margin-top:9px; background:#a87843; }
.v-icon-sickle:before { content:''; position:absolute; top:-10px; left:0; width:13px; height:12px; border:3px solid #dce5d0; border-left:0; border-bottom:0; }
.village.inventory-open .village-ticker,.village.inventory-open .village-you { display:none; }
@media(max-width:600px) {
  .village.inventory-open .village-card { position:relative; inset:auto; width:auto; max-height:none; margin:0; border-width:2px 0 0; }
  .village.inventory-open .v-inventory { grid-template-columns:repeat(6,1fr); }
  .village.inventory-open .village-hud { display:none; }
  .village.inventory-open .village-camera-controls { top:8px; bottom:auto; right:8px; left:auto; }
  .village.inventory-open .village-minimap { top:46px; bottom:auto; width:80px; height:53px; }
  .village-card-note { font-size:10px; }
  .v-item { min-height:59px; }
  .village-minimap { width:80px; height:53px; }
  .village-ticker { right:98px; font-size:10px; }
}

.village-wrap { position: relative; left: 50%; width: min(calc(100vw - 32px), 1640px); transform: translateX(-50%); }
.village-wrap .village-note { max-width: 1140px; margin-left: auto; margin-right: auto; }
.village-compact .village-minimap, .village-compact .village-camera-controls { display: none; }

/* Islands: the chip on the stage, the trait panel and the stills. */
.vchip-isle b { color: var(--gold); }
.island-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.island-name { font-size: 22px; line-height: 1.2; }
.island-tier-uncommon { color: var(--ok); border-color: #1b4a36; background: #0d2019; }
.island-tier-rare { color: #7fb8ff; border-color: #1f3d66; background: #0e1a2b; }
.island-tier-epic { color: #c9a3ff; border-color: #46306e; background: #1a1230; }
.island-tier-legendary { color: var(--gold); border-color: rgba(245, 196, 81, .55); background: rgba(245, 196, 81, .12); }
.trait-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.trait { display: grid; gap: 1px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.trait-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.trait-v { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trait-p { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trait-rare { border-color: rgba(245, 196, 81, .5); }
.trait-rare .trait-p { color: var(--gold); }
.island-panel .hint { margin-top: 12px; }
.isle-lede { max-width: 860px; margin: -6px 0 16px; }
.isle-lede b, .isle-gallery .hint b { color: var(--text); font-variant-numeric: tabular-nums; }
.isle-gallery .hint { margin-bottom: 14px; max-width: 900px; }
.isle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.isle-card { display: grid; gap: 7px; color: inherit; min-width: 0; align-content: start; }
.isle-card:hover { color: inherit; }
.isle-card .village { box-shadow: none; }
.isle-card:hover .village { border-color: var(--accent); }
.isle-card-text { display: grid; line-height: 1.35; min-width: 0; }
.isle-card-text b { font-size: 14px; }
.isle-card-text span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-isle { font-size: 12px; color: var(--muted); margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-isle:empty { display: none; }
@media (max-width: 560px) {
  .isle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .trait-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The island list: filters, cards and the trait tables. */
button.tab { background: none; cursor: pointer; font-family: inherit; line-height: inherit; }
.tab span { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.isle-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.isle-bar .isle-extra { color: var(--gold); border-color: rgba(245, 196, 81, .5); }
.isle-count { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.isle-list { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.isle-entry { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, transform .15s; }
.isle-entry:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.isle-entry .village { border-width: 1px; border-radius: 6px; }
.isle-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; margin-top: 2px; }
.isle-entry-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.isle-entry-head .pill { flex: none; }
.isle-entry-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.isle-entry-rare { display: flex; gap: 5px; flex-wrap: wrap; min-height: 21px; }
.isle-entry-rare span { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(245, 196, 81, .45); color: var(--gold); background: rgba(245, 196, 81, .08); white-space: nowrap; }
.isle-entry-village { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 9px; min-width: 0; white-space: nowrap; }
.isle-entry-village b { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.isle-entry-pop { margin-left: auto; }
.isle-entry-logo { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; flex: none; }
.isle-none-actions { justify-content: center; }
#isle-filters input[type=search] { width: 250px; }
.trait-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; align-items: start; }
.trait-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px 10px; }
.trait-table h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin: 0 6px 8px; }
.trait-table h3 span { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; text-transform: none; }
.trait-row { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 6px 6px 7px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.trait-row:hover { background: var(--surface-2); }
.trait-row.on { background: rgba(94, 230, 168, .13); }
.trait-row em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trait-row i { position: absolute; left: 6px; bottom: 2px; height: 2px; max-width: calc(100% - 12px); border-radius: 2px; background: var(--accent); opacity: .45; }
@media (max-width: 640px) {
  #isle-filters { width: 100%; }
  #isle-filters input[type=search] { width: 100%; }
  #isle-filters select { flex: 1 1 40%; min-width: 0; }
  .isle-list { grid-template-columns: 1fr; }
  .isle-count { margin-left: 0; flex-basis: 100%; }
}

/* A section that folds away: the summary is its heading, with a Show or Hide button. */
.fold > summary { list-style: none; cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.fold:not([open]) .fold-hide, .fold[open] .fold-show { display: none; }
.fold:not([open]) > .fold-head { margin-bottom: 0; }

/* Docs: a side list of sections, prose, endpoint blocks and code. */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
.docs-nav { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; padding-right: 6px; display: grid; gap: 16px; font-size: 14px; scrollbar-width: thin; }
.docs-nav-group { display: grid; gap: 1px; }
.docs-nav .k { margin-bottom: 5px; }
.docs-nav a { padding: 4px 10px; border-left: 2px solid var(--line); color: var(--muted); }
.docs-nav a:hover { color: var(--text); }
.docs-nav a.on { color: var(--accent); border-left-color: var(--accent); }
.docs-body { min-width: 0; }
.doc { padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.doc:last-child { border-bottom: 0; margin-bottom: 0; }
.doc > h2 { font-size: 26px; margin-bottom: 14px; }
.doc p, .api p { margin: 0 0 12px; max-width: 78ch; }
.doc code, .api code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.doc-list, .doc-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; max-width: 80ch; }
.doc-facts { margin: 14px 0; }
.doc-params td:first-child { white-space: nowrap; }
.doc-params td { vertical-align: top; }
.doc-params .pill { font-size: 10px; padding: 0 6px; margin-left: 4px; }
.api { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; scroll-margin-top: 80px; }
.api h3 { font-size: 18px; margin: 0 0 8px; }
.api-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.api-head .api-path { background: none; border: 0; padding: 0; font-size: 14px; color: var(--text); }
.api-method { font: 700 11px var(--mono); letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; }
.api-get { background: rgba(94, 230, 168, .16); color: var(--accent); }
.api-post { background: rgba(245, 196, 81, .16); color: var(--gold); }
.api .table-wrap { margin: 12px 0; }
.api .hint { margin: 10px 0 0; }
.code { position: relative; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.code pre { margin: 0; padding: 30px 14px 14px; overflow-x: auto; font-size: 13px; line-height: 1.55; tab-size: 2; }
.code pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; white-space: pre; }
.code-label { position: absolute; left: 12px; top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.code-copy { position: absolute; right: 8px; top: 6px; padding: 2px 9px; font-size: 11px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.code-copy:hover { color: var(--text); }
.api-try { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); display: grid; gap: 6px; }
.api-try-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.api-try-base { flex: none; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.api-try-row input { flex: 1; min-width: 0; font-size: 13px; padding: 7px 10px; }
.api-out { margin: 6px 0 0; max-height: 340px; font-size: 12px; }
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 18px; }
  .docs-nav { position: static; max-height: none; display: flex; gap: 14px; overflow-x: auto; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
  .docs-nav-group { display: flex; align-items: center; gap: 2px; flex: none; }
  .docs-nav .k { margin: 0 4px 0 0; white-space: nowrap; }
  .docs-nav a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: 4px 8px; }
  .docs-nav a.on { border-bottom-color: var(--accent); }
  .api { padding: 14px; }
  .api-try-base { display: none; }
  .doc-params td:first-child { white-space: normal; }
}

/* Playground: the controls under the village. */
.pg-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 18px; }
.pg-side { display: grid; gap: 0; min-width: 0; }
.pg-row { display: flex; gap: 8px; align-items: center; }
.pg-row input[type=text] { flex: 1; min-width: 0; }
.pg-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.pg-row input[type=number] { width: 112px; flex: none; }
.pg-traits { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; margin: 4px 0 6px; }
.pg-trait { display: grid; gap: 4px; min-width: 0; }
.pg-trait select { padding: 7px 9px; font-size: 14px; }
.pg-trait.picked select { border-color: rgba(245, 196, 81, .7); color: var(--gold); }
.pg-trait.trait-rare { border: 0; }
.pg-trait.trait-rare .trait-p { color: var(--gold); }
.pg-facts { grid-template-columns: 120px 1fr; margin: 4px 0 2px; font-size: 14px; }
#pg-island .island-head { margin: 4px 0 12px; }
#pg-quote-out { margin: 12px 0 0; }
@media (max-width: 900px) {
  .pg-grid { grid-template-columns: 1fr; }
}

/* The village carries the name and ticker of its token; the X button in the header. */
.vchip-name b { color: var(--text); }
.vchip-name .v-sym { color: var(--accent); font-family: var(--mono); font-size: 1em; font-weight: 650; }
.nav-x { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.nav-x:hover { color: var(--text); border-color: #48604f; background: var(--surface-2); }
.pg-token { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; }
.pg-token .field { margin-bottom: 6px; }
.pg-token-hint { margin: 0 0 14px; }

/* Full map: the village fills the screen and shows the whole island. */
html.village-full-open { overflow: hidden; }
.village-wrap.village-wrap-full { position: static; left: auto; width: auto; transform: none; }
.village.village-full { position: fixed; inset: 0; z-index: 200; width: auto; height: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #08110d; display: flex; align-items: center; justify-content: center; }
.village.village-full .village-canvas { width: min(100vw, calc(100vh * 1.8)); max-width: 100%; height: auto; }
.village.village-full:fullscreen { width: 100%; height: 100%; }
.village.village-full .village-camera-controls [data-camera=full] { background: #79633c; }
@media (max-width: 640px) {
  .village-camera-controls [data-camera=full] { padding-left: 7px; padding-right: 7px; }
}

/* A wide table scrolls inside its panel instead of stretching the page on a phone. */
.deck-main, .deck-side, .pg-grid > * { min-width: 0; }

/* The 3D view: the picture sits under the canvas, which becomes a clear sheet for names and amounts. */
.village-gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.village.view-3d { background: #08110d; }
.village.view-3d .village-canvas { position: relative; }
.village-camera-controls [data-camera=view][aria-pressed=true], .village-camera-controls [data-camera=full][aria-pressed=true] { background: #79633c; }
.village-camera-controls [data-camera=left], .village-camera-controls [data-camera=right] { font-size: 13px; padding: 4px 8px; }
@media (max-width: 640px) {
  .village .village-camera-controls { max-width: calc(100% - 16px); flex-wrap: wrap; }
  .village.inventory-open .village-camera-controls { left: 8px; right: 8px; justify-content: center; }
  .village .village-camera-controls button { padding: 5px 7px; font-size: 10px; }
  .village .village-zoom { padding: 0 3px; }
}

/* ---------- Chart (klinecharts) ---------- */
.chart-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-tools .panel-title { margin-bottom: 0; }
.chart-canvas { position: relative; height: 520px; border: 0; background: transparent; overflow: visible; }
.chart-canvas .kc-root { height: 100%; }
.kc-root { display: flex; flex-direction: column; min-height: 460px; position: relative; }
.kc-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 0 8px; }
.kc-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kc-btn { padding: 4px 9px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.kc-btn:hover { color: var(--text); background: var(--surface-2); }
.kc-btn.on { color: var(--accent); background: rgba(163, 230, 93, .1); border-color: rgba(163, 230, 93, .3); }
.kc-dd { position: relative; }
.kc-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; display: none; min-width: 170px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.kc-dd.open .kc-menu { display: grid; }
.kc-item { text-align: left; padding: 7px 10px; border-radius: 7px; border: 0; background: none; color: var(--text); font-size: 13px; cursor: pointer; }
.kc-item:hover { background: var(--surface-3); }
.kc-item.on { color: var(--accent); }
.kc-canvas { flex: 1; min-height: 400px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.kc-note { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); color: var(--muted); font-size: 13px; pointer-events: none; }

/* ---------- Holder farming: the 30-minute countdown, the SAPLING treasury and the holder list ---------- */
.farming-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.farming-head .panel-title { margin-bottom: 8px; }
.countdown { flex: none; min-width: 210px; text-align: center; padding: 12px 18px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: radial-gradient(120% 120% at 50% 0%, rgba(163, 230, 93, .12), transparent 60%), var(--bg); }
.countdown-k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.countdown-v { font-size: 36px; font-weight: 800; color: var(--accent); line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; min-height: 40px; }
.countdown-v.soon { color: var(--gold); }
.countdown-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.farming-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.farming-stats > div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.farming-stats .k { display: block; font-size: 11px; }
.farming-stats b { display: block; font-size: 16px; margin-top: 4px; overflow-wrap: anywhere; }
.farming-stats .muted { display: block; font-size: 12px; }
.tcard-next { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -4px 0 10px; font-size: 12px; }
.tcard-next b { color: var(--accent); font-variant-numeric: tabular-nums; }
.tcard-next b.soon { color: var(--gold); }
.vchip-next b { color: var(--accent); font-variant-numeric: tabular-nums; }
.vchip-next b.soon { color: var(--gold); }

/* The three pairs on the launch page: SOL, ZEC or SAPLING */
.stock-grid-3 { grid-template-columns: repeat(3, 1fr); max-height: none; overflow: visible; }
.stock-grid-3 .stock-opt { grid-template-rows: auto auto auto auto; padding: 14px; align-items: start; }
.stock-grid-3 .stock-opt img, .stock-grid-3 .stock-opt-blank { grid-row: span 4; }
.stock-opt-note { grid-column: 2; font-size: 12px; color: var(--muted); white-space: normal; margin-top: 6px; line-height: 1.4; }

@media (max-width: 860px) { .farming-stats { grid-template-columns: 1fr 1fr; } .stock-grid-3 { grid-template-columns: 1fr; } .chart-canvas { height: 440px; } }
@media (max-width: 640px) { .countdown { width: 100%; } .countdown-v { font-size: 30px; } }

.village-district-controls { position:absolute;top:52px;left:10px;right:10px;display:flex;gap:4px;overflow-x:auto;z-index:3;scrollbar-width:thin; }
.village-district-controls button { flex:none;padding:6px 9px;border:1px solid #6c8652;border-radius:5px;background:#173322e8;color:#e7f8ce;font:11px var(--mono);cursor:pointer; }
.village-district-controls button:hover,.village-district-controls button:focus-visible { background:#426238; }
.village.inventory-open .village-district-controls,.village-compact .village-district-controls { display:none; }
@media(max-width:600px) { .village-district-controls { top:40px;left:6px;right:6px; } .village-district-controls button { padding:5px 7px;font-size:10px; } }
.stock-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stock-opt.off { opacity: .6; cursor: not-allowed; }
.stock-opt.off:hover { border-color: var(--line); }
.stock-opt-off { color: var(--warn); }
@media (max-width: 980px) { .stock-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .stock-grid-4 { grid-template-columns: 1fr; } }

.village-card [data-farm-livestock] { display:block;width:100%;margin-top:8px;padding:9px;border:1px solid #769a55;border-radius:5px;background:#315b32;color:#eff8df;font:12px var(--mono);cursor:pointer; }
.village-card [data-farm-livestock]:hover { background:#47773d; }
/* SPROUTY theme: the look of sapling.cash. Deep navy surfaces, a gold primary, verdigris for growth, Schibsted Grotesk for the
   UI, Spline Sans Mono for numbers and an italic IM Fell English for display lines. Loaded after app.css and overrides it. */

:root {
  --bg: #11153f;
  --surface: #161b52;
  --surface-2: #1c2260;
  --surface-3: #1f2766;
  --surface-4: #273077;
  --line: rgba(217, 223, 238, .08);
  --line-2: rgba(217, 223, 238, .16);
  --text: #d9dfee;
  --muted: #9aa3cf;
  --muted-2: rgba(154, 163, 207, .68);
  --accent: #e9b84a;
  --accent-2: #f0c665;
  --accent-ink: #11153f;
  --gold: #e9b84a;
  --ok: #52d3a6;
  --err: #ff7466;
  --warn: #e9b84a;
  --seed: #d6d6a0;
  --sapling: #52d3a6;
  --orchard: #d9dfee;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-float: 0 16px 40px rgba(4, 6, 24, .45);
  --mono: "Spline Sans Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
}

html { background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizelegibility; }
body { font: 15px/1.6 var(--sans); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid rgba(217, 223, 238, .7); outline-offset: 2px; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { letter-spacing: -0.01em; font-weight: 600; }
h1 { font-size: clamp(26px, 3.6vw, 34px); line-height: 1.15; }
h2 { font-size: 24px; line-height: 1.25; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
code, pre, .mono { font-family: var(--mono); font-size: 0.93em; }
.eyebrow { color: var(--muted); letter-spacing: .08em; font-weight: 600; }
.k, .stat-k, .tcard-stats .k { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.hint { color: var(--muted); }
.lede { font-size: 17px; line-height: 1.55; color: var(--muted); }

/* ---------- display lines: the brand and the hero, in the italic serif ---------- */
.display, .hero h1, .page-head h1 { font-family: var(--display); font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--text); }
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08; margin-bottom: 16px; }
.hero h1 .accent, .hero h1 span { color: var(--accent); font-style: italic; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.hero-start { font-size: 14px; color: var(--muted); margin-top: 14px; }
.hero-start a { color: var(--text); border-bottom: 1px solid var(--line-2); }
.hero-start a:hover { color: var(--accent-2); border-color: var(--accent-2); }
.hero { padding: 36px 0 20px; gap: 28px; }

/* ---------- nav ---------- */
.nav { background: rgba(17, 21, 63, .92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { padding: 10px 20px; gap: 18px; }
.brand { gap: 8px; }
.brand:hover { color: var(--text); }
.brand-mark { width: 22px; height: 22px; border-radius: 0; background: none; }
.brand-mark::after { content: ""; position: absolute; inset: 1px 3px 1px 3px; background: var(--accent); clip-path: polygon(50% 0, 72% 12%, 88% 34%, 86% 62%, 66% 88%, 50% 100%, 34% 88%, 14% 62%, 12% 34%, 28% 12%); }
.brand-mark::before { content: ""; position: absolute; left: 50%; top: 20%; bottom: 0; width: 1.5px; margin-left: -0.75px; background: var(--accent-ink); z-index: 1; }
.brand-name { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 22px; letter-spacing: 0; }
.brand-name b { font-family: var(--display); font-weight: 400; color: var(--text); font-style: italic; }
.nav-links a { padding: 6px 12px; border-radius: 10px; font-weight: 500; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.on { color: var(--text); background: var(--surface-3); }
.nav-right { gap: 8px; }
.nav-plant { display: inline-flex; }
.ca { border: 0; background: var(--surface-2); padding: 6px 12px; font-size: 12px; color: var(--muted); }
.ca b { color: var(--accent); }
.ca-v.mono { color: var(--text); }
.banner { background: rgba(233, 184, 74, .1); color: var(--accent); border-bottom: 1px solid rgba(233, 184, 74, .25); }

/* ---------- buttons, inputs, chips ---------- */
.btn { padding: 0 16px; height: 40px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--text); font: 500 14px/1 var(--sans); transition: background .12s, color .12s; }
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn:disabled { opacity: .45; }
input[type=text], input[type=search], input[type=number], input[type=password], select, textarea { background: var(--surface-2); border: 1px solid transparent; border-radius: 10px; color: var(--text); }
input[type=text]:focus, input[type=search]:focus, input[type=number]:focus, input[type=password]:focus, select:focus, textarea:focus { border-color: var(--line-2); box-shadow: none; outline: none; }
.amount-row { background: var(--surface-2); border-color: transparent; }
.amount-row:focus-within { border-color: var(--line-2); box-shadow: none; }
.chip { background: var(--surface-2); border: 0; color: var(--muted); font-weight: 500; }
.chip:hover { color: var(--text); background: var(--surface-3); }
.tabs { gap: 2px; }
.tab { border: 0; padding: 6px 12px; border-radius: 8px; font-weight: 500; color: var(--muted); }
.tab.on, .tab:hover { background: var(--surface-3); color: var(--text); }
.pill { background: var(--surface-2); border: 0; font-weight: 500; color: var(--muted); padding: 3px 9px; }
.pill-ok { color: var(--ok); background: rgba(82, 211, 166, .14); }
.pill-warn { color: var(--accent); background: rgba(233, 184, 74, .14); }
.pill-err { color: var(--err); background: rgba(255, 116, 102, .14); }
.pill-founder { color: var(--accent); background: rgba(233, 184, 74, .14); }
.stock-badge { background: var(--surface-3); border: 0; font-weight: 500; }
.pager a { border: 0; background: var(--surface-2); color: var(--muted); }
.pager a.on { background: var(--accent); color: var(--accent-ink); }
.seg { background: var(--surface-2); border: 0; }
.seg button[aria-selected=true] { background: var(--surface-4); }
.seg [data-side=buy][aria-selected=true] { background: rgba(82, 211, 166, .18); color: var(--ok); }
.seg [data-side=sell][aria-selected=true] { background: rgba(255, 116, 102, .18); color: var(--err); }
.estimate { background: rgba(233, 184, 74, .08); border-color: rgba(233, 184, 74, .25); }
.note { border: 0; background: var(--surface-2); }
.note-err { background: rgba(255, 116, 102, .12); color: #ffb4aa; }
.note-warn { background: rgba(233, 184, 74, .12); color: #f3d388; }
.note-ok { background: rgba(82, 211, 166, .12); color: #a7ecd3; }
.logbox { background: var(--bg); border-color: var(--line); color: var(--muted); }

/* ---------- surfaces ---------- */
.panel, .stat, .tcard, .wp-box, .wallet-menu, .isle-card, .mine { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.wallet-menu { box-shadow: var(--shadow-float); }
.panel-title { font: 600 15px/1.3 var(--sans); text-transform: none; letter-spacing: 0; color: var(--text); }
.panel-title .opt { font-size: 12px; font-weight: 400; color: var(--muted); }
.panel-no { background: var(--accent); color: var(--accent-ink); }
.stat-v { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: 0; }
.stat-sub { color: var(--muted-2); }
.tcard:hover { border-color: var(--line-2); transform: none; }
.tcard-logo { border-radius: 10px; background: var(--surface-3); }
.tcard-logo-blank { color: var(--accent); }
.tcard-stats .v, .tcard-name { font-weight: 600; }
.tcard-stats .v { font-family: var(--mono); font-weight: 500; }
.tcard-bar, .progress { background: var(--surface-3); }
.tcard-bar span, .progress span { background: var(--ok); }
.tcard-bar.done span, .progress.done span { background: var(--orchard); }
.tcard-foot { color: var(--muted-2); }
.tcard-next b { color: var(--accent); }
.table th { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); border-bottom-color: var(--line); }
.table td { border-bottom-color: var(--line); }
.table .mono { font-size: 13px; }
.facts dt { color: var(--muted); }
.empty { border: 1px dashed var(--line-2); }
.foot { background: var(--surface); border-top-color: var(--line); }
.foot-note { color: var(--muted-2); }
.foot .brand-name { font-size: 20px; }

/* ---------- growth stages, as on the coin cards: seed, sapling, orchard ---------- */
.stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.stage::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stage-seed { color: var(--seed); }
.stage-sapling { color: var(--sapling); }
.stage-orchard { color: var(--orchard); }

/* ---------- the fee split bar ---------- */
.splitbar-track span { color: var(--text); }
.sb-protocol { background: var(--surface-4); }
.sb-creator { background: var(--accent); color: var(--accent-ink) !important; }
.sb-treasury { background: var(--ok); color: var(--accent-ink) !important; }

/* ---------- the village ---------- */
.vchip { background: rgba(17, 21, 63, .8); border-color: rgba(217, 223, 238, .14); color: var(--text); }
.vchip b { color: var(--text); }
.vchip-next b, .v-next { color: var(--accent); }
.village-camera-controls button, .village-district-controls button { background: rgba(17, 21, 63, .8); color: var(--text); border-color: rgba(217, 223, 238, .14); }

/* ---------- holder farming ---------- */
.countdown { background: var(--surface-2); border: 1px solid var(--line-2); }
.countdown-k { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; }
.countdown-v { color: var(--accent); font-family: var(--mono); font-weight: 600; }
.countdown-v.soon { color: var(--ok); }
.farming-stats > div { background: var(--surface-2); border-color: transparent; }
.farming-stats b { font-family: var(--mono); font-weight: 500; }
.clock { color: var(--text); font-variant-numeric: tabular-nums; }
.clock.soon { color: var(--ok); }
.my-clock { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 12px; }
.my-clock .k { font-size: 12px; }
.my-clock b { font-family: var(--mono); font-size: 24px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.my-clock b.soon { color: var(--ok); }
.my-clock .muted { font-size: 12px; }
.reward-mine .big { font-family: var(--mono); font-weight: 600; }

/* ---------- the launch page ---------- */
.stock-opt { background: var(--surface-2); border: 1px solid transparent; }
.stock-opt:hover { border-color: var(--line-2); }
.stock-opt.on { border-color: var(--accent); background: rgba(233, 184, 74, .08); box-shadow: none; }
.stock-opt-p { color: var(--muted); }
.stock-opt-note { color: var(--muted-2); }
.stock-opt-off { color: var(--accent); }
.drop { background: var(--surface-2); border-color: var(--line-2); }

/* ---------- the chart ---------- */
.kc-btn.on { color: var(--accent); background: rgba(233, 184, 74, .12); border-color: rgba(233, 184, 74, .3); }
.kc-menu { background: var(--surface-2); border-color: var(--line-2); box-shadow: var(--shadow-float); }
.kc-item:hover { background: var(--surface-3); }
.kc-item.on { color: var(--accent); }
.kc-canvas { border-color: var(--line); }

/* ---------- feed dots ---------- */
.feed-launched { background: var(--seed); }
.feed-migrated { background: var(--orchard); }
.feed-migrationfeecollected { background: var(--accent-2); }
.feed-feescollected { background: var(--surface-4); }
.feed-treasuryfunded, .feed-treasuryconverted { background: var(--ok); }
.feed-harvestshared, .feed-harvestpaid, .feed-harvest-crop { background: var(--accent); }

@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  .brand-name { font-size: 20px; }
  .nav-plant { display: none; }
}

/* small screens: the nav keeps the planter button and the wallet, the address chip waits in the footer */
@media (max-width: 640px) {
  .nav-right { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
  .nav-right .ca { display: none; }
  .nav-plant { display: inline-flex; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .farming-head { flex-direction: column; }
}

/* ---------- the playground: no form, only buttons ---------- */
.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.pg-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: none; }
.pg-world-panel { margin-top: 14px; }
.pg-world-panel .island-head { margin-bottom: 10px; }
.pg-traits-line { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-trait-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.pg-trait-chip b { color: var(--text); font-weight: 600; }
.pg-trait-chip.rare b { color: var(--accent); }
.feed .up { color: var(--ok); }
.feed .down { color: var(--err); }
#pg-next { font-variant-numeric: tabular-nums; }
#pg-next.soon { color: var(--ok); }
/*
 * The only rules the SPA adds to the legacy stylesheets (app.css and theme.css are verbatim copies).
 */

/* The legacy <body> is a flex column whose direct children are <header>, <main> and <footer>
   (app.css:25-26). The mount point must not become a box between them. */
#app { display: contents; }

/* Stand-in for the browser's own loading indicator while a page loader runs: <html aria-busy="true">
   is set by the router's busy state and removed when the navigation settles. No visible UI is added. */
html[aria-busy='true'],
html[aria-busy='true'] * { cursor: progress !important; }
