/* Keno product palette — sampled from vietlott.vn + official Keno logo
   https://media.vietlott.vn/main/06.2018/cms/game/keno.png
   Wikimedia Vietlott logo SVG, EX.css brand tokens */
:root {
  --red: #ed1b2f;
  --red-hot: #fa000c;
  --red-deep: #b01020;
  --keno-orange: #f15922;
  --gold: #faa61a;
  --gold-2: #ffc14a;
  --gold-deep: #f18806;
  --navy: #001452;
  --navy-deep: #050934;
  --bg: #fff8f3;
  --bg-2: #fff1e6;
  --surface: #ffffff;
  --line: rgba(237, 27, 47, 0.14);
  --text: #001452;
  --muted: #5d6180;
  --shadow: 0 16px 40px rgba(237, 27, 47, 0.1);
  --glow-red: 0 10px 28px rgba(237, 27, 47, 0.22);
  --glow-gold: 0 10px 24px rgba(250, 166, 26, 0.28);
  --radius: 18px;
  --font: "Be Vietnam Pro", system-ui, sans-serif;
  --display: "Chakra Petch", var(--font);
  --desk-header-h: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 480px at 8% -12%, rgba(237, 27, 47, 0.14), transparent 52%),
    radial-gradient(900px 420px at 108% -8%, rgba(250, 166, 26, 0.22), transparent 48%),
    radial-gradient(700px 360px at 50% 120%, rgba(241, 89, 34, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 148px;
  overflow-x: hidden;
}
.desktop-only { display: none; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-deep); }
h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: 0.02em;
  margin: 0 0 0.4em;
  color: var(--navy);
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.15rem; }
p { line-height: 1.55; }

.crumbs {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 13px; color: var(--muted); margin: 0 0 14px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--red); }
.lede { font-size: 1.05rem; }
.takeaways { background: var(--bg-2); border-radius: 14px; padding: 12px 16px; margin: 12px 0 18px; }
.takeaways ul { margin: 0; padding-left: 18px; }
.faq-list { margin: 0; }
.faq-list dt { font-weight: 650; margin-top: 12px; }
.faq-list dd { margin: 4px 0 0; color: var(--muted); }
.article-meta { font-size: 13px; }
.article-cover img, .article-thumb {
  width: 100%; height: auto; border-radius: 12px; display: block;
}
.howto-steps { padding-left: 18px; }
.howto-steps li { margin-bottom: 8px; }
.home-define { margin-bottom: 18px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: rgba(255, 248, 243, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--navy); flex-shrink: 0; }
.brand:hover { color: var(--navy); }
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 132px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}
.brand strong { display: block; line-height: 1.2; min-height: 1.2em; }
.brand small { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; min-height: 1.15em; }
.topbar-live {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 20, 82, 0.06);
  min-width: 118px; min-height: 32px; flex-shrink: 0;
}
.topbar-live b {
  color: var(--red); font-family: var(--display);
  display: inline-block; min-width: 3.2ch; font-variant-numeric: tabular-nums;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red-hot);
  box-shadow: 0 0 0 0 rgba(237, 27, 47, 0.7);
  animation: ping 1.6s infinite;
}
@keyframes ping {
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.shell { width: calc(100% - 24px); margin: 16px auto; }
.page-head { margin-bottom: 16px; }
.eyebrow {
  color: var(--red);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 700;
  margin: 0 0 6px;
}
.muted { color: var(--muted); }

.board {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,241,230,0.96)),
    linear-gradient(135deg, rgba(237, 27, 47, 0.08), rgba(250, 166, 26, 0.12));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px 16px 16px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.9);
  position: relative;
  overflow: hidden;
}
.board::before {
  content: "";
  position: absolute; inset: 0 auto auto 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--keno-orange), var(--gold));
}
.board-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.countdown-card {
  min-width: 108px; text-align: center;
  background: #fff;
  border: 1px solid rgba(237, 27, 47, 0.22);
  border-radius: 16px; padding: 10px;
  box-shadow: var(--glow-red);
}
.countdown-card span, .countdown-card small { display: block; color: var(--muted); font-size: 11px; }
.countdown-card strong {
  font-family: var(--display); font-size: 1.6rem; color: var(--red-hot);
}

