:root {
  --bg: #ffffff;
  --card: #f8f9fa;
  --border: #eaecf0;
  --text: #16181d;
  --muted: #72777d;
  --accent: #3366cc;
  --accent-dark: #2a4b8d;
  --accent-soft: #eaf0fa;
  --green: #14866d;
  --green-soft: #e6f4f0;
  --red: #d73333;
  --red-soft: #fbeaea;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.05), 0 4px 14px rgba(16, 24, 40, 0.04);
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
a { color: var(--accent); }
.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
.link.back { display: inline-block; margin-bottom: 14px; font-size: 13px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ---------- Brand ---------- */
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  object-fit: cover;
  flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--muted); }

/* ---------- Buttons / inputs ---------- */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #c8ccd1; cursor: default; }
.btn-ghost {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-ghost:hover { background: var(--card); }
.btn-ghost.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: #9aa0a6; }

.error { color: var(--red); font-size: 13px; min-height: 16px; margin: 4px 0 0; }
.empty { color: var(--muted); font-size: 13px; padding: 14px 16px; }

/* ---------- Sign-in prompts (browsing is public; these gate credit actions) ---------- */
.signin-prompt {
  padding: 22px 20px;
  text-align: center;
}
.signin-prompt p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }

.signin-hero {
  padding: 40px 30px;
  text-align: center;
  max-width: 560px;
  margin: 14px auto 0;
}
.signin-hero .brand-mark.lg { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 14px; }
.signin-hero h2 { margin: 0 0 10px; font-size: 22px; letter-spacing: -0.02em; }
.signin-hero .page-hint { line-height: 1.6; margin: 0 0 20px; }
.signin-hero .page-hint strong { color: var(--accent); }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  min-width: 250px;
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side-brand { padding: 0 8px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.nav-item svg {
  width: 19px; height: 19px; fill: none; stroke: var(--muted);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav-item:hover { background: var(--card); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item.active svg { stroke: var(--accent); }
/* Discord's brand mark is a filled glyph, not a stroke icon like the rest
   of the nav - override to render solid, tinted with Discord's own blurple
   on hover instead of the site's accent color. */
.nav-item svg.discord-icon { fill: var(--muted); stroke: none; }
.nav-item:hover svg.discord-icon { fill: #5865f2; }

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: block;
  text-decoration: none;
  color: inherit;
}
a.side-card:hover { border-color: var(--accent); }
.side-card-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.side-card-value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 3px 0 1px; }
.side-card-hint { font-size: 11.5px; color: var(--muted); }
.logout { width: 100%; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

/* Hamburger toggle for the off-canvas sidebar - hidden on desktop, shown
   at the same breakpoint the sidebar goes off-canvas (see media query below). */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.mobile-menu-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
}
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; border: none; background: transparent; padding: 10px 0; }
.search input:focus { box-shadow: none; }

#discover-nav-btn { gap: 6px; }
#discover-nav-btn svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.header-stats { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.hstat { display: flex; flex-direction: column; align-items: flex-end; }
.hstat-label { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.hstat-value { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.profile { display: flex; align-items: center; gap: 9px; padding-left: 18px; border-left: 1px solid var(--border); }
.profile-name { font-weight: 600; font-size: 13.5px; }
.side-profile { display: flex; align-items: center; gap: 10px; padding: 2px 4px 4px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
}

/* ---------- Ticker (auto-scrolling marquee) ---------- */
.ticker {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}
.ticker-track {
  display: flex;
  gap: 26px;
  align-items: center;
  width: max-content;
  white-space: nowrap;
  animation: ticker-scroll linear infinite;
  animation-duration: var(--ticker-duration, 40s);
}
/* Pause to let someone actually read a number, resume on mouse-out. */
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker { overflow-x: auto; }
}
.tick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  flex: 0 0 auto;
}
.tick-name { font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 11.5px; }
.tick-value { color: var(--muted); font-weight: 600; }
.tick-change { font-weight: 700; font-size: 12px; }

/* ---------- Pages ---------- */
.pages { padding: 22px 24px 40px; flex: 1; }
.page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.page-hint { color: var(--muted); font-size: 13px; margin: 0 0 18px; }

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1180px) { .page-grid { grid-template-columns: 1fr; } }
.page-center { min-width: 0; }
.page-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}
.card-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Overview chart + metrics ---------- */
.overview-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
  margin: 14px 0 20px;
}
@media (max-width: 900px) { .overview-top { grid-template-columns: 1fr; } }

