/* AUREA Staking & Farm — dark theme matched to aureaswap.com (Orderly One).
   Palette taken from https://aureaswap.com/theme.css + runtime config
   (VITE_ORDERLY_THEME_CONFIG), fetched 2026-11-27:
     --oui-color-fill        10 15 30    #0a0f1e  (page background)
     --oui-color-base-1      20 24 40    #141828  (elevated surface)
     --oui-color-base-2      18 22 38    #121626  (card surface)
     --oui-color-base-4      14 18 34    #0e1222  (input surface)
     --oui-color-fill-active 15 20 35    #0f1423  (panel surface)
     --oui-color-line        40 45 60    #282d3c  (borders)
     --oui-color-primary     255 215 0   #ffd700  (gold)
     --oui-color-primary-light   255 235 80  #ffeb50
     --oui-color-primary-darken  200 170 0   #c8aa00
     --oui-color-primary-contrast 20 24 40   #141828
     --oui-color-link        138 43 226  #8a2be2  (violet)
     --oui-color-tertiary    132 131 136 #A7ACC2  (muted text)
     --oui-color-quaternary  98 96 102   #8B90A5
     --oui-color-success     2 181 137   #02b589
     --oui-color-danger      233 77 122  #e94d7a
     --oui-color-warning     217 171 82  #d9ab52
     brand gradient: linear-gradient(45deg, #ffd700 6.62%, #8a2be2 86.5%)
     font: 'Manrope', sans-serif                                        */
