/* =========================================================
   Satta King Raja — optimized stylesheet
   Same final look as before, with all override layers merged.
   Sections: tokens · base · header · intro/notices · results
   table · footer · monthly chart · live board
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --ink: #171717;
  --muted: #687078;
  --line: #dedede;
  --paper: #fff;

  --green: #2fc99a;
  --yellow: #ffc400;
  --charcoal: #3d3d3d;
  --red: #ff5252;
  --gold-text: #b18400;
  --link: #0757bd;

  --font-body: "Roboto", system-ui, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-chart: "DM Sans", Arial, sans-serif;

  /* results-table column widths (shared by heading + table) */
  --game-col: 64%;
  --result-col: 18%;
}

@media (max-width: 360px) {
  :root {
    --game-col: 63%;
    --result-col: 18.5%;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f4f4f4;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.page-wrap {
  width: min(100% - 32px, 1010px);
  margin: 0 auto;
}

@media (max-width: 600px) {
  .page-wrap {
    width: 100%;
    margin: 0;
  }
}

/* ---------- Brand header ---------- */
.brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 20px 10px;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid #ededed;
}

.king-logo {
  display: block;
  width: 460px;
  max-width: 95vw;
  height: auto;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.king-logo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
}

.brand-kicker {
  margin: 0 0 5px;
  color: #179d76;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
}

.brand-hero h1 {
  margin: 0;
  color: #252525;
  font-family: var(--font-serif);
  font-size: clamp(25px, 7vw, 36px);
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.12;
}

.brand-hero h1 span {
  color: #d9a600;
}

.brand-tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.brand-seo-copy {
  width: min(100%, 680px);
  margin: 9px auto 0;
  color: #626262;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .brand-hero {
    min-height: auto;
    padding: 12px 5px;
  }

  .king-logo {
    width: 300px;
  }
}

@media (max-width: 600px) {
  .brand-hero h1 {
    font-size: 27px;
  }

  .brand-tagline {
    font-size: 12px;
  }

  .brand-seo-copy {
    max-width: 360px;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.45;
  }
}

/* ---------- SEO intro, ad slot, notice, updated line ---------- */
.seo-intro {
  margin: 14px 0 12px;
  padding: 14px 15px;
  border: 1px solid #e8e8e8;
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  background: #fff;
}

.seo-intro h2 {
  margin: 0 0 6px;
  color: #292929;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.3;
}

.seo-intro p {
  margin: 0;
  color: #686356;
  font-size: 12px;
  line-height: 1.65;
}

.ad-space {
  display: grid;
  place-items: center;
  min-height: 76px;
  margin: 12px 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: #a69d89;
}

.ad-space span {
  padding: 4px 10px;
  border-radius: 20px;
  background: #fff8e8;
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.notice {
  padding: 11px 13px;
  border: 1px solid #ffd2d2;
  border-radius: 7px;
  background: #fff0f0;
  color: #8c2424;
}

.notice strong {
  display: block;
  margin-bottom: 4px;
  color: #c83232;
  font-size: 10px;
  letter-spacing: 0.8px;
}

.notice p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.updated-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 13px 0 12px;
  color: #168d69;
  font-size: 11px;
  text-align: center;
}

.updated-line time {
  font-weight: 700;
}

.updated-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px #d9f8ed;
}

@media (min-width: 601px) {
  .seo-intro {
    padding: 17px 19px;
  }

  .seo-intro p {
    font-size: 13px;
  }

  .notice {
    padding: 13px 16px;
  }

  .notice p {
    font-size: 12px;
  }
}

@media (min-width: 820px) {
  .seo-intro {
    margin-top: 18px;
  }

  .ad-space {
    min-height: 90px;
  }
}

@media (max-width: 600px) {
  .seo-intro {
    margin: 10px 8px;
    padding: 12px;
  }

  .seo-intro p {
    font-size: 13px;
    line-height: 1.55;
  }

  .ad-space {
    min-height: 64px;
    margin: 10px 8px;
  }

  .notice {
    margin: 10px 8px;
    padding: 11px 12px;
  }

  .notice p {
    font-size: 12px;
  }

  .updated-line {
    flex-wrap: wrap;
    margin: 11px 8px;
    font-size: 12px;
  }
}

/* ---------- Results section ---------- */
.results-section {
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.results-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 66px;
  padding: 12px 10px;
  color: #fff;
  text-align: center;
  background: var(--green);
}

.title-mark {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #fff3bf;
  font-size: 18px;
}

.results-title h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.results-title p {
  margin: 3px 0 0;
  color: #effff9;
  font-size: 13px;
  font-weight: 600;
}

/* Heading row — columns mirror the table below */
.table-heading {
  display: grid;
  grid-template-columns: minmax(0, var(--game-col)) var(--result-col) var(--result-col);
  min-height: 48px;
  color: #fff;
  background: var(--charcoal);
}

.table-heading-game {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 9px 12px 9px 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.table-heading-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  padding: 4px 12px 4px 2px;
  text-align: right;
}

.table-heading-date span {
  display: none; /* PREVIOUS / TODAY label — date only, like the reference */
  color: #e8e8e8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35px;
  line-height: 1.1;
}

