:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #11161e;
  --panel-2: #171d27;
  --panel-3: #202836;
  --text: #f5f7fb;
  --muted: #929cac;
  --line: rgba(255, 255, 255, .09);
  --green: #b9ff2c;
  --green-2: #75c91a;
  --purple: #7655ff;
  --danger: #ff5e73;
  --warning: #ffcc57;
  --success: #62e69c;
  --radius: 22px;
  --shadow: 0 18px 55px rgba(0, 0, 0, .34);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% -10%, rgba(118, 85, 255, .19), transparent 35%),
    radial-gradient(circle at 10% 35%, rgba(185, 255, 44, .07), transparent 30%),
    var(--bg);
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(185, 255, 44, .45);
  outline-offset: 2px;
}
button:disabled { opacity: .45; cursor: not-allowed; }

.app-shell { min-height: 100vh; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(70px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 16, .86);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; }
.brand img { filter: drop-shadow(0 0 16px rgba(185, 255, 44, .14)); }
.brand span { display: grid; text-align: left; line-height: 1; }
.brand strong { letter-spacing: -.02em; font-size: 1rem; }
.brand small { margin-top: 4px; color: var(--green); font-size: .61rem; font-weight: 900; letter-spacing: .17em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.connection-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: rgba(255,255,255,.03); font-size: .7rem; font-weight: 700;
}
.connection-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.connection-badge.offline span { background: var(--danger); box-shadow: none; }
.icon-button {
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-2);
  color: var(--green); font-weight: 900; cursor: pointer;
}
.main { width: min(100%, 860px); margin: 0 auto; padding: 20px 16px 28px; }

.loading-screen { min-height: 55vh; display: grid; place-items: center; align-content: center; gap: 16px; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.bottom-nav {
  position: fixed; z-index: 25; left: 50%; bottom: 0; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 1fr);
  width: min(100%, 860px); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  background: rgba(10, 13, 18, .94); backdrop-filter: blur(20px);
}
.bottom-nav button { display: grid; justify-items: center; gap: 3px; padding: 7px; border: 0; border-radius: 14px; color: var(--muted); background: none; font-size: .67rem; font-weight: 800; cursor: pointer; }
.bottom-nav button span { font-size: 1.3rem; line-height: 1; }
.bottom-nav button.active { color: var(--green); background: rgba(185,255,44,.07); }

.hero {
  position: relative; min-height: 310px; overflow: hidden; padding: 24px; border: 1px solid var(--line); border-radius: 30px;
  background: var(--panel); box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,11,16,.93) 0%, rgba(8,11,16,.64) 53%, rgba(8,11,16,.09) 100%); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 260px; max-width: 500px; }
