/* Shared result pages — brand orange / red / dark (not GLO green) */
.result-board-page {
  --rb-orange: #f99919;
  --rb-orange-deep: #e07f00;
  --rb-red: #f9314b;
  --rb-dark: #171717;
  --rb-dark-2: #221f1f;
  --rb-gold: #ffd27a;
  --rb-muted: #6b7280;
  --rb-line: #e8e8e8;
  --rb-card: #ffffff;
  font-family: "Kanit", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f7f7f8 0%, #efefef 100%);
  padding: 28px 0 48px;
  min-height: 50vh;
}

.result-board-page .rb-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.result-board-page .rb-date-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--rb-card);
  border: 1px solid var(--rb-line);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .05);
}

.result-board-page .rb-date-bar .rb-date-label {
  font-size: 13px;
  font-weight: 800;
  color: #374151;
  white-space: nowrap;
}

.result-board-page .rb-date-bar .rb-date-control {
  flex: 1;
  max-width: 220px;
  margin: 0;
}

.result-board-page .rb-date-bar .form-control,
.result-board-page .rb-date-bar select,
.result-board-page .rb-date-select {
  height: 46px;
  min-height: 46px;
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid rgba(249, 153, 25, .45);
  font-weight: 800;
  font-size: 15px;
  color: #1a1408;
  box-shadow: 0 4px 12px rgba(180, 100, 30, .1);
  padding: 0 36px 0 14px;
  appearance: none;
  -webkit-appearance: none;
  background-color: #fffef8;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239a4d00' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #fffef8, #fff6e4);
  background-repeat: no-repeat, no-repeat;
  background-position: right 14px center, 0 0;
  background-size: 12px 8px, 100% 100%;
  cursor: pointer;
}
.result-board-page .rb-date-bar--select .rb-date-control {
  max-width: 260px;
}
.result-board-page .rb-date-select:focus {
  outline: none;
  border-color: rgba(249, 153, 25, .85);
  box-shadow: 0 0 0 3px rgba(249, 153, 25, .2);
}

/* Daily results — date list-style trigger; calendar only when opened */
.result-board-page .rb-date-bar--picker {
  position: relative;
  z-index: 20;
}
.result-board-page .rb-cal-wrap {
  position: relative;
  flex: 1;
  max-width: 240px;
  margin: 0 0 0 auto;
}
.result-board-page .rb-cal-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #d7d7d7;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.result-board-page .rb-cal-wrap.is-open .rb-cal-trigger {
  border-color: rgba(249, 153, 25, .65);
  box-shadow: 0 0 0 3px rgba(249, 153, 25, .18);
}
.result-board-page .rb-cal-trigger-ico {
  color: #9a4d00;
  font-size: 12px;
  line-height: 1;
}
.result-board-page .rb-cal-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(92vw, 340px);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(249, 153, 25, .4);
  background: #fffdf8;
  box-shadow: 0 18px 40px rgba(80, 45, 10, .22);
  z-index: 40;
}
.result-board-page .rb-cal-pop[hidden] {
  display: none !important;
}
.result-board-page .rb-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.result-board-page .rb-cal-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.result-board-page .rb-cal-month,
.result-board-page .rb-cal-year {
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(249, 153, 25, .4);
  background: #fffdf8;
  font-weight: 800;
  font-size: 13px;
  color: #2a1a0a;
  padding: 0 8px;
}
.result-board-page .rb-cal-month { max-width: 130px; }
.result-board-page .rb-cal-year { max-width: 88px; }
.result-board-page .rb-cal-nav {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(249, 153, 25, .4);
  background: linear-gradient(145deg, #fff7e6, #ffe9b8);
  color: #9a4d00;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(249, 153, 25, .2);
}
.result-board-page .rb-cal-nav:active { transform: scale(.96); }
.result-board-page .rb-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
}
.result-board-page .rb-cal-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #8a7350;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 0;
}
.result-board-page .rb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.result-board-page .rb-cal-day {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f7f1e6;
  color: #2a1a0a;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.result-board-page .rb-cal-day.is-empty {
  background: transparent;
  cursor: default;
  pointer-events: none;
}
.result-board-page .rb-cal-day.has-draw {
  border-color: rgba(249, 153, 25, .55);
  background: linear-gradient(160deg, #fff8e8, #ffe9b8);
  box-shadow: inset 0 -3px 0 rgba(249, 153, 25, .35);
}
.result-board-page .rb-cal-day.has-draw::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #f99919;
}
.result-board-page .rb-cal-day.is-today:not(.is-selected) {
  border-color: rgba(249, 49, 75, .45);
}
.result-board-page .rb-cal-day.is-selected {
  color: #6a3200;
  background: linear-gradient(90deg, #ffe39a, #ffd27a) !important;
  border-color: transparent !important;
  box-shadow: 0 6px 14px rgba(249, 153, 25, .35);
}
.result-board-page .rb-cal-day.is-selected::after {
  background: #9a4d00;
}
.result-board-page .rb-cal-day:not(.is-empty):hover {
  transform: translateY(-1px);
  border-color: rgba(249, 153, 25, .7);
}
.result-board-page .rb-cal-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #6b5e45;
}
.result-board-page .rb-cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f99919;
  box-shadow: 0 0 0 3px rgba(249, 153, 25, .2);
  flex: 0 0 auto;
}
.result-board-page .rb-cal-today {
  margin-left: auto;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(249, 153, 25, .45);
  background: #fff;
  color: #9a4d00;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.result-board-page .rb-draw-name {
  margin: 4px 0 16px;
  text-align: center;
}

