/* Grand Slam Pickleball — Road to Vũng Tàu
   Ý tưởng: con đường Sài Gòn → Vũng Tàu. Cột cây số (thân trắng, đầu đỏ) đánh dấu chặng; vé đăng ký = vé xe đi Vũng Tàu.
   Màu: biển đêm + mặt sân teal + nhấn cam hoàng hôn; vàng bóng chỉ cho quả bóng / LIVE / người thắng. */
:root {
  --ink: #0c1a33;        /* biển đêm — nền */
  --ink-2: #132a4d;      /* mặt nổi trên nền tối */
  --ink-3: #1c3a63;
  --line: rgba(214, 228, 240, .14);
  --salt: #f2f6f4;       /* muối trắng — chữ trên nền tối, mặt sáng */
  --mist: #a9bccb;       /* chữ phụ */
  --court: #1e7c8c;      /* mặt sân */
  --court-2: #2b9aa8;
  --sunset: #ff6b3d;     /* hoàng hôn Bãi Trước — nhấn duy nhất */
  --sunset-2: #ff8a5c;
  --ball: #ddf04a;       /* bóng pickleball */
  --post-red: #c8102e;   /* đầu cột cây số */
  --live: #ff4b4b;
  --ok: #4fd1a5;
  --wait: #f2c14e;
  --r-s: 6px; --r-m: 12px; --r-l: 20px;
  --font-d: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-t: 'Be Vietnam Pro', system-ui, sans-serif;
  --gutter: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--salt);
  font: 400 16px/1.6 var(--font-t); font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { font-family: var(--font-d); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(30px, 5vw, 46px); }
h3 { font-size: 24px; }
p { margin: 0 0 .8em; }
.muted { color: var(--mist); }
.small { font-size: 14px; }