.eyebrow { display: inline-flex; align-items: center; width: fit-content; gap: 7px; margin: 0 0 12px; color: var(--green); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(2rem, 10vw, 4rem); line-height: .96; letter-spacing: -.055em; }
h2 { margin-bottom: 12px; font-size: 1.35rem; letter-spacing: -.025em; }
h3 { margin-bottom: 8px; font-size: 1rem; }
.hero p { max-width: 440px; margin-bottom: 21px; color: #cbd1db; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 17px; border: 1px solid transparent;
  border-radius: 15px; background: var(--green); color: #10140b; font-weight: 900; cursor: pointer; text-decoration: none; transition: transform .15s ease, filter .15s ease;
}
.button:active { transform: scale(.98); }
.button:hover { filter: brightness(1.06); }
.button.secondary { border-color: var(--line); background: rgba(255,255,255,.07); color: var(--text); }
.button.purple { background: var(--purple); color: #fff; }
.button.danger { border-color: rgba(255,94,115,.28); background: rgba(255,94,115,.12); color: #ff94a3; }
.button.ghost { padding-inline: 12px; border-color: transparent; background: transparent; color: var(--muted); }
.button.small { min-height: 36px; padding: 0 12px; border-radius: 11px; font-size: .78rem; }
.button.full { width: 100%; }

.section { margin-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }
.text-button { padding: 5px 0; border: 0; background: none; color: var(--green); font-size: .78rem; font-weight: 800; cursor: pointer; }

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(23,29,39,.96), rgba(15,20,28,.96)); box-shadow: 0 12px 34px rgba(0,0,0,.14); }
.card.clickable { cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.card.clickable:hover { border-color: rgba(185,255,44,.25); transform: translateY(-1px); }
.stat-card { min-height: 105px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-card .value { font-size: 1.8rem; font-weight: 950; letter-spacing: -.05em; }
.stat-card .label { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.stat-card.accent { background: linear-gradient(145deg, rgba(185,255,44,.16), rgba(23,29,39,.96)); }
.stat-card.accent .value { color: var(--green); }

.tournament-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.tournament-card h3 { margin-bottom: 6px; }
.tournament-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.tournament-card .arrow { color: var(--green); font-size: 1.35rem; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: #c8ced8; font-size: .66rem; font-weight: 800; }
.badge.green { background: rgba(185,255,44,.1); color: var(--green); }
.badge.purple { background: rgba(118,85,255,.13); color: #b9aaff; }
.badge.warning { background: rgba(255,204,87,.11); color: var(--warning); }
.badge.danger { background: rgba(255,94,115,.11); color: #ff91a0; }

.empty-state { padding: 32px 20px; border: 1px dashed rgba(255,255,255,.14); border-radius: var(--radius); text-align: center; color: var(--muted); }
.empty-state .symbol { margin-bottom: 12px; font-size: 2rem; }
.empty-state h3 { color: var(--text); }
.empty-state p { max-width: 430px; margin: 0 auto 16px; line-height: 1.5; }

.tournament-hero { position: relative; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(135deg, rgba(118,85,255,.21), rgba(185,255,44,.08) 50%, var(--panel)); }
.tournament-hero::after { content: "26"; position: absolute; right: -10px; top: -30px; color: rgba(255,255,255,.035); font-size: 10rem; font-weight: 1000; letter-spacing: -.1em; }
.tournament-head { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.back-button { padding: 5px 0; border: 0; background: none; color: var(--muted); font-weight: 800; cursor: pointer; }
.tournament-title { margin: 14px 0 7px; font-size: 1.85rem; line-height: 1.05; }
.tournament-meta { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: .78rem; }
.invite-box { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 20px; padding: 13px; border: 1px solid rgba(185,255,44,.2); border-radius: 17px; background: rgba(8,11,16,.48); }
.invite-code { font-size: 1.35rem; font-weight: 950; letter-spacing: .15em; color: var(--green); }
.invite-box small { display: block; margin-bottom: 4px; color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }

.progress-card { margin-top: 13px; padding: 14px 16px; border-radius: 17px; background: rgba(255,255,255,.045); }
.progress-row { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: .77rem; }
.progress-track { display: block; width: 100%; height: 7px; overflow: hidden; margin-top: 10px; border: 0; border-radius: 99px; background: rgba(255,255,255,.07); appearance: none; }
.progress-track::-webkit-progress-bar { border-radius: inherit; background: rgba(255,255,255,.07); }
.progress-track::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--green)); }
.progress-track::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--green)); }

.participant-list { display: grid; gap: 9px; }
.participant-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.025); }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, rgba(185,255,44,.2), rgba(118,85,255,.25)); color: var(--green); font-weight: 950; }
.participant-row strong { display: block; margin-bottom: 3px; font-size: .9rem; }
.participant-row small { color: var(--muted); }
.participant-actions { display: flex; align-items: center; gap: 6px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 20px -16px 0; padding: 0 16px 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--muted); font-size: .76rem; font-weight: 850; cursor: pointer; }
.tabs button.active { border-color: rgba(185,255,44,.28); background: rgba(185,255,44,.1); color: var(--green); }