.balls {
  list-style: none; padding: 14px 0 6px; margin: 0;
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px;
}
.balls li {
  aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700;
  background: radial-gradient(circle at 30% 25%, #ffd9d4, var(--red) 46%, var(--red-deep));
  color: #fff;
  box-shadow: inset 0 -4px 6px rgba(0,0,0,.18), 0 6px 12px rgba(237, 27, 47, 0.22);
  animation: pop 0.45s ease both;
}
.balls li.is-even {
  background: radial-gradient(circle at 30% 25%, #fff4cc, var(--gold) 42%, var(--gold-deep));
  color: var(--navy-deep);
  box-shadow: inset 0 -4px 6px rgba(0,0,0,.16), 0 6px 12px rgba(250, 166, 26, 0.28);
  filter: none;
}
.balls li.is-odd {
  filter: none;
}
.balls li.is-hit {
  background: radial-gradient(circle at 30% 25%, #ffe7b0, var(--gold-2) 38%, var(--keno-orange) 72%, var(--red));
  color: var(--navy-deep);
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--red), 0 8px 18px rgba(237, 27, 47, 0.35);
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip, .chip-link {
  border-radius: 999px; padding: 6px 12px; font-size: 13px;
  background: #fff; border: 1px solid var(--line); color: var(--text);
}
.chip-gold {
  border-color: rgba(250, 166, 26, 0.7);
  background: linear-gradient(180deg, #fff8e8, #fff);
  color: var(--navy);
  font-weight: 700;
}
.chip.ghost { color: var(--muted); }
.chip-link:hover { border-color: var(--red); color: var(--red); }
.chip-link.is-on {
  background: linear-gradient(180deg, var(--red-hot), var(--red));
  color: #fff;
  border-color: var(--red);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 16px; border-radius: 14px;
  border: 0; font-weight: 700; font-family: var(--font); cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-gold {
  background: linear-gradient(180deg, #ff2d2d, var(--red));
  color: #fff;
  box-shadow: var(--glow-red);
}
.btn-gold:hover { color: #fff; filter: brightness(1.05); }
.btn-ghost {
  background: #fff;
  color: var(--red);
  border: 2px solid rgba(237, 27, 47, 0.28);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red-deep); }
.text-link { color: var(--red); font-size: 14px; font-weight: 700; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 10px 28px rgba(0, 20, 82, 0.05);
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grid-2 { display: grid; gap: 12px; }

.feature-list, .topic-list, .draw-list, .pos-list, .rank { list-style: none; padding: 0; margin: 0; }
.feature-list li, .draw-list li, .pos-list li, .rank li, .topic-list li {
  padding: 10px 0; border-bottom: 1px solid rgba(0, 20, 82, 0.08);
}
.topic-list strong, .pos-list strong { display: block; }
.pill {
  display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--red); font-weight: 700; margin-bottom: 4px;
}
.article-grid { display: grid; gap: 12px; }
.article-card {
  display: block; color: inherit; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 20, 82, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.article-card:hover {
  color: inherit;
  transform: translateY(-2px);
  border-color: rgba(250, 166, 26, 0.55);
}
.article-card h3 { font-size: 1.05rem; }

/* Thông tin — news section. Scoped; do not reuse on home/live/POS. */
body.page-info {
  background: #fff;
  color: #3f3f46;
  font-size: 16px;
}
body.page-info h1,
body.page-info h2,
body.page-info h3 {
  font-family: var(--font);
  letter-spacing: -0.02em;
  color: #001452;
}
body.page-info .shell {
  width: min(760px, calc(100% - 32px));
}
body.page-info-news .shell {
  width: min(1080px, calc(100% - 32px));
}
body.page-info .card {
  border: 1px solid #ececec;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
body.page-info .takeaways {
  background: #f7f7f8;
  border-radius: 0;
  border-left: 3px solid #ed1b2f;
}

.news-masthead {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 2px 0 10px;
  border-bottom: 3px solid #ed1b2f;
}
.news-masthead h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #001452;
}
.news-pagehead {
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ececec;
}
.news-pagehead h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.news-kicker {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ed1b2f;
}
.news-sections {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 0 22px;
  border-bottom: 1px solid #ececec;
}
.news-sections::-webkit-scrollbar { display: none; }
.news-sections a {
  flex: 0 0 auto;
  padding: 10px 14px 9px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #001452;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.news-sections a:first-child { padding-left: 0; }
.news-sections a:hover,
.news-sections a.is-on {
  color: #ed1b2f;
  border-bottom-color: #ed1b2f;
}
.news-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: -8px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ececec;
}
.news-subnav a {
  color: #71717a;
  font-size: 0.875rem;
  font-weight: 500;
}
.news-subnav a:hover,
.news-subnav a.is-on {
  color: #ed1b2f;
}

.news-spotlight { margin: 0 0 8px; }
.news-lead {
  display: block;
  color: inherit;
  padding-bottom: 18px;
}
.news-lead:hover { color: inherit; }
.news-lead-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f4f4f5;
  margin: 0 0 12px;
}
.news-lead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-lead-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: #001452;
}
.news-lead:hover .news-lead-title { color: #ed1b2f; }
.news-dek {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #52525b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-dek--article {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #3f3f46;
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
  margin: 0 0 18px;
  font-weight: 500;
}
.news-lead time,
.news-sec time,
.news-row time,
.news-byline {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #a1a1aa;
}
.news-secondary {
  border-top: 1px solid #ececec;
}
.news-sec {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid #ececec;
  color: inherit;
}
.news-sec:last-child { border-bottom: 0; }
.news-sec:hover { color: inherit; }
.news-sec strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #001452;
}
.news-sec:hover strong { color: #ed1b2f; }

.news-more { margin: 12px 0 8px; }
.news-more-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0 4px;
  border-top: 1px solid #ececec;
}
.news-more-head h2,
.news-rail h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ed1b2f;
}
.news-more-all {
  font-size: 0.8125rem;
  font-weight: 600;
}
.news-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #ececec;
  color: inherit;
}
.news-row:hover { color: inherit; }
.news-thumb {
  width: 96px;
  height: 64px;
  background: #f4f4f5;
  overflow: hidden;
}
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-thumb--empty {
  border-top: 3px solid #ed1b2f;
  box-sizing: border-box;
}
.news-row-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.news-row-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  color: #001452;
}
.news-row:hover .news-row-title { color: #ed1b2f; }
.news-empty {
  margin: 28px 0;
  font-size: 0.9375rem;
  color: #71717a;
}
.news-pager {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0 8px;
  font-size: 0.875rem;
  color: #71717a;
}
.news-pager a { font-weight: 600; }

.news-article-layout { display: grid; gap: 28px; }
.news-article h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.03em;
}
.news-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ececec;
}
.news-byline span { color: #71717a; }
.news-cover { margin: 0 0 18px; }
.news-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}
.news-body {
  font-size: 1rem;
  line-height: 1.65;
  color: #3f3f46;
}
.news-faq {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid #ececec;
}
.news-rail-list { border-top: 1px solid #ececec; margin-top: 8px; }
.news-nested {
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.65;
}

.info-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.info-steps li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #ececec;
}
.info-steps li:last-child { border-bottom: 0; }
.info-steps p { margin: 4px 0 0; color: #71717a; line-height: 1.55; }
.info-step-num {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #001452;
  padding-top: 2px;
}

@media (min-width: 1024px) {
  .news-masthead h1 { font-size: 1.55rem; }
  .news-lead-title { font-size: 1.85rem; }
  .news-article h1 { font-size: 2rem; }
  .news-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.85fr);
    gap: 8px 36px;
    align-items: start;
    padding-bottom: 8px;
    border-bottom: 1px solid #ececec;
    margin-bottom: 4px;
  }
  .news-spotlight--solo { grid-template-columns: 1fr; }
  .news-lead {
    padding: 0;
    border-right: 1px solid #ececec;
    padding-right: 36px;
  }
  .news-spotlight--solo .news-lead {
    border-right: 0;
    padding-right: 0;
  }
  .news-secondary { border-top: 0; }
  .news-sec:first-child { padding-top: 0; }
  .news-row {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px 16px;
    padding: 16px 0;
  }
  .news-thumb { width: 120px; height: 80px; }
  .news-article-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 40px;
    align-items: start;
  }
  .news-rail {
    position: sticky;
    top: calc(var(--desk-header-h) + 16px);
  }
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td {
  padding: 8px 10px; text-align: left;
  border-bottom: 1px solid rgba(0, 20, 82, 0.08);
}
table.data th { color: var(--muted); font-weight: 600; background: #fff6ee; }
table.data tr:hover td { background: rgba(250, 166, 26, 0.08); }
.nums { font-family: var(--display); white-space: nowrap; }

.form label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.form input, .form select, .form textarea, .filter input, .filter select {
  width: 100%; margin-top: 6px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit;
}
.form input:focus, .form select:focus, .form textarea:focus,
.filter input:focus, .filter select:focus {
  outline: 2px solid rgba(237, 27, 47, 0.35);
  border-color: var(--red);
}
.filter { display: flex; gap: 10px; align-items: end; margin: 12px 0; }
.filter label { flex: 1; color: var(--muted); font-size: 13px; }

.picker {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 12px 0;
}
.picker button {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-family: var(--display); cursor: pointer;
}
.picker button:hover { border-color: var(--gold); }
.picker button.on {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--navy-deep);
  border-color: var(--gold-deep);
  font-weight: 700;
}