:root {
  --bg: #0a0f1e;
  --bg-deep: #020616;
  --card: #121626;
  --card-2: #141828;
  --panel: #0f1423;
  --border: #39415f;
  --text: #ffffff;
  --muted: #A7ACC2;
  --muted-2: #8B90A5;
  --gold: #ffd700;
  --gold-light: #ffeb50;
  --gold-dark: #c8aa00;
  --gold-soft: rgba(255, 215, 0, 0.1);
  --violet: #8a2be2;
  --violet-soft: rgba(138, 43, 226, 0.16);
  --violet-text: #c9a7f5;
  --green: #02b589;
  --red: #e94d7a;
  --warning: #d9ab52;
  --input-bg: #0e1222;
  --gradient-brand: linear-gradient(45deg, #ffd700 6.62%, #8a2be2 86.5%);
  --on-primary: #141828;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-weight: 500;
  padding-bottom: 150px; /* room for the floating bottom nav + hosting badge zone */
}

a { color: var(--gold); }

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
.body-text { line-height: 1.65; font-size: 15px; }

/* --- header ------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 0 auto; }
.page-title { font-size: 19px; font-weight: 800; color: var(--text); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.price-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px 3px 4px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-muted { background: var(--input-bg); color: var(--muted); }
.badge-ok { background: rgba(2, 181, 137, 0.15); color: #2fd3a7; }
.badge-warn { background: rgba(217, 171, 82, 0.15); color: var(--warning); }
.network-badge { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }

/* --- alerts / status ---------------------------------------------------- */
.alert {
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.alert-success { background: rgba(2, 181, 137, 0.12); border: 1px solid rgba(2, 181, 137, 0.45); color: #4be3bb; }
.alert-error { background: rgba(233, 77, 122, 0.12); border: 1px solid rgba(233, 77, 122, 0.45); color: #ff8fab; }
.alert-warn { background: rgba(217, 171, 82, 0.12); border: 1px solid rgba(217, 171, 82, 0.45); color: #e8c87e; }
.alert-info { background: var(--violet-soft); border: 1px solid rgba(138, 43, 226, 0.5); color: var(--violet-text); }
#statusBar { white-space: pre-wrap; }

/* --- layout ------------------------------------------------------------- */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.section-label {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.page-heading {
  margin: 2px 0 0;
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
}
.footer {
  max-width: 880px;
  margin: 10px auto 0;
  padding: 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* --- cards & stats ------------------------------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.card h2 {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}
.card h3 { color: var(--text); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 6px 0 14px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.stat-label { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 16.5px; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.tvl-strip .stat { background: var(--gold-soft); border-color: rgba(255, 215, 0, 0.35); }
.stat-hero .stat-value { font-size: 27px; color: var(--gold); }

/* --- buttons ------------------------------------------------------------ */
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
}
.btn:hover:not(:disabled) { border-color: var(--gold); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { background: var(--input-bg); border-color: var(--border); color: var(--muted-2); cursor: not-allowed; }
.btn-primary {
  background: var(--gold);
  border-color: transparent;
  color: var(--on-primary);
  font-weight: 800;
}
.btn-primary:hover:not(:disabled) { border-color: transparent; filter: brightness(1.07); }
.btn-primary:disabled { background: var(--input-bg); border-color: var(--border); color: var(--muted-2); }
.btn-small { padding: 6px 12px; font-size: 13.5px; border-radius: 8px; }
.btn-wide { width: 100%; padding: 13px 18px; font-size: 16px; }
.btn-connect { white-space: nowrap; }
.btn-anchor { display: block; text-align: center; text-decoration: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn-row .btn { flex: 1 1 120px; }
.link-btn {
  display: inline-block;
  margin: 4px 0 14px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  background: var(--card-2);
}
.link-btn:hover { border-color: var(--gold); }

/* --- forms -------------------------------------------------------------- */
.form-row { margin: 14px 0; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }
input[type="number"], input[type="text"] {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 14px;
  outline: none;
  width: 100%;
}
input[type="number"]:focus, input[type="text"]:focus {
  border-color: var(--gold);
  background: var(--panel);
}
input::placeholder { color: var(--muted-2); }
.estimate {
  background: var(--violet-soft);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--violet-text);
  font-size: 13.5px;
  line-height: 1.55;
}
.estimate:empty { display: none; }
.fee-note {
  background: var(--gold-soft);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--gold-light);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 12px 0;
}
.helper-result { font-weight: 700; color: var(--text); font-size: 14.5px; }
.field-select {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 700;
}
.field-select-text { flex: 1; }
.field-select-chevron { color: var(--muted); }

/* --- segmented control & pair picker (liquidity wizard) ----------------- */
.seg-control {
  display: flex;
  gap: 4px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 10px;
  overflow-x: auto;
}
.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.seg-btn.active { background: var(--gold); color: var(--on-primary); }
.seg-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.seg-btn.active:disabled { opacity: 1; cursor: default; }

.step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--on-primary);
  font-size: 15px;
  font-weight: 800;
  flex: 0 0 auto;
}

.pair-options { display: flex; flex-direction: column; gap: 10px; }
.pair-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  cursor: pointer;
  color: var(--text);
}
.pair-option.selected { border-color: var(--gold); background: rgba(255, 215, 0, 0.05); }
.pair-option-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pair-option-name { font-weight: 800; font-size: 16px; }
.pair-option-sub { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pair-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex: 0 0 auto;
  position: relative;
}
.pair-option.selected .pair-check { background: var(--gold); border-color: var(--gold); }
.pair-option.selected .pair-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2.5px;
  width: 5px;
  height: 10px;
  border: solid var(--on-primary);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(42deg);
}
.liq-next-btn { margin-top: 16px; }
.liq-step3-head { display: flex; align-items: center; gap: 12px; }
.liq-step3-head .step-title { margin: 0; }
.wizard-heading { color: var(--gold); font-size: 24px; font-weight: 800; margin: 8px 0 0; }

/* --- coin badges --------------------------------------------------------- */
.coin-img { border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--panel); }
.coin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  flex: 0 0 auto;
  color: #ffffff;
}
.coin-badge-sm { width: 20px; height: 20px; font-size: 11px; }
.coin-badge-md { width: 34px; height: 34px; font-size: 16px; }
.coin-badge-lg { width: 38px; height: 38px; font-size: 19px; }
.coin-badge-usdt { background: #26a17b; }
.coin-badge-mk { background: #5b3bb8; }
.coin-stack { position: relative; display: inline-flex; }
.pair-badges { position: relative; display: inline-flex; flex: 0 0 auto; padding-right: 14px; }
.pair-badges .coin-badge:last-child, .pair-badges .coin-img:last-child {
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 20px;
  height: 20px;
  font-size: 11px;
  border: 2px solid var(--card);
}

/* --- Syrup-Pools-style list rows (Pool plans & Farms) -------------------- */
.pool-list { display: flex; flex-direction: column; gap: 12px; }
.pool-row, .farm-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.pool-row-head, .farm-row-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: none;
  border: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  flex-wrap: wrap;
}
.pr-main { display: flex; align-items: center; gap: 12px; flex: 1.5 1 170px; min-width: 0; }
.pr-names { display: flex; flex-direction: column; min-width: 0; }
.pr-earn { font-size: 16.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.pr-sub { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pr-col { display: flex; flex-direction: column; gap: 2px; flex: 1 1 90px; min-width: 0; }
.pr-col-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.pr-col-value { font-size: 15px; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.apr-value { color: var(--gold); font-size: 18px; }
.pr-details {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--gold);
  font-weight: 800;
  font-size: 15px;
  flex: 0 0 auto;
  margin-left: auto;
}
.chev { display: inline-block; transition: transform 0.15s ease; font-size: 12px; }
.pool-row.open .chev, .farm-row.open .chev { transform: rotate(180deg); }
.pool-panel, .farm-panel { border-top: 1px solid var(--border); padding: 6px 18px 18px; }
.farm-panel { margin: 0; }
.farm-list-card { padding: 8px 20px 14px; }
.farm-table-head {
  display: flex;
  gap: 14px;
  padding: 12px 0 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.farm-table-head .ft-name { flex: 1.5 1 170px; }
.farm-table-head .ft-earned, .farm-table-head .ft-locked, .farm-table-head .ft-apr { flex: 1 1 90px; }
.farm-table-head .ft-chev { flex: 0 0 74px; }
.farm-list-card .farm-row { border: none; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.farm-list-card .farm-row-head { padding-left: 0; padding-right: 0; }
.farm-list-card .farm-panel { padding-left: 0; padding-right: 0; border-top: none; }
.ft-usd { color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.apr-note { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 2px 0 10px; }
.apr-note:empty { display: none; }

/* Pool page hero + per-plan stake list */
.pool-hero { display: flex; align-items: center; gap: 16px; }
.pool-hero-logo { width: 68px; height: 68px; border-radius: 50%; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); }

/* --- pool page: AUR Pool / MK Pool switcher tabs (seg-control based) ---- */
.pool-tabs { margin: 18px 0 14px; }
.pool-tabs .seg-btn { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.plan-note2 { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.plan-stakes-title { font-size: 15px; font-weight: 800; margin: 18px 0 8px; color: var(--text); }
.plan-stake-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}
.plan-stake-row .psr-main { font-weight: 800; }
.plan-load-error { text-align: center; padding: 26px 10px; }
.plan-load-title { font-weight: 800; font-size: 16px; margin: 0 0 6px; }
.status-matured { color: #2fd3a7; font-weight: 800; }
.status-locked { color: var(--warning); font-weight: 800; }
.status-done { color: var(--muted); font-weight: 700; }

/* Legacy plan cards (unused by the Pool list; kept for safety) */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  width: 100%;
}
.plan.selected { border-color: var(--gold); background: rgba(255, 215, 0, 0.05); }
.plan-top { display: flex; flex-direction: column; gap: 2px; }

/* --- farm detail heads (liquidity detail cards reuse) ------------------- */
.farm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.farm-name { font-size: 17px; font-weight: 800; }
.farm-name-wrap { display: flex; flex-direction: column; min-width: 0; }
.farm-sub { color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* --- liquidity: positions + pool table ----------------------------------- */
.position-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.position-row:first-of-type { border-top: none; }
.position-name { font-weight: 800; font-size: 15.5px; }
.position-value { margin-left: auto; font-weight: 800; font-size: 15px; text-align: right; }
.pool-table-head {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr auto;
  gap: 12px;
  padding: 4px 6px 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pool-table-row {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 6px;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.pool-table-row:hover { background: rgba(255, 255, 255, 0.03); }
.pt-pool { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.pt-name { font-weight: 800; font-size: 15.5px; }
.chain-tag {
  background: var(--violet-soft);
  color: var(--violet-text);
  border-radius: 999px;
  padding: 2.5px 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.pt-tvl, .pt-price { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }

/* --- docs & pool info ------------------------------------------------------ */
.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.toc-list a { font-weight: 700; text-decoration: none; }
.toc-list a:hover { text-decoration: underline; }
.doc-list { line-height: 1.7; padding-left: 20px; }
.doc-list li { margin-bottom: 7px; }
.table-wrap { overflow-x: auto; margin: 10px 0 16px; }
.doc-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc-table th, .doc-table td {
  border: 1px solid var(--border);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.doc-table th { background: var(--panel); font-weight: 800; }
.contract-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contract-list li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.soon-pill {
  display: inline-block;
  background: var(--input-bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 800;
  margin-left: 8px;
  vertical-align: middle;
}

/* --- wallet picker modal --------------------------------------------------- */
.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 22, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.wallet-modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  width: 100%;
  max-width: 420px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.wallet-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wallet-modal-title { margin: 0; font-size: 20px; font-weight: 800; color: var(--text); }
.wallet-modal-close {
  appearance: none;
  border: none;
  background: var(--input-bg);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
}
.wallet-modal-close:hover { color: var(--text); }
#walletModalOptions, #walletModalConnected { display: flex; flex-direction: column; gap: 12px; }
.wallet-options-mock { display: flex; flex-direction: column; gap: 12px; }
.wallet-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: #101424;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.wallet-option:hover:not(:disabled) { border-color: var(--gold); background: var(--card-2); }
.wallet-option:disabled { background: var(--input-bg); border-color: var(--border); color: var(--muted-2); cursor: not-allowed; }
.wallet-option-name { font-size: 16.5px; font-weight: 800; }
.wallet-option-sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.wallet-option:disabled .wallet-option-sub { color: var(--muted-2); }
.wallet-connected-line { font-size: 15.5px; margin: 0; overflow-wrap: anywhere; }

/* --- bottom nav ------------------------------------------------------------ */
.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 56px; /* floats above the hosting provider badge zone so no nav item is covered */
  z-index: 30;
  display: flex;
  background: rgba(10, 15, 30, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  padding: 6px 4px;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 8px;
}
.nav-item svg { width: 23px; height: 23px; }
.nav-item.active { color: var(--gold); }
/* the fifth bottom-bar slot is a <button> (opens the drawer) */
.bottom-nav button.nav-item {
  background: none; border: 0; font-family: inherit; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}

/* docked variant (section-specific menus): bar sits flush with the bottom
   edge — no floating gap, no side/bottom borders or card radius; the iPhone
   home-indicator area is kept as padding inside the bar. */
.bottom-nav-dock {
  left: 0;
  right: 0;
  bottom: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

/* --- guide page ------------------------------------------------------------ */
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-toc a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px 6px 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.guide-toc a:hover { border-color: var(--gold); }
.guide-toc .toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 800;
}
.guide-step { scroll-margin-top: 84px; }
.guide-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.guide-step-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--text); }
.guide-step .step-num { width: 32px; height: 32px; font-size: 16px; }
.guide-step p { line-height: 1.65; font-size: 14.5px; }
.guide-step ul { line-height: 1.65; font-size: 14.5px; padding-left: 20px; }
.guide-step li { margin-bottom: 6px; }
.guide-note {
  background: rgba(217, 171, 82, 0.1);
  border: 1px solid rgba(217, 171, 82, 0.4);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #e8c87e;
  margin-top: 12px;
}
.guide-note strong { color: var(--warning); }

/* UI mock frames: static recreations of the app's real screens. */
.mock {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-deep);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); flex: 0 0 auto; }
.mock-url {
  flex: 1;
  background: var(--input-bg);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mock-caption {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.mock .topbar { position: static; border: 1px solid var(--border); border-radius: 10px; }
.mock .wallet-modal { position: static; background: rgba(2, 6, 22, 0.55); border-radius: 10px; }
.mock .wallet-modal-card { max-height: none; }
.mock .pool-row, .mock .farm-row { box-shadow: none; }
.mock-field {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}
.mock-field .mf-label { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.mock-field .mf-value { margin-left: auto; font-weight: 800; }
.mock-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 3px 0; }
.mock-kv .k { color: var(--muted); font-weight: 600; }
.mock-kv .v { font-weight: 800; text-align: right; }
.mock-arrow { text-align: center; color: var(--gold); font-size: 17px; line-height: 1; }
.mock-wallet-row { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; }
.mock-check { color: #2fd3a7; font-weight: 800; }

/* --- responsive -------------------------------------------------------------- */
@media (max-width: 720px) {
  .farm-table-head, .pool-table-head { display: none; }
  .pool-table-row { grid-template-columns: 1.4fr 1fr auto; }
  .pt-price { display: none; }
}
@media (max-width: 560px) {
  .page-heading { font-size: 28px; }
  .pool-hero-logo { width: 54px; height: 54px; }
  .card { padding: 18px 16px; }
  .pool-row-head, .farm-row-head { padding: 14px; gap: 10px; }
  .pool-panel, .farm-panel { padding: 6px 14px 16px; }
  .farm-list-card .farm-row-head, .farm-list-card .farm-panel { padding-left: 0; padding-right: 0; }
  .network-badge { display: none; }
  .btn-connect { padding: 9px 12px; font-size: 14px; }
}

/* Token logos inside card headings and contract rows (Pool Info page). */
.card h2 img.coin-img { width: 26px; height: 26px; border-radius: 50%; vertical-align: -5px; margin-right: 8px; }
.contract-list .row-logo { width: 20px; height: 20px; border-radius: 50%; vertical-align: -4px; margin-right: 8px; }

/* --- portfolio page -------------------------------------------------------- */
.pf-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; }
.pf-addr { font-size: 15px; overflow-wrap: anywhere; }
.pf-chain-breakdown { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.pf-chain-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 13px; font-size: 13px; font-weight: 700; color: var(--muted);
}
.pf-chain-chip strong { color: var(--text); }
.pf-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.pf-toggle input { accent-color: var(--gold); width: 17px; height: 17px; }
.pf-section-title { display: flex; align-items: center; gap: 9px; font-size: 21px; margin: 26px 0 12px; }
.pf-source { margin-top: -6px; }
.pf-chain-total { float: right; color: var(--gold); font-size: 17px; }
.pf-token-head, .pf-token-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.6fr) minmax(80px, 1fr) minmax(70px, 0.8fr) minmax(70px, 0.8fr) minmax(90px, auto);
  gap: 8px; align-items: center;
  padding: 9px 2px;
}
.pf-token-head { color: var(--muted-2); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.pf-token-row { border-bottom: 1px solid var(--border); font-size: 14.5px; }
.pf-token-row:last-child { border-bottom: none; }
.pf-token-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pf-token-icon { width: 30px; height: 30px; border-radius: 50%; flex: none; background: var(--card-2); }
.pf-token-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--gold); border: 1px solid var(--border); font-size: 14px;
}
.pf-token-names { display: flex; flex-direction: column; min-width: 0; }
.pf-token-sym { font-weight: 800; }
.pf-token-name { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-token-amt, .pf-token-price, .pf-token-value { font-weight: 700; overflow-wrap: anywhere; }
.pf-token-value { color: var(--gold); }
.pf-token-links { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.pf-token-links a { color: var(--violet-text); text-decoration: none; font-weight: 700; }
.pf-token-links a:hover { text-decoration: underline; }
.pf-pos-row {
  display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline;
  padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: 14.5px;
}
.pf-pos-row:last-of-type { border-bottom: none; }
.pf-pos-main { font-weight: 800; }
.pf-pos-total { margin: 10px 0 0; font-size: 14.5px; }
@media (max-width: 560px) {
  .pf-token-head { display: none; }
  .pf-token-row { grid-template-columns: minmax(110px, 1.4fr) minmax(70px, 1fr) minmax(64px, 0.8fr); }
  .pf-token-price { display: none; }
  .pf-token-links { flex-direction: row; gap: 10px; grid-column: 1 / -1; }
  .nav-item { font-size: 10.5px; }
  .nav-item svg { width: 20px; height: 20px; }
}

/* --- liquidity: any-pair section ------------------------------------------- */
.gen-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 14px;
  outline: none;
  margin-bottom: 8px;
}
.gen-select:focus { border-color: var(--gold); background: var(--panel); }

/* --- news page -------------------------------------------------------------- */
.ticker-lane {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px;
  scrollbar-width: thin;
}
.ticker-item {
  flex: none; min-width: 148px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 13px;
}
.ticker-sym { font-weight: 800; font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.ticker-price { font-weight: 800; font-size: 18px; margin: 2px 0; }
.ticker-chgs { font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; gap: 9px; }
.chg-pos { color: var(--green); }
.chg-neg { color: var(--red); }
.breaking-card {
  border: 1px solid var(--red);
  background: rgba(233, 77, 122, 0.08);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 12px;
}
.breaking-tag {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em;
  color: #fff; background: var(--red); border-radius: 6px; padding: 2.5px 8px; margin-bottom: 7px;
}
.breaking-card p { margin: 0; font-size: 15.5px; font-weight: 700; }
/* Breaking-mover cards are swap links (the whole card is the link). */
a.breaking-card { display: block; text-decoration: none; color: inherit; cursor: pointer; }
a.breaking-card:hover { background: rgba(233, 77, 122, 0.14); }
.news-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .news-grid { grid-template-columns: 1fr 1fr; } }
.news-card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px;
}
.news-card:hover { border-color: var(--gold); }
.news-cat {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em;
  color: var(--on-primary); background: var(--gradient-brand); border-radius: 6px; padding: 2.5px 8px;
}
/* Sponsored (paid) articles: gold-outline badge + highlighted card so the
   PR nature is unmissable in every list surface. */
.sponsored-badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--gold); background: rgba(255, 215, 0, 0.08);
  border: 1.5px solid var(--gold); border-radius: 6px; padding: 2px 7px; margin-left: 6px;
  vertical-align: 1px; white-space: nowrap;
}
.news-card.is-sponsored { border-color: rgba(255, 215, 0, 0.55); }
.news-card.is-sponsored:hover { border-color: var(--gold); }
.side-item .sponsored-badge { margin-left: 4px; padding: 1px 5px; font-size: 9.5px; }
/* Coin tags, article market boxes and coin pages. Prices inside are
   filled in by coin.js from OKX and stay hidden until real data lands. */
.coin-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 16px; }
.coin-tags-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); margin-right: 2px;
}
.coin-chip {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.03em;
  color: var(--text); background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 11px; text-decoration: none;
}
.coin-chip:hover { border-color: var(--gold); color: var(--gold); }
/* Article hashtags + share row (build_shared.article_share_html). */
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 22px 0 10px; }
.tag-chip {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em;
  color: #B18CFF; background: rgba(138, 43, 226, 0.10); border: 1px solid rgba(177, 140, 255, 0.45);
  border-radius: 999px; padding: 3px 11px; text-decoration: none;
}
.tag-chip:hover { border-color: var(--gold); color: var(--gold); }
.article-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
.article-share-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); margin-right: 2px;
}
.share-btn {
  display: inline-block; font-size: 12.5px; font-weight: 800;
  color: var(--text); background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 14px; text-decoration: none;
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); }
.coin-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 4px; }
.market-box {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px 10px; margin: 18px 0;
}
.market-box-title {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 4px;
}
.market-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 9px 0; border-top: 1px solid var(--border);
}
.market-box .market-row:first-of-type { border-top: none; }
.market-coin { font-size: 15.5px; font-weight: 800; }
.market-sym { color: var(--muted); font-weight: 700; font-size: 0.85em; }
.coin-live { font-size: 14px; font-weight: 700; color: var(--muted); }
.coin-live .lp { color: var(--text); font-size: 15.5px; font-weight: 800; }
.coin-live-hero .lp { font-size: 24px; }
.coin-live-hero { font-size: 15px; }
.market-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.market-newslink { font-size: 13.5px; font-weight: 700; }
.market-trade {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
  color: var(--on-primary); background: var(--gradient-brand); border-radius: 8px;
  padding: 7px 13px; text-decoration: none; white-space: nowrap;
}
.coin-source { margin: 2px 0 6px; }