.round { margin-top: 22px; }
.round-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.round-heading h3 { margin: 0; font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; }
.round-heading span { color: var(--muted); font-size: .7rem; }
.parallel-grid { display: grid; gap: 11px; }
.match-card { position: relative; padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: var(--panel); overflow: hidden; }
.match-card.completed { background: linear-gradient(145deg, rgba(185,255,44,.05), var(--panel)); }
.match-card.pending { border-color: rgba(255,204,87,.27); }
.match-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.team { min-width: 0; }
.team.away { text-align: right; }
.team strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.team small { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.score { min-width: 70px; text-align: center; font-size: 1.55rem; font-weight: 950; letter-spacing: .04em; }
.score .penalties { display: block; margin-top: 3px; color: var(--warning); font-size: .62rem; letter-spacing: 0; }
.vs { color: var(--muted); font-size: .75rem; font-weight: 800; }
.match-actions { display: flex; gap: 8px; margin-top: 14px; }
.match-note { margin: 11px 0 0; color: var(--muted); font-size: .7rem; }

.timer-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-top: 18px; padding: 16px; border: 1px solid rgba(118,85,255,.23); border-radius: 19px; background: linear-gradient(135deg, rgba(118,85,255,.15), rgba(255,255,255,.025)); }
.timer-display { font-variant-numeric: tabular-nums; font-size: 2rem; font-weight: 950; letter-spacing: -.04em; }
.timer-card p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; }
.timer-actions { display: flex; gap: 7px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .76rem; }
th, td { padding: 12px 9px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
th { color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; }
th:nth-child(2), td:nth-child(2) { position: sticky; left: 0; z-index: 1; min-width: 124px; background: var(--panel); text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
td.rank { color: var(--green); font-weight: 950; }
td.points { font-size: .95rem; font-weight: 950; }
.withdrawn { opacity: .47; }
.tiebreak-list { display: grid; gap: 12px; margin-top: 12px; }
.tiebreak-card { padding: 15px; border: 1px solid rgba(255,204,87,.22); border-radius: 17px; background: rgba(255,204,87,.04); }
.tiebreak-card form { margin-top: 14px; }
.tiebreak-order { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tiebreak-order .field { margin-bottom: 0; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; margin: 25px 0 10px; }
.podium-place { display: grid; place-items: center; align-content: end; min-height: 130px; padding: 13px 7px; border: 1px solid var(--line); border-radius: 18px 18px 9px 9px; background: var(--panel); text-align: center; }
.podium-place.first { min-height: 175px; border-color: rgba(185,255,44,.24); background: linear-gradient(180deg, rgba(185,255,44,.13), var(--panel)); }
.podium-place .medal { margin-bottom: 7px; font-size: 1.8rem; }
.podium-names { display: grid; gap: 2px; width: 100%; min-width: 0; }
.podium-place strong { max-width: 100%; overflow-wrap: anywhere; font-size: .76rem; line-height: 1.2; }
.podium-place small { margin-top: 5px; color: var(--muted); }

.notice { padding: 14px 15px; border: 1px solid rgba(255,204,87,.22); border-radius: 16px; background: rgba(255,204,87,.07); color: #eadca9; font-size: .78rem; line-height: 1.5; }
.notice.success { border-color: rgba(98,230,156,.22); background: rgba(98,230,156,.07); color: #acefc8; }
.notice.danger { border-color: rgba(255,94,115,.22); background: rgba(255,94,115,.07); color: #ffb4be; }
.proposal-card { padding: 14px; border: 1px solid rgba(255,204,87,.22); border-radius: 17px; background: rgba(255,204,87,.055); }
.proposal-card + .proposal-card { margin-top: 9px; }
.proposal-score { margin: 8px 0; font-size: 1.2rem; font-weight: 950; }
.audit-list { display: grid; gap: 8px; }
.audit-entry { padding: 11px 13px; border-left: 3px solid var(--purple); border-radius: 0 12px 12px 0; background: rgba(255,255,255,.03); }
.audit-entry strong { display: block; font-size: .78rem; }
.audit-entry small { color: var(--muted); font-size: .67rem; }

.modal-root:empty, .toast-root:empty { display: none; }
.modal-root { position: fixed; z-index: 100; inset: 0; display: grid; align-items: end; padding: 16px; background: rgba(0,0,0,.67); backdrop-filter: blur(10px); }
.modal { width: min(100%, 560px); max-height: calc(100vh - 32px); overflow-y: auto; margin: 0 auto; padding: 21px; border: 1px solid var(--line); border-radius: 27px; background: #11161e; box-shadow: 0 28px 90px rgba(0,0,0,.55); animation: modalIn .2s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-handle { width: 42px; height: 4px; margin: -7px auto 18px; border-radius: 99px; background: rgba(255,255,255,.18); }
.modal-heading { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 18px; }
.modal-heading h2 { margin-bottom: 4px; }
.modal-heading p { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.45; }
.close-button { width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { color: #cdd3dc; font-size: .73rem; font-weight: 850; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  background: #0b0f15; color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.field textarea { min-height: 86px; resize: vertical; }
.field small { color: var(--muted); line-height: 1.4; }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.025); cursor: pointer; }
.setting-copy { min-width: 0; }
.setting-copy strong, .setting-copy small { display: block; }
.setting-copy strong { font-size: .82rem; }
.setting-copy small { margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.toggle-control { position: relative; flex: 0 0 auto; width: 48px; height: 28px; }
.toggle-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { display: block; width: 48px; height: 28px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: var(--panel-3); transition: background .15s ease, border-color .15s ease; }
.toggle-track::after { content: ''; display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: var(--muted); transition: transform .15s ease, background .15s ease; }
.toggle-control input:checked + .toggle-track { border-color: rgba(185,255,44,.45); background: rgba(185,255,44,.16); }
.toggle-control input:checked + .toggle-track::after { transform: translateX(20px); background: var(--green); }
.toggle-control input:focus-visible + .toggle-track { outline: 3px solid rgba(185,255,44,.45); outline-offset: 2px; }
.toggle-control input:disabled + .toggle-track { opacity: .45; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.score-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.score-inputs .separator { padding-bottom: 17px; color: var(--muted); font-weight: 900; }
.score-inputs input { text-align: center; font-size: 1.5rem; font-weight: 950; }
.modal-actions { display: flex; gap: 9px; margin-top: 19px; }
.modal-actions .button { flex: 1; }

.toast-root { position: fixed; z-index: 120; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 520px); transform: translateX(-50%); }
.toast { padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(28,35,47,.96); box-shadow: var(--shadow); font-size: .8rem; animation: toastIn .18s ease-out; }
.toast.error { border-color: rgba(255,94,115,.3); color: #ffc0c8; }
.toast.success { border-color: rgba(98,230,156,.3); color: #b9f3d0; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

.profile-hero { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(135deg, rgba(185,255,44,.11), rgba(118,85,255,.13)); }
.profile-hero .big-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 68px; height: 68px; border-radius: 22px; background: var(--green); color: #0c1007; font-size: 1.7rem; font-weight: 1000; }
.profile-hero h1 { margin: 0 0 5px; font-size: 1.65rem; }
.profile-hero p { margin: 0; color: var(--muted); font-size: .77rem; }
.history-rank { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: rgba(185,255,44,.1); color: var(--green); font-weight: 950; }

.device-list { display: grid; gap: 9px; }
.device-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.025);
}
.device-symbol { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(118,85,255,.16); color: #b9aaff; font-size: 1.15rem; }
.device-copy { min-width: 0; }
.device-copy strong { display: block; overflow-wrap: anywhere; font-size: .84rem; }
.device-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; line-height: 1.35; }

.pairing-qr {
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 0 auto 17px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}
.pairing-qr svg { display: block; width: 100%; height: 100%; }
.pairing-code-block { display: grid; justify-items: center; gap: 7px; padding: 15px; border: 1px solid rgba(185,255,44,.22); border-radius: 16px; background: rgba(185,255,44,.06); text-align: center; }
.pairing-code-block small { color: var(--muted); font-size: .69rem; }
.pairing-code-block strong { color: var(--green); font-size: 2rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pairing-instruction { margin: 15px 0; color: var(--muted); font-size: .78rem; line-height: 1.5; text-align: center; }
.pairing-result { margin-top: 15px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); }
.pairing-result.success { border-color: rgba(98,230,156,.24); background: rgba(98,230,156,.07); }
.pairing-result strong { display: block; font-size: .88rem; }
.pairing-result p { margin: 5px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 680px) {
  .main { padding: 28px 24px 42px; }
  .parallel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tabs { margin-inline: 0; padding-inline: 0; }
  .modal-root { align-items: center; }
  .modal { border-radius: 27px; }
}

@media (max-width: 420px) {
  .connection-badge { display: none; }
  .hero { padding: 20px; }
  .hero-actions .button { flex: 1; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .participant-actions .button span { display: none; }
  .device-row { grid-template-columns: 40px minmax(0, 1fr); }
  .device-row .button { grid-column: 2; width: 100%; }
  .tiebreak-order { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.subdued-copy { color: var(--muted); line-height: 1.5; }
.mt-12 { margin-top: 12px; }
.mt-13 { margin-top: 13px; }
.code-input { text-transform: uppercase; letter-spacing: .15em; font-weight: 900; }
