/* =========================================================
   Sasta King — theme matched to satta-king-fast.com
   Yellow live rows | Green banners | Blue chart | Red alerts
   ========================================================= */

:root {
  --bg-page: #f2f2f2;
  --bg-white: #ffffff;
  --bg-stripe: #e9ecef;
  --bg-soft: #f1f1f1;
  --line: #cfcfcf;
  --text: #000000;
  --muted: #555555;

  --green: #28a745;
  --green-dark: #1e7e34;
  --green-soft: #339966;
  --yellow: #ffc107;
  --yellow-soft: #ffe082;
  --yellow-bar: #ffeb3b;
  --blue: #007bff;
  --blue-dark: #0056b3;
  --red: #ff5252;
  --red-dark: #dc3545;
  --dark: #212529;
  --dark-bar: #343a40;

  --font: Arial, Helvetica, "Hind", sans-serif;
  --max: 100%;
}

@media (min-width: 769px) {
  :root {
    --max: 720px;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-page);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #0d47a1; text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; color: var(--blue-dark); }

/* ---------- Header / Logo (centered like reference) ---------- */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 0.6rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none !important;
  color: inherit;
}

.brand-logo {
  width: 52px;
  height: 52px;
}

.brand-text { text-align: left; line-height: 1.05; }
.brand-name {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand-tag {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.live-clock {
  width: 100%;
  max-width: var(--max);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.clock-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.clock-time {
  font-weight: 800;
  color: var(--red-dark);
  font-variant-numeric: tabular-nums;
}
.clock-date { color: var(--muted); font-weight: 600; }

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.admin-nav a {
  background: var(--dark-bar);
  color: #fff !important;
  padding: 0.35rem 0.65rem;
  border-radius: 3px;
  font-size: 0.8rem;
  text-decoration: none !important;
}
.admin-nav a:hover { background: #000; }

/* ---------- Page shell ---------- */
.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem 0.45rem 2rem;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto 1rem;
  padding: 0.85rem 0.6rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  background: var(--bg-white);
  border: 1px solid var(--line);
}

/* ---------- Banners (reference style) ---------- */
.disclaimer {
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.65rem;
  background: var(--red);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  border: none;
}

.hero {
  margin: 0 0 0.45rem;
  padding: 0.65rem 0.55rem;
  background: var(--green);
  color: #fff;
  text-align: center;
}
.hero h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
}
.hero p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.95);
  font-weight: 500;
}

.updated-line {
  margin: 0 0 0.55rem;
  padding: 0.35rem 0.5rem;
  text-align: center;
  color: var(--green-soft);
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--bg-white);
  border: 1px solid var(--line);
}

/* ---------- Panels ---------- */
.panel {
  margin: 0 0 0.75rem;
  background: var(--bg-white);
  border: 1px solid var(--line);
}

.panel-title {
  margin: 0;
  padding: 0.55rem 0.45rem;
  text-align: center;
  font-size: clamp(0.9rem, 3.2vw, 1.05rem);
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  background: var(--dark-bar);
}

/* Results board uses dark title; chart uses blue like reference */
.panel-results .panel-title { background: var(--dark-bar); }
.panel-chart .panel-title { background: var(--blue); }

.live-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 0.55rem 0.6rem;
  background: #111;
  color: #fff;
  border-bottom: 2px solid var(--red);
  font-weight: 800;
}
.live-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #ff1744;
  box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7);
  animation: livePulse 1.1s ease-in-out infinite;
}
.live-text {
  color: #ff1744;
  letter-spacing: 0.12em;
  font-size: 1.05rem;
  animation: liveBlink 1.1s step-start infinite;
}
.live-sub {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0.95;
}
@keyframes liveBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7); transform: scale(1); }
  70% { box-shadow: 0 0 0 8px rgba(255, 23, 68, 0); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 0 rgba(255, 23, 68, 0); transform: scale(1); }
}

.panel-body { padding: 0; }

.live-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.legend-opened { color: var(--green-dark); }
.legend-coming { color: #9a7b00; }
.legend-opened::before,
.legend-coming::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.3rem;
  vertical-align: -1px;
  border: 1px solid rgba(0,0,0,0.15);
}
.legend-opened::before { background: #e8f5e9; }
.legend-coming::before { background: var(--yellow); }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow: visible; }

table.results,
table.chart,
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

table.results th,
table.results td,
table.chart th,
table.chart td,
table.admin-table th,
table.admin-table td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.3rem;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
}

