:root {
  --navy: #0b1d3a; --navy2: #12305e; --green: #16c172; --lime: #c8f31d; --orange: #ff7a1a;
  --gold: #f5b700; --silver: #aab4c3; --bronze: #c9783a; --bg: #f1f5fb; --text: #14213d;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Kanit', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.container { width: min(1180px, 92%); margin: 0 auto; }
main.container { padding: 28px 0 60px; position: relative; z-index: 1; }
a { color: var(--navy2); }
.muted { color: #6b7a90; } .center { text-align: center; } .big { font-size: 1.4rem; }

/* floating sport icons */
.bg-balls { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-balls span { position: absolute; font-size: 2.2rem; opacity: .10; animation: float 18s linear infinite; bottom: -60px; }
.bg-balls span:nth-child(1) { left: 6%; } .bg-balls span:nth-child(2) { left: 24%; animation-delay: -4s; }
.bg-balls span:nth-child(3) { left: 45%; animation-delay: -9s; } .bg-balls span:nth-child(4) { left: 62%; animation-delay: -2s; }
.bg-balls span:nth-child(5) { left: 80%; animation-delay: -12s; } .bg-balls span:nth-child(6) { left: 92%; animation-delay: -6s; }
@keyframes float { from { transform: translateY(0) rotate(0); } to { transform: translateY(-115vh) rotate(360deg); } }

/* header */
.topbar { background: linear-gradient(90deg, var(--navy), var(--navy2)); position: sticky; top: 0; z-index: 50; box-shadow: 0 4px 18px rgba(0,0,0,.25); border-bottom: 4px solid var(--green); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; line-height: 1.2; }
.brand small { display: block; font-weight: 300; font-size: .75rem; color: #b9c8e6; }
.logo { font-size: 1.9rem; animation: bounce 2.4s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-5px) rotate(-8deg); } }
.menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.menu > a:not(.btn) { color: #dbe6ff; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; transition: .2s; }
.menu > a:not(.btn):hover, .menu > a.active { background: var(--green); color: #04210f; }
.dropdown { position: relative; }
.dropdown-toggle { font: inherit; font-size: .95rem; cursor: pointer; border: 0; color: #dbe6ff; background: transparent; padding: 8px 14px; border-radius: 999px; transition: .2s; }
.dropdown:hover .dropdown-toggle, .dropdown:focus-within .dropdown-toggle, .dropdown.active .dropdown-toggle { background: var(--green); color: #04210f; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; min-width: 190px; padding: 8px; background: var(--navy); border: 1px solid rgba(255,255,255,.15); border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.35); z-index: 60; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a { display: block; color: #dbe6ff; text-decoration: none; padding: 9px 14px; border-radius: 10px; font-size: .95rem; }
.dropdown-menu a:hover, .dropdown-menu a.active { background: var(--green); color: #04210f; }
.school-badge { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255,255,255,.12); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: .85rem; margin: 0 4px; }
.footer-school { display: inline-block; margin-top: 10px; background: rgba(255,255,255,.12); color: #fff; padding: 4px 16px; border-radius: 999px; font-size: .9rem; }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 1.7rem; cursor: pointer; }
.closed-banner { background: var(--orange); color: #fff; text-align: center; padding: 8px; font-weight: 500; }

/* buttons & forms */
.btn { display: inline-block; background: linear-gradient(135deg, var(--green), #0ea35f); color: #fff; border: 0; padding: 10px 20px; border-radius: 999px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s; box-shadow: 0 4px 12px rgba(22,193,114,.35); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(22,193,114,.45); }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; } .btn-sm { padding: 5px 14px; font-size: .85rem; }
.btn-ghost { background: transparent; border: 2px solid currentColor; color: #fff; box-shadow: none; }
.topbar .btn-ghost { color: #dbe6ff; }
.panel .btn-ghost, main .btn-ghost { color: var(--navy2); }
.hero .btn-ghost { color: #fff; }
.btn-danger { background: linear-gradient(135deg, #ff5a5f, #d62839); box-shadow: 0 4px 12px rgba(214,40,57,.3); }
.inline { display: inline; }
input, select, textarea { font: inherit; padding: 9px 12px; border: 2px solid #d5deec; border-radius: 10px; background: #fff; max-width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,193,114,.2); }
.form { display: grid; gap: 14px; } .form label, .filter label { display: grid; gap: 4px; font-weight: 500; }
.sport-name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gender-fields { display: grid; align-content: start; gap: 4px; }
.filter { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; background: #fff; padding: 16px; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(11,29,58,.07); margin-bottom: 22px; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.row-form input, .row-form select { flex: 1 1 140px; }
[hidden] { display: none !important; }

.swal-kanit, .swal2-popup { font-family: 'Kanit', sans-serif; }
.alert { padding: 12px 18px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; animation: slide .4s; }
.alert-success { background: #d9f7e8; color: #0b6b3a; } .alert-danger { background: #ffe1e3; color: #a1121f; } .alert-warning { background: #fff2cf; color: #7a5600; }
@keyframes slide { from { opacity: 0; transform: translateY(-10px); } }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 64px 32px; text-align: center; color: #fff; background: radial-gradient(circle at 20% 20%, #1e5aa8, transparent 55%), linear-gradient(135deg, var(--navy), #0a5a3d); box-shadow: 0 18px 40px rgba(11,29,58,.35); }
.hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 40px, rgba(255,255,255,.04) 40px 80px); animation: slideBg 8s linear infinite; }
@keyframes slideBg { to { background-position: 160px 0; } }
.hero-track { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: repeating-linear-gradient(90deg, var(--lime) 0 30px, transparent 30px 60px); animation: run 1.2s linear infinite; }
@keyframes run { to { background-position: -60px 0; } }
.hero > * { position: relative; }
.eyebrow { letter-spacing: .4em; color: var(--lime); font-weight: 700; margin: 0; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 3rem); margin: 10px 0; font-weight: 800; text-shadow: 0 4px 20px rgba(0,0,0,.4); }
.hero .sub { color: #cfe0ff; max-width: 640px; margin: 0 auto 24px; }
.hero-year { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 14px; }
.hero-year::before, .hero-year::after { content: ''; flex: 0 1 90px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero-year::after { transform: scaleX(-1); }
.hero-year span { display: inline-block; padding: 6px 26px; border-radius: 999px; font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.4rem); letter-spacing: .04em; color: #4a3500;
  background: linear-gradient(135deg, #ffe27a, var(--gold) 55%, #e09a00); box-shadow: 0 6px 18px rgba(245,183,0,.45), inset 0 1px 0 rgba(255,255,255,.6); animation: glow 2s ease-in-out infinite; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: -28px 18px 30px; position: relative; z-index: 2; }
.stat { background: #fff; border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: 0 10px 25px rgba(11,29,58,.12); border-top: 5px solid var(--green); }
.stat.gold { border-color: var(--gold); }
.stat b { display: block; font-size: 2.6rem; color: var(--navy2); line-height: 1.1; } .stat span { color: #6b7a90; }

.section-title, .page-title { font-weight: 800; color: var(--navy); }
.section-title { margin: 34px 0 14px; padding-left: 14px; border-left: 6px solid var(--green); }
.page-title small { font-size: .55em; color: #6b7a90; font-weight: 400; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0 12px; }
.page-head h2, .page-head .page-title { margin: 0; }
.back { display: inline-block; margin-bottom: 12px; text-decoration: none; font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { display: block; background: #fff; border-radius: var(--radius); padding: 20px; text-decoration: none; color: inherit; box-shadow: 0 4px 16px rgba(11,29,58,.08); position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 16px 30px rgba(11,29,58,.18); }
.card h3 { margin: 8px 0; color: var(--navy); } .card p { margin: 3px 0; }
.sport-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--green); }
.sport-card.athletics::before { background: var(--orange); }
.sport-card { padding: 18px 20px 14px 24px; background: linear-gradient(160deg, #fff 55%, #eaf8f1); border: 1px solid #dbece3; }
.sport-card.athletics { background: linear-gradient(160deg, #fff 55%, #fff1e4); border-color: #f6dfca; }
.sport-card::before { width: 8px; background: linear-gradient(180deg, var(--green), #0b8f55); }
.sport-card.athletics::before { background: linear-gradient(180deg, var(--orange), #d95a00); }
.sport-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(22,193,114,.18), transparent 70%); pointer-events: none; }
.sport-card.athletics::after { background: radial-gradient(circle, rgba(255,122,26,.2), transparent 70%); }
.sport-card:hover { border-color: var(--green); box-shadow: 0 16px 30px rgba(22,193,114,.25); }
.sport-card.athletics:hover { border-color: var(--orange); box-shadow: 0 16px 30px rgba(255,122,26,.28); }
.sc-icon { position: absolute; right: 14px; top: 10px; font-size: 2.6rem; opacity: .9; filter: drop-shadow(0 3px 4px rgba(0,0,0,.2)); transition: transform .35s; z-index: 1; }
.sport-card:hover .sc-icon { transform: rotate(-14deg) scale(1.18); }
.sc-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-right: 56px; }
.sc-top .badge-done { margin-left: 0; }
.sport-card h3 { font-size: 1.15rem; line-height: 1.35; margin: 10px 0 8px; font-weight: 600; position: relative; z-index: 1; }
.sc-meta { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; color: #51607a; }
.sc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #cfdcd5; font-size: .9rem; font-weight: 500; color: var(--navy2); }
.sc-go { color: #0b8f55; font-weight: 600; transition: transform .25s; }
.athletics .sc-go { color: #d95a00; }
.sport-card:hover .sc-go { transform: translateX(4px); }
.badge-done { display: inline-block; margin-left: 8px; padding: 2px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #5a3b00; background: linear-gradient(135deg, #fff1a8, #f5c542 50%, #d99a00); border: 1px solid #c58b00; box-shadow: 0 2px 6px rgba(217,154,0,.45), inset 0 1px 0 rgba(255,255,255,.7); text-shadow: 0 1px 0 rgba(255,255,255,.5); white-space: nowrap; }
.chip { display: inline-block; background: #e3f6ec; color: #0b6b3a; padding: 2px 12px; border-radius: 999px; font-size: .8rem; font-weight: 500; }
.athletics .chip { background: #ffe9d6; color: #a34100; }

.panel { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: 0 6px 22px rgba(11,29,58,.09); margin-bottom: 22px; }
.form-compact { max-width: 520px; }
.form-narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.form-narrow .sport-name-fields { grid-template-columns: 2fr 1fr; }
.team-stack { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.team-stack .panel { overflow-x: auto; margin-bottom: 0; }
.team-stack .table.compact input[name="fullname"] { min-width: 220px; }
.detail-wrap { max-width: 760px; margin: 0 auto; }
.panel.narrow { max-width: 460px; margin: 30px auto; } .panel h1, .panel h2 { margin-top: 0; }
.info { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; } .info dt { color: #6b7a90; } .info dd { margin: 0; }
.school-list li { padding: 3px 0; } 
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } .two-col .panel { overflow-x: auto; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(11,29,58,.08); }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th { background: var(--navy2); color: #fff; padding: 11px 12px; text-align: left; font-weight: 500; white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid #e8eef7; vertical-align: middle; }
.table tbody tr:hover { background: #f4f9ff; }
.table.compact input, .table.compact select { width: 100%; padding: 6px 8px; }
.table.compact input[name="fullname"] { min-width: 280px; }
.table.compact input[name="shirt_no"] { min-width: 70px; }
.row-form input[name="fullname"] { flex: 2 1 300px; }
.actions { white-space: nowrap; }
.row-gold { background: linear-gradient(90deg, #fff3bf, #ffe27a) !important; font-weight: 700; box-shadow: inset 6px 0 0 var(--gold); animation: glow 2s ease-in-out infinite; }
@keyframes glow { 50% { filter: brightness(1.07); } }
.row-final { background: linear-gradient(90deg, #fff3bf, #ffe27a); box-shadow: inset 6px 0 0 var(--gold); }
.row-final-label td { text-align: center; padding: 8px 12px; background: linear-gradient(90deg, #fff3bf, #ffe27a); }
.final-tag { color: #a36b00; font-weight: 700; font-size: 1rem; white-space: nowrap; }
#pairForm th:nth-child(4), #pairForm td:nth-child(4) { min-width: 180px; }
#pairForm .sw { width: 100%; }
.summary td:not(:nth-child(2)), .summary th:not(:nth-child(2)) { text-align: center; }

.medal { display: inline-block; padding: 2px 14px; border-radius: 999px; font-weight: 500; color: #fff; }
.medal-gold { background: var(--gold); color: #4a3500; } .medal-silver { background: var(--silver); color: #25303f; }
.medal-bronze { background: var(--bronze); } .medal-participate { background: #5b8def; }
a.count { display: inline-block; min-width: 38px; padding: 2px 10px; border-radius: 999px; text-decoration: none; font-weight: 700; transition: transform .15s; }
a.count:hover { transform: scale(1.2); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 10px 20px; border-radius: 999px; background: #fff; text-decoration: none; font-weight: 500; box-shadow: 0 2px 8px rgba(11,29,58,.08); }
.tabs a.active { background: var(--navy2); color: #fff; }

.matches { display: grid; gap: 14px; }
.match { background: #fff; border-radius: var(--radius); padding: 18px 22px; box-shadow: 0 4px 16px rgba(11,29,58,.08); position: relative; }
.match-no { font-weight: 700; color: var(--green); }
.match-body { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 1.1rem; margin: 6px 0; }
.team { padding: 6px 14px; border-radius: 10px; background: #eef2f9; } .team.win { background: #d9f7e8; font-weight: 700; color: #0b6b3a; }
.vs { font-weight: 800; color: var(--orange); }
.match.final { background: linear-gradient(135deg, #fff8d6, #ffe58a); border: 3px solid var(--gold); transform: scale(1.01); animation: glow 2s ease-in-out infinite; }
.ribbon { position: absolute; top: -14px; right: 18px; background: var(--gold); color: #4a3500; padding: 3px 16px; border-radius: 999px; font-weight: 700; box-shadow: 0 4px 10px rgba(0,0,0,.2); }

.ok { color: #0b8a4a; } .bad { color: #d62839; }
.footer { background: var(--navy); color: #b9c8e6; text-align: center; padding: 26px 0; position: relative; z-index: 1; border-top: 4px solid var(--lime); }

.maint { background: linear-gradient(135deg, var(--navy), #0a5a3d); min-height: 100vh; display: grid; place-items: center; color: #fff; text-align: center; }
.maint-box { padding: 30px; } .spinner { font-size: 4rem; display: inline-block; animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(20px); transition: .6s; } .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .burger { display: block; } .menu { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .nav { flex-wrap: wrap; } body.menu-open .menu { display: flex; }
  .dropdown-toggle { width: 100%; text-align: left; }
  .dropdown-menu { display: block; position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; }
  .two-col { grid-template-columns: 1fr; } .info { grid-template-columns: 1fr; }
  .sport-name-fields, .form-narrow .sport-name-fields { grid-template-columns: 1fr; }
}

/* ระบบจับคู่แข่งขัน */
.small { font-size: .85rem; }
.pick-layout, .draw-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.draw-layout { grid-template-columns: minmax(0, 1fr) 340px; }
.draw-layout:has(#drawSide[hidden]) { grid-template-columns: minmax(0, 1fr); }
.pick-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pick-tools input { flex: 1 1 200px; }
.school-list, .selected-list, .remain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.school-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.school-item { width: 100%; text-align: left; font: inherit; cursor: pointer; padding: 10px 14px; border: 2px solid #d5deec; border-radius: 12px; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 8px; transition: .15s; }
.school-item:hover { border-color: var(--green); transform: translateY(-1px); }
.school-item.on { background: #d9f7e8; border-color: var(--green); font-weight: 600; }
.tag-reg { color: #0b6b3a; background: #e8fbf1; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.selected-box { position: sticky; top: 90px; }
.selected-box h3, .draw-side h3 { margin-top: 0; }
.count-pill { background: var(--green); color: #04210f; padding: 1px 12px; border-radius: 999px; font-size: .9rem; }
.selected-list { counter-reset: n; margin-bottom: 14px; }
.selected-list li { counter-increment: n; background: #f1f5fb; padding: 8px 12px; border-radius: 10px; animation: slide .3s; }
.selected-list li::before { content: counter(n) '. '; font-weight: 700; color: var(--navy2); }
.selected-list .x, .modal-card .x { border: 0; background: none; color: #d62839; cursor: pointer; font-size: 1rem; float: right; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.analysis { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.analysis .stat { text-align: center; min-width: 90px; }
.analysis .stat b { display: block; font-size: 2rem; line-height: 1.1; color: var(--navy2); }
.analysis .stat span { color: #6b7a90; font-size: .85rem; }
.analysis .stat-text { flex: 1 1 320px; }
.phase-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(90deg, var(--navy), var(--navy2)); color: #fff; padding: 12px 18px; border-radius: 14px; margin-bottom: 14px; }
.draw-side { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.remain-list li { background: #fff7e0; border: 1px solid #f5d98a; padding: 6px 12px; border-radius: 10px; }
.draw-side form { margin-top: 14px; display: grid; gap: 10px; }
.venue-row { display: grid; gap: 2px; margin-bottom: 8px; font-weight: 500; }
.venue-panel { margin-top: 22px; max-width: 560px; }
.view-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.round-title { margin: 22px 0 8px; color: var(--navy2); }
.round-title small { font-weight: 400; color: #6b7a90; margin-left: 8px; }
.round-title.is-final { color: #b07d00; }

.modal-back { position: fixed; inset: 0; background: rgba(11,29,58,.6); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal-card { background: #fff; border-radius: 18px; padding: 22px; width: min(460px, 100%); max-height: 86vh; overflow: auto; animation: slide .25s; }
.modal-card h3 { margin-top: 0; }
.remain-list.pick button { width: 100%; text-align: left; font: inherit; cursor: pointer; padding: 10px 14px; border: 2px solid #d5deec; border-radius: 12px; background: #fff; }
.remain-list.pick button:hover { border-color: var(--green); background: #d9f7e8; }
.modal-card > button { margin: 12px 8px 0 0; }

/* bracket diagram */
.bk-scroll { overflow: auto; background: #fff; border-radius: var(--radius); box-shadow: 0 6px 22px rgba(11,29,58,.09); padding: 10px 16px 20px; margin-bottom: 22px; background-image: radial-gradient(#e4ebf6 1px, transparent 1px); background-size: 18px 18px; }
.bk-canvas { position: relative; }
.bk-lines { position: absolute; left: 0; top: 0; pointer-events: none; }
.bk-lines path { fill: none; stroke: #b8c5dc; stroke-width: 2; }
.bk-lines path.on { stroke: var(--green); stroke-width: 2.5; }
.bk-head { position: absolute; top: 0; text-align: center; background: linear-gradient(135deg, var(--navy), var(--navy2)); color: #fff; border-radius: 999px; padding: 4px 10px; line-height: 1.25; }
.bk-head small { display: block; font-size: .72rem; color: #b9c8e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-match { position: absolute; border-radius: 12px; background: #fff; border: 2px solid #c9d5ea; box-shadow: 0 4px 12px rgba(11,29,58,.1); }
.bk-no { position: absolute; left: 10px; top: -11px; background: var(--orange); color: #fff; font-size: .7rem; padding: 0 9px; border-radius: 999px; line-height: 1.5; z-index: 2; }
.bk-note { position: absolute; left: 10px; bottom: -11px; background: #fff4d6; color: #7a5600; font-size: .7rem; padding: 0 9px; border-radius: 999px; border: 1px solid #f5d98a; }
.bk-team { display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: .88rem; overflow: hidden; border-radius: 10px; }
.bk-team + .bk-team { border-top: 1px dashed #d5deec; border-radius: 0 0 10px 10px; }
.bk-team .bk-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-team { font-size: 1.05rem; }
.bk-num { background: var(--navy2); color: #fff; min-width: 34px; height: 34px; padding: 0 4px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.2rem; font-weight: 800; line-height: 1; }
.bk-toolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }

/* dark sport theme */
body.bk-dark .bk-scroll { background-color: #0a1222; background-image: radial-gradient(rgba(57,255,136,.12) 1px, transparent 1px), linear-gradient(180deg, #0a1222, #0e1b33); border: 1px solid #1f3358; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
body.bk-dark .bk-lines path { stroke: #3b5384; }
body.bk-dark .bk-lines path.on { stroke: #39ff88; filter: drop-shadow(0 0 4px rgba(57,255,136,.7)); }
body.bk-dark .bk-head { background: linear-gradient(135deg, #14305f, #0b1d3a); border: 1px solid #2a4a80; color: #fff; text-transform: none; box-shadow: 0 0 12px rgba(57,255,136,.15); }
body.bk-dark .bk-match { background: #111f3a; border-color: #2a4a80; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
body.bk-dark .bk-no { background: linear-gradient(135deg, #ff8a1f, #ff5a1f); box-shadow: 0 0 8px rgba(255,138,31,.6); }
body.bk-dark .bk-note { background: #3a2f0b; color: #ffd466; border-color: #7a5f12; }
body.bk-dark .bk-team { color: #e8f0ff; }
body.bk-dark .bk-team + .bk-team { border-top-color: #2a4a80; }
body.bk-dark .bk-num { background: linear-gradient(135deg, #39ff88, #12b85a); color: #04210f; box-shadow: 0 0 10px rgba(57,255,136,.45); }
body.bk-dark .bk-team.empty, body.bk-dark .bk-team.pending { background: #0d192f; color: #7f93b8; }
body.bk-dark .bk-team.empty .bk-num { background: #34476b; color: #b8c6e0; box-shadow: none; }
body.bk-dark .bk-team.clickable:hover { background: #17335c; box-shadow: inset 0 0 0 2px #39ff88; }
body.bk-dark .bk-team.win { background: #0f3d29; color: #7dffb4; }
body.bk-dark .bk-team.lose { color: #6a7da3; }
body.bk-dark .bk-team.filled { color: #fff; }
.bk-team.empty { color: #8a97ab; background: #f7f9fd; }
.bk-team.empty .bk-num { background: #aab4c3; }
.bk-team.pending { color: #8a97ab; font-style: italic; background: #f7f9fd; }
.bk-team.filled { font-weight: 600; }
.bk-team.clickable { cursor: pointer; }
.bk-team.clickable:hover { background: #d9f7e8; }
.bk-team.win { background: #d9f7e8; color: #0b6b3a; }
.bk-team.lose { color: #8a97ab; text-decoration: line-through; }
.bk-team.pop { animation: pop .7s; }
@keyframes pop { 0% { transform: scale(.6); background: var(--lime); } 60% { transform: scale(1.06); background: var(--lime); } 100% { transform: scale(1); } }
.bk-champ { position: absolute; display: grid; place-items: center; text-align: center; border-radius: 14px; background: linear-gradient(135deg, #fff1a8, #f5c542 55%, #d99a00); color: #5a3b00; padding: 4px 8px; box-shadow: 0 6px 16px rgba(217,154,0,.45); line-height: 1.2; }
.bk-trophy { font-size: 1.5rem; }
@media (max-width: 900px) { .pick-layout, .draw-layout { grid-template-columns: 1fr; } .selected-box, .draw-side { position: static; max-height: none; } }