body.check-page {
  font-family: "Noto Sans Lao", var(--font);
  background: var(--bg);
}

.check-page-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem max(1rem, env(safe-area-inset-right)) 2.5rem max(1rem, env(safe-area-inset-left));
}

.check-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
}

.check-breadcrumb a {
  color: #334155;
  text-decoration: none;
}

.check-breadcrumb a:hover {
  color: var(--blue);
}

.check-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
  align-items: start;
}

.check-main,
.check-sidebar {
  display: grid;
  gap: 1.25rem;
}

.check-card {
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(10, 47, 107, 0.08);
  overflow: hidden;
}

.check-card-head {
  padding: 1.15rem 1.35rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.check-card-head-split {
  padding-bottom: 1rem;
}

.check-card-head h1,
.check-card-head h2,
.check-form-title,
.check-history-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 800;
  color: var(--blue-navy);
  letter-spacing: 0.01em;
}

.check-title-special {
  color: var(--blue-deep);
}

.check-draw-date {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue);
}

.check-subtitle {
  margin: 0 0 1rem;
  color: #64748b;
  font-weight: 700;
  font-size: 0.88rem;
}

/* Official Lao development lottery breakdown */
.official-result-body {
  padding: 1rem 1.35rem 1.35rem;
}

.official-result-lead {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
}

.official-breakdown {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.official-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.official-breakdown-row:last-child {
  border-bottom: none;
}

.official-breakdown-row.is-main {
  background: linear-gradient(180deg, #f0f7ff 0%, #e8f2ff 100%);
}

.official-breakdown-row.is-animal {
  background: #fffaf3;
}

.official-breakdown-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
}

.official-breakdown-value {
  margin: 0;
  font-family: Arial, "Noto Sans Lao", sans-serif;
  font-size: clamp(1.05rem, 2.8vw, 1.25rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--blue-navy);
  text-align: right;
}

.official-breakdown-row.is-main .official-breakdown-value {
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  color: var(--blue-deep);
}

.official-breakdown-row.is-animal .official-breakdown-value {
  letter-spacing: 0;
  color: #c2410c;
}

.official-result-note {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
}

/* Special prizes grid */
.check-card-special {
  padding-bottom: 1.35rem;
}

.check-card-head-split + .prize-results-grid {
  padding: 0 1.35rem;
}

.prize-results-meta {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
}

.prize-results-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem 0.45rem;
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem 1.35rem 0;
}

.prize-results-grid.is-empty {
  display: block;
  color: #cbd5e1;
  font-weight: 700;
  text-align: center;
  padding: 1.5rem 1.35rem 0;
}

.prize-results-item {
  font-family: Arial, "Noto Sans Lao", sans-serif;
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--blue-navy);
  line-height: 1.45;
  padding: 0.35rem 0.2rem;
  border-radius: 8px;
  background: #f3f8ff;
}

.prize-results-item.is-match {
  color: #166534;
  background: #dcfce7;
  border: 2px solid #86efac;
  font-weight: 800;
}

/* History list */
.check-card-history {
  padding: 1.15rem 0 0.5rem;
}

.check-history-title {
  padding: 0 1.35rem 0.85rem;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.check-history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.85rem 1.35rem 1.25rem;
}

.check-history-list.is-empty {
  display: block;
  padding: 1.25rem 1.35rem 1.5rem;
  text-align: center;
  color: #94a3b8;
  font-weight: 700;
}

.check-history-item {
  display: grid;
  grid-template-columns: 64px 1fr 22px;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.check-history-item:hover,
.check-history-item.is-active {
  background: #f0f7ff;
}

.check-history-item.is-active {
  border-color: #c8dcf5;
  box-shadow: inset 3px 0 0 var(--blue), 0 4px 12px rgba(21, 120, 232, 0.08);
}

.check-history-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  background: #e8f2ff;
  border-radius: 8px;
  padding: 0.35rem 0.25rem;
  font-weight: 800;
  color: var(--blue-navy);
  line-height: 1.15;
}