.result-board-page .rb-draw-name h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 4.2vw, 30px);
  font-weight: 900;
  line-height: 1.2;
  color: #111;
}

.result-board-page .rb-draw-name p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--rb-muted);
}

.result-board-page .rb-card {
  padding: 16px;
  background: var(--rb-card);
  border: 1px solid var(--rb-line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
}

.result-board-page .rb-prize-1 {
  position: relative;
  padding: 22px 58px 18px;
  margin-bottom: 14px;
  border-radius: 18px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 85% 18%, rgba(249, 153, 25, .35), transparent 42%),
    linear-gradient(145deg, #2a2114 0%, var(--rb-dark) 55%, #0f0f0f 100%);
  border: 1px solid rgba(249, 153, 25, .4);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
  overflow: visible;
}

.result-board-page .rb-prize-1::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    url("../images/logo-daily-thai-loto-base.png") center / contain no-repeat,
    #0f1630;
  background-origin: content-box;
  padding: 3px;
  border: 2.5px solid rgba(249, 153, 25, .9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35), 0 0 12px rgba(249, 153, 25, .4);
  pointer-events: none;
}

.result-board-page .rb-img-share {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111 !important;
  text-decoration: none !important;
  background: linear-gradient(135deg, #ffe39a, var(--rb-orange));
  box-shadow: 0 6px 14px rgba(0, 0, 0, .28);
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}

.result-board-page .rb-img-share:hover,
.result-board-page .rb-img-share:focus {
  filter: brightness(1.05);
  transform: scale(1.05);
  color: #111 !important;
  text-decoration: none !important;
}

.result-board-page .rb-img-share i {
  font-size: 15px;
}

.result-board-page .rb-prize-1 .rb-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--rb-gold);
}

