/* =========================================================
   GIẢI ĐẤU NỘI BỘ MR.K – Giao diện chung
   Nỉ xanh bàn bida + vàng kim
   ========================================================= */
:root {
    --bg: #071f17;
    --bg-2: #0b2a20;
    --felt: #0f3d2e;
    --felt-2: #145039;
    --surface: rgba(255,255,255,.045);
    --surface-2: rgba(255,255,255,.075);
    --border: rgba(255,255,255,.09);
    --border-2: rgba(255,255,255,.16);
    --gold: #d4af37;
    --gold-2: #f0d77a;
    --gold-soft: rgba(212,175,55,.14);
    --text: #eef4f0;
    --muted: #9db3a8;
    --win: #1a7a43;   /* chữ trắng trên nền thắng đủ tương phản (≥ 4.5:1) */
    --live: #ef4444;
    --danger: #e5533d;
    --ok: #34d399;
    --card: #ffffff;
    --ink: #1c2420;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --font: "Be Vietnam Pro", system-ui, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.5;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(20,80,57,.55), transparent 60%),
        radial-gradient(900px 500px at 110% 0%, rgba(212,175,55,.08), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 20px; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }

/* ---------- Nút ---------- */
.btn, button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 600 14px var(--font); border: 1px solid transparent; border-radius: 10px;
    padding: 10px 18px; cursor: pointer; text-decoration: none; transition: .15s; white-space: nowrap;
    background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405;
    box-shadow: 0 4px 14px rgba(212,175,55,.25);
}
.btn:hover, button:hover { filter: brightness(1.06); color: #1a1405; transform: translateY(-1px); }
.btn.ghost, button.ghost {
    background: var(--surface); color: var(--text); border-color: var(--border-2); box-shadow: none;
}
.btn.ghost:hover, button.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger, button.danger { background: var(--danger); color: #fff; box-shadow: none; }
.btn.sm, button.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.lg, button.lg { padding: 13px 26px; font-size: 16px; border-radius: 12px; }
button:disabled { opacity: .5; cursor: wait; transform: none; }
button.armed { background: var(--danger) !important; color: #fff !important; border-color: var(--danger) !important; }
button.icon { background: transparent; box-shadow: none; padding: 2px 6px; color: inherit; border: 0; opacity: .65; }
button.icon:hover { opacity: 1; transform: none; }

/* ---------- Form ---------- */
label.f { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel], input[type=search], input[type=url], input[type=date], input[type=time], select, textarea {
    width: 100%; font: 15px var(--font); color: var(--text); background: rgba(0,0,0,.25);
    border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px; outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input[type=date], input[type=time] { color-scheme: dark; }
select option { background: var(--bg-2); }
/* Hộp nền trắng (nhập kết quả…): danh sách chọn chữ tối trên nền sáng – không bị chữ tối trên nền tối */
.modal-box select option, .card-light select option { background: #fff; color: #1c2420; }
.ff-btn.on { background: #e5484d !important; color: #fff !important; border-color: #e5484d !important; }
.wo-reason .wo-who { display: block; color: #b42318; font-size: 13.5px; margin-bottom: 2px; }
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: 1 / -1; }
@media (max-width: 860px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span3 { grid-column: 1 / -1; } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2, .span3 { grid-column: auto; } }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.actions .sp { flex: 1; }

/* ---------- Khung / thẻ ---------- */
.panel {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.panel > h2, .panel-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel > h2 { margin-bottom: 14px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--gold); color: #1a1405; font-size: 13px; font-weight: 800; }
.alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.alert.ok { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.35); color: #a7f3d0; }
.alert.error { background: rgba(229,83,61,.12); border-color: rgba(229,83,61,.4); color: #fecaca; }
.error-text { color: #fca5a5; font-size: 14px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 40px; display: block; margin-bottom: 6px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    padding: 4px 10px; border-radius: 99px; white-space: nowrap; letter-spacing: .2px; }
.badge.live { background: rgba(239,68,68,.15); color: #fca5a5; }
.badge.ready { background: rgba(212,175,55,.15); color: var(--gold-2); }
.badge.done { background: rgba(255,255,255,.08); color: var(--muted); }
.badge.soon { background: rgba(59,130,246,.15); color: #93c5fd; }
.badge.cancel-b { background: rgba(239,68,68,.16); color: #fca5a5; }
.cancel-box { margin: 14px 0; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block;
    box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.live-off .dot-live { background: #777; animation: none; }

.progress { height: 6px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 99px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
    font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border-2); }
table.tbl td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td form { display: inline; }
.tbl-wrap { overflow-x: auto; }

/* ---------- Header / footer công khai ---------- */
.site-head { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
    background: rgba(7,31,23,.82); border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.logo { flex: none; filter: drop-shadow(0 3px 8px rgba(0,0,0,.4)); }
.site-nav { display: flex; gap: 4px; background: rgba(0,0,0,.25); border: 1px solid var(--border); padding: 4px; border-radius: 12px; }
.site-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; }
.site-nav a:hover { color: var(--text); }
.site-nav a.on { background: var(--gold); color: #1a1405; }
.site-nav a.on .dot-live { background: #7f1d1d; box-shadow: none; animation: none; }
@media (max-width: 640px) {
    .head-row { padding-top: 10px; padding-bottom: 10px; }
    .site-nav { width: 100%; }
    .site-nav a { flex: 1; justify-content: center; padding: 8px 6px; font-size: 13px; }
}
.site-foot { border-top: 1px solid var(--border); margin-top: 40px; padding: 22px 0; color: var(--muted); font-size: 13px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--gold); }

/* ---------- Trang chủ ---------- */
.hero { padding: 38px 0 24px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { color: var(--muted); margin: 8px 0 0; max-width: 640px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; max-width: 640px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; font-weight: 800; color: var(--gold-2); }
.stat span { font-size: 12px; color: var(--muted); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.section-title h2 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.t-card { position: relative; display: block; color: var(--text); border-radius: var(--radius); padding: 20px;
    background: linear-gradient(160deg, var(--felt-2), var(--felt) 55%, var(--bg-2));
    border: 1px solid var(--border-2); box-shadow: var(--shadow); overflow: hidden; transition: .2s; }
.t-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,.18), transparent 70%); }
.t-card:hover { transform: translateY(-3px); border-color: rgba(212,175,55,.5); color: var(--text); }
.t-card h3 { font-size: 19px; font-weight: 800; margin: 12px 0 6px; }
.t-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.t-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
.t-card .go { font-weight: 700; color: var(--gold); font-size: 14px; }
.t-card .progress { margin-top: 14px; }
.t-card .prog-text { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Lịch thi đấu */
.sched { display: grid; gap: 12px; }
.sched-item { display: grid; grid-template-columns: 86px 1fr auto; gap: 18px; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.sched-item.past { opacity: .6; }
.cal { text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-2); background: rgba(0,0,0,.25); }
.cal .m { background: var(--gold); color: #1a1405; font-size: 11px; font-weight: 800; padding: 3px 0; letter-spacing: .5px; }
.cal .d { font-size: 28px; font-weight: 800; line-height: 1.2; padding-top: 4px; }
.cal .w { font-size: 11px; color: var(--muted); padding-bottom: 6px; }
.sched-item h3 { font-size: 17px; font-weight: 700; }
.sched-item .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; margin-top: 6px; }
.sched-item .meta b { color: var(--text); font-weight: 600; }
.sched-item .note { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: pre-line; }
@media (max-width: 640px) {
    .sched-item { grid-template-columns: 64px 1fr; }
    .sched-item > :last-child { grid-column: 1 / -1; }
    .cal .d { font-size: 22px; }
}

/* Lịch sử */
.podium { display: grid; gap: 6px; margin-top: 14px; }
.podium div { display: flex; align-items: center; gap: 10px; font-size: 14px; background: rgba(0,0,0,.2); border-radius: 8px; padding: 6px 10px; }
.podium div:first-child { background: var(--gold-soft); font-weight: 700; color: var(--gold-2); }
.podium span { width: 22px; text-align: center; }

/* ---------- Trang 1 giải ---------- */
.t-head { padding: 26px 0 8px; }
.t-head .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.t-head .crumbs a { color: var(--muted); }
.t-head .crumbs a:hover { color: var(--gold); }
.t-head h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.t-head .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; margin-top: 10px; }
.t-head .meta b { color: var(--text); font-weight: 600; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 18px 0 18px; overflow-x: auto; }
.tabs button { background: none; box-shadow: none; color: var(--muted); border-radius: 0; padding: 12px 14px;
    border-bottom: 2px solid transparent; font-weight: 600; }
.tabs button:hover { transform: none; color: var(--text); filter: none; }
.tabs button.on { color: var(--gold); border-bottom-color: var(--gold); }
.champion-banner { display: flex; align-items: center; gap: 16px; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px;
    background: linear-gradient(120deg, rgba(212,175,55,.28), rgba(212,175,55,.06)); border: 1px solid rgba(212,175,55,.45); }
.champion-banner .cup { font-size: 40px; }
.champion-banner small { display: block; color: var(--gold-2); font-weight: 700; letter-spacing: .6px; font-size: 12px; }
.champion-banner b { font-size: 22px; font-weight: 800; }

/* Danh sách trận (tab "Trận đấu") */
.mlist { display: grid; gap: 8px; }
.mrow { display: grid; grid-template-columns: 56px 1fr 74px 1fr 70px; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.mrow.clickable { cursor: pointer; transition: .12s; }
.mrow.clickable:hover { border-color: var(--gold); background: var(--surface-2); }
.mrow .no { color: var(--muted); font-size: 12px; }
.mrow .pl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .pl.r { text-align: right; }
.mrow .pl.w { font-weight: 700; color: var(--text); }
.mrow .pl.l { color: var(--muted); text-decoration: line-through; }
.mrow .sc { text-align: center; font-weight: 800; font-size: 16px; background: rgba(0,0,0,.25); border-radius: 8px; padding: 3px 0; }
.mrow .sc.pending { font-size: 12px; font-weight: 600; color: var(--muted); }
.mrow .tb { text-align: right; }
.mrow.has-cam { grid-template-columns: 56px 1fr 74px 1fr 70px 36px; }
.cam-cell { text-align: right; }
button.cam { width: 34px; height: 34px; padding: 0; border-radius: 9px; box-shadow: none;
    background: var(--gold-soft); color: var(--gold-2); border: 1px solid rgba(212,175,55,.35); }
button.cam:hover { background: var(--gold); color: #1a1405; transform: none; }
.modal-box.notice { width: min(400px, 100%); text-align: center; }
.modal-box.notice .notice-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; font-size: 30px; }
.modal-box.notice p { color: #4b5550; margin: 8px 0 0; }
.tbl-tag { display: inline-block; background: var(--gold); color: #1a1405; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.round-label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--gold);
    text-transform: uppercase; letter-spacing: .6px; margin: 18px 0 8px; }
.round-label .pill { text-transform: none; letter-spacing: .2px; }
.mrow .sc small { font-size: 10px; color: #fca5a5; }
@media (max-width: 560px) {
    .mrow { grid-template-columns: 1fr 60px 1fr; }
    .mrow.has-cam { grid-template-columns: 1fr 60px 1fr 34px; }
    .mrow .no, .mrow .tb { display: none; }
}

/* ---------- Sơ đồ ---------- */
.scroll { overflow-x: auto; padding: 8px 4px 22px; scrollbar-width: thin; scrollbar-color: rgba(212,175,55,.55) rgba(255,255,255,.05); }
.scroll::-webkit-scrollbar { height: 10px; }
.scroll::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 99px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(212,175,55,.5); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
.scroll::-webkit-scrollbar-thumb:hover { background-color: var(--gold); }
.scroll.dragging { cursor: grabbing; user-select: none; }
/* Trang người xem: sơ đồ được dùng hết chiều ngang màn hình (thoát khỏi khung 1240px) */
.scroll.bleed { width: 100vw; position: relative; left: 50%; margin-left: -50vw; padding-left: 20px; padding-right: 20px; }
.bracket { position: relative; display: flex; gap: 76px; width: max-content; margin: 0 auto; padding-left: 30px; transform-origin: top left; }
.fit-on .bracket { margin: 0; }
.bracket-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 6px; }
.bracket-tools .hint { font-size: 12px; color: var(--muted); margin-right: auto; }
.bracket svg.lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.round { display: flex; flex-direction: column; width: 214px; }
.round-head { height: 50px; margin-bottom: 8px; }
.round h3 { margin: 0 0 6px; text-align: center; font-size: 12px; font-weight: 800; color: var(--gold);
    text-transform: uppercase; letter-spacing: .8px; height: 18px; }
/* Nhãn thể thức dưới tên vòng: Chạm 7 · Có phí / Miễn phí */
.rule { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }
.rule.left { justify-content: flex-start; margin-bottom: 8px; }
.pill { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; padding: 3px 9px;
    border-radius: 99px; white-space: nowrap; letter-spacing: .2px; box-shadow: 0 2px 6px rgba(0,0,0,.3); line-height: 1.2; }
.pill b { font-size: 13px; font-weight: 800; }
.pill.race { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; }
.pill.fee { background: linear-gradient(180deg, #f87171, #dc2626); color: #fff; }
.pill.free { background: linear-gradient(180deg, #4ade80, #16a34a); color: #fff; }
.p .wo { font-size: 10px; font-weight: 800; color: #b91c1c; background: #fee2e2; border-radius: 4px; padding: 0 4px; }
.fmt-list { display: grid; gap: 8px; }
.fmt-row { display: grid; grid-template-columns: 150px auto 1fr; gap: 14px; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.fmt-row .rule { justify-content: flex-start; }
/* ---------- Giải CLB / giải thành viên ---------- */
.badge.club-b { background: rgba(212,175,55,.18); color: var(--gold-2); }
.badge.member-b { background: rgba(56,189,248,.16); color: #7dd3fc; white-space: normal; max-width: 100%; overflow-wrap: anywhere; text-align: left; }   /* tên người tổ chức dài: xuống dòng, không tràn ngang */
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; position: relative; z-index: 1; }
.origin-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
/* Thẻ giải thành viên: tông xanh dương – khác hẳn thẻ vàng/xanh lá của giải CLB */
.t-card.member { background: linear-gradient(160deg, #123a52, #0d2b3e 55%, #0a2030); border-color: rgba(56,189,248,.35); }
.t-card.member::after { background: radial-gradient(circle, rgba(56,189,248,.2), transparent 70%); }
.t-card.member:hover { border-color: rgba(56,189,248,.7); }
.t-card.member .go { color: #7dd3fc; }
.t-card.member .progress > i { background: linear-gradient(90deg, #38bdf8, #7dd3fc); }
.card-stats { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 6px; margin-top: 10px; }
.card-stats div { background: rgba(0,0,0,.2); border-radius: 8px; padding: 6px 8px; }
.card-stats b { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-stats .wide b { font-size: 12px; }
.card-stats span { font-size: 11px; color: var(--muted); }
.his-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 8px; }
.his-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.his-stats b { display: block; font-size: 22px; font-weight: 800; color: var(--gold-2); }
.his-stats .m b { color: #7dd3fc; }
.his-stats span { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .his-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Trang Tạo giải đấu (thành viên) */
.code-row { display: flex; gap: 10px; max-width: 460px; }
.code-row input { font-size: 20px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; text-align: center; }
.ok-text { color: #86efac; font-weight: 600; }
.locked-steps { opacity: .4; pointer-events: none; filter: grayscale(.4); }
.code-chip { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 15px; letter-spacing: 1px;
    background: rgba(0,0,0,.3); border: 1px dashed rgba(212,175,55,.6); color: var(--gold-2); border-radius: 8px; padding: 4px 10px; }
.code-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* Chọn thể thức thi đấu */
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.type-opt { position: relative; display: block; cursor: pointer; background: var(--surface); border: 1px solid var(--border-2);
    border-radius: 12px; padding: 12px 14px 12px 40px; transition: .15s; }
.type-opt input { position: absolute; left: 14px; top: 15px; accent-color: var(--gold); width: 16px; height: 16px; }
.type-opt b { display: block; font-size: 14px; }
.type-opt small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.type-opt:hover { border-color: rgba(212,175,55,.5); }
.type-opt.on { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 1px var(--gold) inset; }

/* Bật / tắt giải thưởng */
.prize-cfg { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; transition: .15s; }
.prize-cfg.off { opacity: .5; }
.prize-cfg.off .prize { text-decoration: line-through; }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; margin-bottom: 8px; cursor: pointer; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.18); transition: .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + i { background: var(--win); }
.switch input:checked + i::after { left: 19px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--gold-soft); }
.cfg-note { display: block; margin-top: 6px; font-size: 12px; }
.fmt-edit { grid-template-columns: 130px 1fr auto; }
.fmt-inputs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fmt-inputs .race { width: 76px; text-align: center; font-weight: 800; }
.fmt-inputs .fee { width: auto; min-width: 220px; }
@media (max-width: 560px) {
    .fmt-row, .fmt-edit { grid-template-columns: 1fr auto; }
    .fmt-row .small, .fmt-inputs { grid-column: 1 / -1; }
    /* note122 BUG-122-003: nhãn luật dài (VD Karate "Hòa → Quyết định của trọng tài") xuống hàng riêng, được ngắt dòng */
    .fmt-row .rule { grid-column: 1 / -1; min-width: 0; }
    .fmt-row .pill { white-space: normal; text-align: left; }
    .fmt-inputs .fee { min-width: 0; flex: 1; }
}
.matches { flex: 1; display: flex; flex-direction: column; }
.slot-wrap { flex: 1; display: flex; align-items: center; padding: 7px 0; }
.match { width: 100%; background: var(--card); color: var(--ink); border-radius: 9px;
    box-shadow: 0 4px 14px rgba(0,0,0,.35); position: relative; z-index: 1; }
.match.clickable { cursor: pointer; transition: .12s; }
.match.clickable:hover { outline: 2px solid var(--gold); transform: translateY(-1px); }
.match .no { position: absolute; left: -30px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.match .tbl { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%);
    background: var(--gold); color: #1a1405; font-size: 11px; font-weight: 800; padding: 2px 8px;
    border-radius: 99px; white-space: nowrap; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
/* Nút chọn bàn (trọng tài) – cùng kiểu nhãn "Bàn" */
.match .tbl.pick { font: 800 11px var(--font); padding: 2px 8px; border-radius: 99px; border: 0; cursor: pointer;
    background: var(--gold); color: #1a1405; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.match .tbl.pick:hover { transform: translateY(-50%) scale(1.06); filter: brightness(1.08); }
.match .tbl.pick.empty { background: rgba(7,31,23,.9); color: var(--gold-2); border: 1px dashed rgba(212,175,55,.7); }
.tbl-pop { position: absolute; z-index: 300; width: 236px; background: #fff; color: var(--ink); border-radius: 14px; padding: 12px;
    box-shadow: 0 18px 40px rgba(0,0,0,.45); animation: pop .15s ease; }
.tbl-pop .tp-head b { display: block; font-size: 14px; }
.tbl-pop .tp-head small { display: block; color: #6b7570; font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-pop .tp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.tbl-pop .tp-grid button { padding: 8px 0; font-size: 15px; font-weight: 800; border-radius: 9px; box-shadow: none;
    background: #f1f5f2; color: var(--ink); border: 1px solid #dfe5e1; }
.tbl-pop .tp-grid button:hover { background: var(--gold); border-color: var(--gold); transform: none; }
.tbl-pop .tp-grid button.cur { background: var(--win); color: #fff; border-color: var(--win); }
.tbl-pop .tp-empty { margin: 10px 0; font-size: 13px; color: #9a6b00; background: #fff7e0; border-radius: 8px; padding: 8px; }
.tbl-pop .tp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tbl-pop .tp-foot small { color: #6b7570; font-size: 12px; }
.tbl-pop .ghost { background: #f1f3f2; color: var(--ink); border-color: #dfe3e1; }
.p { display: flex; align-items: center; gap: 4px; padding: 6px 10px; font-size: 13px; min-height: 32px; }
.p:first-of-type { border-radius: 9px 9px 0 0; }
.p:nth-of-type(2) { border-radius: 0 0 9px 9px; border-top: 1px solid #e5e7eb; }
.p .n { min-width: 22px; color: #66706b; font-size: 11px; font-weight: 600; }
.p .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.p .sc { font-weight: 800; min-width: 18px; text-align: right; }
.p .badge-ic { font-size: 14px; }
.p.tbd .nm, .p.bye .nm { color: #5f6964; font-style: italic; }   /* tương phản ≥ 4.5:1 trên nền trắng / #f3f4f3 (WCAG AA) */
.p.bye { background: #f3f4f3; }
.p.win { background: var(--win); color: #fff; }
.p.win .nm { font-weight: 700; }
.p.win .n { color: #c9ecd6; }
.p.lose .nm { color: #6b756f; text-decoration: line-through; }
.p.lose .sc { color: #6b756f; }
.champ-col .slot-wrap { padding: 0; }
.champ-wrap { position: relative; width: 100%; }
.champ-box { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; padding: 16px; border-radius: 12px;
    text-align: center; font-size: 17px; position: relative; z-index: 1; box-shadow: 0 8px 24px rgba(212,175,55,.3); }
.champ-box small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1px; margin-bottom: 4px; }
.below { position: absolute; top: calc(100% + 26px); left: 0; right: 0; display: grid; gap: 22px; }
.third h4, .standings h4 { margin: 0 0 8px; font-size: 12px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: .6px; }
/* Bảng xếp hạng dưới tranh hạng Ba */
.standings { position: absolute; z-index: 1; background: linear-gradient(180deg, rgba(20,80,57,.55), rgba(11,42,32,.9));
    border: 1px solid rgba(212,175,55,.35); border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.standings h4 { font-size: 13px; }
.st-row { display: grid; grid-template-columns: 28px 100px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 4px;
    padding: 8px 12px; border-radius: 9px; font-size: 14px; }
.st-row .ic { grid-row: span 2; }
.st-row .lb { grid-row: span 2; white-space: nowrap; }
.st-row + .st-row { margin-top: 4px; }
.st-row .ic { font-size: 19px; text-align: center; }
.st-row .lb { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.st-row .who { font-weight: 700; color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-row:not(.got) .who { font-weight: 500; font-style: italic; font-size: 13px; }
.st-row .who i { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; margin-right: 6px; }
.st-row.got .who { color: var(--text); }
.st-row .amt { color: var(--gold-2); font-weight: 700; font-size: 13px; white-space: nowrap; text-align: right; }
.st-row .path { grid-column: 3 / 5; display: flex; gap: 4px; flex-wrap: wrap; }
.st-row .path:empty { display: none; }
.jr { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; white-space: nowrap; letter-spacing: .2px; }
.jr.w { background: rgba(31,138,76,.35); color: #b7f0cc; }
.jr.l { background: rgba(220,38,38,.28); color: #fecaca; }
.jr small { font-size: 9px; margin-left: 2px; opacity: .8; }
.jr b { font-weight: 800; opacity: .75; margin-right: 3px; }
.st-row.st-1 { background: linear-gradient(90deg, rgba(212,175,55,.32), rgba(212,175,55,.08)); }
.st-row.st-1 .lb, .st-row.st-1.got .who { color: var(--gold-2); }
.st-row.st-2, .st-row.st-3, .st-row.st-4 { background: rgba(255,255,255,.05); }
.st-row.st-kk { background: rgba(0,0,0,.18); }

/* ---------- Các thể thức khác: vòng bảng, nhánh thắng / thua ---------- */
.sec-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; }
.sec-title:first-child { margin-top: 4px; }
.sec-title h3 { font-size: 16px; font-weight: 800; color: var(--gold-2); }
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.grp-card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border-2); border-radius: 14px; padding: 14px; }
.grp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.grp-head h3 { font-size: 16px; font-weight: 800; margin-right: auto; }
.grp-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.grp-table th { font-size: 11px; color: var(--muted); font-weight: 700; text-align: center; padding: 4px; border-bottom: 1px solid var(--border-2); }
.grp-table td { text-align: center; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.grp-table th:nth-child(2), .grp-table td.nm { text-align: left; }
.grp-table td.nm { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-table td.nm i { font-style: normal; color: var(--muted); font-size: 11px; margin-right: 5px; }
.grp-table tr.q td { background: rgba(31,138,76,.16); }
.grp-table tr.q td:first-child { box-shadow: inset 3px 0 0 var(--win); }
.grp-games { display: grid; gap: 4px; }
.gm { display: grid; grid-template-columns: 34px 1fr 64px 1fr auto; gap: 6px; align-items: center; font-size: 13px;
    background: rgba(0,0,0,.18); border-radius: 8px; padding: 6px 8px; }
.gm.clickable { cursor: pointer; }
.gm.clickable:hover { outline: 1px solid var(--gold); }
.gm .no { color: var(--muted); font-size: 11px; }
.gm .pl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm .pl.r { text-align: right; }
.gm .pl.w { font-weight: 700; }
.gm .pl.l { color: var(--muted); text-decoration: line-through; }
.gm .sc { text-align: center; font-weight: 800; font-size: 12px; }
.gm .sc small { color: #fca5a5; font-size: 10px; }
.gm .tbl.pick { position: static; transform: none; font: 800 11px var(--font); padding: 2px 8px; border-radius: 99px; border: 0;
    cursor: pointer; background: var(--gold); color: #1a1405; box-shadow: none; }
.gm .tbl.pick.empty { background: transparent; color: var(--gold-2); border: 1px dashed rgba(212,175,55,.7); }
.final-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.final-row .scroll { flex: 0 1 auto; }
.champ-box.static { width: 230px; }
.standings.static { position: static; width: auto; margin-top: 22px; }
@media (max-width: 560px) { .groups-grid { grid-template-columns: 1fr; } }

/* Giải thưởng */
.prize-list { display: grid; gap: 8px; }
.prize-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.prize-row .ic { font-size: 22px; text-align: center; }
.prize-row .lbl { font-weight: 700; overflow-wrap: anywhere; }
.prize-row .who { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.prize-row.got .who { color: var(--text); font-weight: 700; font-size: 15px; }
.prize-row .amt { color: var(--gold-2); font-weight: 700; white-space: nowrap; }
.prize-row.got { border-color: rgba(212,175,55,.4); background: var(--gold-soft); }
@media (max-width: 480px) { .prize-row { grid-template-columns: 28px minmax(0, 1fr); gap: 4px 10px; } .prize-row .ic { font-size: 18px; } .prize-row .amt { grid-column: 2; white-space: normal; font-size: 14px; } }

/* ---------- Danh sách bốc thăm ---------- */
.drawn { list-style: none; padding: 0; margin: 14px 0 0; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.drawn li { background: var(--card); color: var(--ink); border-radius: 9px; padding: 9px 12px;
    display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 500; }
.drawn .n { background: var(--felt); color: var(--gold-2); font-weight: 800; border-radius: 6px; min-width: 34px; text-align: center; padding: 2px 4px; font-size: 13px; }
.drawn .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawn.rolling li { filter: blur(1.5px); opacity: .6; transform: scale(.97); }
.drawn.final li { animation: pop .4s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.draw-status { font-size: 16px; font-weight: 600; min-height: 24px; }
.dice { display: inline-block; animation: spin .5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hộp thoại ---------- */
.modal { position: fixed; inset: 0; background: rgba(2,10,7,.72); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-box { background: #fff; color: var(--ink); border-radius: 18px; width: min(580px, 100%); padding: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,.5); animation: pop .2s ease; }
.modal-box h3 { font-size: 19px; font-weight: 800; }
.modal-box .sub { color: #6b7570; font-size: 13px; margin-top: 2px; }
.modal-box input[type=text], .modal-box input[type=number], .modal-box input[type=email], .modal-box input[type=tel], .modal-box select {
    background: #fff; color: var(--ink); border: 2px solid #d9dedb; }
.modal-box input:focus, .modal-box select:focus { border-color: var(--gold); }
.modal-box .ghost { background: #f1f3f2; color: var(--ink); border-color: #dfe3e1; }
.modal-box .ghost:hover { background: #e7eae8; color: var(--ink); }
.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; margin: 20px 0; text-align: center; }
.vs .num { display: inline-block; background: var(--felt); color: var(--gold-2); border-radius: 6px; padding: 1px 9px; font-weight: 800; font-size: 12px; }
.vs .name { font-weight: 800; font-size: 17px; margin: 8px 0 12px; word-break: break-word; min-height: 2.7em; line-height: 1.3; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 4px; }
.vs input { max-width: 130px; font-size: 38px !important; font-weight: 800; text-align: center; padding: 8px !important; }
.vs .mid { font-weight: 800; color: #6b756f; padding-top: 56px; }
.vs .ff-btn { max-width: 100%; white-space: normal; line-height: 1.25; }
.vs input { width: 100%; }
.modal-box .row-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.modal-box .row-inline select { width: auto; }
.modal-box .ff-btn { margin-top: 10px; color: #b91c1c; }
.modal-box .ff-btn.armed { color: #fff; }
.fee-row .tbl-tag { margin-right: 4px; }
.modal-box .warn { background: #fff7e0; color: #7a5a00; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 12px; }
.modal-box .error-text { color: #c0392b; margin-top: 10px; }

/* ---------- Đăng nhập ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-2); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); }
.login-card .brand { flex-direction: column; text-align: center; gap: 10px; margin-bottom: 22px; }
.login-card h1 { font-size: 20px; font-weight: 800; }
.login-card .field { margin-bottom: 14px; }
.login-card button { width: 100%; margin-top: 8px; }
.login-card .foot { text-align: center; margin-top: 18px; font-size: 13px; }

/* ---------- Khu quản trị ---------- */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px;
    background: rgba(0,0,0,.28); border-right: 1px solid var(--border); }
.side .brand { padding: 0 6px; }
.side .brand b { font-size: 14px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.side nav a span { width: 22px; text-align: center; }
.side nav a:hover { background: var(--surface); color: var(--text); }
.side nav a.on { background: var(--gold-soft); color: var(--gold-2); box-shadow: inset 3px 0 0 var(--gold); }
.side .me { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface); }
.side .me b { display: block; font-size: 14px; }
.side .me small { display: block; color: var(--muted); font-size: 12px; }
.side .me .out { margin-left: auto; font-size: 20px; color: var(--muted); }
.side .me .out:hover { color: var(--danger); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
    background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; flex: none; }
.main { padding: 28px 32px 60px; min-width: 0; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title h1 { font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.page-title p { color: var(--muted); margin: 6px 0 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: linear-gradient(160deg, var(--felt-2), var(--felt)); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 16px 18px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { display: block; font-size: 30px; font-weight: 800; color: var(--gold-2); line-height: 1.2; margin-top: 4px; }
.kpi small { color: var(--muted); font-size: 12px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; }
.list-row .grow small { color: var(--muted); }
@media (max-width: 960px) {
    .admin-shell { grid-template-columns: 1fr; }
    .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; gap: 10px; }
    .side nav { flex-direction: row; flex-wrap: wrap; flex-basis: 100%; order: 3; }
    .side nav a { padding: 8px 10px; font-size: 13px; }
    .side .me { margin-left: auto; padding: 6px 10px; }
    .main { padding: 20px 16px 50px; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Trang công khai: chống bôi đen */
body.viewer { overflow-x: clip; }   /* cho phép bôi đen, sao chép, in (trước đây bị chặn) */

@media print {
    body { background: #fff; color: #000; }
    .site-head, .site-foot, .side, .tabs, .no-print { display: none !important; }
    .scroll { overflow: visible; }
    .bracket-tools { display: none !important; }
}

/* Tiêu đề phụ trong khối cài đặt giải */
.sub-h { margin: 22px 0 8px !important; font-size: 15px !important; }

/* ---------- Giải sắp tới + đồng hồ đếm ngược ---------- */
.next-card { position: relative; overflow: hidden; border-radius: 18px; padding: 24px;
    background: radial-gradient(600px 260px at 85% -20%, rgba(212,175,55,.22), transparent 65%),
                linear-gradient(160deg, var(--felt-2), var(--felt) 55%, var(--bg-2));
    border: 1px solid rgba(212,175,55,.35); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06); }
.next-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgba(240,215,122,.08) 50%, transparent 60%);
    background-size: 250% 100%; animation: shine 5s linear infinite; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.next-head { display: flex; gap: 18px; align-items: center; }
.cal.big { width: 92px; flex: none; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.cal.big .d { font-size: 34px; }
.next-info { min-width: 0; }
.next-info h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin: 8px 0 4px; letter-spacing: -.3px; }
.next-label { margin: 22px 0 10px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 3px;
    text-transform: uppercase; color: var(--gold-2); opacity: .85; }
.countdown { display: flex; justify-content: center; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.cd-box { width: 104px; text-align: center; }
.cd-box b { position: relative; display: block; font-size: 54px; line-height: 1; font-weight: 800; padding: 16px 0 14px;
    font-variant-numeric: tabular-nums; color: var(--gold-2); border-radius: 14px;
    background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.25) 50%, rgba(0,0,0,.4) 50%, rgba(0,0,0,.2));
    border: 1px solid rgba(212,175,55,.4); text-shadow: 0 0 18px rgba(240,215,122,.55);
    box-shadow: 0 8px 22px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08); }
.cd-box b::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.55); }
.cd-box b.flip { animation: cdflip .45s ease; }
@keyframes cdflip { 0% { transform: rotateX(70deg); opacity: .3; } 100% { transform: none; opacity: 1; } }
.cd-box span { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }
.cd-sep { font-style: normal; font-size: 40px; font-weight: 800; color: var(--gold); padding-top: 18px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.countdown.urgent .cd-box b { color: #fecaca; border-color: rgba(239,68,68,.6); text-shadow: 0 0 18px rgba(239,68,68,.7); }
.countdown.urgent .cd-sep { color: var(--live); }
.cd-done { flex-basis: 100%; text-align: center; margin-top: 10px; font-weight: 800; color: #fecaca; }
.next-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }
.next-stats div { padding: 10px 12px; }
.next-stats b { font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
.next-loc { margin-top: 12px; font-size: 14px; color: var(--muted); }
.next-card .note { font-size: 13px; color: var(--muted); margin-top: 8px; white-space: pre-line; }
.ko-note { overflow-wrap: anywhere; line-height: 1.5; }
.cd-mini { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
    background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.4); color: var(--gold-2); font-size: 13px; }
.cd-mini i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: blink 1s steps(1) infinite; }
.cd-mini b { font-variant-numeric: tabular-nums; font-weight: 800; }
.cd-mini.urgent { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.5); color: #fecaca; }
.cd-mini.urgent i { background: var(--live); }
@media (max-width: 640px) {
    .next-card { padding: 18px 16px; }
    .cal.big { width: 72px; } .cal.big .d { font-size: 26px; }
    .countdown { gap: 6px; flex-wrap: nowrap; }
    .cd-box { width: auto; flex: 1; }
    .cd-box b { font-size: 32px; padding: 12px 0 10px; }
    .cd-box span { font-size: 10px; letter-spacing: .5px; }
    .cd-sep { font-size: 24px; padding-top: 12px; }
    .next-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Thanh menu chung của website mrk.vn ---------- */
.mk-head { background: rgba(4,20,14,.92); border-bottom: 1px solid var(--border); position: relative; z-index: 60; }
.mk-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.mk-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.mk-brand:hover { color: var(--text); }
.mk-brand img { border-radius: 50%; }
.mk-brand b { display: block; font-size: 18px; font-weight: 900; color: var(--gold-2); line-height: 1.1; }
.mk-brand small { display: block; font-size: 11px; color: var(--muted); }
.mk-nav { display: flex; gap: 2px; }
.mk-nav a { color: var(--text); font-weight: 600; font-size: 14.5px; padding: 8px 13px; border-radius: 9px; }
.mk-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.mk-nav a.on { background: var(--gold-soft); color: var(--gold-2); }
.mk-burger { display: none; width: 42px; height: 42px; border: 1px solid var(--border-2); background: transparent; border-radius: 10px;
    padding: 11px 9px; flex-direction: column; justify-content: space-between; align-items: stretch; cursor: pointer; box-shadow: none; }
.mk-burger i { display: block; height: 2px; background: var(--text); border-radius: 2px; }
@media (max-width: 860px) {
    .mk-burger { display: flex; }
    .mk-nav { display: none; position: absolute; left: 0; right: 0; top: 60px; flex-direction: column; padding: 10px 16px 16px;
        background: rgba(4,20,14,.98); border-bottom: 1px solid var(--border); }
    .mk-nav.open { display: flex; }
    .mk-nav a { padding: 12px; font-size: 16px; }
}
.site-head { top: 0; }
.gold { color: var(--gold-2); }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 14px 16px; border-radius: 12px;
    background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.35); font-size: 14px; line-height: 1.55; cursor: pointer; }
.agree input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--gold); }

/* Nút Chế độ TV / Tải ảnh trên trang xem giải */
.t-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.t-actions .btn, .t-actions button { text-decoration: none; }
@media (max-width: 640px) {
    .site-head .brand { display: none; }
    .site-head .head-row { min-height: 0; }
}

/* ---------- Thanh tab Giải đấu: Trực tiếp / Lịch thi đấu / Lịch sử / Tạo giải ---------- */
.site-head { display: none; }
.sub-head { position: sticky; top: 0; z-index: 50; background: rgba(7,31,23,.92); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.sub-row { display: flex; align-items: stretch; justify-content: space-between; gap: 18px; min-height: 56px; }
.sub-title { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 16px; white-space: nowrap; }
.sub-title:hover { color: var(--text); }
.sub-title .ico { color: var(--gold); }
.sub-title b { color: var(--gold-2); font-weight: 800; }
.sub-tabs { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tabs a { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 16px; white-space: nowrap;
    color: var(--muted); font-weight: 700; font-size: 14.5px; border-bottom: 3px solid transparent; transition: color .15s, border-color .15s; }
.sub-tabs a:hover { color: var(--text); }
.sub-tabs a.on { color: var(--gold-2); border-bottom-color: var(--gold); }
.sub-tabs a .ico { flex: none; }
.sub-tabs a.is-live .ico { color: var(--live); }
.sub-tabs a.is-live.on .ico { color: var(--live); }
.t-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }   /* máy tính: 1 hàng, tự xuống dòng khi hẹp */
.t-actions .btn, .t-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.t-actions .ico { width: 17px; height: 17px; }
@media (max-width: 760px) {
    .sub-title { display: none; }
    .sub-row { min-height: 50px; }
    .sub-tabs { width: 100%; justify-content: space-between; gap: 0; }
    .sub-tabs a { flex: 1; justify-content: center; flex-direction: column; gap: 3px; padding: 7px 4px 5px; font-size: 12px; }
    .t-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* điện thoại: 2 × 2 đều nhau */
    .t-actions .btn, .t-actions button { padding: 9px 6px; font-size: 13px; gap: 6px; }
}
@media (max-width: 640px) {
    .tabs { gap: 0; }
    .tabs button { flex: 1 0 auto; padding: 11px 8px; font-size: 13.5px; }
    .tabs > span[style*="flex:1"] { display: none; }
    .tabs .badge.live { display: none; }
    .bracket-tools { gap: 8px; }
    .bracket-tools .hint { font-size: 12px; }
}
/* Menu chính giống hệt website: cao 70px, logo 44px, nút Đặt bàn vàng */
.mk-row { min-height: 70px; }
.mk-brand img { width: 44px; height: 44px; }
.mk-brand b { font-size: 19px; }
.mk-brand small { font-size: 11.5px; letter-spacing: .3px; }
.mk-nav { align-items: center; gap: 4px; }
.mk-nav a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; padding: 9px 14px; border-radius: 10px; }
.mk-nav a .ico { width: 16px; height: 16px; }
.mk-nav a.mk-cta { margin-left: 8px; color: #1a1405; font-weight: 700; padding: 8px 14px;
    background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 6px 18px rgba(212,175,55,.25); }
.mk-nav a.mk-cta:hover { color: #1a1405; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
@media (max-width: 860px) {
    .mk-row { min-height: 64px; }
    .mk-nav { top: 64px; align-items: stretch; }
    .mk-nav a.mk-cta { margin: 8px 0 0; justify-content: center; }
}
/* Thanh tab dạng NÚT LIỀN KHỐI (segmented): 4 nút sát nhau, cùng hàng, nút đang chọn màu vàng */
.sub-row { align-items: center; min-height: 64px; }
.sub-tabs { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; overflow: hidden;
    background: rgba(0,0,0,.32); border: 1px solid var(--border-2); }
.sub-tabs a { flex-direction: row; gap: 7px; padding: 9px 16px; border-radius: 9px; border-bottom: 0;
    font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.sub-tabs a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.sub-tabs a.on { color: #1a1405; background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 4px 12px rgba(212,175,55,.25); }
.sub-tabs a.on .ico, .sub-tabs a.is-live.on .ico { color: #1a1405; }
.sub-tabs a .ico { width: 16px; height: 16px; }
@media (max-width: 760px) {
    .sub-row { min-height: 0; padding-top: 8px; padding-bottom: 8px; }
    .sub-tabs { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); width: 100%; gap: 2px; padding: 3px; }
    .sub-tabs a { flex-direction: column; justify-content: center; gap: 3px; padding: 7px 2px; font-size: 11.5px; border-radius: 8px; }
    .sub-tabs a .ico { width: 17px; height: 17px; }
}

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
/* Chân trang giống website mrk.vn */
.mk-foot { margin-top: 48px; border-top: 1px solid var(--border); background: rgba(0,0,0,.25); padding: 44px 0 0; font-size: 14.5px; }
.mk-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.mk-foot h3 { font-size: 14px; font-weight: 800; color: var(--gold-2); margin: 0 0 12px; text-transform: uppercase; letter-spacing: 1px; }
.mk-foot p { margin: 0 0 8px; }
.mk-foot a { color: var(--text); }
.mk-foot a:hover { color: var(--gold-2); }
.mk-foot .mk-brand { margin-bottom: 12px; }
.mk-foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 30px; margin-top: 30px;
    border-top: 1px solid var(--border); color: var(--muted); font-size: 13.5px; }
.mk-foot-bottom a { color: var(--muted); }
.mk-foot-disc { margin-top: 22px; padding: 10px 14px; border: 1px solid rgba(255,210,122,.35); border-radius: 10px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 860px) { .mk-foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .mk-foot-grid { grid-template-columns: 1fr; } }

/* ---------- Đa môn: tỉ số hòa, luân lưu, chi tiết set, hành trình hòa ---------- */
.match .p.draw .sc { color: var(--muted); }
.match .pk, .gm .pk { font-size: 10px; font-weight: 700; color: #64748b; margin-left: 3px; }
.match .p.win .pk { color: #d5f0de; }
.mrow .det { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.jr.d { background: rgba(148,163,184,.25); color: #e2e8f0; }

/* ---------- Xếp hạng thành tích ---------- */
.rank-wrap { padding: 4px 2px 10px; }
.rank-scroll { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.rank-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.rank-table th, .rank-table td { padding: 9px 10px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rank-table th { background: rgba(0,0,0,.3); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.rank-table th.clickable { cursor: pointer; color: var(--gold-2); text-decoration: underline dotted; }
.rank-table td.nm { text-align: left; font-weight: 700; }
.rank-table td.nm i { font-style: normal; color: var(--muted); font-size: 11px; margin-right: 6px; }
.rank-table td.pos { font-weight: 900; color: var(--gold-2); width: 40px; }
.rank-table td.tot { font-weight: 900; color: var(--gold-2); }
.rank-table td small { display: block; font-size: 10.5px; color: var(--muted); }
.rank-table tr.pr-1 td { background: rgba(212,175,55,.16); }
.rank-table tr.pr-2 td, .rank-table tr.pr-3 td { background: rgba(255,255,255,.05); }
.rank-table tr:hover td { background: rgba(255,255,255,.04); }

/* ---------- Hộp nhập kết quả theo môn ---------- */
.res-pick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin: 14px 0 4px; }
.res-pick button { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--border-2); box-shadow: none; font-size: 14px; padding: 12px 10px; }
.res-pick button.on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; border-color: var(--gold); }
.sets-box { margin: 12px 0 4px; border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 12px; background: rgba(0,0,0,.18); }
.sets-box summary { cursor: pointer; font-weight: 700; color: var(--gold-2); }
.set-row { display: grid; grid-template-columns: 80px 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 8px; }
.set-row span { font-size: 13px; color: var(--muted); }
.set-row input { text-align: center; padding: 8px; }
.tb-box { margin: 12px 0 4px; border: 1px solid rgba(212,175,55,.45); border-radius: 12px; padding: 12px; background: var(--gold-soft); }
.tb-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.tb-row label { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; cursor: pointer; }
.tb-row input[type=number] { width: 70px; text-align: center; padding: 7px; }
.modal-box.wide { width: min(640px, 96vw); }
.rank-input { display: grid; gap: 6px; max-height: 58vh; overflow-y: auto; margin-top: 10px; padding-right: 4px; }
.ri-row { display: grid; grid-template-columns: 34px 1fr 110px 90px; gap: 8px; align-items: center; }
.ri-row .n { color: var(--muted); font-size: 12px; text-align: right; }
.ri-row .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-row input { padding: 8px; text-align: center; }
.ri-row input:only-of-type { grid-column: span 2; }
@media (max-width: 560px) {
    .ri-row { grid-template-columns: 18px minmax(0, 1fr) 62px 62px; gap: 6px; }
    .ri-row .nm { white-space: normal; line-height: 1.2; font-size: 13.5px; }   /* tên dài xuống dòng thay vì bị cắt */
    .ri-row input { padding: 8px 4px; }
    .res-pick { grid-template-columns: 1fr; }
}

/* ---------- Chọn môn khi tạo giải ---------- */
.sport-pick { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 18px; align-items: start; margin-bottom: 8px; }
.sport-pick select { font-size: 15px; font-weight: 700; padding: 12px 14px; }
.sport-info { background: rgba(0,0,0,.2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.sport-info b { display: block; font-size: 16px; color: var(--gold-2); }
.sport-info span { display: block; margin-top: 2px; }
.sport-info small { display: block; color: var(--muted); margin-top: 4px; }
.sport-info ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 3px; }
.type-opt.hidden { display: none !important; }
.set-rule { margin-top: 12px; }
.set-rule select { font-size: 14px; font-weight: 600; padding: 10px 12px; }
.set-custom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.set-custom label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.set-custom input { width: 100%; padding: 8px 10px; }
.set-hint { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 6px; }
@media (max-width: 760px) { .sport-pick { grid-template-columns: 1fr; } }
/* Hộp nhập kết quả nằm trên nền TRẮNG: màu chữ / nền sáng cho rõ */
.modal-box .sets-box { background: #f6f7f6; border-color: #dfe5e1; }
.modal-box .sets-box summary { color: #7a5b05; }
.modal-box .set-row span, .modal-box .sub { color: #5b6661; }
.modal-box .set-row b { color: #1c2420; }
.modal-box .set-row input, .modal-box .tb-row input[type=number], .modal-box .ri-row input {
    background: #fff; color: #1c2420; border: 1px solid #cfd8d3; }
.modal-box .tb-box { background: #fff8e1; border-color: #e6c766; color: #1c2420; }
.modal-box .tb-box b { color: #7a5b05; }
.modal-box .res-pick button { background: #f1f4f2; color: #1c2420; border-color: #cfd8d3; }
.modal-box .res-pick button.on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; border-color: var(--gold); }
.modal-box .ri-row .nm { color: #1c2420; }
.modal-box .ri-row .n { color: #6b7671; }
.mrow .sc .det { color: #64748b !important; font-weight: 600; text-decoration: none; line-height: 1.3; }

/* ---------- Hệ Thụy Sĩ ---------- */
.swiss-grid { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 16px; align-items: start; }
.swiss-rounds { display: grid; gap: 12px; }
.swiss-table td, .swiss-table th { text-align: center; }
.swiss-table td.nm { text-align: left; }
.gm.bye-row { opacity: .75; }
@media (max-width: 900px) { .swiss-grid { grid-template-columns: 1fr; } }

/* Cảnh báo tên trùng trong danh sách thi đấu */
.dup-warn { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 14px; border-radius: 12px;
    background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .45); color: #fcd9a0; font-size: 13.5px; line-height: 1.5; }
.dup-warn b { color: #fff; }
.dup-warn i { color: var(--gold-2); font-style: normal; font-weight: 600; }
.dup-warn .ic { font-size: 16px; line-height: 1.3; }

/* Nút loa mời thi đấu (trang trọng tài) */
.spk { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; cursor: pointer;
    background: linear-gradient(180deg, #f3d77a, #d4af37); color: #1a1405; border: 2px solid rgba(7,31,23,.95);
    box-shadow: 0 2px 8px rgba(0,0,0,.4); transition: transform .12s, box-shadow .12s; flex: none; }
.spk svg { width: 14px; height: 14px; }
.spk:hover { transform: scale(1.12); box-shadow: 0 0 0 3px rgba(212,175,55,.35), 0 2px 8px rgba(0,0,0,.4); }
.spk:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.spk.speaking { animation: spkPulse 1s ease-in-out infinite; background: linear-gradient(180deg, #8ef0b4, #22c55e); }
@keyframes spkPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }
.match .spk { position: absolute; top: -11px; right: -11px; z-index: 3; }
.gm .tb, .mrow .tb { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.gm .spk, .mrow .spk { width: 24px; height: 24px; border-width: 1px; }
@media (hover: none) { .spk { width: 30px; height: 30px; } .match .spk { top: -13px; right: -13px; } }

/* Hình thức & nơi thi đấu (tạo giải) */
.venue-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; align-items: end; }
.seg { display: flex; background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { flex: 1; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 9px 10px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; transition: .15s; }
.seg input:checked + span { background: linear-gradient(180deg, #f3d77a, #d4af37); color: #1a1405; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.seg input:focus-visible + span { outline: 2px solid var(--gold-2); }
.voice-demo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.voice-demo button { display: inline-flex; align-items: center; gap: 8px; }
.voice-demo small { font-style: italic; line-height: 1.45; }
.spk-ic { display: inline-block; width: 16px; height: 16px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9.5v5h3.5L12 19V5L7.5 9.5H4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18 6a8.5 8.5 0 0 1 0 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9.5v5h3.5L12 19V5L7.5 9.5H4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18 6a8.5 8.5 0 0 1 0 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 760px) { .venue-grid { grid-template-columns: 1fr 1fr; } .venue-grid > :first-child { grid-column: 1 / -1; } }
.voice-demo button.speaking { border-color: #22c55e; color: #8ef0b4; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
/* Điện thoại: tên 2 bên đủ chỗ, nút loa + chọn sân xuống dòng riêng bên dưới */
@media (max-width: 600px) {
    .gm { grid-template-columns: 26px 1fr 44px 1fr; row-gap: 6px; }
    .gm .tb { grid-column: 2 / -1; justify-content: center; }
    .gm .tb:empty { display: none; }
}

/* Thẻ giải: các thẻ cùng hàng cao bằng nhau, chân thẻ luôn nằm dưới cùng, nhãn trên 1 dòng */
.cards { align-items: stretch; }
.t-card { display: flex; flex-direction: column; }
.t-card .foot { margin-top: auto; padding-top: 16px; }
.t-card .podium { margin-bottom: 0; }
.t-card .card-badges .badge { white-space: nowrap; }
.t-card .foot > .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-card .foot .go { flex: none; white-space: nowrap; }
.t-card h3 { overflow-wrap: anywhere; }

/* Nhãn môn thi đấu trên thẻ giải và trang giải */
.badge.sport-b { background: rgba(255,255,255,.1); color: var(--text); border: 1px solid var(--border-2); }
.origin-row .badge.sport-b { margin-right: 6px; }
/* Lọc giải cộng đồng theo môn */
.sport-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.sport-filter a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 700;
    color: var(--muted); background: rgba(0,0,0,.25); border: 1px solid var(--border-2); transition: .15s; }
.sport-filter a:hover { color: var(--text); border-color: var(--gold); }
.sport-filter a.on { color: #1a1405; background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: transparent; }
.sport-filter small { font-size: 11px; opacity: .75; font-weight: 800; }
.cards.mt { margin-top: 14px; }

/* Cách đọc tên cho loa (trang trọng tài) */
.say-hint { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; margin: 0 0 14px;
    background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.3); color: var(--muted); line-height: 1.5; }
.say-hint .spk-ic { color: var(--gold-2); flex: none; margin-top: 2px; }
.say-hint b { color: var(--text); }
.say-hint i { color: var(--gold-2); font-style: normal; font-weight: 700; }
#players li .nm { display: flex; flex-direction: column; min-width: 0; }
#players li .say-as { font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#players li .say-as.own { color: var(--gold-2); }
#players li .spk { width: 28px; height: 28px; margin-left: auto; }
#players li .spk svg { width: 14px; height: 14px; }

/* Nút đọc loa bảng xếp hạng – ngay trên bảng xếp hạng (trang trọng tài, giải đã kết thúc) */
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.st-head h4 { margin: 0; }
.say-bar { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head .say-bar { margin-left: auto; }
.say-std { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; border: 0; cursor: pointer;
    font: 800 12.5px var(--font); color: #1a1405; background: linear-gradient(180deg, #f3d77a, #d4af37); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.say-std:hover { filter: brightness(1.07); }
.say-std .spk-ic { width: 15px; height: 15px; }
.say-std.speaking { background: linear-gradient(180deg, #8ef0b4, #22c55e); color: #052e16; animation: spkPulse 1s ease-in-out infinite; }
.say-prize { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text);
    text-transform: none; letter-spacing: 0; cursor: pointer; user-select: none; }
.say-prize input { width: 16px; height: 16px; margin: 0; accent-color: #d4af37; cursor: pointer; }

/* Ngày + giờ bắt đầu khi tạo giải */
.when-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 8px; }
.when-row input { min-width: 0; width: 100%; }   /* ô ngày / giờ không đẩy tràn khung */
@media (max-width: 360px) { .when-row { grid-template-columns: minmax(0, 1fr); } }
.mk-nav a.mk-cta.on { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }

/* Trang trọng tài: thanh chia sẻ link xem trực tiếp */
.share-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; padding: 10px 12px; border-radius: 14px;
    background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.3); }
.share-bar .sb-lb { font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.share-bar input { flex: 1; min-width: 200px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: #7dd3fc; }
/* Điện thoại: gọn còn 1 hàng nút (Sao chép đã chép đúng link) – nhường chỗ cho danh sách trận */
@media (max-width: 640px) {
    .share-bar { flex-wrap: nowrap; gap: 6px; padding: 8px; margin-bottom: 10px; }
    .share-bar input, .share-bar .sb-lb { display: none; }
    .share-bar > button, .share-bar > a { flex: 1 1 0; justify-content: center; padding-left: 4px; padding-right: 4px; white-space: nowrap; font-size: 12.5px; }
    .ref-acts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .ref-acts::-webkit-scrollbar { display: none; }
    .ref-acts > * { flex: 0 0 auto; white-space: nowrap; }
    .ref-acts .sp { display: none; }
}
/* Giải kết thúc: lời cảm ơn + QR ủng hộ */
.thanks-box { position: relative; display: flex; gap: 18px; align-items: center; margin: 0 0 16px; padding: 18px 20px; border-radius: 18px;
    background: linear-gradient(120deg, rgba(212,175,55,.2), rgba(212,175,55,.05) 60%), var(--surface, rgba(255,255,255,.04));
    border: 1px solid rgba(212,175,55,.5); box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: tbIn .5s ease; }
@keyframes tbIn { from { opacity: 0; transform: translateY(-8px); } }
.thanks-box .tb-qr { flex: none; background: #fff; border-radius: 14px; padding: 6px; }
.thanks-box .tb-qr img { display: block; width: 160px; height: auto; border-radius: 8px; }
.thanks-box .tb-text b { font-size: 18px; color: var(--gold-2); }
.thanks-box .tb-text p { margin: 8px 0 0; line-height: 1.55; }
.thanks-box .actions { margin-top: 12px; }
.thanks-box .tb-x { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; padding: 0; border-radius: 50%;
    background: rgba(0,0,0,.25); border: 0; color: var(--text); cursor: pointer; }
@media (max-width: 640px) { .thanks-box { flex-direction: column; text-align: center; } .thanks-box .actions { justify-content: center; } }
.mk-nav a.mk-cta.on, .mk-nav a.mk-cta.on:hover { color: #1a1405; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }

/* ================= BỐC THĂM TRỰC TIẾP ================= */
/* Form tạo giải: chọn cách bốc thăm */
.draw-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.dm-opt { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; cursor: pointer; margin: 0;
    background: rgba(0,0,0,.2); border: 1px solid var(--border); transition: .15s; }
.dm-opt:has(input:checked) { border-color: var(--gold); background: rgba(212,175,55,.1); box-shadow: 0 0 0 1px rgba(212,175,55,.4) inset; }
.dm-opt input { margin-top: 3px; accent-color: #d4af37; width: 17px; height: 17px; flex: none; }
.dm-opt b { display: block; font-size: 15px; }
.dm-opt small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 3px; }
.live-cfg { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; margin-bottom: 12px;
    background: rgba(56,189,248,.07); border: 1px dashed rgba(56,189,248,.4); }
.live-cfg .chk { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.live-cfg .chk input { width: 17px; height: 17px; accent-color: #d4af37; }
.live-cfg input[type=datetime-local] { width: auto; padding: 8px 10px; }
.live-cfg small { flex-basis: 100%; font-size: 12.5px; }
.live-note { padding: 14px 16px; border-radius: 14px; margin-bottom: 14px; background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.35); }
.live-note p { margin: 0 0 8px; }
.ld-guide { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ld-guide b { color: var(--text); }
@media (max-width: 760px) { .draw-mode { grid-template-columns: 1fr; } }

/* Khung chờ bốc thăm */
.dl-wait { text-align: center; padding: 26px 20px; border-radius: 20px; margin: 0 0 18px;
    background: radial-gradient(500px 220px at 50% 0%, rgba(212,175,55,.2), transparent 70%), linear-gradient(160deg, #123a2c, #0a2219);
    border: 1px solid rgba(212,175,55,.45); }
.dl-icon { font-size: 44px; animation: dlSpin 3s ease-in-out infinite; display: inline-block; }
@keyframes dlSpin { 50% { transform: rotate(18deg) scale(1.08); } }
.dl-wait h2 { margin: 4px 0 6px; font-size: 26px; font-weight: 900; color: var(--gold-2); }
.dl-sub { margin: 0 auto 12px; max-width: 620px; color: var(--muted); }
.dl-when { font-size: 15px; }
.dl-cd { display: flex; justify-content: center; gap: 10px; margin: 12px 0 4px; }
.dl-cd span { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 8px 6px; border-radius: 12px;
    background: rgba(0,0,0,.3); border: 1px solid var(--border-2); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.dl-cd span b { font-size: 28px; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.dl-now { font-size: 20px; color: #fbbf24; animation: upPulse 1s infinite; }
.dl-hash { margin: 12px auto 0; font-size: 12.5px; color: var(--muted); max-width: 640px; }
.dl-tools { margin: 10px auto 0; text-align: center; }
.dl-hash code { word-break: break-all; color: #7dd3fc; font-size: 12px; }
.dl-list { margin-top: 16px; }
.dl-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.dl-chips span { padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid var(--border-2); font-size: 13px; font-weight: 600; }
.dl-how { margin: 14px auto 0; max-width: 640px; text-align: left; font-size: 13px; color: var(--muted); }
.dl-how summary { cursor: pointer; text-align: center; color: var(--gold-2); font-weight: 700; }
.dl-wait.big { padding: 4vh 3vw; }
.dl-wait.big h2 { font-size: clamp(30px, 4vw, 56px); }
.dl-wait.big .dl-cd span { min-width: 9vw; } .dl-wait.big .dl-cd span b { font-size: clamp(34px, 5vw, 76px); }
.dl-wait.big .dl-chips span { font-size: clamp(14px, 1.4vw, 22px); }
.dl-info { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 9px 14px; border-radius: 12px;
    background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.3); font-size: 13.5px; }
.dl-info span { flex: 1; min-width: 200px; }
.draw-pending #tabs, .draw-pending [data-pane], .draw-pending #btnPng, .draw-pending .tv-btn { display: none !important; }

/* Màn hình trọng tài khi chờ bốc */
.ld-panel { margin: 0 0 18px; }
.ld-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.ld-cols .dl-wait { margin: 0; }
.ld-side { padding: 18px; border-radius: 18px; background: var(--card-2, rgba(255,255,255,.04)); border: 1px solid var(--border); }
.ld-go { width: 100%; font-size: 18px; padding: 16px; background: linear-gradient(180deg, #f3d77a, #d4af37); color: #1a1405; }
@media (max-width: 860px) { .ld-cols { grid-template-columns: 1fr; } }

/* Hiệu ứng rút thăm (toàn màn hình) */
body.dl-open { overflow: hidden; }
.dl-stage { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px;
    background: radial-gradient(800px 400px at 50% 20%, rgba(212,175,55,.18), transparent 70%), rgba(3,14,10,.985); animation: tbIn .3s ease; backdrop-filter: blur(6px); }
.dl-box { width: min(1100px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 16px; color: var(--text); }
.dl-head { text-align: center; }
.dl-live { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: 2px; font-size: 13px; color: #fca5a5; }
.dl-live i { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: upPulse 1.2s infinite; box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
.dl-head h2 { margin: 6px 0 4px; font-size: clamp(22px, 3vw, 36px); font-weight: 900; }
.dl-head small { color: var(--muted); } .dl-head code { color: #7dd3fc; }
.dl-drum { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dl-ball { min-width: min(520px, 90%); padding: 18px 26px; border-radius: 22px; text-align: center; font-size: clamp(26px, 4vw, 48px); font-weight: 900;
    background: linear-gradient(180deg, #f3d77a, #d4af37); color: #1a1405; box-shadow: 0 16px 50px rgba(212,175,55,.35); overflow: hidden;
    white-space: nowrap; text-overflow: ellipsis; }
.dl-ball.rolling { filter: blur(.6px); opacity: .85; transform: scale(.97); }
.dl-ball.pop { animation: dlPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes dlPop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
.dl-pos { font-size: clamp(18px, 2.4vw, 28px); font-weight: 900; color: #7dd3fc; min-height: 1.3em; }
.dl-slots { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.dl-slots li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.05);
    border: 1px dashed var(--border-2); color: var(--muted); font-weight: 700; min-width: 0; }
.dl-slots li .no { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(0,0,0,.35); color: var(--gold-2); font-size: 13px; }
.dl-slots li .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-slots li.in { color: var(--text); border-style: solid; border-color: rgba(212,175,55,.6); background: rgba(212,175,55,.12); animation: dlPop .4s ease; }
.dl-board.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.dl-grp { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--border-2); }
.dl-grp b { display: block; color: var(--gold-2); margin-bottom: 6px; font-size: 16px; }
.dl-grp ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; min-height: 24px; }
.dl-grp li.in { font-weight: 700; animation: dlPop .4s ease; }
.dl-foot { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.dl-ver { display: grid; gap: 8px; text-align: left; font-size: 13.5px; }
.dl-ver span { display: block; } .dl-ver code { word-break: break-all; font-size: 12px; }
/* Chế độ TV */
.tv-draw { position: absolute; inset: 70px 20px 20px; z-index: 30; display: grid; place-items: center; overflow: auto; }
.tv-draw .dl-wait { width: min(1400px, 100%); margin: 0; }
body.dl-open .modal { z-index: 500 !important; }
.f-hint { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.f-hint b { color: var(--text); }
.ld-share { padding: 12px; border-radius: 12px; margin-bottom: 12px; background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.3); }
.ld-share .actions { margin-top: 8px; }

.wo-reason { display: grid; gap: 4px; margin: 10px 0 0; font-size: 12.5px; }
.wo-reason select { padding: 6px 10px; font-size: 13px; }
/* Tỷ số tạm – trận đang đấu, chưa chốt */
.live-sc { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; font-weight: 700; color: #e5484d; white-space: nowrap; }
.live-sc small { font-size: 10px; font-weight: 600; }
.live-sc b { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.live-sc i { width: 7px; height: 7px; border-radius: 50%; background: #e5484d; animation: livePulse 1.4s infinite; }
.live-n { color: #e5484d; }
@keyframes livePulse { 50% { opacity: .25; } }
.mtb-box { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 13px; cursor: pointer; }
.mtb-box input { margin-top: 3px; accent-color: #d4af37; }
/* Bảng xếp hạng: đồng hạng chờ phân định + giải thích tiêu chí */
.grp-table tr.tie td { background: rgba(251,191,36,.08); }
.grp-table sup { color: #fbbf24; font-weight: 800; margin-left: 1px; }
.tie-note { margin: 8px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5;
    background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.45); }
.tie-note button { margin-left: 6px; }
.rank-rule { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

/* Bước cuối tạo giải: đồng ý quy định + 2 nút (bấm là tạo giải, vào thẳng màn hình trọng tài) */
.final-box .agree { margin: 0 0 14px; }
.final-btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.final-btns .fo { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: rgba(0,0,0,.2); }
.final-btns .fo.live { border-color: rgba(212,175,55,.5); background: linear-gradient(160deg, rgba(212,175,55,.12), rgba(0,0,0,.15)); }
.final-btns .fo button { width: 100%; justify-content: center; font-size: 17px; padding: 15px 16px; }
.final-btns .fo.now button { background: linear-gradient(180deg, #7dd3fc, #38bdf8); color: #06202e; }
.final-btns .fo p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.final-btns .fo p b { color: var(--text); }
.ri-head { margin: 8px 0 2px; font-weight: 800; color: var(--gold-2); font-size: 13.5px; }
.ri-head small { color: var(--muted); font-weight: 600; }
/* Đồng đội có trận con */
.team-cfg { margin-top: 14px; display: grid; gap: 8px; }
.team-labels { display: grid; gap: 4px; }
.team-box { display: grid; gap: 6px; margin: 4px 0 10px; }
.team-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 6px; align-items: center; }
.team-row b { font-size: 13.5px; }
.team-row select, .team-row input { padding: 6px 8px !important; font-size: 14px !important; min-width: 0; }
.team-tally { font-weight: 800; font-size: 15px; }
@media (max-width: 560px) { .team-row { grid-template-columns: 1fr 1fr; } .team-row b { grid-column: 1 / -1; } }
/* Từ ngữ không phù hợp (trang tạo giải) */
.bad-words { display: grid; gap: 6px; margin-top: 8px; font-size: 13.5px; line-height: 1.5; }
.bad-words .bad-block { padding: 8px 12px; border-radius: 10px; background: rgba(229,72,77,.14); border: 1px solid rgba(229,72,77,.5); color: #ffb4b6; }
.bad-words .bad-warn { padding: 8px 12px; border-radius: 10px; background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.45); color: #f3dc8b; }
/* 🔊 Đồng bộ giọng đọc (trang tạo giải) */
.say-sync { margin-top: 10px; }
.say-sync .say-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.say-list { margin-top: 10px; display: grid; gap: 6px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.say-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr) auto; gap: 8px; align-items: center;
    padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.03); }
.say-row.need { border-color: rgba(212,175,55,.55); }
.say-row .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.say-row input { padding: 7px 10px; font-size: 14px; min-width: 0; }
.say-row [data-say-use] { white-space: nowrap; }
@media (max-width: 560px) { .say-row { grid-template-columns: minmax(0, 1fr) auto; } .say-row input, .say-row [data-say-use] { grid-column: 1 / -1; } }
.final-btns .fo.manual { grid-column: 1 / -1; background: rgba(255,255,255,.03); }   /* tự xếp: không bốc thăm */
.final-btns .fo.manual button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: var(--text); }
.final-btns .live-cfg { margin: 0; padding: 10px 12px; }
.final-box #saveErr { margin-top: 12px; font-weight: 700; }
.final-box #saveErr:empty { display: none; }
.ld-help { margin-top: 14px; font-size: 13.5px; }
.ld-help summary { cursor: pointer; color: var(--gold-2); font-weight: 700; }
@media (max-width: 760px) { .final-btns { grid-template-columns: minmax(0, 1fr); } }
/* 320px: ô nội dung co lại theo màn hình (không đẩy tràn ngang trang) */
.final-btns .fo { min-width: 0; }
.final-btns .live-cfg input[type=datetime-local], .final-btns .live-cfg input[type=text] { max-width: 100%; min-width: 0; }

/* Tài khoản & phân quyền */
.role-legend .roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.role-legend .roles > div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.role-legend .roles small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.perm-box { display: grid; gap: 6px; }
.perm-chk { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border); cursor: pointer; }
.perm-chk input { margin-top: 3px; accent-color: #d4af37; flex: 0 0 auto; }
.perm-chk small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.mod-row { display: block; }
.mod-row > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.mod-row > summary::-webkit-details-marker { display: none; }
.mod-row .perm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mod-row .perm-edit { display: grid; gap: 6px; margin-top: 10px; }

/* ✍️ Trình tự xếp (cặp đấu / bảng) */
.man-box { grid-column: 1 / -1; margin-top: 14px; padding: 14px; border-radius: 16px; border: 1px solid rgba(212,175,55,.45); background: rgba(0,0,0,.22); }
.man-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.man-head .sp { flex: 1; }
.man-ko { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.man-m { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.man-m .no { font-size: 12px; color: var(--muted); white-space: nowrap; }
.man-m b { font-size: 12px; color: var(--muted); }
.man-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.man-g { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.man-box select { padding: 7px 8px; font-size: 14px; min-width: 0; }
.man-miss { color: #f3dc8b; margin: 10px 0 0; font-size: 13.5px; }
.man-ok { color: #86efac; margin: 10px 0 0; font-size: 13.5px; }
@media (max-width: 560px) { .man-m { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } .man-m .no { grid-column: 1 / -1; } }
.swiss-warn { margin: 0 0 12px; font-size: 13.5px; }
.col-w, .col-b { font-style: normal; font-size: 11px; }
.carom-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; font-size: 13px; }
.carom-box label { display: grid; gap: 4px; }
.carom-box small { grid-column: 1 / -1; }
@media (max-width: 560px) { .carom-box { grid-template-columns: 1fr; } }
/* Vùng cuộn sơ đồ: Tab tới được, viền rõ khi focus bằng bàn phím (mũi tên để cuộn) */
.scroll[tabindex]:focus-visible { outline: 3px solid #f5c542; outline-offset: 2px; border-radius: 10px; }
/* Hộp thoại cao hơn màn hình (VD nhập đủ 5 set trên điện thoại): cuộn BÊN TRONG hộp, nút chốt luôn dính đáy hộp */
.modal-box { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-box form > .actions, .modal-box > .actions { position: sticky; bottom: -24px; z-index: 2; background: #fff; margin-bottom: -24px; padding: 12px 0 24px; }
.sets-box summary.req { color: #b4231a; font-weight: 800; }

/* ===== Cổng giải mrk.vn/<mã> + ô nhập mã giải ===== */
.code-find { display: flex; gap: 8px; align-items: center; max-width: 440px; background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 14px; }
.code-find input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; font-weight: 700; letter-spacing: 1px; padding: 8px 4px; }
.code-find input:focus { outline: none; box-shadow: none; }
.code-find button { white-space: nowrap; }
.gate-find { max-width: 560px; margin: 30px auto; text-align: center; }
.gate-find .code-find { margin: 18px auto 4px; }
.gate { padding-top: 22px; }
.gate-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px;
    border: 1px solid rgba(212,175,55,.35); border-radius: 20px; background: linear-gradient(150deg, rgba(212,175,55,.12), rgba(0,0,0,.22)); }
.gate-code { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 18px; border-radius: 16px; background: rgba(0,0,0,.35); border: 1px solid rgba(212,175,55,.45); }
.gate-code small { font-size: 11px; letter-spacing: 2px; color: var(--muted); font-weight: 700; }
.gate-code b { font-size: 44px; line-height: 1; letter-spacing: 4px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.gate-info h1 { font-size: clamp(22px, 3.2vw, 32px); margin: 8px 0 6px; line-height: 1.2; }
.gate-info .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.gate-link { margin-top: 10px; font-weight: 700; color: var(--gold-2); word-break: break-all; }
.gate-qr { background: #fff; padding: 8px; border-radius: 12px; line-height: 0; }
.gate-qr:empty { display: none; }
.gate-choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 18px 0 10px; }
.gate-opt { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 18px; border: 1px solid var(--border); background: rgba(0,0,0,.22); color: var(--text); text-decoration: none; transition: transform .12s, border-color .12s; }
a.gate-opt:hover { transform: translateY(-2px); border-color: rgba(212,175,55,.6); }
.gate-opt .ic { font-size: 30px; width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.06); }
.gate-opt b { display: block; font-size: 18px; }
.gate-opt small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.45; }
.gate-opt .go { margin-left: auto; font-size: 22px; color: var(--gold-2); }
.gate-opt.main { grid-column: 1 / -1; border-color: rgba(212,175,55,.55); background: linear-gradient(120deg, rgba(212,175,55,.22), rgba(0,0,0,.2)); }
.gate-opt.main b { font-size: 21px; }
.gate-opt.btc { align-items: flex-start; }
.btc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.btc-body .btn { align-self: flex-start; }
.btc-form { display: flex; flex-direction: column; gap: 6px; }
.btc-form .f { margin: 4px 0 0; }
.btc-row { display: flex; gap: 8px; }
.btc-row input { flex: 1; min-width: 0; }
.masked { padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.06); font-weight: 600; letter-spacing: .3px; }
.center { text-align: center; }
@media (max-width: 760px) {
    .gate-hero { grid-template-columns: minmax(0, 1fr); text-align: center; }
    .gate-info .meta, .gate-info .card-badges { justify-content: center; }
    .gate-qr { display: none; }                     /* điện thoại: QR để chiếu cho người khác quét – ẩn cho gọn */
    .gate-choices { grid-template-columns: minmax(0, 1fr); }
    .btc-row { flex-direction: column; }
}
.sb-code { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: rgba(212,175,55,.16); border: 1px solid rgba(212,175,55,.45); font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.sb-code b { font-size: 18px; letter-spacing: 2px; color: var(--gold-2); }
.gcode-b { text-decoration: none; background: rgba(212,175,55,.16); border: 1px solid rgba(212,175,55,.45); color: var(--gold-2); }
.gcode-b b { letter-spacing: 1.5px; }
.draw-b { text-decoration: none; }
.draw-b.draw-live { background: rgba(220,60,60,.14); border: 1px solid rgba(230,90,90,.45); color: #ffb4b4; }
.draw-b.draw-auto { background: rgba(80,160,255,.14); border: 1px solid rgba(110,170,255,.45); color: #b9d6ff; }
.draw-b.draw-manual { background: rgba(255,170,60,.14); border: 1px solid rgba(255,180,80,.45); color: #ffd39a; }
.draw-b:hover { filter: brightness(1.15); }
.hero .code-find { margin-top: 14px; }
/* Ô bắt buộc còn thiếu / sai khi bấm tạo giải: viền đỏ + nền đỏ nhạt (tự hết khi gõ lại) */
input.invalid, select.invalid, textarea.invalid, .when-row.invalid input { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.22) !important; background: rgba(239,68,68,.08); }
.agree.invalid { outline: 2px solid #ef4444; outline-offset: 4px; border-radius: 10px; }
.f-err { display: block; margin-top: 4px; font-size: 12.5px; color: #fca5a5; font-weight: 600; }
/* Khối thông tin quản lý (email / SĐT / mã) ở trang tạo giải */
.mgr-box { margin-top: 6px; padding: 16px; border-radius: 14px; border: 1px solid rgba(212,175,55,.3); background: rgba(212,175,55,.06); }
.mgr-box h3 { margin: 0 0 12px; font-size: 15.5px; display: flex; gap: 8px; align-items: center; }
.mgr-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.22); font-size: 13px; line-height: 1.6; color: var(--muted); }
.mgr-note b { color: var(--text); }
.mgr-note ul { margin: 4px 0 0; padding-left: 18px; }

/* Giải không có sơ đồ rộng (vòng tròn 1 bảng, xếp hạng thành tích, Swiss): nằm gọn trong khung trang như các phần khác */
.scroll.bleed.fit { width: auto; left: auto; margin-left: 0; padding-left: 0; padding-right: 0; }
/* Vòng tròn 1 bảng: thẻ rộng hết khung – bảng điểm bên trái, danh sách trận bên phải (máy tính); điện thoại xếp dọc */
.groups-grid.solo { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
    .groups-grid.solo .grp-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
    .groups-grid.solo .grp-head { grid-column: 1 / -1; }
    .groups-grid.solo .grp-card > :not(.grp-head):not(.grp-games) { grid-column: 1; }
    .groups-grid.solo .grp-games { grid-column: 2; grid-row: 2 / span 4; }
    .groups-grid.solo .grp-table td.nm { max-width: none; }
    .groups-grid.solo .grp-table { font-size: 14px; }
}
/* Tên trong danh sách trận / bảng điểm: xuống tối đa 2 dòng thay vì cắt cụt "Hạt Kiểm lâm "…" (khán giả phải đọc được ai gặp ai) */
.gm .pl { white-space: normal; text-overflow: clip; line-height: 1.25; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.gm .pl.r { justify-self: end; }
@media (max-width: 600px) {
    .gm { font-size: 12.5px; padding-top: 7px; padding-bottom: 7px; }
    .grp-table td.nm { white-space: normal; max-width: none; line-height: 1.25; overflow-wrap: anywhere; }
}
.grp-table td:not(.nm), .grp-table th { white-space: nowrap; }
@media (max-width: 600px) { .grp-table td, .grp-table th { padding-left: 3px; padding-right: 3px; } }
/* Bảng xếp hạng trên điện thoại: hạng + tiền thưởng 1 dòng, tên đủ chiều ngang dòng dưới (không cụt "Hạ…"), hành trình dòng cuối */
@media (max-width: 600px) {
    .st-row { grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 8px; }
    .st-row .ic { grid-row: 1 / span 3; }
    .st-row .lb { grid-row: 1; grid-column: 2; }
    .st-row .amt { grid-row: 1; grid-column: 3; }
    .st-row .who { grid-row: 2; grid-column: 2 / 4; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
    .st-row .path { grid-row: 3; grid-column: 2 / 4; }
}
/* Sơ đồ tràn mép (loại trực tiếp / nhánh thắng–thua): tiêu đề, các bảng đấu, bảng xếp hạng vẫn canh giữa theo khung trang –
   màn 1920 / 2560 không còn cảnh bảng dạt sát mép trái, bảng xếp hạng kéo dài hết màn hình */
.scroll.bleed #bracket > .sec-title, .scroll.bleed #bracket > .groups-grid, .scroll.bleed #bracket > .standings.static,
.scroll.bleed #bracket > .third-note { max-width: 1200px; margin-left: auto; margin-right: auto; }
.scroll.bleed #bracket > .final-row { justify-content: center; }
/* Ít bảng (2–3) thì thẻ giãn đều hết khung – không chừa cột trống bên phải */
.groups-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
@media (max-width: 560px) { .groups-grid { grid-template-columns: 1fr; } }
/* Màn lớn dư chỗ: ô sơ đồ rộng hơn để đọc đủ tên đội (laptop giữ 214px cho đỡ cuộn ngang) */
@media (min-width: 1600px) { .round { width: 250px; } }
@media (min-width: 2200px) { .round { width: 290px; } }
/* Công tắc "Xếp bàn / sân cho từng trận" ở bước tạo giải */
.tbl-switch { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
.tbl-switch input { width: 18px; height: 18px; accent-color: var(--gold); }
/* Bảng thành tích (bơi, chạy…) trên điện thoại: tên xuống dòng để các cột thời gian hiện ngay, không phải vuốt ngang */
@media (max-width: 600px) {
    .rank-table { font-size: 12.5px; min-width: 0; }
    .rank-table td.nm { white-space: normal; overflow-wrap: anywhere; min-width: 110px; line-height: 1.25; }
    .rank-table td, .rank-table th { padding-left: 4px; padding-right: 4px; }
}
.venue-grid { align-items: start; }   /* cột số bàn / sân có thêm công tắc – các cột vẫn thẳng hàng phía trên */

/* Mất kết nối (trang khán giả): nhãn đổi chữ + màu cảnh báo, vẫn giữ sơ đồ / tỉ số cũ nhìn được */
.badge.live.live-off { background: rgba(245,158,11,.16); color: #fbbf24; border-color: rgba(245,158,11,.5); white-space: normal; }
/* Điện thoại (note120 N120-009): thanh chia sẻ không tràn ngang – mã giải 1 hàng, 4 nút lưới 2×2 (Sao chép · Chia sẻ · Facebook · QR) */
@media (max-width: 640px) {
    .share-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .share-bar .sb-code { grid-column: 1 / -1; justify-content: center; }
    .share-bar > button, .share-bar > a { min-width: 0; width: 100%; min-height: 40px; }
}

/* Phân trang danh sách giải (12 giải / trang) */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; margin: 22px 0 6px; }
.pager a, .pager b, .pager .pg-nav.off { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font-weight: 700; text-decoration: none; }
.pager a:hover { border-color: var(--gold); color: var(--gold-2); }
.pager .pg-on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; border-color: var(--gold); }
.pager .pg-nav.off { opacity: .4; }
.pager .pg-nums { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager .pg-gap { align-self: center; color: var(--muted); padding: 0 2px; }
.pager .pg-info { flex-basis: 100%; text-align: center; color: var(--muted); }@media (max-width: 480px) {
    .pager { gap: 6px; }
    .pager .pg-t { display: none; }                       /* điện thoại: chỉ còn ‹ › – cả thanh 1 hàng */
    .pager a, .pager b, .pager .pg-nav.off { min-width: 36px; height: 38px; padding: 0 8px; }
    .pager .pg-nums { flex-wrap: nowrap; gap: 4px; }
}
#ds, #ds-cd, #ds-cu { scroll-margin-top: 140px; }   /* chuyển trang: đầu danh sách không bị thanh menu dính che */

.pager .pg-gm { display: none; }
@media (max-width: 480px) { .pager .pg-far { display: none; } .pager .pg-gm { display: inline; } }

/* Thẻ KHAI MẠC SAU trên trang xem giải (giải chưa đấu trận nào) */
.ko-card { margin: 4px 0 18px; }
.ko-card .ko-lead { margin: 2px 0 0; }
.ko-card .cd-done { flex-basis: 100%; text-align: center; font-weight: 800; font-size: 18px; color: var(--gold-2); padding: 12px 0; }
.ko-acts { display: flex; justify-content: center; margin-top: 18px; }
.ko-acts .btn { min-height: 46px; padding: 0 26px; font-size: 16px; }
/* Form tạo giải: ghi chú tổng giải thưởng + giải phụ */
.total-note { display: block; margin-top: 6px; line-height: 1.45; }
.award-cfg { margin-top: 18px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--border-2); background: rgba(0,0,0,.12); }
.award-h { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.award-add { display: flex; gap: 8px; flex-wrap: wrap; }
.award-add input { flex: 1 1 220px; min-width: 0; }
.award-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.aw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(212,175,55,.14);
    border: 1px solid rgba(212,175,55,.45); font-weight: 700; font-size: 14px; }
.aw-chip button { width: 24px; height: 24px; padding: 0; border-radius: 50%; background: rgba(0,0,0,.25); color: var(--text); border: 0; cursor: pointer; }
/* Giải phụ trên bảng xếp hạng / tab Giải thưởng */
.st-aw-h { margin: 4px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: var(--gold-2); text-transform: uppercase; }
.st-row.st-aw { background: rgba(124,58,237,.12); }
.st-row.st-aw .lb { white-space: normal; color: #d8b4fe; }
.st-aw-sep { height: 1px; background: var(--border-2); margin: 10px 0; }
.aw-block { margin-top: 18px; }
.aw-block h3 { font-size: 16px; font-weight: 800; margin: 0 0 10px; }
/* Trang trọng tài: quản lý giải phụ */
.aw-mgr { margin-top: 14px; }
.awm-row { padding: 12px; border-radius: 12px; background: rgba(0,0,0,.18); border: 1px solid var(--border-2); margin-bottom: 10px; }
.awm-top { display: flex; gap: 8px; align-items: center; }
.awm-top .awm-name { flex: 1; min-width: 0; font-weight: 700; }
.awm-ic { font-size: 20px; }
.awm-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.awm-pick { width: 100%; }
.awm-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.warn-text { color: #fbbf24; font-weight: 700; }
/* Ô tên bàn / sân */
.tbl-help { display: block; margin-top: 6px; line-height: 1.45; }
.tbl-preview { display: block; margin-top: 4px; font-weight: 700; color: #86efac; }
.tbl-preview.bad { color: #fbbf24; }

.kk-note { display: block; margin-top: 6px; line-height: 1.45; }
/* Khuyến khích đang tắt: chỉ mờ công tắc, hướng dẫn vẫn rõ; ẩn ô chọn số giải cho đỡ rối */
.prize-cfg.off:has(.kk-note) { opacity: 1; }
.prize-cfg.off:has(.kk-note) .switch-row { opacity: .55; }
.prize-cfg[data-code="kk"].off select { display: none !important; }

/* Hộp nhập tỉ số: ghi chú nhập SỐ VÁN thắng */
.sc-hint { margin: 10px 0 4px; padding: 8px 12px; border-radius: 10px; background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.35); font-size: 13.5px; line-height: 1.5; }

/* Trao giải phụ ngay tại bảng xếp hạng (trang trọng tài) */
.st-head .st-tools { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aw-open { border-color: rgba(167,139,250,.6) !important; color: #e9d5ff !important; }
.aw-modal-box { width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 18px; padding: 16px;
    background: var(--surface, #0f2a20); border: 1px solid var(--border-2); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.aw-modal-box .aw-mgr { margin-top: 0; }/* Cổng mã giải: email đã che (chuỗi dài) xuống dòng – không đẩy khung Ban tổ chức tràn ở màn 320px */
.gate-opt.btc .btc-body { min-width: 0; }
.btc-form .masked { overflow-wrap: anywhere; word-break: break-all; }
.btc-row { flex-wrap: wrap; } .btc-row input { min-width: 0; flex: 1 1 140px; }

/* Hỗ trợ nhanh (admin/ho-tro) */
.support-new { border-color: rgba(52,211,153,.45); }
.support-new .pin-big { font-size: 26px; letter-spacing: 2px; color: var(--gold-2); background: rgba(0,0,0,.25); padding: 2px 12px; border-radius: 8px; user-select: all; }
.support-new textarea { width: 100%; font-size: 14px; }
.support-tbl td { overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .support-tbl thead { display: none; }
    .support-tbl tr { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; }
    .support-tbl td { display: flex; gap: 10px; padding: 6px 0; border: 0; }
    .support-tbl td[data-l]::before { content: attr(data-l); flex: 0 0 100px; color: var(--muted); font-size: 12px; }
}
/* Trọng tài: đã lưu nhưng vẽ lại màn hình lỗi (note122 BUG-122-002) */
.render-warn { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 500; max-width: min(560px, calc(100vw - 32px));
    background: #12352a; border: 1px solid rgba(52,211,153,.5); color: var(--text); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.render-warn button { margin-left: 8px; }
/* Dấu tích "Đồng hạng Ba" cạnh Giải Ba (thay ô chọn cũ) */
.third-shared { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 13px; line-height: 1.45; cursor: pointer; }
.third-shared input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--gold); }
.third-shared.off { opacity: .5; cursor: default; }
/* Trọng tài: đếm ngược tới giờ khai mạc */
.ref-ko { margin: 0 0 10px; background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.4); }
.ref-ko .ref-ko-left { font-variant-numeric: tabular-nums; color: var(--gold-2); }

/* Biểu tượng môn vẽ riêng thay emoji (VD vợt pickleball – js/emo.js) */
.emo-img { display: inline-block; height: 1.15em; width: auto; vertical-align: -0.22em; }
/* Slogan nền tảng ở chân trang */
.mk-foot .ft-slogan { font-weight: 800; color: var(--gold-2); letter-spacing: .2px; margin: 10px 0 4px; }