.check-history-date-day {
  font-size: 1.15rem;
}

.check-history-date-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.check-history-body {
  display: grid;
  gap: 0.35rem;
}

.check-history-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.check-history-main {
  font-family: Arial, "Noto Sans Lao", sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--blue-deep);
}

.check-history-main.is-pending {
  color: #cbd5e1;
  font-size: 1rem;
  letter-spacing: 0;
}

.check-history-special {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.check-history-chevron {
  color: #cbd5e1;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

/* Sidebar form */
.check-card-form {
  padding: 1.25rem 1.25rem 1.35rem;
  position: sticky;
  top: 1rem;
}

.check-form-title {
  margin-bottom: 0.35rem;
}

.check-form {
  display: grid;
  gap: 0.75rem;
}

.check-label {
  font-weight: 800;
  color: var(--blue-navy);
  font-size: 0.85rem;
}

.check-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 2px solid #d7e3f4;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--blue-navy);
  background: #f8fbff;
}

.check-digit-rows {
  display: grid;
  gap: 0.55rem;
}

.check-digit-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.45rem;
  align-items: center;
}

.check-digit-row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e8f2ff;
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.check-digits {
  max-width: none;
}

.check-digits .search-digit {
  height: 2.65rem;
  font-size: 1.05rem;
  border-radius: 10px;
  border: 2px solid #d7e3f4;
  background: #f8fbff;
}

.check-digits .search-digit:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 120, 232, 0.15);
}

.check-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.btn-check {
  border: 0;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #1a85ef 0%, var(--blue-deep) 100%);
  box-shadow: 0 8px 22px rgba(21, 120, 232, 0.32);
  cursor: pointer;
}

.btn-check:hover {
  background: linear-gradient(180deg, var(--blue) 0%, #094fb8 100%);
}

.btn-check-clear {
  border: 2px solid #d7e3f4;
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  font-family: inherit;
  font-weight: 700;
  color: var(--blue-navy);
  background: #fff;
  cursor: pointer;
}

.check-results {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.check-result {
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  text-align: center;
  background: #f3f8ff;
  border: 2px solid #d7e3f4;
}

.check-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.check-result-row-no {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
}

.check-result.is-win {
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
  border-color: #86efac;
}

.check-result.is-lose {
  background: #fafafa;
  border-color: #e2e8f0;
}

.check-result.is-pending {
  background: #fffbeb;
  border-color: #fcd34d;
}

.check-result.is-hint .check-result-message {
  margin-top: 0;
  font-size: 0.95rem;
}

.check-result-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.check-result.is-win .check-result-badge {
  background: #16a34a;
  color: #fff;
}

.check-result.is-lose .check-result-badge {
  background: #94a3b8;
  color: #fff;
}

.check-result.is-pending .check-result-badge {
  background: #f59e0b;
  color: #fff;
}

.check-result-number {
  margin: 0.1rem 0;
  font-family: Arial, "Noto Sans Lao", sans-serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--blue-navy);
}

.check-result-message {
  margin: 0.3rem 0 0;
  font-weight: 700;
  color: #475569;
  font-size: 0.92rem;
}

.check-result-matches {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.check-match-card {
  background: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #86efac;
  font-weight: 800;
  font-size: 0.85rem;
  color: #166534;
}

@media (max-width: 960px) {
  .check-layout {
    grid-template-columns: 1fr;
  }

  .check-sidebar {
    order: -1;
  }

  .check-card-form {
    position: static;
  }
}

@media (max-width: 768px) {
  .prize-results-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .check-history-list {
    grid-template-columns: 1fr;
    padding: 0.75rem 1rem 1.15rem;
  }

  .check-history-item {
    grid-template-columns: 64px 1fr 24px;
    padding: 0.75rem 0.85rem;
  }
}

@media (max-width: 480px) {
  .prize-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .check-page-wrap {
    padding-top: 0.75rem;
  }
}