.result-board-page .rb-prize-1 .rb-number {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .32em;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 10px 0 12px;
  padding: 0 .4em;
  font-size: clamp(26px, 6.5vw, 38px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 0;
  text-shadow: none;
}
.result-board-page .rb-prize-1 .rb-number .rb-digit {
  flex: 0 0 auto;
  text-align: center;
  color: #fff;
  font-weight: 600;
}

.result-board-page .rb-prize-1 .rb-meta {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
}

.result-board-page .rb-prize-block {
  margin-bottom: 16px;
}

.result-board-page .rb-prize-block .rb-label {
  display: block;
  margin-bottom: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #222;
}

.result-board-page .rb-pills {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.result-board-page .rb-pill {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 6px;
  border-radius: 999px;
  text-align: center;
  font-size: clamp(13px, 2.8vw, 17px);
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, #3a2a14, var(--rb-dark-2));
  border: 1px solid rgba(249, 153, 25, .45);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .14);
}

.result-board-page .rb-pill.is-accent {
  background: linear-gradient(135deg, var(--rb-orange), var(--rb-orange-deep));
  border-color: transparent;
  color: #111;
}

/* History share capture + 2nd prize boxes (Friday / 2 Days) */
.result-board-page .rb-history-capture {
  padding: 2px 0 6px;
}

.result-board-page .rb-sf-boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

/* 2 Days — up to 5 second prizes */
.result-board-page .rb-sf-boxes.rb-sf-boxes--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.result-board-page .rb-sf-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 10px 6px 9px;
  border-radius: 12px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(249, 153, 25, .26), transparent 44%),
    linear-gradient(145deg, #2a2114 0%, var(--rb-dark) 55%, #0f0f0f 100%);
  border: 1px solid rgba(249, 153, 25, .4);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .14);
}

.result-board-page .rb-sf-box-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--rb-gold);
}

.result-board-page .rb-sf-box-num {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .22em;
  width: 100%;
  margin-top: 5px;
  padding: 0 .15em;
  font-size: clamp(11px, 2.4vw, 15px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: #fff;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 0;
  text-shadow: none;
  white-space: nowrap;
}

/* 2 Days — 5 boxes are narrower; keep digits readable */
.result-board-page .rb-sf-boxes--5 .rb-sf-box-num {
  gap: .18em;
  font-size: clamp(10px, 2.1vw, 13px);
}
.result-board-page .rb-sf-box-num .rb-digit {
  flex: 0 0 auto;
  text-align: center;
  color: #fff;
  font-weight: 600;
}

.result-board-page .rb-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #111 !important;
  text-decoration: none !important;
  background: linear-gradient(90deg, var(--rb-orange), #ffc266);
  box-shadow: 0 10px 22px rgba(249, 153, 25, .35);
  transition: transform .15s ease, filter .15s ease;
  cursor: pointer;
}

.result-board-page .rb-wa:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  color: #111 !important;
  text-decoration: none !important;
}

.result-board-page .rb-wa.is-busy,
.result-board-page .rb-img-share.is-busy {
  opacity: .65;
  pointer-events: none;
}

.result-board-page .rb-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--rb-muted);
  font-weight: 700;
}

.result-board-page .rb-stack + .rb-stack {
  margin-top: 14px;
}

.result-board-page .rb-draw-time {
  margin: 0 0 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--rb-muted);
}

body.result-board-body {
  padding-top: 110px;
}

body.result-board-body .result-board-page {
  padding-top: 20px;
}

/* ===== TV Live board — VIP Midnight Gold (page === share capture) ===== */
.result-board-page .rb-tv-card {
  padding: 14px 12px 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.result-board-page .rb-tv-capture {
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  border: 2.5px solid #d4af37;
  box-shadow:
    0 0 0 1px rgba(120, 90, 30, .35),
    0 14px 32px rgba(0, 0, 0, .16);
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(255, 210, 80, .08), transparent 50%),
    linear-gradient(180deg, #faf6ee 0%, #f3eee4 100%);
}

.result-board-page .rb-tv-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  text-align: center;
}

