/* =========================================================
   SG Alerts - Clean Responsive CSS
   ========================================================= */

/* =========================
   1. GLOBAL / VARIABLES
   ========================= */

* {
  box-sizing: border-box;
}

:root {
  --bg: #f10101d5;
  --card: rgba(255, 255, 255, 0.747);
  --panel: #ffffff;
  --result: #f8fafc;

  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;

  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #f97316;
  --purple: #8b5cf6;
}

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

/* =========================
   2. HEADER
   ========================= */

header {
  background: linear-gradient(135deg, #2563eb 0%, #ff0a0a 100%);
  color: white;
  text-align: center;
  padding: 40px 18px 44px;
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.18);
}

header h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

header p {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.92;
}

/* =========================
   3. LAYOUT / CARDS
   ========================= */

.grid {
  max-width: 1240px;
  margin: 26px auto;
  padding: 0 18px 44px;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.wide-card {
  grid-column: span 2;
}

.half-card {
  grid-column: span 1;
}

.card {
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(240, 229, 226, 0.9);
  border-radius: 22px;
  padding: 22px;

  box-shadow:
    0 12px 34px rgba(15, 23, 42, 0.07),
    0 2px 10px rgba(15, 23, 42, 0.04);
}

.news-card { border-top: 5px solid #ef4444; }
.checkpoint-card { border-top: 5px solid #0ea5e9; }
.sgpools-card { border-top: 5px solid var(--blue); }
.coe-card { border-top: 5px solid var(--orange); }
.petrol-card { border-top: 5px solid var(--green); }
.bto-card { border-top: 5px solid var(--red); }
.quick-card { border-top: 5px solid var(--purple); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.card h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.5px;
}

.card h2::before {
  margin-right: 9px;
}

.news-card h2::before { content: "🚨"; }
.checkpoint-card h2::before { content: "🚗"; }
.sgpools-card h2::before { content: "🎲"; }
.coe-card h2::before { content: "🚗"; }
.petrol-card h2::before { content: "⛽"; }
.bto-card h2::before { content: "🏠"; }
.quick-card h2::before { content: "🇸🇬"; }

.card p {
  margin: 0 0 15px;
  font-size: 14px;
  color: #475569;
}

.result {
  margin-top: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
  border: 1px solid var(--border);
  border-radius: 18px;
}

.note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}

/* =========================
   4. SHARED COMPONENTS
   ========================= */

.card-header a,
.row a,
.quick-tile a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 12px;
  border-radius: 999px;

  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  text-decoration: none;

  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

button,
.lucky-actions button {
  border: none;
  border-radius: 10px;
  padding: 8px;

  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;

  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.hide-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: none;
  background: rgba(220, 38, 38, 0.08);
  color: var(--red);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.refresh-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: none;

  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);

  font-size: 12px;
  font-weight: 750;
  line-height: 1;

  cursor: pointer;
  white-space: nowrap;
}

.refresh-btn:hover {
  background: rgba(37, 99, 235, 0.15);
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;

  padding: 9px 0;
  border-bottom: 1px dashed #d4dce8;
  font-size: 13px;
}

.row:last-child {
  border-bottom: none;
}

.row strong {
  text-align: right;
  white-space: nowrap;
  font-size: 13px;
}

.up { color: var(--red); }
.down { color: var(--green); }

/* =========================
   5. NEWS CAROUSEL
   ========================= */

.news-card {
  overflow: hidden;
}

.news-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.news-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.news-controls button {
  width: 30px;
  height: 30px;
  padding: 0;

  border: none;
  border-radius: 50%;

  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;

  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.news-scroller {
  width: 100%;
  max-width: 100%;

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 300px;
  gap: 12px;

  overflow-x: auto;
  overflow-y: hidden;

  padding: 4px 4px 12px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.news-card-item {
  scroll-snap-align: start;

  min-width: 0;
  min-height: 150px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;

  padding: 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;

  text-decoration: none;
  color: var(--text);

  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.news-card-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.news-card-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.news-tag {
  align-self: flex-start;

  font-size: 11px;
  font-weight: 850;
  padding: 5px 9px;
  border-radius: 999px;

  background: #e2e8f0;
  color: #334155;
}

.news-crime {
  background: #fee2e2;
  color: #b91c1c;
}

.news-traffic,
.news-transport {
  background: #ffedd5;
  color: #c2410c;
}

.news-fire {
  background: #fef3c7;
  color: #b45309;
}

.news-housing {
  background: #dcfce7;
  color: #15803d;
}

.news-money {
  background: #dbeafe;
  color: #1d4ed8;
}

/* =========================
   6. CHECKPOINT
   ========================= */

.checkpoint-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkpoint-group h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 850;
}

.checkpoint-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.checkpoint-camera {
  display: block;
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  cursor: zoom-in;
}

.checkpoint-camera img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e2e8f0;
}

.checkpoint-camera span {
  display: block;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
}

.checkpoint-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Image Modal */

.image-modal {
  display: none;

  position: fixed;
  z-index: 99999;

  inset: 0;

  background: rgba(0, 0, 0, 0.9);

  align-items: center;
  justify-content: center;

  padding: 20px;
}

.image-modal.show {
  display: flex;
}

.image-modal-content {
  max-width: 95%;
  max-height: 90vh;

  border-radius: 12px;
  object-fit: contain;
}

.image-modal-close {
  position: absolute;

  top: 20px;
  right: 25px;

  color: white;
  font-size: 42px;
  font-weight: bold;

  cursor: pointer;
}

.image-modal-caption {
  position: absolute;
  bottom: 20px;

  color: white;
  font-size: 14px;
}

/* =========================
   7. SINGAPORE POOLS
   ========================= */

.sgpools-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 14px;
  align-items: start;
}

.pool-side-grid {
  display: grid;
  gap: 12px;
}

.pool-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.pool-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.pool-panel-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.1;
}