/* ---------- thanh điều hướng ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(12, 26, 51, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 18px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-d); font-weight: 800; font-style: italic; font-size: 21px; white-space: nowrap; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f6ff9a, var(--ball) 55%, #a9bd1f); box-shadow: 0 0 12px rgba(221, 240, 74, .5); flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; padding: 7px 11px; border-radius: 999px; font-size: 15px; color: var(--mist); white-space: nowrap; }
.nav a:hover { color: var(--salt); background: var(--ink-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--salt); font-weight: 600; }
.top-cta { text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 15px; color: var(--ink); background: var(--sunset); font-weight: 600; white-space: nowrap; }
.top-cta:hover { background: var(--sunset-2); }
.top-cta[aria-current="page"] { background: var(--salt); }
@media (max-width: 720px) {
  .top .wrap { height: auto; flex-wrap: wrap; gap: 6px; padding-top: 8px; padding-bottom: 8px; }
  .top-cta { margin-left: auto; }
  .nav { margin-left: 0; width: 100%; order: 3; }
  .brand { font-size: 19px; }
}

/* ---------- nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 16px; text-decoration: none; transition: background .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-hot { background: var(--sunset); color: #1b0d06; }
.btn-hot:hover { background: var(--sunset-2); }
.btn-ghost { background: transparent; color: var(--salt); box-shadow: inset 0 0 0 1.5px rgba(242, 246, 244, .5); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--salt); }
.btn-plain { background: var(--ink-2); color: var(--salt); }
.btn-plain:hover { background: var(--ink-3); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(86vh, 760px); display: flex; flex-direction: column; justify-content: flex-end; }
.hero .bg { position: absolute; inset: 0; z-index: -1; }
.hero .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero .bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12, 26, 51, .55) 0%, rgba(12, 26, 51, 0) 30%, rgba(12, 26, 51, .1) 58%, rgba(12, 26, 51, .94) 88%, var(--ink) 100%);
}
.hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 120px; }
.hero-meta { padding-bottom: 40px; }
.title-lock .gs { font-family: var(--font-d); font-weight: 600; font-size: clamp(17px, 2.4vw, 22px); letter-spacing: .02em; color: var(--salt); opacity: .92; margin-bottom: 6px; }
.title-lock h1 {
  font-weight: 800; font-style: italic; font-size: clamp(52px, 11vw, 132px); line-height: 1.02; letter-spacing: -.01em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .35);
}
.title-lock h1 span { display: block; }
.hero .when { margin: 14px 0 0; font-size: clamp(16px, 2vw, 19px); color: var(--salt); }
.hero .when b { font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 720px) {
  .hero { display: block; min-height: 0; }
  .hero .bg { position: relative; inset: auto; aspect-ratio: 4 / 5; z-index: auto; }
  .hero .bg img { object-position: 50% 50%; }
  .hero .bg::after { background: linear-gradient(180deg, rgba(12, 26, 51, .5) 0%, rgba(12, 26, 51, 0) 26%, rgba(12, 26, 51, 0) 72%, var(--ink) 100%); }
  .hero-top { position: absolute; top: 0; left: 0; right: 0; padding-top: 18px; align-items: flex-start; }
  .hero-meta { position: relative; margin-top: -48px; padding-bottom: 28px; }
}

/* ---------- cột cây số ---------- */
.post { --w: 150px; width: var(--w); flex: none; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.post .head {
  background: var(--post-red); color: #fff; border-radius: calc(var(--w) / 2) calc(var(--w) / 2) 0 0;
  height: calc(var(--w) * .62); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  font-family: var(--font-d); font-weight: 700; font-size: calc(var(--w) * .16); letter-spacing: .02em; text-align: center; line-height: 1.05;
}
.post .body {
  background: linear-gradient(90deg, #e9eeec, #fff 40%, #dfe6e3); color: var(--ink);
  text-align: center; padding: 10px 6px 14px; border-radius: 0 0 4px 4px;
}
.post .num { font-family: var(--font-d); font-weight: 800; font-size: calc(var(--w) * .46); line-height: .95; }
.post .unit { font-family: var(--font-d); font-weight: 600; font-size: calc(var(--w) * .15); }
.post .foot { height: 14px; background: #b9c3c0; margin: 0 6px; border-radius: 0 0 3px 3px; }
@media (max-width: 720px) { .hero .post { --w: 96px; } }

/* ---------- con đường (các chặng) ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head p { max-width: 60ch; margin: 8px 0 0; color: var(--mist); }
.road { list-style: none; margin: 0; padding-left: 0; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding-top: 18px; }
.road::before {
  content: ""; position: absolute; left: 0; right: 0; top: 46px; height: 10px; border-radius: 6px;
  background: #2b3542; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.road::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50px; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .7) 0 18px, transparent 18px 34px);
}
.stop { position: relative; z-index: 1; text-align: left; }
.stop .km {
  display: inline-flex; flex-direction: column; align-items: center; width: 54px; border-radius: 27px 27px 3px 3px; overflow: hidden;
  background: #fff; color: var(--ink); font-family: var(--font-d); font-weight: 700; line-height: 1; box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}
.stop .km i { display: block; width: 100%; background: var(--post-red); color: #fff; font-style: normal; font-size: 11px; padding: 9px 0 3px; text-align: center; }
.stop .km b { font-size: 20px; padding: 4px 0 5px; }
.stop h3 { margin-top: 14px; font-size: 22px; }
.stop p { color: var(--mist); font-size: 14px; margin: 4px 0 0; }
.stop.now .km { outline: 3px solid var(--ball); outline-offset: 3px; }
.stop.now h3 { color: var(--ball); }
.stop.done { opacity: .62; }
.stop .here { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--ball); padding: 2px 8px; border-radius: 999px; }
@media (max-width: 760px) {
  .road { grid-template-columns: 1fr; gap: 18px; padding-top: 0; padding-left: 70px; }
  .road::before { left: 22px; right: auto; top: 0; bottom: 0; width: 10px; height: auto; }
  .road::after { left: 26px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .7) 0 14px, transparent 14px 26px); }
  .stop .km { position: absolute; left: -70px; top: 0; }
  .stop h3 { margin-top: 2px; }
}

/* ---------- avatar + thẻ VĐV ---------- */
.av { --s: 56px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; overflow: hidden; background: #efe6d6; position: relative; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.mono { display: grid; place-items: center; background: linear-gradient(140deg, var(--court), #164c63); color: var(--salt); font-family: var(--font-d); font-weight: 700; font-size: calc(var(--s) * .42); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.pcard {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 18px 12px 14px; border-radius: var(--r-m); background: var(--ink-2); position: relative;
}
.pcard .av { --s: 84px; }
.pcard .nm { font-family: var(--font-d); font-weight: 700; font-size: 21px; line-height: 1.1; }
.pcard .dp { font-size: 13px; color: var(--mist); line-height: 1.35; min-height: 1.35em; }
.pcard .no { position: absolute; top: 10px; left: 12px; font-family: var(--font-d); font-weight: 600; font-size: 14px; color: var(--mist); }
.lv {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px;
  font-family: var(--font-d); font-weight: 800; font-size: 17px; color: var(--ink);
}
.lv-A { background: #ffd166; } .lv-B { background: #9be7c4; } .lv-C { background: #8ecdf0; } .lv-D { background: #d7c4f5; }
.pcard .lv { position: absolute; top: 10px; right: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-ok { color: var(--ok); background: rgba(79, 209, 165, .12); }
.chip-wait { color: var(--wait); background: rgba(242, 193, 78, .12); }
.chip-new { color: var(--mist); background: rgba(169, 188, 203, .12); }
.counts { display: flex; gap: 22px; flex-wrap: wrap; font-size: 17px; }
.counts b { font-family: var(--font-d); font-size: 30px; font-weight: 800; margin-right: 4px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 0; background: var(--ink-2); color: var(--mist); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.filters button[aria-pressed="true"] { background: var(--salt); color: var(--ink); font-weight: 600; }
.empty { padding: 40px 20px; text-align: center; color: var(--mist); border: 1.5px dashed var(--line); border-radius: var(--r-m); }

/* ---------- thể thức ---------- */
.rules { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.rules ol { margin: 0; padding-left: 22px; }
.rules li { margin-bottom: 12px; }
.rules li::marker { font-family: var(--font-d); font-weight: 700; color: var(--sunset); }
.fee { background: var(--salt); color: var(--ink); border-radius: var(--r-l); padding: 26px; }
.fee .amt { font-family: var(--font-d); font-weight: 800; font-size: 64px; line-height: 1; }
.fee .amt small { font-size: 26px; font-weight: 700; margin-left: 4px; }
.fee p { color: #34465f; }
@media (max-width: 860px) { .rules { grid-template-columns: 1fr; } }

/* ---------- form đăng ký ---------- */
.form-shell { display: grid; grid-template-columns: 1fr 380px; gap: 40px; padding: 40px 0 72px; align-items: start; }
@media (max-width: 900px) { .form-shell { grid-template-columns: 1fr; gap: 22px; padding-top: 20px; } .form-side { order: -1; } .form-side .poster img { aspect-ratio: 16 / 9; object-position: 50% 58%; } .form-side > p { display: none; } }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--mist); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--r-s);
  background: var(--ink-2); border: 1.5px solid transparent; color: var(--salt); font-size: 16px;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ball); }
.field input[aria-invalid="true"] { border-color: var(--live); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-block; padding: 9px 15px; border-radius: 999px; background: var(--ink-2); color: var(--mist); cursor: pointer; font-size: 15px; }
.seg input:checked + span { background: var(--salt); color: var(--ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--ball); outline-offset: 2px; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.pick label { position: relative; display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 12px; color: var(--mist); text-align: center; line-height: 1.2; }
.pick input { position: absolute; opacity: 0; }
.pick .av { --s: 62px; box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; }
.pick input:checked ~ .av { box-shadow: 0 0 0 3px var(--ball); }
.pick input:checked ~ span { color: var(--salt); font-weight: 600; }
.pick input:focus-visible ~ .av { outline: 3px solid var(--ball); outline-offset: 2px; }
.pick label.taken { opacity: .3; cursor: not-allowed; }
.err { color: #ffb4a8; background: rgba(255, 75, 75, .1); padding: 10px 14px; border-radius: var(--r-s); }
.hp { position: absolute; left: -9999px; }
.form-side .poster { border-radius: var(--r-l); overflow: hidden; position: relative; }
.form-side .poster img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.form-side .poster .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 16px; background: linear-gradient(180deg, transparent, rgba(12, 26, 51, .92)); }
.form-side .poster .cap b { font-family: var(--font-d); font-size: 28px; font-weight: 800; font-style: italic; display: block; line-height: 1.05; }

/* ---------- vé xe ---------- */
.ticket-page { padding: 34px 0 72px; }
.ticket {
  --notch: 16px;
  display: grid; grid-template-columns: 1fr 330px; max-width: 920px; margin: 0 auto;
  background: var(--salt); color: var(--ink); border-radius: var(--r-l); overflow: hidden; position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.ticket .main { padding: 26px 28px; position: relative; }
.ticket .stub { padding: 24px 26px; background: #fff; border-left: 2px dashed #c6d0cc; position: relative; }
.ticket .stub::before, .ticket .stub::after {
  content: ""; position: absolute; left: calc(var(--notch) * -1 - 1px); width: calc(var(--notch) * 2); height: calc(var(--notch) * 2); border-radius: 50%; background: var(--ink);
}
.ticket .stub::before { top: calc(var(--notch) * -1); }
.ticket .stub::after { bottom: calc(var(--notch) * -1); }
.route { display: flex; align-items: center; gap: 12px; font-family: var(--font-d); font-weight: 800; font-size: clamp(30px, 5vw, 44px); line-height: 1; }
.route .ln { flex: 1; height: 3px; background: repeating-linear-gradient(90deg, var(--ink) 0 10px, transparent 10px 18px); position: relative; }
.route .ln::after { content: ""; position: absolute; right: -2px; top: -6px; border: 7.5px solid transparent; border-left: 11px solid var(--ink); border-right: 0; }
.tk-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 14px 26px; margin-top: 22px; justify-content: start; }
.tk-meta div span { display: block; font-size: 12px; color: #5a6b80; }
.tk-meta div b { font-family: var(--font-d); font-size: 22px; font-weight: 700; line-height: 1.15; }
.tk-who { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #d5ddd9; }
.tk-who .av { --s: 66px; }
.tk-who .nm { font-family: var(--font-d); font-weight: 800; font-size: 30px; line-height: 1.05; }
.tk-status { margin-top: 20px; padding: 14px 16px; border-radius: var(--r-m); background: #e3ebe8; }
.tk-status.ok { background: #d5f3e8; }
.tk-status h3 { font-size: 22px; }
.tk-status p { margin: 4px 0 0; color: #34465f; font-size: 15px; }
.stub .qr { background: #fff; border-radius: 10px; padding: 4px; width: 100%; max-width: 260px; margin: 0 auto; }
.stub .qr svg { width: 100%; height: auto; display: block; }
.stub .amt { font-family: var(--font-d); font-weight: 800; font-size: 38px; text-align: center; margin-top: 6px; line-height: 1; }
.stub dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 14px; margin: 14px 0 0; }
.stub dt { color: #5a6b80; }
.stub dd { margin: 0; font-weight: 600; word-break: break-word; }
.copy { border: 0; background: #e3ebe8; color: var(--ink); border-radius: 6px; padding: 1px 8px; font-size: 12px; cursor: pointer; margin-left: 6px; font-weight: 600; }
.ticket .btn-hot { width: 100%; margin-top: 16px; }
.tk-help { max-width: 920px; margin: 18px auto 0; color: var(--mist); font-size: 14px; }
@media (max-width: 780px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket .stub { border-left: 0; border-top: 2px dashed #c6d0cc; }
  .ticket .stub::before, .ticket .stub::after { top: calc(var(--notch) * -1 - 1px); left: auto; bottom: auto; }
  .ticket .stub::before { left: calc(var(--notch) * -1); }
  .ticket .stub::after { right: calc(var(--notch) * -1); }
  .tk-meta { grid-template-columns: repeat(2, auto); }
}

/* ---------- vòng bảng / trận ---------- */
.tabs { display: flex; gap: 6px; margin: 24px 0; flex-wrap: wrap; }
.tabs button { border: 0; background: var(--ink-2); color: var(--mist); padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--salt); color: var(--ink); }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
@media (max-width: 420px) { .groups { grid-template-columns: 1fr; } }
.gtable { background: var(--ink-2); border-radius: var(--r-m); padding: 16px 16px 10px; }
.gtable h3 { display: flex; align-items: baseline; gap: 10px; font-size: 30px; margin-bottom: 10px; }
.gtable h3 small { font-family: var(--font-t); font-size: 13px; font-weight: 400; color: var(--mist); }
.gtable table { width: 100%; border-collapse: collapse; font-size: 15px; }
.gtable th { font-size: 12px; font-weight: 500; color: var(--mist); text-align: right; padding: 4px 4px 8px; }
.gtable th:nth-child(2) { text-align: left; }
.gtable td { padding: 8px 4px; border-top: 1px solid var(--line); text-align: right; }
.gtable td.team { text-align: left; }
.gtable td.rk { width: 26px; text-align: center; font-family: var(--font-d); font-weight: 700; font-size: 18px; color: var(--mist); }
.gtable tr.q td.rk { color: var(--ball); }
.gtable tr.q td.rk::after { content: ""; display: block; width: 6px; height: 6px; margin: 2px auto 0; border-radius: 50%; background: var(--ball); }
.duo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.duo .avs { display: flex; flex: none; }
.duo .avs .av { --s: 32px; box-shadow: 0 0 0 2px var(--ink-2); }
.duo .avs .av + .av { margin-left: -9px; }
.duo .nms { min-width: 0; line-height: 1.2; }
.duo .nms b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duo .nms small { color: var(--mist); font-size: 12px; }
.form5 { display: inline-flex; gap: 3px; }
.form5 i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.form5 .W { background: var(--ok); } .form5 .L { background: #5b6f86; }
.legend { font-size: 13px; color: var(--mist); margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--ball); display: inline-block; }

.mlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.match { background: var(--ink-2); border-radius: var(--r-m); padding: 12px 14px; }
.match .mh { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--mist); margin-bottom: 8px; }
.match .mr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 5px 0; }
.match .mr + .mr { border-top: 1px solid var(--line); }
.match .sc { display: flex; gap: 10px; font-family: var(--font-d); font-weight: 700; font-size: 22px; min-width: 30px; justify-content: flex-end; }
.match .sc span { min-width: 22px; text-align: right; }
.match .mr.lose { opacity: .55; }
.match .mr.win .nms b::after { content: " ▸"; color: var(--ball); }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--live); font-weight: 700; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- nhánh đấu ---------- */
.bracket-wrap { overflow-x: auto; padding-bottom: 12px; }
.bracket { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 40px; min-width: max-content; align-items: stretch; }
.bracket .col { display: flex; flex-direction: column; }
.bracket .stack { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 18px; }
.bracket .col h4 { font-family: var(--font-d); font-weight: 700; font-size: 20px; margin: 0 0 4px; color: var(--mist); }
.bracket .match { position: relative; z-index: 1; }
.bracket svg.links { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: visible; }
.bracket svg.links path { fill: none; stroke: #3a5478; stroke-width: 2; }
.bracket svg.links path.hot { stroke: var(--ball); stroke-width: 3; }
.bracket .match.hot { box-shadow: 0 0 0 2px var(--ball); }
.bracket .champ { align-items: center; justify-content: center; gap: 10px; text-align: center; }
.bracket .champ img { width: 220px; -webkit-mask: radial-gradient(circle, #000 52%, transparent 70%); mask: radial-gradient(circle, #000 52%, transparent 70%); }
.bracket .champ b { font-family: var(--font-d); font-size: 28px; font-weight: 800; font-style: italic; }

/* ---------- rút thăm ---------- */
.draw-page { background: #070f1f; }
.stage-shell { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 56px); margin: 0 auto; overflow: hidden; }
.stage-shell.fs { position: fixed; inset: 0; max-height: none; aspect-ratio: auto; z-index: 100; background: #070f1f; }
.stage {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: 0 0;
  background: #0a1730 url(/art/stage-1920.jpg) center / cover no-repeat; color: var(--salt); overflow: hidden;
}
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 46%, rgba(7, 15, 31, .25), rgba(7, 15, 31, .86) 70%); }
.stage > * { position: absolute; }
.st-top { left: 64px; right: 64px; top: 40px; display: flex; align-items: center; gap: 28px; }
.st-top .ttl { font-family: var(--font-d); font-weight: 800; font-style: italic; font-size: 58px; line-height: 1; }
.st-top .sub { font-size: 24px; color: var(--mist); }
.st-top .cnt { margin-left: auto; font-family: var(--font-d); font-size: 34px; font-weight: 700; }
.st-top .live-dot { font-size: 26px; }
.pot { top: 170px; width: 480px; bottom: 210px; padding: 22px; border-radius: 22px; background: rgba(12, 26, 51, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); display: flex; flex-direction: column; }
.pot h3 { font-size: 34px; margin-bottom: 4px; }
.pot .ph { font-size: 19px; color: var(--mist); margin-bottom: 14px; }
.pot.left { left: 64px; } .pot.right { right: 64px; }
.pot .balls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-content: start; overflow: hidden; }
.ballp { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); font-size: 21px; font-weight: 600; line-height: 1.1; transition: opacity .4s, background .4s, box-shadow .4s, transform .4s; min-width: 0; }
.ballp .av { --s: 44px; }
.ballp span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ballp .lv { margin-left: auto; height: 28px; font-size: 18px; }
.ballp.used { opacity: .18; }
.ballp.elig { background: rgba(221, 240, 74, .16); box-shadow: inset 0 0 0 2px var(--ball); }
.ballp.blocked { opacity: .35; }
.ballp .why { font-size: 13px; color: var(--mist); font-weight: 500; display: block; }
.center { left: 570px; right: 570px; top: 190px; bottom: 230px; display: grid; place-items: center; text-align: center; }
.reveal { display: grid; justify-items: center; gap: 18px; }
.ball-big {
  width: 230px; height: 230px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 34% 30%, #fbffc8, var(--ball) 46%, #9fb51c 100%);
  box-shadow: 0 0 80px rgba(221, 240, 74, .45), inset -14px -18px 30px rgba(0, 0, 0, .18);
}
.ball-big::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 80, 10, .55) 0 7px, transparent 8px) 0 0 / 46px 46px;
  -webkit-mask: radial-gradient(circle, #000 64%, transparent 66%); mask: radial-gradient(circle, #000 64%, transparent 66%);
}
.ball-big.shake { animation: shake .7s ease-in-out; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg) scale(1.04); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg) scale(1.06); } 80% { transform: rotate(5deg); } }
.card-flip { perspective: 1400px; }
.card-flip .inner { width: 600px; height: 300px; position: relative; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.card-flip.on .inner { transform: rotateY(180deg); }
.card-flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 26px; display: grid; place-items: center; }
.card-flip .front { background: rgba(12, 26, 51, .55); box-shadow: inset 0 0 0 2px rgba(221, 240, 74, .35); }
.card-flip .back { transform: rotateY(180deg); background: var(--salt); color: var(--ink); grid-template-columns: auto 1fr; gap: 26px; padding: 30px 36px; text-align: left; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.card-flip .back .av { --s: 190px; box-shadow: 0 0 0 5px var(--ball); }
.card-flip .back .nm { font-family: var(--font-d); font-weight: 800; font-size: 60px; line-height: 1.12; }
.card-flip .back .dp { font-size: 22px; color: #34465f; margin-top: 10px; line-height: 1.3; }
.card-flip .back .lv { margin-top: 12px; height: 40px; min-width: 40px; font-size: 26px; border-radius: 10px; }
.reveal .say { font-size: 30px; font-family: var(--font-d); font-weight: 600; color: var(--salt); min-height: 40px; }
.teams-strip { left: 64px; right: 64px; bottom: 96px; height: 96px; display: flex; gap: 12px; overflow: hidden; align-items: stretch; }
.tchip { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 16px; background: rgba(242, 246, 244, .1); font-size: 20px; font-weight: 600; }
.tchip .avs { display: flex; }
.tchip .avs .av { --s: 52px; box-shadow: 0 0 0 3px #13284a; }
.tchip .avs .av + .av { margin-left: -14px; }
.tchip small { display: block; font-size: 15px; color: var(--mist); font-weight: 500; }
.tchip.new { background: rgba(221, 240, 74, .2); box-shadow: inset 0 0 0 2px var(--ball); }
.audit { left: 64px; right: 64px; bottom: 30px; display: flex; gap: 34px; font-size: 18px; color: var(--mist); align-items: center; }
.audit code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; color: var(--salt); font-size: 17px; }
.audit .vq { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.gcols { left: 580px; right: 64px; top: 170px; bottom: 210px; display: grid; gap: 16px; grid-auto-flow: column; grid-auto-columns: 1fr; }
.gcol { background: rgba(12, 26, 51, .72); border-radius: 22px; padding: 18px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.gcol h3 { font-size: 44px; margin-bottom: 12px; }
.gslot { height: 88px; border-radius: 16px; border: 2px dashed rgba(242, 246, 244, .18); margin-bottom: 10px; display: flex; align-items: center; padding: 0 12px; gap: 10px; font-size: 20px; font-weight: 600; }
.gslot.full { border: 0; background: rgba(242, 246, 244, .1); }
.gslot.new { background: rgba(221, 240, 74, .2); box-shadow: inset 0 0 0 2px var(--ball); }
.gslot .avs { display: flex; } .gslot .avs .av { --s: 50px; box-shadow: 0 0 0 3px #13284a; } .gslot .avs .av + .av { margin-left: -14px; }
.gslot small { display: block; font-size: 14px; color: var(--mist); font-weight: 500; }
.tpot { left: 64px; width: 480px; top: 170px; bottom: 210px; overflow: hidden; }
.tpot .pot { position: static; height: 100%; width: auto; }
.tpot .tp-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .06); margin-bottom: 8px; font-size: 19px; font-weight: 600; transition: opacity .4s; }
.tpot .tp-row.used { opacity: .18; }
.tpot .tp-row .avs { display: flex; } .tpot .tp-row .avs .av { --s: 40px; box-shadow: 0 0 0 2px #13284a; } .tpot .tp-row .avs .av + .av { margin-left: -12px; }
.tpot .tp-h { font-family: var(--font-d); font-size: 22px; font-weight: 700; color: var(--mist); margin: 10px 0 6px; }
.flyer { position: fixed; z-index: 200; pointer-events: none; transition: transform .75s cubic-bezier(.3, .7, .2, 1), opacity .75s; }
.wait-screen { left: 0; right: 0; top: 190px; bottom: 140px; display: grid; place-items: center; text-align: center; }
.wait-screen h2 { font-size: 96px; font-style: italic; font-weight: 800; }
.wait-screen p { font-size: 28px; color: var(--mist); max-width: 1100px; margin: 18px auto 0; }
.wait-screen .commit { margin-top: 34px; font-size: 22px; }
.wait-screen .commit code { display: block; margin-top: 8px; font-size: 26px; color: var(--ball); font-family: ui-monospace, 'SF Mono', Menlo, monospace; word-break: break-all; }
.draw-tools { display: flex; gap: 8px; justify-content: flex-end; padding: 8px var(--gutter); }

/* rút thăm trên điện thoại: bỏ sân khấu 16:9, xếp dọc */
.mdraw { padding-top: 18px; padding-bottom: 60px; }
.mdraw .panel h3 { margin-top: 0; }
.mdraw .now { background: var(--salt); color: var(--ink); border-radius: var(--r-l); padding: 18px; display: flex; gap: 14px; align-items: center; }
.mdraw .now .av { --s: 72px; }
.mdraw .now .nm { font-family: var(--font-d); font-size: 30px; font-weight: 800; line-height: 1.05; }
.mdraw h3 { margin: 26px 0 10px; }
.mdraw .list { display: grid; gap: 8px; }
.mdraw .ballp { font-size: 16px; }
.mdraw .ballp .av { --s: 36px; }

/* ---------- kiểm chứng + admin ---------- */
.panel { background: var(--ink-2); border-radius: var(--r-m); padding: 20px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: start; }
.check .st { font-weight: 700; }
.check .st.ok { color: var(--ok); } .check .st.bad { color: var(--live); }
code.hash { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; word-break: break-all; color: var(--salt); }
.adm table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm th { text-align: left; font-weight: 500; color: var(--mist); font-size: 12px; padding: 6px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--ink); }
.adm td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm select, .adm input { background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; color: var(--salt); max-width: 100%; }
.adm .tblw { overflow-x: auto; }
.adm .bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.adm .big { min-height: 64px; font-size: 22px; padding: 0 34px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--salt); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 300; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast.bad { background: #ffb4a8; }
footer.foot { padding: 34px 0 44px; color: var(--mist); font-size: 14px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
