/* Liên hoan Tiếng hát Truyền hình Lâm Đồng 2026 – giao diện công khai */
:root {
  --navy: #041853;
  --navy-dark: #031234;
  --panel: #011d53;
  --cyan: #2FA8FF;
  --cyan-soft: rgba(47, 168, 255, .35);
  --gold: #F0C969;
  --gold-2: #F5C542;
  --text: #ffffff;
  --text-2: #C9D6F2;
  --error: #FF6B6B;
  --radius: 14px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--navy-dark);
  background-image:
    radial-gradient(120% 60% at 50% 0%, rgba(47, 168, 255, .18) 0%, rgba(47, 168, 255, 0) 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-2); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 .9em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--navy-dark); padding: 10px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- Thanh đầu trang ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(3, 18, 52, .92);
  border-bottom: 1px solid var(--cyan-soft);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.brand img { width: 40px; height: 45px; border-radius: 8px; }
.brand-text { font-weight: 800; font-size: 14px; line-height: 1.2; color: var(--gold); }
.brand-text small { display: block; font-weight: 600; color: var(--text-2); font-size: 12px; }
.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 10px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); background: rgba(240, 201, 105, .08); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 20px 0 8px; }
.hero-logo {
  width: 200px; max-width: 58vw; margin: 0 auto 12px;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--cyan-soft), 0 10px 40px rgba(47, 168, 255, .18);
}
.hero h1 {
  font-size: clamp(20px, 5.6vw, 30px); font-weight: 800;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: var(--gold);
  -webkit-text-fill-color: transparent;
}
.slogan { color: var(--text-2); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; margin-bottom: 16px; }

.status-card {
  margin: 12px auto 0; padding: 16px; max-width: 520px;
  background: rgba(1, 29, 83, .85);
  border: 1px solid var(--cyan-soft); border-radius: var(--radius);
  box-shadow: 0 0 18px rgba(47, 168, 255, .12) inset;
}
.status-label { font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.status-label strong { color: var(--text); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd-box {
  background: var(--navy-dark); border: 1px solid rgba(240, 201, 105, .35); border-radius: 12px; padding: 8px 4px;
}
.cd-num { display: block; font-size: clamp(22px, 7vw, 32px); font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.15; }
.cd-unit { display: block; font-size: 12px; color: var(--text-2); }
.status-note { font-size: 13px; color: var(--text-2); margin: 10px 0 0; }
.status-closed { font-weight: 600; color: var(--gold); margin: 0 0 12px; }

/* ---------- Thẻ / khung ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--cyan-soft);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(47, 168, 255, .06), 0 6px 24px rgba(0, 0, 0, .25);
  padding: 18px 16px;
  margin: 16px 0;
}
.card h2 { font-size: 19px; color: var(--gold); font-weight: 800; }
.card h3 { font-size: 16px; color: var(--gold); font-weight: 600; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.steps .n {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: var(--navy-dark); font-weight: 800; font-size: 14px;
}
.steps strong { color: var(--text); }

/* ---------- Form ---------- */
.form-step { margin-bottom: 22px; }
.form-step:last-of-type { margin-bottom: 8px; }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; color: var(--gold); margin: 0 0 10px; }
.step-title .n {
  flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--gold); font-size: 13px;
}
.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.req { color: var(--gold); }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 17px; color: var(--text);
  background: var(--navy-dark);
  border: 1.5px solid rgba(47, 168, 255, .45); border-radius: 12px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #7f91bb; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 201, 105, .25); }