.pool-panel-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
  line-height: 1.2;
}

.pool-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 11px;
}

.pool-summary-strip span {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--muted);
}

.pool-summary-strip strong {
  color: var(--text);
}

.sgpools-prizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.sgpools-prize {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px;
  text-align: center;
}

.sgpools-prize span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}

.sgpools-prize strong {
  font-size: 21px;
  color: var(--text);
}

.sgpools-prize.first strong {
  color: var(--red);
}

.pool-number-section {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pool-number-section h4 {
  margin: 0 0 7px;
  font-size: 13px;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 6px;
}

.number-grid span {
  min-width: 0;
  min-height: 36px;
  padding: 0 6px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 10px;

  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;

  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.toto-numbers,
.toto-lucky {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.toto-numbers {
  margin-top: 8px;
}

.toto-numbers span,
.toto-lucky span {
  width: 34px;
  height: 34px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;

  font-size: 14px;
  font-weight: 850;
}

.toto-additional {
  margin-top: 9px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
}

.toto-additional span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.toto-additional strong {
  font-size: 22px;
  color: var(--red);
}

.lucky-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 850;
}

.lucky-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.lucky-result {
  margin-top: 9px;
  min-height: 40px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 9px;
  color: #475569;
  font-size: 12px;
}

.four-d-lucky {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--red);
  text-align: center;
}

.lucky-additional {
  margin-top: 8px;
  color: #475569;
  font-size: 12px;
}

.lucky-additional strong {
  color: var(--red);
  font-size: 18px;
}

.lucky-box small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.gambling-hidden-box {
  padding: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   8. PETROL
   ========================= */

.petrol-table {
  width: 100%;
}

.petrol-header,
.petrol-row {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, 1fr);
  gap: 12px;
  align-items: center;
}

.petrol-header {
  padding: 10px 0;
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  border-bottom: 2px solid #d0d5dd;
}

.petrol-row {
  padding: 11px 0;
  border-bottom: 1px dashed #d0d5dd;
  font-size: 13px;
}

.petrol-row:last-child {
  border-bottom: none;
}

.petrol-row span {
  font-weight: 800;
}

.brand-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-cell img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: 4px;
  border: 1px solid var(--border);
}

.na {
  color: #b6bec9;
  font-style: italic;
  font-weight: 600;
}

.cheapest {
  color: var(--green);
  font-weight: 900;
}

.cheapest small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--green);
}

.petrol-movement {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.petrol-up {
  color: var(--red);
}

.petrol-down {
  color: var(--green);
}

.petrol-flat {
  color: var(--muted);
  font-weight: 700;
}

/* Petrol extra info */

.petrol-extra-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.petrol-discount-panel,
.petrol-effective-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.petrol-discount-panel h3,
.petrol-effective-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 850;
}

.petrol-discount-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.petrol-discount-card {
  text-decoration: none;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 8px;
  text-align: center;
}

.petrol-discount-card img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

.petrol-discount-card strong,
.petrol-discount-card small {
  display: block;
}

.petrol-discount-card span {
  display: block;
  margin: 6px 0 4px;
  font-size: 22px;
  font-weight: 900;
  color: var(--green);
}

.petrol-discount-card small {
  font-size: 10px;
  color: var(--muted);
}

.effective-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.effective-title-row h3 {
  margin: 0;
}

