/* ============================================
   หุ้นรัสเซีย ST - Russian Flag Theme
   พื้นขาว · น้ำเงิน · แดง
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Russian flag colors */
  --rus-white: #ffffff;
  --rus-blue: #0039a6;        /* Pantone 286C - น้ำเงินรัสเซีย */
  --rus-blue-light: #2c5fb8;
  --rus-blue-dark: #002171;
  --rus-red: #d52b1e;          /* Pantone 485C - แดงรัสเซีย */
  --rus-red-light: #e85751;
  --rus-red-dark: #a01510;

  /* Surfaces (light theme) */
  --bg-page: #f6f9fc;
  --bg-card: #ffffff;
  --bg-elev: #f0f4fa;
  --bg-dark-section: #0a1942;  /* dark accent for ticker tape */

  --border: rgba(0,57,166,0.08);
  --border-strong: rgba(0,57,166,0.18);

  --text: #1a2138;
  --text-secondary: #5d6985;
  --text-dim: #8b91a3;
  --text-muted: #b8bdcc;

  --gold: #d4a937;
  --green: #15803d;            /* สำหรับ trend up */
  --green-glow: rgba(21,128,61,0.3);
  --red-glow: rgba(213,43,30,0.3);
  --blue-glow: rgba(0,57,166,0.25);

  --font-display: 'Russo One', 'Bebas Neue', sans-serif;
  --font-sans: 'Prompt', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html, body {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Soft pattern background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(0,57,166,0.05), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(213,43,30,0.04), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ============ Flag Stripe (top accent) ============ */
.flag-stripe {
  display: flex;
  height: 6px;
  position: relative;
  z-index: 11;
}
.flag-stripe .stripe { flex: 1; height: 100%; }
.flag-stripe .stripe-white { background: var(--rus-white); border-bottom: 1px solid rgba(0,57,166,0.15); }
.flag-stripe .stripe-blue { background: var(--rus-blue); }
.flag-stripe .stripe-red { background: var(--rus-red); }

/* ============ Ticker Tape ============ */
.ticker-tape {
  background: linear-gradient(90deg, var(--rus-blue-dark) 0%, var(--rus-blue) 50%, var(--rus-blue-dark) 100%);
  color: #fff;
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 10;
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: tickerScroll 45s linear infinite;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.ticker-sym { color: var(--gold); font-weight: 700; }
.ticker-val { color: #fff; }
.ticker-chg.up { color: #6ee7b7; }
.ticker-chg.down { color: #fda4af; }

/* ============ Header ============ */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(0,57,166,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0,57,166,0.25);
  border: 1px solid var(--border-strong);
}
.brand-mark .mark-stripe { flex: 1; }
.brand-mark .mark-white { background: var(--rus-white); }
.brand-mark .mark-blue { background: var(--rus-blue); }
.brand-mark .mark-red { background: var(--rus-red); }
.brand-logo { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.brand-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--rus-blue-dark);
  line-height: 1.1;
}
.brand-sub {
  font-size: 10px;
  color: var(--rus-red);
  letter-spacing: 2px;
  font-family: var(--font-mono);
  margin-top: 4px;
  font-weight: 500;
}

.header-info { display: flex; align-items: center; gap: 16px; }
.market-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--rus-red);
  letter-spacing: 2px;
  font-weight: 700;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rus-red);
  box-shadow: 0 0 8px var(--red-glow);
}
.status-dot.live { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.server-clock {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--rus-blue-dark);
  letter-spacing: 1px;
  background: var(--bg-elev);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-weight: 600;
}

/* ============ Hero Banner ============ */
.hero-banner {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}

/* ============ Announcement ============ */
.announcement-bar {
  background: linear-gradient(90deg, rgba(213,43,30,0.06), rgba(213,43,30,0.02));
  border-bottom: 1px solid rgba(213,43,30,0.15);
  padding: 10px 0;
  font-size: 13px;
  color: var(--rus-red-dark);
}

/* ============ Main ============ */
.main { padding: 30px 20px 60px; }

/* ============ Trading Floor ============ */
.trading-floor { margin-bottom: 40px; }

.floor-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .floor-grid { grid-template-columns: 1fr; }
}