/* Date/time — flush top; radius comes from .rb-tv-capture clip only */
.result-board-page .rb-tv-card .rb-tv-when,
.result-board-page .rb-tv-when {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 18px;
  margin: 0;
  border-radius: 0 !important;
  font-size: clamp(13px, 3.4vw, 17px);
  font-weight: 900;
  letter-spacing: .03em;
  white-space: nowrap;
  color: #fff8dc !important;
  background:
    radial-gradient(ellipse 70% 120% at 50% -30%, rgba(255, 210, 80, .32), transparent 55%),
    linear-gradient(180deg, #2a2114, #12100e) !important;
  border: 0 !important;
  border-bottom: 2px solid #ffd250 !important;
  box-shadow: none !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

.result-board-page .rb-tv-stage {
  border-radius: 0;
  overflow: hidden;
  background: #f5f5f5;
  border: 0;
  box-shadow: none;
}

/* Banner flush inside result box — no outer gap */
.result-board-page .rb-tv-head {
  margin: 0;
  padding: 0;
}

.result-board-page .rb-tv-head {
  position: relative;
  display: block;
  padding: 0;
  min-height: 0;
  background: transparent;
  border-bottom: 0;
}

.result-board-page .rb-tv-head-cap {
  display: none !important;
}

.result-board-page .rb-tv-head-mid {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: clamp(8px, 1.6vw, 14px);
  min-height: clamp(58px, 10vw, 80px);
  margin: 0;
  padding: 12px 14px;
  border-radius: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.result-board-page .rb-tv-head-plate {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
  z-index: 0;
  border-radius: 0;
}

.result-board-page .rb-tv-logo {
  position: relative;
  z-index: 1;
  width: clamp(36px, 7vw, 52px);
  height: clamp(36px, 7vw, 52px);
  border-radius: 0 !important;
  border: 0 !important;
  background: transparent;
  object-fit: contain;
  box-shadow: none !important;
}

.result-board-page .rb-tv-label-art {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 480px);
  height: auto;
  max-height: clamp(32px, 6.5vw, 48px);
  object-fit: contain;
  justify-self: center;
}

.result-board-page .rb-tv-head h2 {
  display: none;
}

.result-board-page .rb-tv-head-spacer,
.result-board-page .rb-tv-logo-right {
  width: clamp(34px, 6.5vw, 48px);
  height: clamp(34px, 6.5vw, 48px);
}

.result-board-page .rb-tv-board {
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 12px 14px;
  background: #f5f5f5 url("../images/apk-live-result/anim_back_nm.png") center / cover no-repeat;
}

.result-board-page .rb-tv-row {
  display: grid;
  grid-template-columns: minmax(76px, 22%) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
}

.result-board-page .rb-tv-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: clamp(13px, 3.2vw, 18px);
  font-weight: 700;
  color: #673AB7;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}

.result-board-page .rb-tv-digits {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  min-height: 46px;
  box-shadow: none;
}

.result-board-page .rb-tv-row.is-first .rb-tv-digits {
  box-shadow: none;
}

.result-board-page .rb-tv-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  /* 3D look built from border + gradient + ::after only (no inset shadows):
     the share picture renderer draws these exactly, so page == TV == shared picture */
  background: linear-gradient(165deg, #ffffff 0%, #f3f5f8 38%, #d7dce6 72%, #c0c7d2 100%);
  border: 1.5px solid #9aa3b0;
  border-bottom: 4.5px solid #8a93a1;
  box-shadow: 0 6px 10px rgba(40, 50, 70, .22);
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 800;
  color: #1a1f2a;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
  overflow: hidden;
  /* Optical center — nudge digits slightly up */
  padding-bottom: 3px;
  padding-top: 0;
}
.result-board-page .rb-tv-cell::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 12%;
  height: 32%;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0));
  pointer-events: none;
}
/* top highlight edge (replaces inset shadow) */
.result-board-page .rb-tv-cell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: rgba(255, 255, 255, .95);
  pointer-events: none;
}