.map { height: 280px; border-radius: 18px; border: 1px solid var(--line); margin: 12px 0; }
.disclaimer, .fineprint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.flash {
  padding: 10px 12px; border-radius: 12px;
  background: #fff4e5; border: 1px solid rgba(250, 166, 26, 0.45); color: var(--navy);
}
.flash-error {
  background: #fff0f1;
  border: 1px solid rgba(237, 27, 47, 0.4);
  color: var(--red-deep);
}
.banner-strip {
  padding: 14px; border-radius: 16px; margin: 12px 0;
  background: linear-gradient(90deg, rgba(237, 27, 47, 0.1), rgba(250, 166, 26, 0.16));
  border: 1px solid var(--line);
}
.voucher .code {
  font-family: var(--display); font-size: 2.4rem; letter-spacing: 0.18em; color: var(--red);
}
.prose :is(h2,h3) { margin-top: 1em; }
.stat-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.stat-pills a {
  display: inline-flex; align-items: center;
  padding: 8px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--navy); font-weight: 700; font-size: 13px;
}
.stat-pills a:hover { border-color: var(--red); color: var(--red); }

.site-footer { width: calc(100% - 24px); margin: 24px auto 0; color: var(--muted); font-size: 13px; }
.footer-title { font-family: var(--display); font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding: 6px 2px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(0, 20, 82, 0.06);
}
.tabbar a {
  color: var(--muted); text-align: center; font-size: 10px; font-weight: 600;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  white-space: nowrap;
  position: relative;
}
@media (hover: hover) {
  .tabbar a:hover { color: var(--red); }
}
.tabbar a > span { font-size: 16px; }
.tabbar a.is-active { color: var(--red); }
/* No unread/notification pips on Cộng đồng / Thông tin / other tabs. */
.tabbar a:not(.live-tab)::before,
.tabbar a:not(.live-tab)::after,
.tabbar a:not(.live-tab) > span::before,
.tabbar a:not(.live-tab) > span::after {
  content: none;
}
.tabbar a.live-tab { white-space: normal; }
.tabbar .live-tab > .live-badge { font-size: inherit; }
.tabbar .live-tab > .live-tab-label { font-size: 9px; }