/* Main Result Display */
.result-display {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,57,166,0.06);
}
.result-display::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rus-white) 0%, var(--rus-white) 33%, var(--rus-blue) 33%, var(--rus-blue) 66%, var(--rus-red) 66%, var(--rus-red) 100%);
}

.display-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.label-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--rus-blue);
  letter-spacing: 3px;
  font-weight: 700;
}
.label-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Big Number Display */
.big-number {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.big-number .digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 96px;
  background: linear-gradient(180deg, var(--rus-white) 0%, #eef2f8 50%, var(--rus-white) 100%);
  border: 2px solid var(--rus-blue);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 700;
  color: var(--rus-blue-dark);
  box-shadow:
    inset 0 2px 8px rgba(0,57,166,0.06),
    0 4px 12px rgba(0,57,166,0.12);
  position: relative;
}
.big-number .digit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 1px;
  background: rgba(0,57,166,0.1);
  pointer-events: none;
}
@media (max-width: 600px) {
  .big-number .digit {
    width: 50px;
    height: 70px;
    font-size: 36px;
  }
}

/* Rolling animation */
.big-number.rolling .digit { animation: digitRoll 0.15s linear infinite; }
@keyframes digitRoll {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* Spin animation */
.big-number .digit.spinning { animation: digitShake 0.06s linear infinite; }
@keyframes digitShake {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.big-number .digit.revealed { animation: digitReveal 0.7s ease-out; }
@keyframes digitReveal {
  0% { transform: scale(1); border-color: var(--rus-blue); }
  30% {
    transform: scale(1.18);
    border-color: var(--rus-red);
    background: linear-gradient(180deg, #fff5f5 0%, #ffe8e6 50%, #fff5f5 100%);
    color: var(--rus-red);
    box-shadow:
      inset 0 0 20px rgba(213,43,30,0.15),
      0 0 24px rgba(213,43,30,0.4);
  }
  100% { transform: scale(1); border-color: var(--rus-blue); }
}

.trend-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 20px;
}
.trend.up { color: var(--green); font-weight: 600; }
.trend.down { color: var(--rus-red); font-weight: 600; }
.trend-sep { color: var(--text-muted); }
.dot.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rus-red);
  animation: pulse 1.5s infinite;
}

/* Prize Cards */
.prize-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.prize-grid.prize-grid-3 {
  grid-template-columns: 1fr 1.3fr 1fr;
}
@media (max-width: 600px) {
  .prize-grid.prize-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .prize-grid.prize-grid-3 .prize-card-main {
    grid-column: 1 / -1;
    order: -1;
  }
}
.prize-card {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.prize-card:nth-child(1) {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(0,57,166,0.04) 100%);
  border-color: rgba(0,57,166,0.25);
}
.prize-card-main {
  background: linear-gradient(180deg, #fef8f6 0%, #fff 100%);
  border-color: rgba(213,43,30,0.35);
  box-shadow: 0 4px 16px rgba(213,43,30,0.1);
}
.prize-card-main::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--rus-red);
}
.prize-card:nth-child(3) {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(0,57,166,0.04) 100%);
  border-color: rgba(0,57,166,0.25);
}
.prize-card-main .prize-number {
  font-size: 32px;
  color: var(--rus-red);
}
.prize-label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.prize-number {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--rus-blue-dark);
  letter-spacing: 3px;
}
.prize-number .dim { color: var(--text-muted); }

/* ============ Side Panel ============ */
.side-panel { display: flex; flex-direction: column; gap: 16px; }

/* Jackpot */
.jackpot-box {
  background: linear-gradient(135deg, var(--rus-red) 0%, var(--rus-red-dark) 100%);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(213,43,30,0.25);
}
.jackpot-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rus-white) 0%, var(--rus-white) 33%, var(--rus-blue) 33%, var(--rus-blue) 66%, var(--rus-red) 66%);
}
.jackpot-box::after {
  content: '';
  position: absolute;
  top: -30%; left: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 60%);
}
.jp-label {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.9);
  position: relative;
  margin-top: 6px;
}
.jp-amount {
  font-family: var(--font-display);
  font-size: 38px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin: 4px 0;
  letter-spacing: 1px;
  position: relative;
}
.jp-unit {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 3px;
  position: relative;
}