.input[aria-invalid="true"] { border-color: var(--error); }
.input:disabled { opacity: .6; }
.input-big { font-size: 22px; font-weight: 800; letter-spacing: .02em; color: var(--gold); text-align: center; font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.field-error { font-size: 14px; color: var(--error); margin-top: 6px; min-height: 0; }
.field-error:empty { display: none; }
.question { font-size: 15px; color: var(--text); background: rgba(240, 201, 105, .07); border-left: 3px solid var(--gold); padding: 10px 12px; border-radius: 0 10px 10px 0; margin: 0 0 12px; }
.selected-name { color: var(--gold); font-weight: 800; }

/* Lưới thí sinh */
.contestants { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
@media (min-width: 560px) { .contestants { grid-template-columns: repeat(3, 1fr); } }
.c-card { position: relative; display: block; cursor: pointer; }
.c-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.c-inner {
  display: flex; flex-direction: column; height: 100%;
  background: var(--navy-dark);
  border: 1.5px solid rgba(47, 168, 255, .35); border-radius: 14px;
  overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .1s;
}
.c-card:active .c-inner { transform: scale(.98); }
.c-photo { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(160deg, #0a2a72, var(--navy-dark)); display: grid; place-items: center; }
.c-photo img { width: 100%; height: 100%; object-fit: cover; }
.c-ph {
  width: 64%; aspect-ratio: 1 / 1; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: var(--navy-dark);
  font-weight: 800; line-height: 1.05; font-size: 13px;
  box-shadow: 0 0 0 4px rgba(240, 201, 105, .18);
}
.c-ph b { display: block; font-size: 30px; }
.c-sbd {
  position: absolute; left: 8px; top: 8px; background: rgba(3, 18, 52, .85); color: var(--gold);
  font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(240, 201, 105, .5);
}
.c-body { padding: 8px 10px 10px; }
.c-name { font-weight: 800; font-size: 15px; line-height: 1.3; }
.c-genre { font-size: 13px; color: var(--text-2); }
.c-check {
  position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(3, 18, 52, .8); border: 2px solid rgba(255, 255, 255, .6);
  display: grid; place-items: center;
}
.c-check::after { content: ""; width: 12px; height: 7px; border: 3px solid var(--navy-dark); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.c-card input:checked + .c-inner { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(240, 201, 105, .35); }
.c-card input:checked + .c-inner .c-check { background: var(--gold); border-color: var(--gold); }
.c-card input:checked + .c-inner .c-check::after { opacity: 1; }
.c-card input:checked + .c-inner .c-name { color: var(--gold); }
.c-card input:focus-visible + .c-inner { outline: 3px solid var(--gold); outline-offset: 2px; }
.c-card input:disabled + .c-inner { opacity: .55; cursor: not-allowed; }

.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; aspect-ratio: 3 / 4; }
@keyframes sk { to { background-position: -200% 0; } }

/* Checkbox đồng ý */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; color: var(--text-2); min-height: 44px; }
.check input {
  flex: 0 0 24px; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--gold); cursor: pointer;
}
.check a { color: var(--gold); }

.turnstile-box { min-height: 70px; margin: 14px 0 6px; display: flex; justify-content: center; }
.turnstile-box > div { width: 100%; }

/* Nút */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: 12px;
  font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: filter .15s, transform .1s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%); color: var(--navy-dark); box-shadow: 0 6px 20px rgba(245, 197, 66, .25); }