/* On-air live control — broadcast pill + Vietnamese label, not English LIVE */
.live-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--navy);
}
.live-tab:hover { color: var(--red); }
.live-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 16px;
  flex-shrink: 0;
}
.live-badge-pulse {
  position: absolute;
  inset: -4px -5px;
  border-radius: 999px;
  border: 1.5px solid rgba(237, 27, 47, 0.42);
  pointer-events: none;
  animation: live-ring 2.2s ease-out infinite;
}
.live-badge-pulse--late { animation-delay: 1.1s; }
.live-badge-face {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(165deg, #ff4d63 0%, #ff0050 42%, #ed1b2f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(180, 12, 26, 0.28),
    0 2px 8px rgba(237, 27, 47, 0.36);
}
.live-badge-led {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 38%, #ffe8ec 55%, #ffb3bc 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 7px rgba(255, 255, 255, 0.9);
  animation: live-led 1.6s ease-in-out infinite;
}
.live-badge-waves {
  display: block;
  fill: #fff;
  width: 13px;
  height: 8px;
  opacity: 0.96;
}
.live-badge-waves rect {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: live-wave 0.9s ease-in-out infinite;
}
.live-badge-waves rect:nth-child(1) { animation-delay: 0s; }
.live-badge-waves rect:nth-child(2) { animation-delay: 0.14s; }
.live-badge-waves rect:nth-child(3) { animation-delay: 0.28s; }
.live-badge-waves rect:nth-child(4) { animation-delay: 0.08s; }
.live-tab-label {
  font-weight: 700;
  line-height: 1.15;
}
.live-tab.is-active .live-badge-face {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(180, 12, 26, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 12px rgba(255, 0, 80, 0.45);
}
.live-tab--tabbar {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
}
.live-tab--tabbar .live-tab-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: center;
  max-width: 100%;
}
.live-tab--tabbar .live-tab-break { display: block; }
.live-tab--tabbar.is-active,
.live-tab--tabbar:hover { color: var(--red); }
.live-tab--desk {
  margin: 0 4px 0 10px;
  padding: 5px 14px 5px 6px;
  gap: 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(237, 27, 47, 0.16);
  box-shadow: 0 2px 10px rgba(0, 20, 82, 0.05);
  color: var(--navy);
}
.live-tab--desk .live-badge {
  width: 44px;
  height: 22px;
}
.live-tab--desk .live-badge-led {
  width: 7px;
  height: 7px;
}
.live-tab--desk .live-badge-waves {
  width: 14px;
  height: 9px;
}
.live-tab--desk .live-tab-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--navy);
}
.live-tab--desk .live-tab-break { display: inline; }
.live-tab--desk:hover,
.live-tab--desk.is-active {
  color: var(--navy);
  background: #fff;
  border-color: rgba(237, 27, 47, 0.38);
  box-shadow: 0 4px 14px rgba(237, 27, 47, 0.12);
}
.live-tab--desk:hover .live-tab-label,
.live-tab--desk.is-active .live-tab-label {
  color: var(--red);
}
@keyframes live-ring {
  0% { transform: scale(0.94); opacity: 0.55; }
  100% { transform: scale(1.28); opacity: 0; }
}
@keyframes live-led {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.35),
      0 0 7px rgba(255, 255, 255, 0.95);
  }
  50% {
    opacity: 0.72;
    transform: scale(0.86);
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.12),
      0 0 4px rgba(255, 255, 255, 0.45);
  }
}
@keyframes live-wave {
  0%, 100% { transform: scaleY(0.42); }
  50% { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .live-badge-pulse,
  .live-badge-led,
  .live-badge-waves rect { animation: none; }
}

.pos-mode {
  padding: 0;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(237, 27, 47, 0.12), transparent 50%),
    radial-gradient(800px 420px at 100% 10%, rgba(250, 166, 26, 0.2), transparent 45%),
    #fff8f3;
}
.pos-frame {
  min-height: 100vh; padding: 24px;
  display: flex; flex-direction: column; justify-content: center;
}
.pos-frame header {
  display: flex; justify-content: space-between; align-items: center; color: var(--muted);
}
.pos-frame header strong {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(90deg, var(--red-hot), var(--keno-orange));
  padding: 6px 14px;
  border-radius: 10px;
  box-shadow: var(--glow-red);
}
.pos-period { font-family: var(--display); font-size: 1.4rem; color: var(--navy); }
.balls-xl { grid-template-columns: repeat(10, 1fr); max-width: 1100px; }
.balls-xl li { font-size: 1.4rem; }
.pos-count { font-size: 2rem; margin-top: 20px; color: var(--navy); }
.pos-count strong { color: var(--red-hot); font-family: var(--display); }