/* Countdown */
.countdown-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,57,166,0.05);
}
.cd-label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  font-family: var(--font-mono);
  margin-bottom: 4px;
  font-weight: 600;
}
.cd-target {
  font-size: 13px;
  color: var(--rus-red);
  margin-bottom: 12px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  font-weight: 600;
}
.cd-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.cd-cell {
  background: var(--rus-blue);
  border-radius: 6px;
  padding: 8px 10px;
  min-width: 56px;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.cd-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.cd-unit {
  font-size: 9px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 1px;
  margin-top: 2px;
}
.cd-sep {
  font-family: var(--font-mono);
  color: var(--rus-blue);
  font-size: 20px;
  font-weight: 700;
}

/* Market Mini */
.market-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0,57,166,0.05);
}
.mm-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--rus-red);
  letter-spacing: 3px;
  margin-bottom: 10px;
  font-weight: 700;
}
.mm-chart {
  height: 60px;
  margin-bottom: 10px;
  background: var(--bg-elev);
  border-radius: 6px;
  padding: 4px;
}
.mm-chart svg { width: 100%; height: 100%; }
.mm-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.mm-stat { display: flex; justify-content: space-between; padding: 3px 0; }
.mm-key { color: var(--text-dim); }
.mm-val { color: var(--text); font-weight: 600; }
.mm-val.up { color: var(--green); }
.mm-val.down { color: var(--rus-red); }

/* ============ History Section ============ */
.history-section { margin-bottom: 40px; }

.section-head { margin-bottom: 16px; }
.section-head h2 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--rus-blue-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.head-icon { font-size: 20px; }
.head-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 1px;
}