.chart-card { padding: 16px; min-width: 0; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chart-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.chart-caption { font-size: 12px; color: var(--muted); }
.chart-caption.strong { font-weight: 700; color: var(--text); font-size: 13px; }
.range-tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.range-tab {
  border: none; background: transparent; color: var(--muted);
  font-family: inherit; font-weight: 600; font-size: 12px;
  padding: 5px 12px; border-radius: 7px; cursor: pointer;
}
.range-tab.active { background: var(--bg); color: var(--text); box-shadow: var(--shadow); }
.chart-holder { height: 260px; position: relative; min-width: 0; }
.chart-holder svg { width: 100%; height: 100%; display: block; }
.chart-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; text-align: center; padding: 0 20px;
}
.chart-grid-line { stroke: var(--border); stroke-width: 1; }
.chart-axis-label { fill: var(--muted); font-size: 10px; font-family: inherit; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url(#chartFill); }

.metric-stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.metric {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.metric-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.metric-value { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }

/* ---------- Tables ---------- */
.table-card { overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 600; padding: 10px 16px;
  border-bottom: 1px solid var(--border); background: var(--card);
}
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--card); }
.table .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.holding-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.listed-tag { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }

.cell-article { display: flex; align-items: center; gap: 11px; min-width: 0; }
.thumb {
  width: 36px; height: 36px; border-radius: 8px; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; text-transform: uppercase;
  object-fit: cover; overflow: hidden;
}
img.thumb { border: 1px solid var(--border); }
.thumb-wrap { display: inline-flex; flex: 0 0 auto; }
.thumb.xl { width: 64px; height: 64px; border-radius: 12px; font-size: 24px; }
.cell-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.cell-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

.badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  white-space: nowrap;
}
.badge.up { color: var(--green); background: var(--green-soft); }
.badge.down { color: var(--red); background: var(--red-soft); }
.badge.pending { color: var(--muted); background: var(--card); font-weight: 600; }