.draw-list li {
  display: grid;
  grid-template-columns: 1.3fr 0.6fr auto auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 8px 0 14px;
}
.section-head h2 { margin: 0; }
.home-articles, .home-utils, .home-audiences, .stats-mobile, .stats-desktop { margin-top: 8px; }

.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 12px; }
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 10px 28px rgba(0, 20, 82, 0.05);
}
.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.kpi-card strong {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--navy);
  line-height: 1.1;
}
.kpi-card strong.accent { color: var(--red-hot); }
.kpi-card small { color: var(--muted); font-size: 12px; }

.heat-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.heat-grid li {
  text-align: center;
  background: #fff6ee;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 4px 8px;
  border-bottom: 0;
}
.heat-grid.heat-grid-5 { grid-template-columns: repeat(5, 1fr); }
.heat-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffd9d4, var(--red) 46%, var(--red-deep));
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 12px rgba(237, 27, 47, 0.22);
}
.heat-grid.is-cold .heat-num {
  background: radial-gradient(circle at 30% 25%, #e8ecff, var(--navy) 55%, var(--navy-deep));
  box-shadow: 0 6px 12px rgba(0, 20, 82, 0.2);
}
.heat-grid small { color: var(--muted); font-size: 11px; }

.chart-card h3 { font-size: 1.02rem; }
.chart-frame { position: relative; height: 200px; }
.chart-frame-line { height: 220px; }

.community-widget .btn { margin-top: 12px; width: 100%; }

.split-layout { display: grid; gap: 16px; }
.finder-layout .pos-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 16px;
  max-height: none;
}