.news-card h2 { font-size: 19px; line-height: 1.35; margin: 10px 0 8px; }
.news-card p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 10px; }
.news-card time { color: var(--muted-2); font-size: 13px; font-weight: 700; }
.news-updated { color: var(--muted-2); font-size: 13px; font-weight: 700; }

/* --- article pages ------------------------------------------------------------ */
.article-body { font-size: 16.5px; line-height: 1.75; }
.article-body h2 { font-size: 21px; margin: 26px 0 8px; }
.article-body p { margin: 0 0 14px; }
.article-body ul { margin: 0 0 14px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.article-meta { color: var(--muted); font-size: 14px; font-weight: 700; margin: 6px 0 18px; }
.article-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; }
.article-table th, .article-table td { border: 1px solid var(--border); padding: 8px 11px; text-align: left; }
.article-table th { background: var(--card-2); font-weight: 800; }
.sources { font-size: 14px; color: var(--muted); }
.sources a { color: var(--violet-text); }
.related-list { display: grid; gap: 10px; }

/* --- dashboard (Pool page) + treasury -------------------------------------- */
.dash { margin-bottom: 8px; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 18px 0 14px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.kpi-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  overflow-wrap: anywhere;
}
.kpi-value-sm { font-size: 19px; }
.kpi-hero { font-size: 40px; color: var(--gold); }
.kpi-sub { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.kpi-wide { grid-column: span 2; }
@media (max-width: 560px) { .kpi-wide { grid-column: span 1; } .kpi-hero { font-size: 32px; } }

.dash-card { margin: 14px 0; }
.dash-title { margin: 0 0 10px; font-size: 20px; }
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.dash-chart-price { font-size: 26px; font-weight: 800; }
.dash-chart-change { color: var(--muted); font-size: 13.5px; font-weight: 700; margin-left: 8px; }
.dash-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-sm .seg-btn { padding: 6px 12px; font-size: 13px; }
.dash-note { margin: 10px 0 0; }

.chart-wrap { position: relative; }
.area-chart-svg { width: 100%; height: auto; display: block; }
.chart-axis { fill: var(--muted); font-size: 12px; font-weight: 600; }
.chart-empty { fill: var(--muted); font-size: 15px; font-weight: 600; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.market-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.market-table th {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.market-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.market-table tbody tr:last-child td { border-bottom: none; }
.market-table .num { text-align: right; }
.market-table th.num { text-align: right; }
.market-row { cursor: pointer; }
.market-row:hover { background: rgba(255, 255, 255, 0.03); }
.market-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.market-name { display: flex; align-items: center; gap: 10px; }
.market-title { font-weight: 800; display: block; white-space: nowrap; }
.market-sub { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.market-main { font-weight: 700; white-space: nowrap; }
.market-subval { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.market-apr { font-weight: 800; color: var(--gold); white-space: nowrap; }
.spark-cell svg.spark { width: 96px; height: 28px; display: block; margin-left: auto; }

/* --- news redesign: image-led layout (2026-11-27) --------------------------- */
.live-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px 14px; margin-bottom: 8px;
}
.live-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none;
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.live-title { font-size: 17px; font-weight: 800; margin: 0; }
.live-src { margin-left: auto; color: var(--muted-2); font-size: 12.5px; font-weight: 700; }
.live-card .ticker-lane { padding-bottom: 4px; }
.live-card .news-updated { margin: 10px 0 2px; }

.news-thumb { display: block; overflow: hidden; background: var(--card-2); }
.news-thumb img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  transition: transform 0.45s ease;
}
.news-featured {
  display: block; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 6px;
}
.news-featured:hover { border-color: var(--gold); }
.news-featured:hover .news-thumb img, .news-card:hover .news-thumb img { transform: scale(1.03); }
.news-featured .news-thumb img { aspect-ratio: 16 / 8; }
.news-featured-body { display: block; padding: 24px 26px 26px; }
.news-featured h2 { font-size: 30px; line-height: 1.28; font-weight: 800; margin: 12px 0 12px; letter-spacing: -0.01em; }
.news-featured p { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0 0 14px; }
.news-featured time { color: var(--muted-2); font-size: 13.5px; font-weight: 700; }
@media (max-width: 640px) {
  .news-featured h2 { font-size: 24px; }
  .news-featured-body { padding: 18px 18px 20px; }
  .news-featured .news-thumb img { aspect-ratio: 16 / 9; }
}

.news-grid { gap: 18px; }
.news-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.news-card-body { display: block; padding: 18px 20px 20px; }
.news-card h2 { font-size: 20px; line-height: 1.38; margin: 10px 0 9px; }
.news-card p { font-size: 15px; line-height: 1.65; }

.article-hero {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--border); border-radius: var(--radius);
  margin: 4px 0 22px; background: var(--card-2);
}

/* --- token info blocks (Pool & Farms) ----------------------------------- */
.token-info {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0;
}
.ti-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ti-names { display: flex; flex-direction: column; margin-right: auto; }
.ti-name { font-size: 17px; font-weight: 800; line-height: 1.2; }
.ti-sub { font-size: 12.5px; color: var(--muted); }
.chain-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--violet-soft);
  color: var(--violet-text);
  border: 1px solid rgba(138, 43, 226, 0.45);
}
.ti-addr-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ti-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
}
.ti-copy {
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  color: var(--gold);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.ti-copy:hover { border-color: var(--gold); }
.ti-copy.copied { color: #2fd3a7; border-color: var(--green); }
.ti-scan {
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--violet-text);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
}
.ti-scan:hover { border-color: var(--violet); }

/* Language selector (injected by i18n.js into the top bar) */
.lang-select {
  background: var(--card, #121626);
  color: var(--text, #e8eaf2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  max-width: 150px;
  cursor: pointer;
}
.lang-select:focus-visible {
  outline: 2px solid #ffd700;
  outline-offset: 1px;
}

/* --- brand unification with aureaswap.com (2026-11-27) --- */
.brand-logo { height: 44px; width: auto; aspect-ratio: 886 / 320; display: block; flex: none; }

/* --- mobile optimization (2026-11-27, layout only) -------------------------
   Goals at 360-430px: no horizontal overflow, header/nav never overlap,
   tap targets >= 44px, form controls at 16px (prevents iOS auto-zoom),
   wide tables scroll inside their own box, grids stack to one column. */
html, body { overflow-x: clip; }
img, video, canvas, svg { max-width: 100%; }

/* Mid-width desktops (2026-12-02): brand + topnav + the action row
   (App button / language select / chains pill / connect button) can
   add up to more than the bar, and the connect button used to slide
   off the right edge and get clipped ("ウォレットを接…" at 1533px).
   The action row no longer shrinks (flex: 0 0 auto above) and the
   topnav scrolls internally, but below this width the bar wraps to
   two rows instead — the button is always fully visible. */
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar-right { flex-wrap: wrap; row-gap: 8px; }
}

@media (max-width: 720px) {
  /* header: brand row and actions wrap instead of colliding */
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .brand { flex-wrap: wrap; row-gap: 6px; }
  .topbar-right { flex-wrap: wrap; row-gap: 8px; }
  /* bottom nav: items become a horizontally scrollable bar */
  .bottom-nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .bottom-nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 0 0 auto; min-width: 58px; padding: 7px 6px; }
  /* news section menu: five slots (Latest / Markets / Bitcoin /
     Altcoins / Menu) fit without horizontal scrolling or label overlap */
  .bottom-nav-news { overflow-x: visible; }
  .bottom-nav-news .nav-item { flex: 1 1 0; min-width: 0; padding: 6px 1px; font-size: 10.5px; letter-spacing: -0.01em; white-space: nowrap; }
  .bottom-nav-news .nav-item svg { width: 21px; height: 21px; }
  /* wide tables scroll horizontally inside their own box */
  .market-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Article tables: stacked layout (user order 2026-12-03) — header row
     hidden, each row becomes a block: first cell is the row heading,
     the rest stack as "column label (data-label, set by article-i18n.js
     from the header row) + value". No horizontal scrolling. */
  .article-table, .article-table tbody, .article-table tr, .article-table th, .article-table td { display: block; width: auto; }
  .article-table th { border: none; padding: 3px 0; }
  .article-table tr { padding: 10px 10px 12px; border: 1px solid var(--border); border-bottom: none; }
  .article-table tr:last-child { border-bottom: 1px solid var(--border); }
  .article-table tr.article-table-head-row { display: none; }
  .article-table td {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 14px; padding: 3px 0; border: none; white-space: normal; text-align: right;
  }
  .article-table td::before {
    content: attr(data-label); flex: none; text-align: left;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--muted);
  }
  .article-table td.article-td-head { display: block; text-align: left; font-weight: 800; font-size: 15.5px; padding: 0 0 5px; }
  .article-table td.article-td-head::before { content: none; }
  .chart-tooltip { max-width: 82vw; white-space: normal; }
}