.sparkline { width: 72px; height: 24px; display: block; }
.sparkline polyline { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.sparkline .up { stroke: var(--green); }
.sparkline .down { stroke: var(--red); }

/* ---------- Right sidebar panels ---------- */
.side-panel { padding-bottom: 6px; }
.mini-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.mini-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 9px; cursor: pointer;
}
.mini-list li:hover { background: var(--card); }
.mini-list .thumb { width: 30px; height: 30px; font-size: 12px; border-radius: 7px; }
.mini-main { flex: 1; min-width: 0; }
.mini-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 11.5px; color: var(--muted); }
.mini-right { text-align: right; }
.mini-price { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.mini-change { font-size: 11.5px; font-weight: 700; }
.mini-list .empty { padding: 6px 8px 10px; }

/* overflow-x: auto - a long list of pills (e.g. Discover's category chips)
   scrolls horizontally within its own bounds instead of stretching the page. */
.pill-tabs {
  display: flex; gap: 5px; padding: 0 16px 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.pill-tab {
  border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  font-family: inherit; font-weight: 600; font-size: 11.5px;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  flex-shrink: 0;
}
.pill-tab.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
/* Standalone use directly on a page (not inside a card) - flush with the
   page title/hint above it instead of the card-internal padding. */
.pill-tabs.page-tabs { padding: 0 0 16px; }
.pill-tabs.page-tabs .pill-tab { padding: 7px 16px; font-size: 13px; }

/* ---------- Discover page ---------- */
#discover-search-card { margin-bottom: 16px; }
.discover-category-search { position: relative; padding: 16px 16px 10px; }
.discover-suggestions {
  position: absolute; left: 16px; right: 16px; top: 100%;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); margin-top: 4px; z-index: 20; overflow: hidden;
}
.discover-suggestion {
  display: block; width: 100%; text-align: left; background: none; border: none;
  font-family: inherit; font-size: 13.5px; padding: 9px 14px; cursor: pointer; color: var(--text);
}
.discover-suggestion:hover, .discover-suggestion.focused { background: var(--card); }

/* ---------- Activity feed ---------- */
.feed { list-style: none; margin: 0; padding: 4px 16px 12px; }
.feed li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; align-items: baseline; }
.feed li:last-child { border-bottom: none; }
.feed.big { padding: 8px 20px 14px; }
.feed.big li { padding: 12px 0; font-size: 14px; }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; position: relative; top: -1px; }
.feed-dot.sell { background: var(--red); }
.feed-dot.join { background: var(--green); }
.feed-text { flex: 1; min-width: 0; }
.feed-text b { font-weight: 600; }
.feed-time { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* ---------- Article detail ---------- */
.detail-hero { padding: 20px; }
.detail-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.detail-titles { flex: 1; min-width: 220px; }
.detail-titles h1 { margin: 0 0 3px; font-size: 24px; letter-spacing: -0.02em; }
.detail-titles .page-hint { margin: 0; }
.detail-price { text-align: right; }
.detail-price-num { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.stats-list { margin: 0; padding: 2px 16px 12px; }
.stats-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.stats-row:last-child { border-bottom: none; }
.stats-row dt { color: var(--muted); margin: 0; }
.stats-row dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Predictions ---------- */
.stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------- About ---------- */
.about-card { padding: 20px 22px; }
.about-card h2 { margin: 0 0 10px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.about-card p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.65; color: var(--text); }
.about-card ul { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; line-height: 1.65; color: var(--text); }
.about-card li { margin-bottom: 4px; }
.about-card p:last-child, .about-card ul:last-child { margin-bottom: 0; }
.about-card strong { color: var(--accent); }

.predict-card { margin-top: 16px; padding-bottom: 6px; }
.predict-hint { padding: 0 16px; margin: 0 0 14px; }
.predict-form {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 0 16px 6px;
}
.direction-toggle { display: flex; gap: 6px; }
.dir-btn {
  border: 1px solid var(--border); background: var(--bg); color: var(--muted);
  font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: 9px; cursor: pointer;
}
.dir-btn.up.active { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.dir-btn.down.active { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.predict-form input[type="number"] { width: 130px; }
.predict-form .btn-primary:disabled { background: #c8ccd1; cursor: default; }

.bet-outcome { font-weight: 700; }
.bet-outcome.up { color: var(--green); }
.bet-outcome.down { color: var(--red); }
.bet-outcome.even { color: var(--muted); }
.bet-countdown { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------- Points page ---------- */
.points-hero {
  padding: 20px 22px;
  margin: 14px 0 20px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.points-balance-value { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.progress-wrap { flex: 1; min-width: 260px; }
.progress-labels {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; font-weight: 700; margin-bottom: 6px; gap: 10px;
}
.progress-goal { color: var(--muted); font-weight: 600; white-space: nowrap; }
.progress-bar {
  height: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #6fa1e8);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-fill.goal-reached { background: linear-gradient(90deg, var(--green), #4fd1a8); }
.progress-footer { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--bg); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  color: var(--text); padding: 11px 18px; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14); font-size: 13.5px; z-index: 100;
}
.toast.err { border-left-color: var(--red); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.25); padding: 24px; width: 100%; max-width: 380px;
}
.modal-card h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.modal-card .page-hint { margin: 0 0 16px; }
.modal-card input { width: 100%; margin-bottom: 8px; }
.modal-card .btn-primary { width: 100%; }
.field-error { color: var(--red); font-size: 12.5px; margin: 0 0 10px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn-primary, .modal-actions .btn-ghost { flex: 1; width: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header-stats .hstat { display: none; }
  /* Account info (avatar/name, sign-in) moves into the hamburger drawer via
     #sidebar-profile / #sidebar-signin-btn - not enough header room for both. */
  .header-stats .profile, #hdr-signin-btn { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .header { padding: 12px 14px; gap: 10px; }
  .pages { padding: 16px 14px 32px; }

  /* Sidebar becomes an off-canvas drawer instead of just vanishing - it's
     the only nav, so hiding it with nowhere to go would strand mobile users. */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    background: var(--bg);
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; opacity: 1; }
  /* Pinning the footer to the very bottom edge (desktop's margin-top: auto)
     leaves it flush against real phones' browser chrome / home-indicator
     area, cutting it off - sit it right under the nav links instead. */
  .sidebar-footer { margin-top: 24px; }

  /* Tables scroll horizontally instead of clipping columns off-screen. */
  .table-card { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  .table { min-width: 560px; }

  .points-hero { padding: 16px 18px; gap: 18px; }
  .points-balance-value { font-size: 28px; }
  .toast { left: 14px; right: 14px; transform: none; width: auto; }

  #discover-nav-btn { padding: 10px 12px; }
}

@media (max-width: 480px) {
  .search input { font-size: 13px; }
  #discover-nav-btn span.discover-label { display: none; }
  .detail-price-num { font-size: 22px; }
  .chart-holder { height: 200px; }
}
