:root {
  --bg: #07140f;
  --card: rgba(12, 28, 22, 0.82);
  --line: rgba(196, 164, 92, 0.28);
  --text: #f3efe4;
  --muted: #b7c7b4;
  --amber: #e2a23a;
  --moss: #8fbf6a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
}
button, a { font-family: inherit; }
.world { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sky {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 20, 15, 0.15) 0%, rgba(7, 20, 15, 0.2) 40%, #07140f 100%),
    url("/assets/dinos/hero-jungle.jpg") center 30% / cover no-repeat;
}
.mist {
  position: absolute; left: -20%; right: -20%; bottom: 18%; height: 180px;
  background: linear-gradient(90deg, transparent, rgba(210, 230, 200, 0.18), transparent);
  filter: blur(8px);
  animation: drift 18s linear infinite;
}
@keyframes drift { from { transform: translateX(-8%); } to { transform: translateX(8%); } }
.ridge, .dino, .ferns, .egg-glow { display: none; }
.brachio { left: 4%; width: min(420px, 46vw); height: auto; }
.rex { right: 6%; width: min(280px, 34vw); height: auto; bottom: 10vh; }
.ferns {
  position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background:
    radial-gradient(12px 40px at 8% 100%, #1d4a30 70%, transparent 72%),
    radial-gradient(16px 70px at 18% 100%, #163c28 70%, transparent 72%),
    radial-gradient(10px 48px at 30% 100%, #245536 70%, transparent 72%),
    radial-gradient(18px 80px at 72% 100%, #143626 70%, transparent 72%),
    radial-gradient(14px 56px at 88% 100%, #1c4630 70%, transparent 72%);
}
.egg-glow {
  position: absolute; left: 46%; bottom: 16vh; width: 90px; height: 110px; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 40% 35%, #fff4d2, #e2a23a 42%, #8a4e12 78%);
  box-shadow: 0 0 40px rgba(226, 162, 58, 0.55);
}
.top, main, .modal { position: relative; z-index: 1; }
.top {
  display: flex; gap: 12px; align-items: center; padding: 14px 20px;
  position: sticky; top: 0; z-index: 4;
  background: linear-gradient(180deg, rgba(7, 20, 15, 0.88), rgba(7, 20, 15, 0.55));
  backdrop-filter: blur(8px);
}
.brand {
  display: flex; gap: 10px; align-items: center; background: none; border: 0; color: inherit; cursor: pointer; text-align: left;
}
.brand strong { display: block; font-family: "Noto Serif SC", serif; font-size: 20px; letter-spacing: 0.08em; }
.brand small { color: var(--amber); letter-spacing: 0.18em; font-size: 11px; }
.mark {
  width: 28px; height: 34px; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 35% 30%, #fff1c9, var(--amber) 45%, #6a3a10);
  box-shadow: inset -6px -8px 0 rgba(80, 40, 8, 0.25);
}
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav button, .btn {
  background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
}
nav button:hover { border-color: var(--line); }
.top-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.wallet-chip-wrap { position: relative; }
.wallet-chip-wrap[hidden] { display: none; }
.wallet-chip {
  display: flex; align-items: center; min-width: 170px; height: 40px;
  border: 1px solid var(--line); border-radius: 8px; background: transparent;
  color: var(--text); cursor: pointer; padding: 0; font-size: 12px;
}
.wallet-addr { margin: 0; padding: 0 10px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-bal { display: flex; align-items: center; height: 30px; border: 1px solid var(--line); border-radius: 8px; }
.wallet-bal-ico { width: 30px; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--amber); color: #1b1408; }
.wallet-bal-ico svg { width: 18px; height: 18px; }
.wallet-bal-amt { min-width: 72px; padding: 0 8px; color: var(--amber); font-weight: 600; }
.chevron-sm { width: 18px; height: 18px; margin: 0 4px; }
.wallet-chip-wrap.open .chevron-sm { transform: rotate(180deg); }
.wallet-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; width: min(380px, 92vw);
  padding: 0; background: #10241b; border: 1px solid var(--line); border-radius: 10px; z-index: 20;
  box-shadow: 0 18px 50px rgba(0,0,0,.4); overflow: hidden; font-size: 14px; text-align: left;
}
.wallet-chip-wrap.open .wallet-menu { display: flex; flex-direction: column; }
.wm-stack { display: flex; flex-direction: column; width: 100%; }
.wm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.wm-head-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wm-head-addr { margin: 0; font-size: 14px; font-weight: 500; }
.wm-copy { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.wm-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 12px; }
.wm-sec { display: flex; flex-direction: column; gap: 8px; }
.wm-lab-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wm-lab, .wm-equity-lab { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.wm-fx-select {
  appearance: none; border: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 600;
  padding: 0 16px 0 0; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%23b7c7b4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; background-size: 12px;
}
.wm-bal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wm-amt { display: flex; align-items: baseline; gap: 2px; }
.wm-amt-sym { font-size: 22px; font-weight: 600; line-height: 1; }
.wm-amt-val { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.wm-equity-amt .wm-amt-val { font-size: 22px; }
.wm-equity-amt .wm-amt-sym { font-size: 18px; }
.wm-deposit { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--amber); color: #1b1408; font-weight: 700; cursor: pointer; }
.wm-table-wrap { max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.wm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wm-table th { padding: 8px 10px; text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; background: rgba(243, 230, 200, 0.06); border-bottom: 1px solid var(--line); }
.wm-table th:not(:first-child), .wm-table td:not(:first-child) { text-align: right; }
.wm-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.wm-table tr:last-child td { border-bottom: 0; }
.wm-asset { display: flex; align-items: center; gap: 8px; }
.wm-asset img { width: 22px; height: 22px; border-radius: 50%; }
.wm-asset-name, .wm-cell-main { margin: 0; font-weight: 600; }
.wm-cell-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.wm-cell-sub { margin: 0; font-size: 12px; color: var(--muted); }
.wm-foot { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.wm-foot-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
.wm-foot-btn p { margin: 0; }
.btn.solid { background: var(--amber); color: #1b1408; border-color: var(--amber); font-weight: 700; }
.btn.ghost { border-color: var(--line); background: rgba(8, 20, 14, 0.45); }
.btn.wide { width: 100%; }
.btn.text { border: 0; color: var(--muted); background: none; }
main { max-width: 1120px; margin: 0 auto; padding: 12px 20px 64px; }
.hero { padding: 7vh 0 4vh; max-width: 720px; }
.kicker { color: var(--amber); letter-spacing: 0.22em; font-size: 12px; margin: 0 0 10px; }
.hero h1 {
  font-family: "Noto Serif SC", serif; font-weight: 700; font-size: clamp(40px, 6vw, 68px);
  line-height: 1.08; margin: 0 0 16px;
}
.lede { font-size: 18px; line-height: 1.7; max-width: 40em; color: #efe7d4; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 16px;
  backdrop-filter: blur(6px);
}
.step b { display: block; font-family: "Noto Serif SC", serif; margin-bottom: 6px; }
.step span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card, .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  backdrop-filter: blur(8px);
}
.card h3, .panel h2, h2 { font-family: "Noto Serif SC", serif; }
.card h3 { margin: 0 0 6px; }
.shot { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 10px; }
.buybar { display: flex; gap: 8px; margin-top: 12px; }
.buybar select, .buybar input { width: 72px; flex: none; }
.buy-egg {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 11px 14px; cursor: pointer;
  background: linear-gradient(180deg, #f0c36a, #c9852a);
  color: #1b1408; font-weight: 700; letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(201, 133, 42, 0.28);
}
.card-actions { display: grid; gap: 8px; margin-top: 12px; }
.card-actions .row .btn, .card-actions > .btn { flex: 1; width: 100%; }
.pantry-grid { grid-template-columns: repeat(2, minmax(0, 280px)); margin-bottom: 8px; }
.stock { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 0; }
.stock strong { font-family: "Noto Serif SC", serif; font-size: 32px; font-weight: 600; }
.stock span { color: var(--muted); }
.buy-egg:hover { filter: brightness(1.06); }
.buy-egg:active { transform: translateY(1px); }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.meat { color: #e7b089; }
.grass { color: var(--moss); }
.mut { color: var(--amber); }
input, select {
  width: 100%; background: #0e1a14; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px;
}
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.page-head { margin: 12px 0 16px; }
.page-head h2 { font-size: 32px; margin: 0 0 8px; }
.page-head p { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; }
.wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel h3 { font-family: "Noto Serif SC", serif; margin: 0 0 8px; }
.asset-rows { display: grid; gap: 10px; margin: 8px 0 16px; }
.asset-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.asset-row span { color: var(--muted); letter-spacing: 0.04em; }
.asset-row strong { font-family: "Noto Serif SC", serif; font-size: 28px; font-weight: 600; }
.hero-actions { display: flex; gap: 12px; margin-top: 8px; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.bill-wrap { overflow-x: auto; }
.bills { width: 100%; border-collapse: collapse; font-size: 14px; }
.bills th, .bills td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bills th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; }
.bills td.num { white-space: nowrap; }
.bill-pager { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.bill-pager button {
  color: var(--amber); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.bill-pager button:disabled { opacity: 0.4; cursor: default; }
.pay-nos { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-no {
  font: 12px/1.4 ui-monospace, monospace; color: var(--amber);
  background: rgba(226, 162, 58, 0.08); border: 1px solid rgba(226, 162, 58, 0.28);
  border-radius: 999px; padding: 4px 10px; cursor: pointer;
}
.empty { color: var(--muted); text-align: center; padding: 40px; }
.modal {
  position: fixed; inset: 0; z-index: 5; display: grid; place-items: center;
  background: rgba(4, 10, 8, 0.62); padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(420px, 100%); background: #10241b; border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.modal-card h3 { font-family: "Noto Serif SC", serif; margin: 0 0 8px; }
.modal-card p { color: var(--muted); line-height: 1.6; }
.modal-card .btn { margin-top: 8px; }
#notice-modal { z-index: 8; }
#notice-text { color: var(--text); line-height: 1.5; }
@media (max-width: 800px) {
  .steps, .wallet-grid, .pantry-grid { grid-template-columns: 1fr; }
  .rex { opacity: 0.45; }
  .top { flex-wrap: wrap; }
  nav { order: 3; width: 100%; }
}