.table-heading-date strong {
  margin-top: 3px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.today-heading {
  background: #333;
}

.live-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 13px;
  border-left: 4px solid var(--red);
  background: #f1f1f1;
  color: #ff4545;
  font-size: 13px;
  font-weight: 800;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px #ffdede;
}

/* Table */
.results-table-wrap {
  width: 100%;
  overflow: hidden;
}

.results-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
}

.results-table col.game-column {
  width: var(--game-col);
}

.results-table col.result-column {
  width: var(--result-col);
}

.results-table .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.results-table td {
  height: 56px;
  padding: 8px 7px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

.results-table tbody tr:not(.admin-game-row) td {
  background: #fff;
}

.results-table tbody tr:not(.admin-game-row):hover td {
  background: #f7f7f7;
}

/* Rows flagged is_admin_game = 1 */
.results-table tbody tr.admin-game-row td {
  background: var(--yellow);
}

.results-table .game-cell {
  min-width: 0;
  padding-left: 10px;
  overflow-wrap: anywhere;
}

.game-cell > strong {
  display: block;
  color: #111;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: #222;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

.meta-divider {
  color: #b9af98;
}

.game-meta a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

.game-meta a:hover {
  text-decoration: underline;
}

.admin-game-row .game-cell > strong,
.admin-game-row .game-meta,
.admin-game-row .game-meta a {
  color: #111;
}

.results-table .result-cell {
  padding: 6px 12px 6px 2px;
  text-align: right;
}

.result-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  color: #111;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.results-table .empty-state {
  padding: 25px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.results-footnote {
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: #777;
  background: #fafafa;
  font-size: 10px;
  line-height: 1.5;
}

.supporting-content {
  margin: 20px 0;
}

@media (min-width: 601px) {
  .results-table td {
    height: 66px;
    padding: 10px 14px;
  }

  .result-number {
    font-size: 25px;
  }
}

@media (max-width: 600px) {
  .results-section {
    margin: 0 0 18px;
    border-right: 0;
    border-left: 0;
  }

  .results-title {
    min-height: 58px;
    padding: 9px 8px;
  }

  .results-title h2 {
    font-size: 17px;
  }

  .results-title p {
    font-size: 12px;
  }

  .table-heading-game {
    padding: 8px;
    font-size: 13px;
  }

  .table-heading-date span {
    font-size: 9px;
  }

  .table-heading-date strong {
    font-size: 13px;
  }

  .live-label {
    min-height: 40px;
  }

  .results-table td {
    height: 58px;
  }

  .results-table .game-cell {
    padding-left: 8px;
  }

  .supporting-content {
    margin: 14px 8px;
  }
}

@media (max-width: 360px) {
  .table-heading-game,
  .table-heading-date strong {
    font-size: 12px;
  }

  .game-cell > strong {
    font-size: 14px;
  }

  .result-number {
    font-size: 21px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 19px 12px calc(19px + env(safe-area-inset-bottom));
  color: #f3f3f3;
  background: #292929;
  text-align: center;
}

.footer-brand {
  color: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.footer-brand span {
  color: var(--yellow);
}

.site-footer p {
  margin: 5px 0;
  color: #d8cdaf;
  font-size: 10px;
}

.site-footer small {
  color: #b9ad91;
  font-size: 9px;
}

@media (max-width: 600px) {
  .site-footer {
    padding: 18px 12px calc(18px + env(safe-area-inset-bottom));
  }
}

/* ---------- Monthly chart ---------- */
.skr-chart-section {
  width: 100%;
  max-width: 100%;
  margin: 18px 0 24px;
  color: #292821;
  font-family: var(--font-chart);
  overflow-x: hidden;
}

.skr-chart-heading {
  margin: 0 0 10px;
  padding: 14px 12px;
  border: 1px solid #25b98c;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  text-align: center;
  box-shadow: 0 5px 16px rgba(80, 61, 15, 0.08);
}

.skr-chart-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #eafff7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.skr-chart-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(16px, 4.2vw, 20px);
  font-weight: 800;
  line-height: 1.25;
}

.skr-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}

.skr-chart-toolbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #e9e3d5;
  border-radius: 7px;
  background: #fff;
  color: #76550a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.skr-chart-toolbar a:hover {
  border-color: #c59618;
  background: #fff2c9;
  color: #8a650b;
}

.skr-chart-toolbar .skr-current-month {
  min-width: 0;
  color: #777367;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.skr-chart-scroll {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #e9e3d5;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(80, 61, 15, 0.06);
}

.skr-monthly-table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
}

.skr-monthly-table th,
.skr-monthly-table td {
  padding: 8px 2px;
  border-right: 1px solid #eee8db;
  border-bottom: 1px solid #eee8db;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.skr-monthly-table tr > *:last-child {
  border-right: 0;
}

.skr-monthly-table tbody tr:last-child td {
  border-bottom: 0;
}