/* History Table */
.history-table {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,57,166,0.05);
}
.ht-head, .ht-row {
  display: grid;
  grid-template-columns: 50px 1.1fr 1.5fr 0.8fr 0.9fr 0.8fr;
  align-items: center;
  padding: 12px 16px;
  gap: 8px;
}
.ht-head {
  background: var(--rus-blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}
.ht-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.ht-row:last-child { border-bottom: none; }
.ht-row:hover { background: var(--bg-elev); }
.ht-row.is-latest {
  background: linear-gradient(90deg, rgba(213,43,30,0.05), transparent);
  border-left: 3px solid var(--rus-red);
}
.ht-col.mono {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 2px;
}
.col-no { color: #fff; font-family: var(--font-mono); font-size: 12px; }
.col-num {  font-size: 16px; }
.col-3 { color: var(--rus-red); font-size: 14px; font-weight: 700; }
.col-2, .col-2top {  font-size: 14px; }
.date-main { font-size: 13px; color: var(--text); font-weight: 500; }
.date-time { font-size: 11px; color: var(--text-secondary); font-family: var(--font-mono); }

.badge-new {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 7px;
  background: var(--rus-red);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 1px;
  animation: pulse 2s infinite;
}

@media (max-width: 700px) {
  .ht-head { display: none; }
  .ht-row {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
      'no no date'
      'num num num'
      'two three twotop';
    padding: 14px;
    gap: 10px 8px;
  }
  .col-no { grid-area: no; }
  .col-date { grid-area: date; text-align: right; }
  .col-num { grid-area: num; text-align: center; font-size: 22px; padding: 8px; background: rgba(0,57,166,0.06); border-radius: 6px; }
  .col-2 { grid-area: two; text-align: center; padding: 6px; background: rgba(0,57,166,0.04); border-radius: 6px; }
  .col-3 { grid-area: three; text-align: center; padding: 6px; background: rgba(213,43,30,0.06); border-radius: 6px; }
  .col-2top { grid-area: twotop; text-align: center; padding: 6px; background: rgba(0,57,166,0.04); border-radius: 6px; }
  .col-2::before { content: '2 ล่าง '; font-size: 10px; color: var(--text-dim); font-family: var(--font-sans); font-weight: 400; }
  .col-3::before { content: '3 บน '; font-size: 10px; color: var(--text-dim); font-family: var(--font-sans); font-weight: 400; }
  .col-2top::before { content: '2 บน '; font-size: 10px; color: var(--text-dim); font-family: var(--font-sans); font-weight: 400; }
}

/* Empty State */
.empty-state {
  background: var(--bg-card);
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 50px 20px;
  text-align: center;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.empty-title { font-size: 16px; color: var(--text); margin-bottom: 4px; font-weight: 500; }
.empty-sub { font-size: 12px; color: var(--text-secondary); }

/* ============ Info Section ============ */
.info-section { margin-bottom: 40px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,57,166,0.04);
}
.info-card:hover {
  border-color: var(--rus-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(213,43,30,0.1);
}
.info-icon { font-size: 28px; margin-bottom: 10px; }
.info-title {
  font-size: 14px;
  color: var(--rus-blue-dark);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 1px;
}
.info-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.info-link { color: var(--rus-red); text-decoration: none; font-weight: 600; }
.info-link:hover { text-decoration: underline; }
.time-row { padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13px; color: var(--text); }
.time-row:last-child { border-bottom: none; }
.time-row strong { color: var(--rus-red); font-family: var(--font-mono); font-weight: 700; }

/* ============ Footer ============ */
.footer {
  background: var(--rus-blue-dark);
  color: #fff;
  padding: 24px 0;
  position: relative;
  z-index: 1;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rus-white) 0%, var(--rus-white) 33%, var(--rus-blue) 33%, var(--rus-blue) 66%, var(--rus-red) 66%);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand { font-size: 14px; color: #fff; font-weight: 600; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 4px; }
.footer-right { display: flex; gap: 12px; }
.footer-link {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  transition: all 0.2s;
}
.footer-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

/* Confetti */
.confetti-piece {
  position: fixed;
  pointer-events: none;
  z-index: 100;
}

/* ===== MOBILE-FIX v1 (หน้าบ้าน) — ต่อท้าย style.css ===== */
/* กันล้นแนวนอนทุกกรณี */
html, body { overflow-x: hidden !important; max-width: 100vw; }
img, svg { max-width: 100%; height: auto; }
canvas { max-width: 100%; }
.container { max-width: 100%; }

/* หัวเว็บ: ให้ wrap ได้ ไม่ดันกันจนล้น */
.header-inner { flex-wrap: wrap; row-gap: 10px; }
.brand { min-width: 0; }
.brand-text { min-width: 0; }
.brand-sub { white-space: normal; word-break: break-word; }
.header-info { margin-left: auto; }

/* ป้องกันข้อความ/ตัวเลขยาวดันกล่อง */
.how-box, .how-desc, .info-desc, .announcement-bar { word-break: break-word; overflow-wrap: anywhere; }
.prize-card, .result-display, .side-panel > * { min-width: 0; }
.floor-grid > * { min-width: 0; }

/* จอ ≤ 480px */
@media (max-width: 480px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .container { padding-left: 12px; padding-right: 12px; }
  .brand-title { font-size: 19px; }
  .brand-sub { font-size: 8px; letter-spacing: 1px; }
  .server-clock { font-size: 12px; padding: 4px 8px; }
  .prize-number { letter-spacing: 1px; font-size: 22px; }
  .prize-card-main .prize-number { font-size: 26px; }
  .jp-amount { font-size: 28px; }
  .cd-cell { min-width: 46px; padding: 6px 6px; }
  .cd-num { font-size: 18px; }
}

/* จอเล็กมาก ≤ 380px (iPhone SE/จอเก่า) */
@media (max-width: 380px) {
  /* เว็บเลขชุด 5 หลัก */
  .big-number { gap: 4px; }
  .big-number .digit { width: 38px; height: 54px; font-size: 26px; border-width: 1.5px; }
  /* เว็บค่าดัชนีทศนิยม */
  .index-result { font-size: 26px; letter-spacing: 0; }
  .index-result .ir-hl-top, .index-result .ir-hl-low { border-bottom-width: 2px; }
  .lc-price { font-size: 20px; }
  .lc-change { font-size: 12px; }
  .lc-index-name { font-size: 14px; }
  .prize-grid.prize-grid-3 { gap: 8px; }
  .jp-amount { font-size: 24px; }
  .footer-inner { justify-content: center; text-align: center; }
}
/* ===== END MOBILE-FIX v1 ===== */
