/* ຫວຍລາວພະບາງ — result board แบบสกรีนช็อต (พื้นเหลือง/ลูกบอลชมพู/เลขเหลือง) + frame สะอาด */
:root {
  --pink: #f6134a;      /* ลูกบอล + ป้าย */
  --pink-d: #d1093b;
  --yellow: #ffed00;    /* เลขในบอล */
  --board: #ffe100;     /* พื้นกระดานเหลือง */
  --red: #b3001b;       /* header */
  --ink: #241820;
  --muted: #8a7d84;
  --bg: #fff4f7;
  --card: #ffffff;
  --line: #f3d3dd;
  --blue: #2160c4;
  --sans: "Noto Sans Lao", "Sarabun", "Leelawadee UI", system-ui, "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.hd { background: linear-gradient(135deg, var(--red), #e0143a); color: #fff; }
.hd__in { max-width: 1060px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px clamp(12px,3vw,24px); flex-wrap: wrap; }
.hd__brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; }
.hd__seal { background: var(--yellow); color: var(--red); font-weight: 800; font-size: 15px; line-height: 1; text-align: center; padding: 8px 9px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.hd__name { display: flex; flex-direction: column; font-weight: 800; font-size: clamp(19px,4vw,26px); }
.hd__name small { font-weight: 500; font-size: 12px; color: var(--yellow); margin-top: 1px; }
.hd__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hd__official { background: var(--yellow); color: var(--red); font-size: 11.5px; font-weight: 800; padding: 3px 11px; border-radius: 999px; }
.hd__clock { font-size: 12.5px; color: #ffe0e6; font-variant-numeric: tabular-nums; }
.nav { background: rgba(0,0,0,.18); }
.nav__in { max-width: 1060px; margin: 0 auto; display: flex; flex-wrap: wrap; padding: 0 clamp(6px,2vw,16px); }
.nav__link { color: #fff; text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 10px 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav__link:hover { color: var(--yellow); border-bottom-color: var(--yellow); }

/* Hero */
.hero { padding: 20px 12px 4px; text-align: center; }
.hero__title { margin: 0; font-size: clamp(20px,4.5vw,29px); font-weight: 800; color: var(--red); }
.hero__sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

.wrap { flex: 1; max-width: 1060px; width: 100%; margin: 0 auto; padding: 16px clamp(12px,3vw,24px) 40px; }
.wrap--detail { max-width: 820px; }

/* Market card — 1 หวย/บรรทัด (เรียงลง) ให้กระดานผลมีพื้นที่เต็ม ไม่เบียด */
.cards { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.mcard { width: 100%; max-width: 640px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px rgba(150,20,50,.1); }
.mcard--settling { outline: 3px solid var(--yellow); }
.mcard__hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 16px 8px; }
.mcard__name { font-size: 18px; font-weight: 800; color: var(--red); text-decoration: none; }
.mcard__time { font-size: 12.5px; color: var(--muted); background: #fbe9ef; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.mcard__draw { padding: 4px 16px 14px; text-align: center; }
.mcard__draw-lbl { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.mcard__draw .dk { font-size: clamp(19px, 5vw, 26px); font-weight: 800; color: var(--red); letter-spacing: .01em; }
.settling { color: var(--red); }
.mcard__more { display: block; padding: 4px 16px 16px; color: var(--blue); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.noresult { text-align: center; color: var(--muted); padding: 28px 0; font-size: 16px; }

/* ── Result board (สกรีนช็อต) ── */
.board { background: var(--board); margin: 4px 12px 14px; border-radius: 14px; padding: 16px 12px 18px; box-shadow: inset 0 0 0 3px #ffd400; }
.prize { text-align: center; }
.prize__label { color: var(--pink); font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.balls { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.ball {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ff5c86, var(--pink) 70%);
  color: var(--yellow); font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 7px rgba(180,10,50,.35); font-variant-numeric: tabular-nums;
}
.brow-6 .ball { width: clamp(46px, 12vw, 62px); height: clamp(46px, 12vw, 62px); font-size: clamp(26px, 7vw, 36px); }
.prize-note { text-align: center; color: var(--pink-d); font-weight: 700; font-size: clamp(12px, 3vw, 15px); margin: 14px 0 4px; }
.brow-543 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.brow-21 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; max-width: 66%; margin-left: auto; margin-right: auto; }
.brow-543 .prize__label, .brow-21 .prize__label { font-size: 13.5px; }
.brow-543 .ball, .brow-21 .ball { width: 34px; height: 34px; font-size: 18px; }

/* Detail */
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--blue); text-decoration: none; }
.crumb__sep { margin: 0 5px; }
.mcard--detail { max-width: 640px; margin: 0 auto; }
.detail-actions { padding: 4px 16px 18px; text-align: center; }
.btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 20px; border-radius: 999px; font-size: 14px; }
.btn:hover { background: var(--pink-d); }

/* Trust */
.trust { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 4px; }
.trust__item { font-size: 13.5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; }
.trust__item b { color: #1c9e57; }

/* History table */
.hist-title { text-align: center; color: var(--red); font-size: clamp(19px,4.5vw,26px); margin: 6px 0 16px; }
.hist__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hist__table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); min-width: 520px; }
.hist__table th { background: var(--red); color: #fff; font-size: 13.5px; padding: 11px 8px; text-align: center; }
.hist__table td { padding: 10px 8px; text-align: center; border-top: 1px solid var(--line); font-size: 15px; font-variant-numeric: tabular-nums; font-weight: 700; }
.hist__date { color: var(--muted); font-weight: 500 !important; font-size: 13px !important; white-space: nowrap; }
.hist__num--main { color: var(--red); font-size: 17px; }
.hist__table tbody tr:nth-child(even) td { background: #fdf2f5; }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0 6px; }
.pager__btn { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; text-decoration: none; color: var(--red); font-weight: 700; font-size: 14px; }
.pager__btn:hover { background: var(--red); color: #fff; }
.pager__btn.is-off { color: #ccbfc5; pointer-events: none; }
.pager__info { font-size: 13.5px; color: var(--muted); }
.back { margin-top: 18px; text-align: center; }
.back a { color: var(--blue); text-decoration: none; font-weight: 700; }

/* News */
.sec-title { font-size: 19px; font-weight: 800; color: var(--red); margin: 30px 0 12px; padding-left: 12px; border-left: 4px solid var(--pink); }
.news__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ncard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.ncard:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.ncard__imgwrap { width: 100%; aspect-ratio: 16/9; background: #f0e3e8; overflow: hidden; }
.ncard__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ncard__body { padding: 11px 13px 14px; display: flex; flex-direction: column; gap: 6px; }
.ncard__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ncard__src { font-size: 11.5px; color: var(--pink); font-weight: 800; }
.ncard__date { font-size: 11px; color: var(--muted); }
.ncard__ttl { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer */
.ft { background: var(--red); color: #ffe0e6; margin-top: auto; }
.ft__in { max-width: 1060px; margin: 0 auto; padding: 18px clamp(12px,3vw,24px); text-align: center; }
.ft__brand { font-weight: 800; color: var(--yellow); font-size: 16px; }
.ft__note { font-size: 12px; margin-top: 5px; opacity: .9; }

@media (max-width: 560px) {
  .hd__in { justify-content: center; } .hd__right { align-items: center; }
  .cards { grid-template-columns: 1fr; }
  .brow-21 { max-width: 100%; }
}