table.results thead th {
  background: var(--dark-bar);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

table.results tbody tr:nth-child(even) { background: var(--bg-stripe); }
table.results tbody tr:nth-child(odd) { background: var(--bg-white); }

table.results td.market-name {
  text-align: left;
  padding-left: 0.45rem;
  font-weight: 700;
}
table.results td.market-name a {
  color: var(--text);
  text-decoration: none;
}
table.results td.market-name a:hover { color: var(--blue-dark); text-decoration: underline; }

/* Coming soon = yellow highlight (LIVE style on reference) */
tr.live-row.row-coming {
  background: var(--yellow) !important;
  box-shadow: none;
}
tr.live-row.row-coming td,
tr.live-row.row-coming a {
  color: #000 !important;
}

/* Opened = clean white/stripe with green left accent */
tr.live-row.row-opened {
  box-shadow: inset 5px 0 0 var(--green);
}

.num {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.num.xx { color: #888; }
.num.open { color: #000; }
.num.flash {
  background: #fff59d;
  animation: pulse 0.9s ease;
}
@keyframes pulse {
  from { background: #ffeb3b; }
  to { background: transparent; }
}

.badge-opened,
.badge-coming {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(0,0,0,0.12);
}
.badge-opened {
  background: #e8f5e9;
  color: var(--green-dark);
}
.badge-coming {
  background: #fff8e1;
  color: #7a5c00;
}
.countdown {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-block;
  margin-left: 0.2rem;
  padding: 0.05rem 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: #eee;
  border: 1px solid var(--line);
  color: #444;
}

/* ---------- Chart (blue header + red dates like reference) ---------- */
table.chart thead th {
  background: #c8e6c9;
  color: #000;
  font-size: 0.78rem;
  font-weight: 800;
}
table.chart tbody tr:nth-child(even) { background: #fafafa; }
table.chart tbody tr:nth-child(odd) { background: #fff; }
table.chart td:first-child {
  color: var(--red-dark);
  font-weight: 800;
  width: 16%;
  background: #fff8f8;
}
table.chart .num { font-size: 0.95rem; }

/* Yellow month/year bar like reference */
.chart-controls,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: end;
  justify-content: center;
  margin: 0;
  padding: 0.55rem 0.4rem;
  background: var(--yellow-bar);
  border-top: 1px solid #e0d000;
  border-bottom: 1px solid #e0d000;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.form-row label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #333;
}
.form-row select,
.form-row input,
.form-grid input,
.form-grid select {
  border: 1px solid #999;
  background: #fff;
  color: #000;
  border-radius: 2px;
  padding: 0.4rem 0.45rem;
  font: inherit;
  min-height: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0056b3;
  border-radius: 2px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: var(--blue);
  color: #fff;
  min-height: 36px;
}
.btn:hover { background: var(--blue-dark); }

.month-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  background: var(--bg-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.seo-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  justify-content: center;
  margin: 0.65rem 0;
  padding: 0.5rem;
  background: var(--bg-white);
  border: 1px solid var(--line);
  font-size: 0.8rem;
}

/* ---------- Admin / forms ---------- */
.flash-msg {
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--line);
  background: #fff;
}
.flash-msg.ok { border-color: var(--green); background: #e8f5e9; }
.flash-msg.err { border-color: var(--red-dark); background: #ffebee; }
.flash-main { margin: 0 0 0.4rem; }

.schedule-card {
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  background: #f8f9fa;
  border: 1px solid var(--line);
}
.schedule-card h3 {
  margin: 0 0 0.35rem;
  color: var(--green-dark);
  font-size: 0.9rem;
}
.schedule-card ul { margin: 0; padding-left: 1.1rem; }

.now-line { color: var(--muted); font-size: 0.85rem; }
.muted-sm { font-size: 0.72rem; color: var(--muted); }

.login-wrap {
  max-width: 420px;
  margin: 1.25rem auto;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1rem;
}
.login-wrap h1 {
  margin-top: 0;
  color: var(--dark);
  font-size: 1.35rem;
}

.form-grid { display: grid; gap: 0.65rem; }
.form-grid .full { grid-column: 1 / -1; }

.admin-layout { display: grid; gap: 0.85rem; }
@media (min-width: 900px) {
  .admin-layout {
    grid-template-columns: 0.95fr 1.15fr;
    align-items: start;
  }
}

table.admin-table thead th {
  background: var(--dark-bar);
  color: #fff;
  font-size: 0.78rem;
}
table.admin-table { min-width: 0; }

/* ===== Admin UX ===== */
.admin-body .site-main {
  max-width: 980px;
}

.admin-hero {
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 0.85rem;
  padding: 0.85rem 0.75rem;
}
.admin-hero h1 {
  margin: 0;
  font-size: 1.45rem;
  color: #111;
}
.admin-welcome {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.admin-hero-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: center;
}
.admin-clock-pill {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  background: #111;
  color: #fff;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.admin-clock-pill span {
  color: #ff5252;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.admin-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.tip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  background: #f8f9fa;
  text-align: center;
}
.tip-ok { border-color: #28a745; background: #e8f5e9; color: #1e7e34; }
.tip-lock { border-color: #dc3545; background: #ffebee; color: #b71c1c; }
.tip-next { border-color: #ffc107; background: #fff8e1; color: #7a5c00; }

.admin-form-body { padding: 0.85rem 0.75rem; }
.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.btn-primary { min-width: 140px; }
.btn-muted {
  background: #6c757d !important;
  border-color: #6c757d !important;
}

.admin-board {
  display: grid;
  gap: 0.65rem;
  padding: 0.65rem;
}

.market-card {
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}
.market-card.is-opened { border-left: 5px solid #28a745; }
.market-card.is-openable { border-left: 5px solid #ffc107; }

.market-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.65rem 0.7rem;
  background: #f8f9fa;
  border-bottom: 1px solid var(--line);
}
.market-card-head h3 {
  margin: 0;
  font-size: 1.1rem;
}
.market-card-head p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.market-state {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.state-ok { background: #fff8e1; color: #7a5c00; }
.state-lock { background: #e8f5e9; color: #1e7e34; }

.market-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.65rem;
}
.slot {
  border: 1px solid var(--line);
  background: #fafafa;
  padding: 0.55rem 0.4rem;
  text-align: center;
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  min-height: 108px;
}
.slot-editable { background: #fff; border-color: #90caf9; }
.slot-locked { background: #f5f5f5; }
.slot-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #555;
  letter-spacing: 0.04em;
}
.slot .num { font-size: 1.45rem; }
.slot-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #777;
}
.tag-lock { color: #c62828; }

.icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.icon-btn:hover { background: var(--blue-dark); }
.icon-btn-add { background: #28a745; }
.icon-btn-add:hover { background: #1e7e34; }
.ico {
  width: 18px;
  height: 18px;
  display: block;
}

.admin-empty {
  margin: 0;
  padding: 1.25rem 0.85rem;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

/* History: cards on phone, table on desktop */
.history-cards {
  display: none;
  gap: 0.5rem;
  padding: 0.65rem;
}
.history-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "main num"
    "meta meta";
  gap: 0.25rem 0.65rem;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.7rem 0.75rem;
}
.history-card-main { grid-area: main; }
.history-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #555;
}
.history-market {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
}
.history-market small {
  color: var(--muted);
  font-weight: 700;
}
.history-num {
  grid-area: num;
  font-size: 1.55rem !important;
}
.history-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  border-top: 1px dashed #ddd;
  padding-top: 0.4rem;
  margin-top: 0.15rem;
}
.history-table-wrap { display: block; }

@media (max-width: 768px) {
  .admin-tips {
    grid-template-columns: 1fr;
  }
  .admin-hero-top {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-clock-pill { justify-content: center; }
  .market-slots {
    grid-template-columns: 1fr;
  }
  .slot {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "label num action";
    align-items: center;
    justify-items: start;
    min-height: 0;
    text-align: left;
    padding: 0.65rem 0.75rem;
  }
  .slot-label { grid-area: label; }
  .slot .num { grid-area: num; justify-self: center; font-size: 1.6rem; }
  .slot .icon-btn,
  .slot .slot-tag { grid-area: action; justify-self: end; }
  .admin-form-actions .btn {
    width: 100%;
    min-height: 46px;
    font-size: 16px;
  }
  .icon-btn {
    width: 46px;
    height: 46px;
  }
  .ico { width: 20px; height: 20px; }

  .history-cards { display: grid; }
  .history-table-wrap { display: none; }
}

@media (min-width: 769px) {
  .history-cards { display: none !important; }
  .history-table-wrap { display: block; }
}


/* ---------- Mobile (readable like satta-king-fast.com) ---------- */
@media (max-width: 768px) {
  html {
    font-size: 17px; /* base bump so rem text stays readable */
  }

  .site-main {
    max-width: 100%;
    padding: 0.4rem 0.25rem 1.75rem;
  }

  .site-header .header-inner {
    padding: 0.65rem 0.4rem 0.4rem;
  }

  .brand-name {
    font-size: 1.45rem;
    letter-spacing: 0;
  }
  .brand-logo { width: 48px; height: 48px; }
  .brand-tag { font-size: 0.78rem; }

  .live-clock {
    font-size: 1rem;
    padding: 0.45rem 0.5rem;
  }
  .clock-time { font-size: 1.15rem; }
  .clock-date { font-size: 0.9rem; }

  .disclaimer {
    font-size: 0.88rem;
    padding: 0.65rem 0.55rem;
    line-height: 1.35;
  }

  .hero {
    padding: 0.75rem 0.5rem;
  }
  .hero h1 {
    font-size: 1.2rem;
    line-height: 1.35;
  }
  .hero p { font-size: 0.95rem; }

  .updated-line {
    font-size: 0.95rem;
    padding: 0.45rem 0.5rem;
  }

  .panel-title {
    font-size: 1.05rem;
    padding: 0.7rem 0.5rem;
    line-height: 1.35;
  }

  .live-legend {
    font-size: 0.9rem;
    padding: 0.5rem;
    gap: 1.1rem;
  }

  .admin-nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  /*
   * Live board on phone = reference-style rows:
   * left: market + time, right: big numbers
   * (not tiny multi-column table)
   */
  table.results thead { display: none; }
  table.results,
  table.results tbody {
    display: block;
    width: 100%;
  }
  table.results tr.live-row {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr 1fr;
    grid-template-areas:
      "market status today"
      "time status yesterday";
    align-items: center;
    gap: 0.15rem 0.35rem;
    margin: 0;
    padding: 0.7rem 0.55rem;
    border: none;
    border-bottom: 1px solid #c8c8c8;
    width: 100%;
  }
  table.results td {
    display: block;
    border: none !important;
    padding: 0 !important;
    text-align: left;
  }
  table.results td::before { display: none !important; content: none !important; }

  table.results td.market-name {
    grid-area: market;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
  }
  table.results td.market-name a {
    font-size: 1.1rem;
    font-weight: 800;
  }
  table.results td.market-name .status-pill {
    font-size: 0.72rem;
    margin-left: 0.25rem;
  }

  table.results td[data-label="Time"] {
    grid-area: time;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
  }

  table.results td.status-cell {
    grid-area: status;
    text-align: center;
  }
  .badge-opened,
  .badge-coming {
    font-size: 0.82rem;
    padding: 0.25rem 0.4rem;
    white-space: normal;
    justify-content: center;
  }
  .countdown {
    display: block;
    font-size: 1.05rem;
    margin-top: 0.1rem;
  }

  table.results td[data-label="Today"] {
    grid-area: today;
    text-align: right;
  }
  table.results td[data-label="Yesterday"] {
    grid-area: yesterday;
    text-align: right;
  }
  table.results td[data-label="Today"] .num {
    font-size: 1.85rem;
    line-height: 1;
  }
  table.results td[data-label="Yesterday"] .num {
    font-size: 1.35rem;
    line-height: 1;
    opacity: 0.9;
  }
  table.results td[data-label="Today"]::after {
    content: "Today";
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #444;
    margin-top: 0.15rem;
  }
  table.results td[data-label="Yesterday"]::after {
    content: "Yesterday";
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #555;
    margin-top: 0.1rem;
  }

  /* Chart: readable + full width, no swipe */
  .table-wrap.chart-scroll {
    overflow: hidden;
    padding: 0.15rem;
  }
  .table-wrap.chart-scroll::before { display: none !important; }

  table.chart {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
  }
  table.chart thead th {
    font-size: 0.92rem;
    padding: 0.45rem 0.15rem;
    line-height: 1.2;
  }
  table.chart th,
  table.chart td {
    padding: 0.4rem 0.12rem;
    font-size: 0.95rem;
    line-height: 1.2;
  }
  table.chart td:first-child {
    font-size: 1rem;
    width: 18%;
  }
  table.chart .num {
    font-size: 1.15rem;
    font-weight: 800;
  }

  .chart-controls,
  .filters {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 0.5rem;
  }
  .form-row label { font-size: 0.85rem; }
  .form-row select,
  .form-row input,
  .btn {
    width: 100%;
    font-size: 17px;
    min-height: 46px;
  }

  .month-nav {
    flex-direction: column;
    text-align: center;
    font-size: 1rem;
    padding: 0.6rem;
    gap: 0.55rem;
  }

  .seo-footer-links {
    font-size: 0.95rem;
    gap: 0.55rem 1rem;
  }

  .site-footer { font-size: 0.85rem; }

  /* Admin tables may still scroll */
  .table-wrap:has(table.admin-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.admin-table { min-width: 520px; }
}

/* Slightly smaller phones — still keep text large (never go tiny) */
@media (max-width: 380px) {
  html { font-size: 16px; }

  .brand-name { font-size: 1.3rem; }
  table.results td.market-name,
  table.results td.market-name a { font-size: 1.02rem; }
  table.results td[data-label="Today"] .num { font-size: 1.65rem; }
  table.results td[data-label="Yesterday"] .num { font-size: 1.2rem; }

  table.chart thead th { font-size: 0.85rem; }
  table.chart th,
  table.chart td { font-size: 0.88rem; padding: 0.35rem 0.08rem; }
  table.chart .num { font-size: 1.05rem; }
}