.btn-primary:hover { filter: brightness(1.06); color: var(--navy-dark); }
.btn-outline { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-outline:hover { background: rgba(240, 201, 105, .1); }
.btn-ghost { background: rgba(47, 168, 255, .1); color: var(--text); border-color: var(--cyan-soft); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: grayscale(.3); box-shadow: none; }
.btn .spinner { width: 18px; height: 18px; border: 3px solid rgba(3, 18, 52, .3); border-top-color: var(--navy-dark); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  border-radius: 12px; padding: 12px 14px; font-size: 15px; margin: 12px 0;
  border: 1px solid; display: flex; gap: 10px; align-items: flex-start;
}
.alert:empty, .alert[hidden] { display: none; }
.alert-error { color: #ffd9d9; background: rgba(255, 107, 107, .12); border-color: rgba(255, 107, 107, .6); }
.alert-info { color: var(--text-2); background: rgba(47, 168, 255, .1); border-color: var(--cyan-soft); }
.alert-success { color: var(--gold); background: rgba(240, 201, 105, .1); border-color: rgba(240, 201, 105, .5); }

/* ---------- Hộp thoại kết quả gửi ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(2, 8, 26, .78);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, #06225f 0%, var(--panel) 100%);
  border: 1px solid var(--cyan); border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(47, 168, 255, .25);
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  animation: up .25s ease-out;
}
@media (min-width: 560px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 20px; border-bottom: 1px solid var(--cyan); }
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-icon {
  width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold), var(--gold-2)); display: grid; place-items: center;
}
.sheet-icon::after { content: ""; width: 22px; height: 12px; border: 4px solid var(--navy-dark); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(2px, -2px); }
.sheet h2 { color: var(--gold); font-size: 22px; font-weight: 800; }
.receipt {
  margin: 14px 0 8px; padding: 14px 10px; border-radius: 14px;
  border: 1.5px dashed var(--gold); background: var(--navy-dark);
}
.receipt-label { font-size: 13px; color: var(--text-2); }
.receipt-code { display: block; font-size: clamp(24px, 8vw, 32px); font-weight: 800; color: var(--gold); letter-spacing: .06em; font-variant-numeric: tabular-nums; word-break: break-all; user-select: all; }
.sheet-meta { font-size: 14px; color: var(--text-2); margin: 6px 0; }
.sheet-remaining { font-weight: 600; margin: 12px 0; }
.sheet-actions { display: grid; gap: 10px; margin-top: 16px; }

/* ---------- Văn bản (thể lệ, điều khoản) ---------- */
.draft-banner {
  background: repeating-linear-gradient(-45deg, rgba(240, 201, 105, .16) 0 12px, rgba(240, 201, 105, .08) 12px 24px);
  border: 1.5px solid var(--gold); color: var(--gold);
  text-align: center; font-weight: 800; letter-spacing: .03em;
  padding: 12px; border-radius: 12px; margin: 16px 0;
}
.doc h1 { font-size: clamp(22px, 6vw, 28px); color: var(--gold); font-weight: 800; margin-top: 8px; }
.doc .card h2 { font-size: 18px; }
.doc ol, .doc ul { padding-left: 1.3em; margin: 0 0 .9em; }
.doc li { margin-bottom: .45em; color: var(--text-2); }
.doc li strong, .doc p strong { color: var(--text); }
.doc p { color: var(--text-2); }
.placeholder { background: rgba(240, 201, 105, .15); color: var(--gold); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 10px 8px; border-bottom: 1px solid rgba(47, 168, 255, .2); text-align: left; vertical-align: top; }
.tbl th { color: var(--gold); font-weight: 600; font-size: 14px; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.formula { font-family: ui-monospace, Consolas, monospace; background: var(--navy-dark); border: 1px solid var(--cyan-soft); border-radius: 10px; padding: 10px 12px; color: var(--gold); display: block; text-align: center; margin: 8px 0 12px; }

/* ---------- Kết quả ---------- */
.result-top { display: grid; gap: 12px; }
.top-card { display: flex; gap: 14px; align-items: center; }
.top-card .c-photo { flex: 0 0 96px; width: 96px; border-radius: 14px; overflow: hidden; border: 2px solid var(--gold); }
.top-card .c-ph { width: 74%; font-size: 11px; }
.top-card .c-ph b { font-size: 22px; }
.big-n { font-size: clamp(30px, 10vw, 44px); font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.prize-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.prize-1 { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: var(--navy-dark); }
.prize-2 { background: #dfe7f5; color: var(--navy-dark); }
.prize-3 { background: #d39a5f; color: var(--navy-dark); }
.prize-r { background: transparent; color: var(--text-2); border: 1px solid var(--cyan-soft); }
.empty-state { text-align: center; padding: 28px 16px; }
.empty-state .icon { font-size: 40px; margin-bottom: 8px; }

/* ---------- Chân trang ---------- */
.footer { border-top: 1px solid var(--cyan-soft); margin-top: 28px; padding: 20px 0 calc(28px + env(safe-area-inset-bottom)); text-align: center; font-size: 13px; color: var(--text-2); }
.footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.footer p { margin: 4px 0; }

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack-sm > * + * { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.mt-12 { margin-top: 12px; }
.nav a { white-space: nowrap; }
@media (max-width: 439px) {
  .brand-text { display: none; }
  .nav a { padding: 0 9px; font-size: 14px; }
}
.c-photo:has(.c-ph) .c-sbd { display: none; }

/* Dải cảnh báo trang demo */
.demo-banner {
  background: repeating-linear-gradient(45deg, #7a4b00, #7a4b00 12px, #8f5a00 12px, #8f5a00 24px);
  color: #fff; text-align: center; font-weight: 800; font-size: 13px; padding: 6px 12px; letter-spacing: .02em;
}

/* =====================================================================
   RESPONSIVE – tối ưu theo cỡ màn hình
   ≤359px điện thoại nhỏ · 360–767 điện thoại · 768–1023 máy tính bảng
   ≥1024 laptop/PC (2 cột) · ≥1440 màn hình lớn
   ===================================================================== */

/* Điện thoại nhỏ (iPhone SE đời đầu, Android giá rẻ) */
@media (max-width: 359px) {
  .container { padding: 0 12px; }
  .card { padding: 16px 12px; }
  .countdown { gap: 6px; }
  .cd-unit { font-size: 11px; }
  .contestants { gap: 8px; }
  .c-name { font-size: 14px; }
  .nav a { padding: 0 7px; font-size: 13px; }
}

/* Thiết bị có chuột: hiệu ứng rê chuột */
@media (hover: hover) and (pointer: fine) {
  .c-card:hover .c-inner { border-color: var(--gold); box-shadow: 0 0 14px rgba(240, 201, 105, .2); }
  .btn-primary:not([disabled]):hover { transform: translateY(-1px); }
}

/* Máy tính bảng */
@media (min-width: 768px) {
  .container { max-width: 880px; padding: 0 24px; }
  .hero { padding-top: 28px; }
  .hero-logo { width: 220px; }
  .card { padding: 22px 24px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .form-step { margin-bottom: 26px; }
  /* Họ tên + SĐT trên một hàng */
  .form-step:first-child { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .form-step:first-child .step-title { grid-column: 1 / -1; }
  .contestants { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .input-big { font-size: 26px; }
  #submit-btn { max-width: 420px; display: flex; margin: 0 auto; }
  .doc .card { padding: 24px 28px; }
}

/* Laptop & PC: bố cục 2 cột – thông tin bên trái (cố định khi cuộn), phiếu bên phải */
@media (min-width: 1024px) {
  .container.wide, main.layout { max-width: 1200px; padding: 0 32px; }
  main.container:not(.layout) { max-width: 900px; }
  main.layout {
    display: grid;
    grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding-top: 24px;
  }
  .col-info {
    position: sticky; top: 80px;
    max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: rgba(47,168,255,.4) transparent;
    padding-right: 4px;
  }
  .col-info .hero { padding-top: 0; }
  .col-info .hero-logo { width: 200px; }
  .col-info .hero h1 { font-size: 26px; }
  .col-info .steps { grid-template-columns: 1fr; gap: 10px; }
  .col-info .card { margin-bottom: 0; }
  .col-form .card { margin-top: 0; }
  .col-form #form-card { padding: 28px 32px; }
  .contestants { grid-template-columns: repeat(4, 1fr); }
  .c-ph b { font-size: 26px; }
  .topbar .container { min-height: 64px; }
  .brand img { width: 44px; height: 50px; }
  .brand-text { font-size: 15px; }
  .nav a { padding: 0 14px; font-size: 15px; }
}

/* Laptop màn hình thấp (1366×768, 1280×720): thu nhỏ phần đầu để cột trái vừa màn hình */
@media (min-width: 1024px) and (max-height: 820px) {
  .col-info .hero-logo { width: 130px; margin-bottom: 8px; }
  .col-info .hero h1 { font-size: 22px; }
  .col-info .slogan { margin-bottom: 10px; }
  .col-info .status-card { padding: 12px; }
  .col-info .cd-num { font-size: 24px; }
  .col-info .card { padding: 16px 18px; margin-top: 12px; }
  .col-info .steps li { font-size: 14px; }
  .col-info .steps { gap: 6px; }
  .col-info .steps .n { flex-basis: 24px; height: 24px; font-size: 12px; }
}
/* Nếu cột trái vẫn cao hơn màn hình thì bỏ cố định để không bị che */
@media (min-width: 1024px) and (max-height: 640px) {
  .col-info { position: static; }
}

/* Màn hình lớn */
@media (min-width: 1440px) {
  .container.wide, main.layout { max-width: 1320px; }
  main.layout { grid-template-columns: 440px minmax(0, 1fr); gap: 40px; }
  .contestants { grid-template-columns: repeat(5, 1fr); }
  .col-info .hero-logo { width: 230px; }
}
@media (min-width: 1440px) and (max-height: 820px) {
  .col-info .hero-logo { width: 140px; }
}

/* Màn hình ngang trên điện thoại: thu gọn phần đầu */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1023px) {
  .hero-logo { width: 110px; }
  .hero { padding-top: 10px; }
  .topbar { position: static; }
}

/* Khi nhảy tới một phần (#form-card...) không bị thanh đầu trang che */
[id] { scroll-margin-top: 80px; }
/* Chặn mọi tràn ngang còn sót (clip không làm hỏng position: sticky như hidden) */
html, body { overflow-x: clip; }

/* =====================================================================
   TÔNG SÁNG HƠN (01/12/2026, theo yêu cầu "giao diện cần sáng hơn")
   Giữ màu nhận diện navy – vàng kim – cyan nhưng nâng độ sáng nền/khung.
   ===================================================================== */
:root {
  --navy: #0d3394;        /* nền trên  */
  --navy-dark: #0a2a7c;   /* nền dưới, ô nhập */
  --panel: #12399e;       /* khung thẻ */
  --cyan: #4cc3ff;
  --cyan-soft: rgba(110, 200, 255, .55);
  --gold: #FFD76A;
  --gold-2: #FFC83D;
  --text-2: #E3ECFF;
}
body {
  background-color: #0a2a7c;
  background-image:
    radial-gradient(90% 45% at 50% 0%, rgba(120, 210, 255, .45) 0%, rgba(120, 210, 255, 0) 70%),
    radial-gradient(60% 40% at 100% 100%, rgba(255, 200, 61, .14) 0%, rgba(255, 200, 61, 0) 70%),
    linear-gradient(180deg, #1546b8 0%, #0d3394 45%, #0a2a7c 100%);
}
.topbar { background: rgba(13, 51, 148, .9); }
.card {
  background: linear-gradient(180deg, rgba(36, 86, 200, .78) 0%, rgba(22, 64, 170, .78) 100%);
  box-shadow: 0 0 0 1px rgba(110, 200, 255, .15), 0 10px 30px rgba(4, 16, 60, .35);
}
.status-card { background: rgba(28, 74, 190, .8); box-shadow: 0 0 24px rgba(120, 210, 255, .25) inset; }
.cd-box { background: #0c2f88; border-color: rgba(255, 215, 106, .6); }
.input { background: #0c2f88; border-color: rgba(140, 210, 255, .7); }
.input::placeholder { color: #a9bff0; }
.c-inner { background: #0f378f; border-color: rgba(140, 210, 255, .55); }
.c-photo { background: linear-gradient(160deg, #2a66d8, #103a9a); }
.question { background: rgba(255, 215, 106, .14); }
.alert-info { background: rgba(110, 200, 255, .16); }
.sheet { background: linear-gradient(180deg, #2457c9 0%, #133c9f 100%); }
.receipt { background: #0c2f88; }
.hero-logo { box-shadow: 0 0 0 1px var(--cyan-soft), 0 12px 44px rgba(120, 210, 255, .45); }
.footer { background: rgba(8, 30, 90, .35); }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.16), rgba(255,255,255,.08)); background-size: 200% 100%; }

/* ===== Font chữ (01/12/2026): tiêu đề Playfair Display, nội dung Mulish ===== */
:root { --font: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --font-display: "Playfair Display", Georgia, "Times New Roman", serif; }
body { font-family: var(--font); }
h1, h2, .card h2, .sheet h2, .doc h1, .step-title, .brand-text { font-family: var(--font-display); letter-spacing: .005em; }
.hero h1 { font-style: italic; font-weight: 800; }
.card h2 { font-size: 21px; }
.step-title { font-size: 18px; }
.cd-num, .big-n, .receipt-code, .input-big { font-family: var(--font); }
.slogan { font-family: var(--font); letter-spacing: .08em; }

/* ===== Ảnh thí sinh chân dung 3:4 ===== */
.c-photo:has(img) { aspect-ratio: 3 / 4; }
.c-photo img { object-position: center top; }

/* Ô tìm thí sinh */
.c-search { margin-bottom: 12px; }
.c-search .input { min-height: 46px; font-size: 16px; }
.c-card[hidden] { display: none; }
@media (min-width: 1024px) { .c-search { max-width: 420px; } }

/* ===== Font chính thức (01/12/2026, người dùng chọn phương án D): Nunito cho toàn trang ===== */
:root { --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --font-display: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1, h2, .card h2, .sheet h2, .doc h1, .step-title, .brand-text { font-weight: 800; letter-spacing: 0; }
.hero h1 { font-style: normal; font-weight: 900; }
.cd-num, .big-n, .receipt-code, .input-big { font-weight: 800; }
.btn { font-weight: 800; }

/* ===== Logo đã tách nền (01/12/2026) – bỏ khung, thêm quầng sáng nhẹ ===== */
.hero-logo {
  border-radius: 0; box-shadow: none; background: none;
  filter: drop-shadow(0 6px 18px rgba(4, 16, 60, .45)) drop-shadow(0 0 22px rgba(120, 210, 255, .35));
}
.brand img { border-radius: 0; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(4, 16, 60, .5)); }
.brand img { width: 45px; height: 40px; }
@media (min-width: 1024px) { .brand img { width: 52px; height: 46px; } }

/* =====================================================================
   HÀI HOÀ MÀU SẮC (01/12/2026)
   1) Phân tầng rõ: nền xanh hoàng gia sáng → khung xanh đậm hơn → ô nhập/thẻ ở giữa
   2) Vàng chỉ cho điểm nhấn: nút chính, lựa chọn đang chọn, con số quan trọng
   3) Thêm hồng – tím – xanh ngọc của logo (quầng sáng, đường kẻ)
   4) Thống nhất một mức viền
   ===================================================================== */
:root {
  --line: rgba(130, 205, 255, .32);
  --line-strong: rgba(130, 205, 255, .55);
  --surface: #0b2770;        /* khung thẻ – đậm hơn nền */
  --surface-2: #10358f;      /* ô nhập, thẻ thí sinh – ở giữa */
  --pink: #F05FC1;
  --violet: #9B6BFF;
  --teal: #2FD3C9;
  --accent-grad: linear-gradient(90deg, var(--pink) 0%, var(--violet) 45%, var(--cyan) 100%);
  --cyan-soft: var(--line);
}

/* Nền: giữ xanh hoàng gia, thêm quầng hồng tím phía trên như ánh đèn sân khấu */
body {
  background-image:
    radial-gradient(60% 38% at 50% 0%, rgba(155, 107, 255, .38) 0%, rgba(155, 107, 255, 0) 70%),
    radial-gradient(45% 30% at 15% 8%, rgba(240, 95, 193, .22) 0%, rgba(240, 95, 193, 0) 70%),
    radial-gradient(45% 30% at 85% 8%, rgba(47, 211, 201, .18) 0%, rgba(47, 211, 201, 0) 70%),
    linear-gradient(180deg, #1748bd 0%, #0f379c 50%, #0b2b80 100%);
}
.topbar { background: rgba(11, 39, 112, .92); border-bottom: 1px solid var(--line); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent-grad); opacity: .7; }

/* Khung thẻ: đậm hơn nền, có đường kẻ gradient phía trên */
.card, .status-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(3, 12, 45, .35);
}
.card::before {
  content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px;
  border-radius: 2px; background: var(--accent-grad); opacity: .85;
}
.status-card { background: rgba(11, 39, 112, .85); }

/* Ô nhập, thẻ thí sinh, ô đếm ngược: tầng giữa */
.input, .c-inner, .cd-box, .receipt { background: var(--surface-2); border-color: var(--line-strong); }
.input:focus { border-color: var(--gold); }
.cd-box { border-color: var(--line-strong); }
.c-photo { background: linear-gradient(160deg, #2a5fd6, #13399a); }

/* Vàng chỉ cho điểm nhấn – tiêu đề chuyển sang trắng */
.card h2, .card h3, .doc .card h2, .sheet h2 { color: #fff; }
.hero h1 {
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
  -webkit-text-fill-color: #fff; color: #fff;
  text-shadow: 0 2px 18px rgba(155, 107, 255, .45);
}
.step-title { color: #fff; }
.step-title .n { border-color: var(--gold); color: var(--gold); }
.brand-text { color: #fff; }
.slogan { color: #cfdcff; }
.question { background: rgba(155, 107, 255, .14); border-left-color: var(--violet); }
.selected-name { color: var(--gold); }
.status-label strong { color: var(--gold); }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .10); }
.doc h1 { color: #fff; }
.tbl th { color: #cfdcff; }

/* Giữ vàng: nút chính, số đếm ngược, số N, mã phiếu, thí sinh đang chọn, nhãn SBD */
.btn-primary { box-shadow: 0 8px 24px rgba(255, 200, 61, .35); }

/* Logo: quầng hồng tím phía sau */
.hero-logo {
  filter: drop-shadow(0 6px 18px rgba(4, 16, 60, .45)) drop-shadow(0 0 26px rgba(155, 107, 255, .45)) drop-shadow(0 0 40px rgba(240, 95, 193, .18));
}

/* Chân trang */
.footer { border-top: 0; position: relative; background: rgba(8, 28, 85, .45); }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent-grad); opacity: .6; }

/* =====================================================================
   TÔNG SÁNG (01/12/2026 – "muốn web sáng sủa hơn nữa")
   Nền trắng/xanh rất nhạt, chữ navy; khung đầu trang (logo + đếm ngược) giữ xanh hoàng gia.
   ===================================================================== */
:root {
  --text: #0E1F4D;
  --text-2: #46577F;
  --blue: #1546B8;
  --blue-dark: #0F379C;
  --line: #D3DEF3;
  --line-strong: #B9CBEC;
  --surface: #FFFFFF;
  --surface-2: #F6F9FF;
  --cyan-soft: var(--line);
}
body {
  color: var(--text);
  background-color: #F2F6FF;
  background-image:
    radial-gradient(55% 30% at 50% 0%, rgba(155, 107, 255, .14) 0%, rgba(155, 107, 255, 0) 70%),
    radial-gradient(40% 25% at 10% 5%, rgba(240, 95, 193, .10) 0%, rgba(240, 95, 193, 0) 70%),
    radial-gradient(40% 25% at 90% 5%, rgba(47, 211, 201, .10) 0%, rgba(47, 211, 201, 0) 70%),
    linear-gradient(180deg, #EAF1FF 0%, #F4F7FF 40%, #F7F9FF 100%);
}
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline-color: var(--blue); }

/* Thanh đầu trang */
.topbar { background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); }
.brand-text { color: var(--text); }
.brand-text small { color: var(--text-2); }
.nav a { color: var(--text-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); background: #EAF1FF; }

/* Khung đầu trang: xanh hoàng gia, chữ trắng */
.hero {
  margin-top: 14px; padding: 22px 16px 18px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(155, 107, 255, .45) 0%, rgba(155, 107, 255, 0) 70%),
    radial-gradient(50% 40% at 0% 0%, rgba(240, 95, 193, .30) 0%, rgba(240, 95, 193, 0) 70%),
    radial-gradient(50% 40% at 100% 10%, rgba(47, 211, 201, .25) 0%, rgba(47, 211, 201, 0) 70%),
    linear-gradient(170deg, #1B52CF 0%, #1546B8 50%, #0F379C 100%);
  box-shadow: 0 14px 34px rgba(21, 70, 184, .28);
}
.col-info .hero { padding-top: 22px; }
.hero h1 { -webkit-text-fill-color: #fff; color: #fff; }
.slogan { color: #DCE6FF; }
.hero .status-card { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); box-shadow: none; }
.hero .status-card::before { display: none; }
.status-label { color: #E6EDFF; }
.status-label strong { color: #FFD76A; }
.hero .cd-box { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); }
.cd-num { color: #FFD76A; }
.cd-unit, .status-note { color: #DCE6FF; }
.status-closed { color: #FFD76A; }

/* Khung nội dung trắng */
.card { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 26px rgba(21, 60, 150, .08); }
.card h2, .card h3, .doc .card h2, .doc h1 { color: var(--text); }
.muted { color: var(--text-2); }
.steps li { color: var(--text-2); }
.steps strong { color: var(--text); }

/* Form */
.step-title { color: var(--text); }
.step-title .n { border-color: var(--blue); color: var(--blue); }
.field label, .field .label { color: var(--text); }
.req { color: #D93025; }
.input { background: #fff; color: var(--text); border: 1.5px solid var(--line-strong); }
.input::placeholder { color: #8A9AC0; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 70, 184, .15); }
.input-big { color: var(--blue); }
.hint { color: var(--text-2); }
.field-error { color: #C5221F; }
.question { color: var(--text); background: #F1ECFF; border-left-color: #9B6BFF; }
.selected-name { color: var(--blue); }
.check { color: var(--text-2); }
.check a { color: var(--blue); }
.turnstile-box { min-height: 65px; }

/* Thẻ thí sinh */
.c-inner { background: #fff; border: 1.5px solid var(--line); box-shadow: 0 2px 8px rgba(21, 60, 150, .06); }
.c-name { color: var(--text); }
.c-genre { color: var(--text-2); }
.c-photo { background: linear-gradient(160deg, #DCE7FF, #C3D5FF); }
.c-check { background: rgba(255, 255, 255, .9); border-color: #9FB3DD; }
.c-card input:checked + .c-inner { border-color: #F5B700; box-shadow: 0 0 0 2px #F5C542, 0 8px 22px rgba(245, 183, 0, .25); }
.c-card input:checked + .c-inner .c-name { color: var(--blue); }
.c-card input:checked + .c-inner .c-check { background: #F5C542; border-color: #F5C542; }
@media (hover: hover) and (pointer: fine) {
  .c-card:hover .c-inner { border-color: var(--blue); box-shadow: 0 6px 18px rgba(21, 70, 184, .15); }
}
.skeleton { background: linear-gradient(90deg, #E8EEFB, #F4F7FF, #E8EEFB); background-size: 200% 100%; }

/* Nút & thông báo */
.btn-outline { color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: #EAF1FF; }
.btn-ghost { background: #EEF3FF; color: var(--text); border-color: var(--line); }
.btn-primary { color: #1B1300; box-shadow: 0 8px 22px rgba(245, 183, 0, .35); }
.alert-info { color: var(--text); background: #EAF2FF; border-color: #BBD0F5; }
.alert-error { color: #9F1C14; background: #FFF1F0; border-color: #F5B5AE; }
.alert-success { color: #7A5300; background: #FFF8E1; border-color: #F2D27A; }

/* Hộp thoại gửi thành công */
.sheet-backdrop { background: rgba(10, 25, 70, .55); }
.sheet { background: #fff; color: var(--text); border-color: var(--line); box-shadow: 0 -10px 40px rgba(10, 30, 90, .25); }
.sheet h2 { color: var(--text); }
.receipt { background: #F6F9FF; border-color: #E0A800; }
.receipt-label, .sheet-meta { color: var(--text-2); }
.receipt-code { color: var(--blue); }

/* Văn bản thể lệ / điều khoản, bảng */
.doc p, .doc li { color: var(--text-2); }
.doc li strong, .doc p strong { color: var(--text); }
.draft-banner { background: #FFF8E1; border-color: #E8B400; color: #8A5A00; }
.placeholder { background: #FFF1C2; color: #7A5300; }
.tbl th { color: var(--text-2); }
.tbl th, .tbl td { border-bottom-color: var(--line); }
.formula { background: #F6F9FF; border-color: var(--line); color: var(--blue); }
.big-n { color: var(--blue); }
.prize-r { color: var(--text-2); border-color: var(--line); }

/* Chân trang */
.footer { background: #fff; color: var(--text-2); }
.footer a { color: var(--blue); }

/* Turnstile kích thước chuẩn, căn giữa */
.turnstile-box { display: flex; justify-content: center; }
.turnstile-box > div { width: auto; max-width: 100%; }

/* Dòng giải thích dưới mã phiếu */
.receipt-note { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: #8A5A00; }

/* =====================================================================
   PHIẾU DẠNG VÉ (ticket) sau khi gửi thành công
   ===================================================================== */
.ticket-sheet { text-align: left; padding-top: 18px; }
.ticket-ok { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 20px; margin-bottom: 14px; }
.ok-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #137333; color: #fff; font-size: 17px; }
.ticket {
  --ticket-bg: #FFFFFF; --sheet-bg: #FFFFFF; --t-line: #C9D7F2;
  position: relative; border-radius: 18px; background: var(--ticket-bg);
  border: 1px solid var(--t-line); box-shadow: 0 10px 28px rgba(21, 60, 150, .16); overflow: hidden;
}
.ticket-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #fff;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(240, 95, 193, .35) 0%, rgba(240, 95, 193, 0) 70%),
    radial-gradient(60% 120% at 0% 100%, rgba(155, 107, 255, .40) 0%, rgba(155, 107, 255, 0) 70%),
    linear-gradient(160deg, #1B52CF 0%, #1546B8 55%, #0F379C 100%);
}
.ticket-head img { flex: 0 0 auto; width: 54px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.t-kicker { display: block; font-size: 12px; font-weight: 900; letter-spacing: .16em; color: #FFD76A; }
.t-event { display: block; font-size: 13px; font-weight: 700; line-height: 1.35; color: #fff; }
.ticket-body { padding: 14px 16px 10px; }
.t-contestant { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #E6EDFA; }
.t-contestant img { width: 64px; height: 85px; object-fit: cover; object-position: center top; border-radius: 10px; border: 2px solid #F5C542; flex: 0 0 auto; }
.t-label { display: block; font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.t-contestant b { display: block; font-size: 17px; line-height: 1.3; color: var(--text); }
.t-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 12px 0 0; }
.t-grid dt { font-size: 12px; color: var(--text-2); }
.t-grid dd { margin: 0; font-weight: 800; font-size: 15px; color: var(--text); word-break: break-word; }
#t-prediction { color: var(--blue); font-size: 18px; }
/* Đường xé: răng cưa hai bên + nét đứt */
.ticket-tear { position: relative; height: 22px; }
.ticket-tear::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 50%; border-top: 2px dashed var(--t-line);
}
.ticket-tear::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 0 50%, var(--sheet-bg) 11px, transparent 11.5px) left / 22px 22px no-repeat,
    radial-gradient(circle at 100% 50%, var(--sheet-bg) 11px, transparent 11.5px) right / 22px 22px no-repeat;
}
.ticket-stub { padding: 6px 16px 16px; text-align: center; background: linear-gradient(180deg, #FFFFFF 0%, #FFF8E1 100%); }
.ticket-stub .receipt-label { display: block; font-size: 12px; letter-spacing: .2em; color: var(--text-2); font-weight: 800; }
.ticket-stub .receipt-code { display: block; font-size: clamp(26px, 8vw, 34px); color: var(--blue); letter-spacing: .06em; margin: 2px 0; }
.ticket-stub .receipt-note { color: #8A5A00; }
.ticket-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 6px 0 4px; }
.ticket-sheet .sheet-remaining { text-align: center; margin: 14px 0 10px; }
.ticket-sheet .sheet-meta { text-align: center; font-size: 13px; }
.ticket-sheet .sheet-actions { grid-template-columns: 1fr 1fr; }
@media (max-width: 359px) { .t-grid { grid-template-columns: 1fr; } .ticket-actions { grid-template-columns: 1fr; } }
.ticket-actions { grid-template-columns: 1.3fr 1fr; }
.ticket-actions .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.t-event { font-size: 12.5px; }

/* Giải Khuyến khích (cơ cấu 01/12/2026) */
.prize-kk { background: #e6f4ea; color: #1d5b33; border: 1px solid #b9dfc5; }