.skr-monthly-table thead .skr-table-title th {
  padding: 11px 6px;
  background: #e9fff7;
  color: #176e55;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.skr-monthly-table thead .skr-column-head th {
  background: var(--charcoal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.skr-monthly-table thead .skr-column-head th:first-child {
  width: 16%;
}

.skr-monthly-table tbody td {
  background: #fff;
  color: #292821;
  font-size: 13px;
}

.skr-monthly-table tbody tr:nth-child(even) td {
  background: #f7f7f7;
}

.skr-monthly-table tbody tr:hover td {
  background: #fff3c4;
}

.skr-monthly-table tbody td.skr-day {
  color: #76550a;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.skr-monthly-table tbody td.skr-result {
  color: var(--gold-text);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.skr-chart-empty {
  padding: 20px 10px;
  color: #777367;
  text-align: center;
  font-size: 13px;
}

.skr-chart-message {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #ead8a8;
  border-radius: 8px;
  background: #fff7e3;
  color: #70571d;
  font-size: 13px;
}

@media (max-width: 600px) {
  .skr-chart-section {
    margin: 14px 0 20px;
  }

  .skr-chart-heading {
    padding: 12px 8px;
  }

  .skr-chart-heading h2 {
    font-size: 15px;
  }

  .skr-chart-toolbar a {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .skr-chart-toolbar .skr-current-month {
    font-size: 11px;
  }

  .skr-monthly-table th,
  .skr-monthly-table td {
    padding: 7px 1px;
  }

  .skr-monthly-table thead .skr-table-title th {
    padding: 9px 4px;
    font-size: 12px;
  }

  .skr-monthly-table thead .skr-column-head th {
    font-size: 10px;
  }

  .skr-monthly-table tbody td.skr-day {
    font-size: 11px;
  }

  .skr-monthly-table tbody td.skr-result {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .skr-monthly-table thead .skr-column-head th {
    font-size: 9px;
  }

  .skr-monthly-table tbody td.skr-day {
    font-size: 10px;
  }

  .skr-monthly-table tbody td.skr-result {
    font-size: 12px;
  }
}

/* ---------- Live board ---------- */
.live-board {
  margin: 0 0 20px;
}

.live-board-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 8px 12px;
    color: #fff;
    background: linear-gradient(110deg, #263b50, #344f68);
}

.live-board-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1.2;
}

.live-board-heading p {
  margin: 4px 0 0;
  color: #dedede;
  font-size: 11px;
  line-height: 1.35;
}

.live-board-pulse,
.live-board-clock-dot {
  display: inline-block;
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.16);
}

.live-board-clock-dot {
  flex-basis: 6px;
  width: 6px;
  height: 6px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 201, 154, 0.14);
}

.live-board-status {
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: #f2d68a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.live-board-status.has-live-games {
  border-color: rgba(255, 196, 0, 0.45);
  background: rgba(255, 196, 0, 0.13);
  color: #ffd34f;
}

.live-board-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border-top: 1px solid #ededed;
  color: #777;
  background: #fafafa;
  font-size: 10px;
  font-weight: 600;
}

.live-board-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.live-board-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-width: 0;
    min-height: 195px;
    margin: 0;
    padding: 25px 16px;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 4px 15px rgba(20, 43, 77, 0.06);
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.live-board-card[hidden],
.live-board-empty[hidden] {
  display: none;
}

.live-board-game-name {
    display: inline-block;
    max-width: 100%;
    padding: 5px 12px;
    border: 1px solid #f2e5b8;
    border-radius: 6px;
    color: #292929;
    background: #fff6d9;
    font-size: clamp(16px, 2.2vw, 19px);
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.live-board-result {
    margin: 0;
    color: #171717;
    font-size: clamp(68px, 8vw, 86px);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
    line-height: 1;
}

.live-board-result.is-waiting {
  color: var(--gold-text);
  font-size: clamp(38px, 5vw, 48px);
  letter-spacing: 2px;
}

.live-board-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 112px;
  padding: 22px 14px;
  border-radius: 10px;
  color: #555;
  background: #fff;
  box-shadow: 0 2px 12px rgba(20, 20, 20, 0.045);
  text-align: center;
}

.live-board-empty-icon {
  color: #c5960d;
  font-size: 25px;
}

.live-board-empty strong {
  color: #191919;
  font-size: 15px;
  font-weight: 800;
}

.live-board-empty > span:last-child {
  color: #666;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .live-board {
    margin-bottom: 14px;
  }

  .live-board-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .live-board-card {
    gap: 10px;
    min-height: 150px;
    padding: 19px 12px;
    border-radius: 10px;
  }

  .live-board-game-name {
    font-size: 19px;
  }

  .live-board-result {
    font-size: clamp(64px, 20vw, 80px);
  }

  .live-board-result.is-waiting {
    font-size: 40px;
  }
}

@media (max-width: 600px) {
  .live-board-heading {
    gap: 9px;
    min-height: 58px;
    padding: 10px 12px;
  }

  .live-board-heading h2 {
    font-size: 14px;
  }

  .live-board-heading p {
    max-width: 225px;
    font-size: 10px;
  }

  .live-board-status {
    padding: 5px 7px;
    font-size: 8px;
  }
}