.fuel-selector {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.effective-fuel-note {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.effective-empty {
  padding: 14px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}

.effective-table {
  width: 100%;
}

.effective-header,
.effective-table-row {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.4fr 0.9fr;
  gap: 12px;
  align-items: center;
}

.effective-header {
  padding: 8px 0;
  border-bottom: 2px solid #d0d5dd;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.effective-table-row {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}

.effective-table-row:last-child {
  border-bottom: none;
}

.effective-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.effective-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
}

.effective-table-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.effective-price {
  color: var(--green);
  font-size: 16px;
}

.petrol-discount-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

/* =========================
   9. BTO
   ========================= */

.bto-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.bto-tile {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 13px;

  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bto-town {
  display: block;
  font-size: 16px;
  font-weight: 850;
}

.bto-tile p {
  margin: 6px 0 4px;
  font-size: 13px;
  color: #334155;
}

.bto-tile small {
  color: var(--muted);
}

.bto-status {
  text-align: right;
  white-space: nowrap;
}

.bto-status strong {
  display: block;
  color: var(--green);
  font-size: 13px;
}

/* =========================
   10. QUICK INFO
   ========================= */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-tile {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 14px;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.quick-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.quick-tile strong {
  font-size: 21px;
}

.quick-tile p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #475569;
}

/* =========================
   11. STATIC PAGES
   ========================= */

.page-container {
  max-width: 800px;
  margin: 42px auto 80px;
  padding: 0 18px;
}

.page-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;

  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.10),
    0 2px 10px rgba(15, 23, 42, 0.04);
}

.page-card h1 {
  margin: 0 0 20px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-card p {
  font-size: 16px;
  line-height: 1.85;
  color: #334155;
}

.page-meta {
    color: #7a869a;
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 30px;
}

.back-link {
  display: inline-block;
  margin-top: 26px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* =========================
   12. FOOTER
   ========================= */

.site-footer {
  background: #07122f;
  color: #fff;
  text-align: center;
  padding: 34px 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.footer-links a,
.site-footer > a {
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
  transition: 0.2s;
  font-size: 14px;
}

.footer-links a:hover,
.site-footer > a:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

/* =========================
   13. ANIMATIONS
   ========================= */

.rolling {
  opacity: 0.7;
  transform: scale(0.98);
}

.final {
  animation: popIn 0.35s ease;
}

.toto-lucky span {
  animation: ballRoll 0.2s linear;
}

@keyframes popIn {
  0% {
    transform: scale(0.7);
    opacity: 0.3;
  }

  60% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes ballRoll {
  0% {
    transform: translateY(-8px) scale(0.9);
    opacity: 0.5;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* =========================
   14. TABLET
   ========================= */

@media screen and (max-width: 1024px) {
  .grid {
    max-width: 900px;
    grid-template-columns: 1fr;
  }

  .wide-card,
  .half-card {
    grid-column: span 1;
  }

  .sgpools-layout {
    grid-template-columns: 1fr;
  }

  .pool-number-section {
    grid-template-columns: 1fr 1fr;
  }

  .news-scroller {
    grid-auto-columns: 300px;
  }
}

/* =========================
   15. MOBILE
   ========================= */

@media screen and (max-width: 768px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 32%),
      linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  }

  header {
    padding: 24px 14px 28px;
  }

  header h1 {
    font-size: clamp(24px, 8vw, 30px);
    line-height: 1.2;
    margin-bottom: 6px;
  }

  header p {
    max-width: 34ch;
    font-size: 13px;
    line-height: 1.45;
  }

  .grid {
    width: 100%;
    max-width: 100%;
    margin: 12px auto;
    padding: 0 10px 34px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .wide-card,
  .half-card {
    grid-column: span 1;
  }

  .card {
    width: 100%;
    padding: 14px;
    border-radius: 18px;
  }

  .card-header {
    gap: 8px;
  }

  .card h2 {
    font-size: 18px;
    line-height: 1.2;
  }

  .card p {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .card-header a,
  .row a,
  .quick-tile a,
  .hide-btn,
  .refresh-btn {
    font-size: 10px;
    padding: 6px 8px;
  }

  .card-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .result {
    padding: 10px;
    border-radius: 15px;
  }

  .note {
    font-size: 9px;
    line-height: 1.35;
  }

  .news-topbar {
    align-items: center;
    font-size: 10px;
  }

  .news-controls button {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }

  .news-scroller {
    grid-auto-columns: 100%;
    gap: 10px;
    padding: 4px 0 12px;
  }

  .news-card-item {
    min-height: 118px;
    padding: 12px;
  }

  .news-card-item strong {
    font-size: 13px;
    line-height: 1.35;
  }

  .news-card-item small {
    font-size: 10px;
  }

  .news-tag {
    font-size: 10px;
    padding: 4px 8px;
  }

  .checkpoint-layout {
    grid-template-columns: 1fr;
  }

  .checkpoint-grid {
    grid-template-columns: 1fr;
  }

  .sgpools-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pool-panel {
    padding: 12px;
    border-radius: 14px;
  }

  .pool-panel-title {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 9px;
  }

  .pool-panel-title h3 {
    font-size: 15px;
  }

  .pool-panel-title span {
    font-size: 10px;
    text-align: left;
  }

  .pool-summary-strip {
    gap: 5px;
    margin-bottom: 9px;
  }

  .pool-summary-strip span {
    padding: 4px 7px;
    font-size: 10px;
  }

  .sgpools-prizes {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .sgpools-prize {
    padding: 8px 4px;
  }

  .sgpools-prize span {
    font-size: 9px;
  }

  .sgpools-prize strong {
    font-size: 17px;
  }

  .pool-number-section {
    grid-template-columns: 1fr;
    gap: 11px;
    margin-top: 11px;
  }

  .pool-number-section h4 {
    font-size: 12px;
  }

  .number-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .number-grid span {
    width: 100%;
    min-width: 0;
    height: 34px;
    min-height: 34px;
    padding: 0 3px;

    font-size: 11px;
    border-radius: 9px;
    white-space: nowrap;
  }

  .toto-numbers {
    justify-content: flex-start;
  }

  .toto-numbers span,
  .toto-lucky span {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .lucky-actions {
    grid-template-columns: 1fr 1fr;
  }

  .lucky-actions button {
    width: 100%;
    font-size: 12px;
  }

  .lucky-result {
    font-size: 11px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 9px 0;
    font-size: 11px;
  }

  .row strong {
    text-align: left;
    font-size: 11px;
  }

  .petrol-header,
  .petrol-row {
    min-width: 0;
    width: 100%;
    grid-template-columns: 1.35fr repeat(5, 0.8fr);
    gap: 4px;
    font-size: 10px;
  }

  .brand-cell {
    gap: 5px;
  }

  .brand-cell img {
    width: 22px;
    height: 22px;
    padding: 3px;
  }

  .cheapest small {
    font-size: 8px;
  }

  .petrol-discount-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .effective-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .fuel-selector {
    width: 100%;
  }

  .effective-header {
    display: none;
  }

  .effective-table-row {
    grid-template-columns: 1fr;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
  }

  .effective-price {
    font-size: 18px;
  }

  .bto-grid,
  .quick-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .bto-tile,
  .quick-tile {
    flex-direction: column;
    padding: 12px;
  }

  .bto-town {
    font-size: 15px;
  }

  .bto-status {
    text-align: left;
  }

  .quick-tile strong {
    font-size: 18px;
  }

  .quick-tile p {
    font-size: 11px;
    line-height: 1.4;
  }

  .quick-tile a {
    align-self: flex-start;
  }

  .page-container {
    margin: 24px auto 50px;
    padding: 0 12px;
  }

  .page-card {
    padding: 24px;
    border-radius: 20px;
  }

  .page-card p {
    font-size: 14px;
    line-height: 1.75;
  }

  .footer-links {
    gap: 18px;
  }

  .footer-copy {
    font-size: 12px;
    line-height: 1.5;
  }
}

/* =========================
   16. SMALL MOBILE
   ========================= */

@media screen and (max-width: 420px) {
  .grid {
    padding: 0 8px 30px;
  }

  .card {
    padding: 12px;
  }

  .card h2 {
    font-size: 17px;
  }

  .result {
    padding: 9px;
  }

  .news-scroller {
    grid-auto-columns: 100%;
  }

  .news-card-item {
    min-height: 110px;
    padding: 11px;
  }

  .news-card-item strong {
    font-size: 12px;
  }

  .pool-panel {
    padding: 10px;
  }

  .pool-panel-title h3 {
    font-size: 14px;
  }

  .pool-panel-title span {
    font-size: 9px;
  }

  .sgpools-prize strong {
    font-size: 16px;
  }

  .number-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .number-grid span {
    height: 32px;
    min-height: 32px;
    padding: 0 2px;
    font-size: 10px;
    border-radius: 8px;
  }

  .toto-numbers span,
  .toto-lucky span {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .petrol-header,
  .petrol-row {
    grid-template-columns: 1.2fr repeat(5, 0.72fr);
    gap: 3px;
    font-size: 9px;
  }

  .brand-cell img {
    width: 20px;
    height: 20px;
  }
}