.desk-header { display: none; }

@media (max-width: 520px) {
  .balls { grid-template-columns: repeat(5, 1fr); }
  .picker { grid-template-columns: repeat(8, 1fr); }
  .board-head { flex-direction: column; }
  .heat-grid, .heat-grid.heat-grid-5 { grid-template-columns: repeat(5, 1fr); }
  .draw-list li { grid-template-columns: 1fr auto; }
  .draw-list li b:last-child { grid-column: 2; }
}

/* Desktop website layout — 1024px+; below that stays the mobile app chrome */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .mobile-only { display: none !important; }
  .desktop-only { display: block; }

  h1 { font-size: 2.15rem; }
  h2 { font-size: 1.28rem; }

  .desk-header.desktop-only {
    display: block;
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--desk-header-h);
    background: rgba(255, 248, 243, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .desk-header-inner {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 12px 16px;
    flex-wrap: nowrap;
  }
  .brand-lg .brand-logo { height: 56px; max-width: 180px; }
  .desk-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
  }
  .desk-nav a {
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--navy);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    line-height: 1.2;
  }
  .desk-nav > a:hover,
  .desk-nav > a.is-active,
  .desk-nav-dd-trigger:hover,
  .desk-nav-dd-trigger.is-active {
    color: var(--red);
    background: rgba(237, 27, 47, 0.08);
  }
  .desk-nav-dd-menu a:hover,
  .desk-nav-more-menu a:hover,
  .desk-nav-more-menu a.is-active {
    color: var(--red);
    background: rgba(237, 27, 47, 0.08);
  }
  .desk-nav-more { position: relative; flex-shrink: 0; }
  .desk-nav-more-btn {
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--navy);
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
  }
  .desk-nav-more-btn:hover,
  .desk-nav-more.is-open .desk-nav-more-btn {
    color: var(--red);
    background: rgba(237, 27, 47, 0.08);
  }
  .desk-nav-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 2px;
    z-index: 50;
  }
  .desk-nav-more-menu[hidden] { display: none; }
  .desk-nav-dd { position: relative; flex-shrink: 0; }
  .desk-nav > a::before,
  .desk-nav > a::after,
  .desk-nav-dd-trigger::before {
    content: none;
  }
  .desk-nav-dd-trigger::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: 2px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    opacity: 0.55;
  }
  .desk-nav-dd-menu {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--shadow);
    display: none;
    grid-template-columns: 1fr;
    gap: 2px;
    z-index: 50;
  }
  .desk-nav-dd:hover .desk-nav-dd-menu,
  .desk-nav-dd:focus-within .desk-nav-dd-menu,
  .desk-nav-dd.is-open .desk-nav-dd-menu {
    display: grid;
  }
  .desk-nav-dd-menu a {
    display: block;
    padding: 10px 12px;
  }
  .desk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
  }
  .btn-cta { white-space: nowrap; }

  .shell {
    width: min(1200px, calc(100% - 48px));
    margin: 28px auto 48px;
  }
  body.page-info .shell {
    width: min(760px, calc(100% - 48px));
  }
  body.page-info-news .shell {
    width: min(1080px, calc(100% - 48px));
  }
  .shell.live-shell {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .page-head { margin-bottom: 24px; }
  .card { padding: 20px; margin: 0 0 16px; border-radius: 20px; }
  .board { padding: 22px 22px 18px; border-radius: 28px; }
  .cta-row { margin: 18px 0 8px; }

  .grid-2 { grid-template-columns: 1fr 1fr; gap: 20px; }
  .grid-2 > .card { margin: 0; }
  .article-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .home-articles .article-grid { grid-template-columns: 1fr 1fr; }

  .split-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
    gap: 24px;
    align-items: start;
  }
  .finder-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
  }
  .finder-layout .pos-list { max-height: 480px; overflow: auto; }
  .map { height: 440px; margin: 0; }

  .home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.72fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 12px;
  }
  .home-hero-main {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }
  .home-hero-main .board { flex: 1; }
  .home-hero-main .cta-row { margin-bottom: 0; margin-top: auto; }
  .home-aside.desktop-only {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
  }
  .home-aside .kpi-card { margin: 0; flex: 1; }

  .stats-desktop.desktop-only { display: block; margin: 28px 0 8px; }
  .stats-charts {
    display: grid;
    grid-template-columns: 0.9fr 0.9fr 1.2fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  .stats-charts .card { margin: 0; }
  .stats-ranks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 8px;
  }
  .stats-ranks .card { margin: 0; }
  .chart-frame { height: 220px; }
  .chart-frame-line { height: 240px; }

  .home-utils, .home-audiences { margin: 24px 0; }
  .picker { grid-template-columns: repeat(10, 1fr); gap: 8px; }
  .balls { gap: 10px; }
  .filter { max-width: 420px; }
  .prose.card { max-width: 820px; }
  form.card.form { max-width: 560px; }

  .site-footer {
    width: min(1200px, calc(100% - 48px));
    margin: 8px auto 0;
    padding: 36px 0 48px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 1fr;
    gap: 28px;
    align-items: start;
  }
  .site-footer .footer-links { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .site-footer .fineprint { margin: 0; }
}