@media (max-width: 380px) {
  .bottom-nav-news .nav-item { font-size: 10px; letter-spacing: -0.02em; }
}

@media (max-width: 640px) {
  /* tap targets >= 44px */
  .btn { min-height: 44px; }
  .btn-small { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  .btn-connect { min-height: 44px; }
  .seg-btn { min-height: 44px; }
  .link-btn { min-height: 44px; }
  .guide-toc a { min-height: 44px; }
  .ti-copy, .ti-scan { display: inline-flex; align-items: center; min-height: 44px; }
  .wallet-modal-close { width: 44px; height: 44px; }
  .toc-list a { display: block; padding: 9px 0; }
  /* form controls: 16px stops iOS focus zoom */
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
  .lang-select { min-height: 44px; max-width: 132px; }
  .field-select { min-height: 48px; }
  /* roomier cards on phones */
  main { padding: 16px 12px 8px; }
  .alert { margin-left: 12px; margin-right: 12px; }
  .footer { padding: 0 12px; }
}

@media (max-width: 480px) {
  .brand-logo { height: 34px; }
  .page-title { font-size: 17px; }
  .price-chip { font-size: 12.5px; padding: 2px 8px 2px 3px; }
  .kpi-value { font-size: 26px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
}

/* ---------- newsletter signup (build_shared.newsletter_section) ---------- */
.newsletter-section { max-width: 1180px; margin: 30px auto 0; padding: 0 20px; }
.newsletter-inner {
  background: linear-gradient(160deg, var(--card) 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(20px, 3.4vw, 32px);
}
.newsletter-title { margin: 0 0 8px; font-size: clamp(1.15rem, 2.6vw, 1.45rem); font-weight: 800; }
.newsletter-text { margin: 0 0 18px; color: var(--muted); max-width: 640px; }
.newsletter-label { display: block; font-weight: 700; margin-bottom: 8px; }
.newsletter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-row input {
  flex: 1 1 260px;
  background: var(--input-bg, #0e1222);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
}
.newsletter-row input:focus { border-color: var(--gold); outline: none; }
.newsletter-note { color: var(--muted); font-size: 0.92rem; margin: 14px 0 0; }
.newsletter-done { color: var(--gold-light); font-weight: 700; margin: 12px 0 0; }
.newsletter-more { margin: 16px 0 0; }
.newsletter-more a { color: var(--gold); }
@media (max-width: 640px) { .newsletter-section { padding: 0 12px; } }

/* ---------- readability pass (2026-11-29): stronger card frames + neon-glow hover ----------
   Appended last so it wins over the earlier card rules without restructuring them.
   Brand-tasteful only: gold frame tint + violet inner glow, no layout changes. */
.card, .news-card, .live-card {
  border-color: rgba(255,215,0,.24);
  box-shadow: 0 8px 26px rgba(0,0,0,.32), inset 0 0 22px rgba(138,43,226,.045);
}
.card:hover, .news-card:hover, .live-card:hover {
  border-color: rgba(255,215,0,.55);
  box-shadow: 0 0 14px rgba(255,215,0,.15), 0 0 28px rgba(138,43,226,.13), 0 12px 32px rgba(0,0,0,.42);
}

/* ---------- NEON FRAME STANDARD v1 (2026-11-29): gradient gold->purple frame + outer glow ----------
   Appended last; wins over the readability pass. Fill = the site's own card
   colour, so surfaces never change — only the frame goes neon. See
   ~/workspace/aurea-design/shell-spec.md section 10. */
.card, .news-card, .live-card, .dash-card, .tier-card, .plan, .pool-panel, .farm-panel, .kpi, .stat, .guide-step, .wallet-modal-card, .breaking-card, .market-box {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
    linear-gradient(135deg, rgba(255,215,0,.55), rgba(138,43,226,.55) 52%, rgba(255,215,0,.30)) border-box;
  box-shadow: 0 0 16px rgba(138,43,226,.16), 0 0 8px rgba(255,215,0,.08), 0 10px 28px rgba(0,0,0,.36), inset 0 0 24px rgba(138,43,226,.05);
}
@media (hover: hover) {
  .card, .news-card, .live-card, .dash-card, .tier-card, .plan, .pool-panel, .farm-panel, .kpi, .stat, .guide-step, .wallet-modal-card, .breaking-card, .market-box:hover {
    background:
      linear-gradient(var(--card, #121626), var(--card, #121626)) padding-box,
      linear-gradient(135deg, rgba(255,215,0,.9), rgba(138,43,226,.85) 52%, rgba(255,215,0,.55)) border-box;
    box-shadow: 0 0 22px rgba(255,215,0,.22), 0 0 34px rgba(138,43,226,.28), 0 14px 34px rgba(0,0,0,.44), inset 0 0 24px rgba(138,43,226,.07);
  }
}
.hero-banner, .article-hero, .newsletter-inner {
  border: 1px solid rgba(255,215,0,.45);
  box-shadow: 0 0 18px rgba(138,43,226,.20), 0 0 10px rgba(255,215,0,.10), 0 10px 28px rgba(0,0,0,.36), inset 0 0 24px rgba(138,43,226,.05);
}
@media (hover: hover) {
  .hero-banner, .article-hero, .newsletter-inner:hover {
    border-color: rgba(255,215,0,.75);
    box-shadow: 0 0 24px rgba(255,215,0,.24), 0 0 38px rgba(138,43,226,.30), 0 14px 34px rgba(0,0,0,.44), inset 0 0 24px rgba(138,43,226,.07);
  }
}
.pool-row, .position-row, .market-row {
  border-color: rgba(255,215,0,.30);
  box-shadow: inset 0 0 18px rgba(138,43,226,.04), 0 0 10px rgba(138,43,226,.08);
}
@media (hover: hover) {
  .pool-row, .position-row, .market-row:hover {
    border-color: rgba(255,215,0,.55);
    box-shadow: 0 0 14px rgba(255,215,0,.14), 0 0 22px rgba(138,43,226,.16);
  }
}
/* Neon focus frame for form fields (standard, shell-spec section 10). */
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
  border-color: rgba(255,215,0,.75);
  box-shadow: 0 0 0 3px rgba(255,215,0,.14), 0 0 14px rgba(138,43,226,.22);
  outline: none;
}
/* Assistant bubble guard: never resurrect over the mobile bottom nav,
   even if a cached old assistant.js is still being served. */
@media (max-width: 820px) { #aurea-assistant .aa-toggle { display: none !important; } }

/* ---------- Native select popups on the dark theme (2026-12-02) ----------
   Pages set light text on <select>, but without color-scheme the
   OS-rendered dropdown list paints on white -- white text on white
   (user report on the Portal feedback form). color-scheme: dark makes
   the popup render dark in Chrome/Edge/Firefox; the explicit option
   colors cover browsers that take option colors from CSS. */
:root { color-scheme: dark; }
select option, select optgroup {
  background-color: #121626;
  color: #FFFFFF;
}

/* --- Form readability (2026-12-02, all AUREA sites): fields were the
   same darkness as the panel and placeholders were dim. --- */
input[type="number"], input[type="text"] { background: #1b2338; border-color: #57638c; }
input::placeholder { color: #9ba3bc; opacity: 1; }

/* ==== CJK glyph variants by UI language (2026-12-03) ====
   Han codepoints are shared by Japanese and Chinese; the glyph
   variant comes from whichever font serves the character. The base
   stacks name no CJK font (some named Simplified-Chinese fonts
   first), so Japanese text could render with Chinese glyphs.
   These :lang() stacks pin each language's own fonts. The i18n
   core sets <html lang> at runtime, so the matching stack applies
   as soon as the UI language is applied. */
html:lang(ja), html:lang(ja) body {
  font-family: 'Manrope', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans',
    'Noto Sans JP', 'Noto Sans CJK JP', 'Yu Gothic', YuGothic, 'Meiryo',
    system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html:lang(zh), html:lang(zh) body,
html:lang(zh-cn), html:lang(zh-cn) body,
html:lang(zh-hans), html:lang(zh-hans) body {
  font-family: 'Manrope', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Noto Sans SC', 'Noto Sans CJK SC',
    system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html:lang(zh-tw), html:lang(zh-tw) body,
html:lang(zh-hant), html:lang(zh-hant) body,
html:lang(zh-hk), html:lang(zh-hk) body,
html:lang(zh-mo), html:lang(zh-mo) body {
  font-family: 'Manrope', 'PingFang TC', 'Microsoft JhengHei',
    'Noto Sans TC', 'Noto Sans CJK TC',
    system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html:lang(ko), html:lang(ko) body {
  font-family: 'Manrope', 'Apple SD Gothic Neo', 'Noto Sans KR',
    'Noto Sans CJK KR', 'Malgun Gothic',
    system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* AUREA SNS band layout guard (2026-12-03): forces the stacked, full-width
   drawer SNS band even if a stale cached char-icons.js injects the old
   horizontal CSS. Keep in sync with char-icons.js SNS_CSS. */
body .aurea-sns-band{display:flex;flex-direction:column;gap:8px;width:100%;box-sizing:border-box}
body .aurea-sns-band a{flex:none;width:100%;box-sizing:border-box;justify-content:flex-start}
body .aurea-sns-band .sns-label{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body .aurea-sns-band .sns-handle{flex:0 0 auto;white-space:nowrap}