.result-board-page .rb-tv-card .rb-wa {
  margin-top: 14px;
  border-radius: 14px;
  min-height: 48px;
  font-weight: 900;
  letter-spacing: .02em;
  background: linear-gradient(90deg, #f99919, #ffc266);
  color: #0e1528 !important;
  border: 0;
  box-shadow: 0 8px 18px rgba(249, 153, 25, .35);
}

/* Mobile share preview sheet */
.rb-share-sheet {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 12, 24, .72);
  padding: 16px;
  box-sizing: border-box;
}
.rb-share-sheet.is-on { display: flex; }
.rb-share-sheet-panel {
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow: auto;
  border-radius: 18px 18px 16px 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  padding: 14px;
}
.rb-share-sheet-panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  background: #f7f7f7;
}
.rb-share-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.rb-share-sheet-actions button,
.rb-share-sheet-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
}
.rb-share-sheet-actions button.is-busy {
  opacity: .7;
  pointer-events: none;
}
.rb-share-btn-full {
  grid-column: 1 / -1;
  color: #fff !important;
  background: linear-gradient(90deg, #25d366, #128c7e);
}
.rb-share-btn-pic,
.rb-share-btn-text {
  color: #fff !important;
  background: linear-gradient(90deg, #1e3a6e, #0e1528);
  border: 1px solid rgba(255, 210, 80, .55) !important;
}
.rb-share-btn-save {
  color: #111 !important;
  background: linear-gradient(90deg, #f99919, #ffc266);
}
.rb-share-btn-close {
  color: #111 !important;
  background: #ececec;
}
.rb-share-sheet-hint.is-note {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #14532d;
  background: #e8f9ee;
  border: 1px solid #b7e8c8;
}
.rb-share-sheet-actions button:focus-visible {
  outline: 3px solid #c46a00;
  outline-offset: 2px;
}
@media (min-width: 768px) {
  .rb-share-sheet { align-items: center; }
}
.rb-share-sheet-hint {
  margin: 10px 0 2px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.35;
}

@media (max-width: 767px) {
  body.result-board-body {
    padding-top: 90px;
  }

  .result-board-page {
    padding: 16px 0 36px;
  }
  .result-board-page .rb-card {
    padding: 12px;
    border-radius: 14px;
  }
  .result-board-page .rb-prize-1 {
    padding: 18px 50px 14px;
    margin-bottom: 12px;
    border-radius: 14px;
  }
  .result-board-page .rb-prize-1::after {
    width: 40px;
    height: 40px;
    top: 8px;
    right: 8px;
  }
  .result-board-page .rb-img-share {
    width: 36px;
    height: 36px;
    top: 8px;
    left: 8px;
  }
  .result-board-page .rb-prize-1 .rb-number {
    font-size: clamp(22px, 6.2vw, 32px);
    font-weight: 600;
    gap: .28em;
  }
  .result-board-page .rb-sf-boxes {
    gap: 6px;
  }
  .result-board-page .rb-sf-boxes.rb-sf-boxes--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .result-board-page .rb-sf-box {
    padding: 8px 4px 7px;
    border-radius: 10px;
  }
  .result-board-page .rb-sf-box-num {
    font-size: clamp(10px, 2.6vw, 13px);
    font-weight: 600;
    gap: .2em;
  }
  .result-board-page .rb-sf-boxes--5 .rb-sf-box-num {
    gap: .16em;
  }
  .result-board-page .rb-date-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .result-board-page .rb-date-bar .rb-date-control,
  .result-board-page .rb-cal-wrap {
    max-width: none;
    margin-left: 0;
  }
  .result-board-page .rb-cal-pop {
    left: 0;
    right: 0;
    width: auto;
  }
  .result-board-page .rb-cal-day {
    min-height: 38px;
    font-size: 13px;
    border-radius: 10px;
  }
  .result-board-page .rb-cal-month { max-width: 118px; font-size: 12px; }
  .result-board-page .rb-cal-year { max-width: 78px; font-size: 12px; }
  .result-board-page .rb-pills {
    gap: 5px;
  }
  .result-board-page .rb-pill {
    min-height: 40px;
    padding: 9px 3px;
    font-size: clamp(11px, 3.4vw, 14px);
    letter-spacing: .04em;
  }

  .result-board-page .rb-tv-logo,
  .result-board-page .rb-tv-logo-right,
  .result-board-page .rb-tv-head-spacer {
    width: 30px;
    height: 30px;
  }
  .result-board-page .rb-tv-head {
    min-height: 0;
    padding: 0;
    gap: 0;
  }
  .result-board-page .rb-tv-head-mid {
    min-height: 48px;
    margin: 0;
    padding: 8px 10px;
    gap: 5px;
    border-radius: 0;
  }
  .result-board-page .rb-tv-label-art {
    max-height: 26px;
  }
  /* Match Live TV plate size on phone — narrower digits, shorter rows */
  .result-board-page .rb-tv-card {
    padding: 10px 8px 12px;
  }
  .result-board-page .rb-tv-board {
    padding: 8px 8px 10px;
    gap: 5px;
  }
  .result-board-page .rb-tv-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 5px;
    min-height: 34px;
  }
  .result-board-page .rb-tv-label {
    font-size: 11px;
  }
  .result-board-page .rb-tv-digits {
    gap: 3px;
    min-height: 34px;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }
  .result-board-page .rb-tv-cell {
    min-height: 34px;
    height: 34px;
    font-size: 17px;
    border-radius: 6px;
    border-width: 1.25px 1.25px 3.25px;
    padding-bottom: 2px;
    box-shadow: 0 4px 7px rgba(40, 50, 70, .2);
  }
  .result-board-page .rb-tv-cell::before {
    left: 12%;
    right: 12%;
    top: 10%;
    height: 30%;
    border-radius: 4px;
  }
  .result-board-page .rb-tv-meta {
    gap: 0;
    justify-content: center;
    margin-bottom: 0;
  }
  .result-board-page .rb-tv-when {
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 0 !important;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
  .result-board-page .rb-tv-capture {
    border-radius: 12px;
    border-width: 2px;
  }
}

/* Daily history card: date/time bar BELOW the board — same look as the TV bottom bar */
.result-board-page .rb-tv-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 46px;
  padding: 0 18px;
  background: #140a02;
  border-top: 2px solid #d4a017;
}
.result-board-page .rb-tv-foot-date,
.result-board-page .rb-tv-foot-time {
  color: #ffd250;
  font-size: clamp(14px, 3.6vw, 17px);
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 575px) {
  .result-board-page .rb-tv-foot { height: 36px; padding: 0 10px; }
  .result-board-page .rb-tv-foot-date,
  .result-board-page .rb-tv-foot-time { font-size: 12px; }
}

.result-board-page .rb-tv-foot { position: relative; }
.result-board-page .rb-tv-foot-mid {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.result-board-page .rb-tv-foot-gtf {
  font-family: 'Rye', 'Kanit', serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: .06em;
  line-height: 1;
  color: #a8cdf7;
  text-shadow:
    -1.5px -1.5px 0 #0b2a6b, 1.5px -1.5px 0 #0b2a6b, -1.5px 1.5px 0 #0b2a6b, 1.5px 1.5px 0 #0b2a6b,
    0 2px 0 #1c4aa0, 0 4px 0 #0b2a6b,
    0 0 8px rgba(70, 140, 255, .85);
}
.result-board-page .rb-tv-foot-gtf-th {
  font-family: 'Kanit', sans-serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .02em;
}
@media (max-width: 575px) {
  .result-board-page .rb-tv-foot-gtf { font-size: 17px; }
  .result-board-page .rb-tv-foot-gtf-th { font-size: 15px; }
  .result-board-page .rb-tv-foot-mid { gap: 6px; }
}