@media (min-width: 1280px) {
  .home-articles .article-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1023px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@media (min-width: 760px) and (max-width: 1023px) {
  .article-grid { grid-template-columns: 1fr 1fr; }
}

.convert-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom));
  z-index: 29;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 248, 243, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.convert-bar .btn { flex: 1; white-space: nowrap; }

.buy-dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(400px, calc(100vw - 32px));
  box-shadow: var(--shadow);
  color: var(--text);
}
.buy-dialog::backdrop { background: rgba(0, 20, 82, 0.45); }
.buy-dialog-inner { padding: 22px; display: grid; gap: 10px; }
.buy-dialog-inner h3 { margin: 0; }
.buy-dialog-inner p { margin: 0; }

.convert-stack { display: grid; gap: 10px; margin-bottom: 12px; }
.convert-stack .btn { width: 100%; }
.fb-discussion .btn { margin-top: 12px; }

.live-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}
.live-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.live-main { min-width: 0; }
.live-stage-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 50vh;
  min-height: 50vh;
  background: #c4121a;
  border-radius: 0;
  box-shadow: none;
  container-type: size;
}
.live-sidebar {
  padding: 12px 16px 20px;
  background: var(--bg);
}
.live-cd { text-align: center; }
.live-cd strong {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  color: var(--red-hot);
  min-height: 1.2em;
  font-variant-numeric: tabular-nums;
}
.page-live .site-footer { padding-top: 16px; padding-bottom: 20px; }

@media (min-width: 1024px) and (max-width: 1399px) {
  .desk-nav > .nav-wide { display: none; }
  .desk-actions .btn-cta { font-size: 12px; padding: 0 10px; }
  .live-tab--desk { margin-left: 4px; padding: 4px 10px 4px 5px; gap: 7px; }
  .live-tab--desk .live-badge { width: 40px; height: 20px; }
  .live-tab--desk .live-tab-label { font-size: 12px; }
}
@media (min-width: 1400px) {
  .desk-nav-more { display: none; }
  .desk-header-inner { width: min(1320px, calc(100% - 48px)); }
}

@media (min-width: 1024px) {
  body.page-live {
    padding-bottom: 0;
    overflow: hidden;
  }
  .live-shell {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .live-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 0;
    align-items: stretch;
    height: calc(100dvh - var(--desk-header-h));
    min-height: 0;
    overflow: hidden;
  }
  .live-main,
  .live-stage-frame {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }
  .live-sidebar {
    height: 100%;
    min-height: 0;
    overflow: auto;
    padding: 16px 16px 20px;
    border-left: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    flex-direction: column;
  }
  .live-sidebar .live-cd { flex-shrink: 0; }
  .live-sidebar .fb-discussion {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin-bottom: 0;
  }
  .page-live .site-footer { display: none; }
}
