:root {
  color-scheme: dark;
  --bg: #171715;
  --surface: #24231f;
  --surface-2: #302e28;
  --line: #4a463d;
  --text: #f8f4ea;
  --muted: #aaa69e;
  --clay: #f06432;
  --clay-deep: #a93e20;
  --lime: #ddf247;
  --lime-ink: #171812;
  --danger: #ff7b68;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.app-shell { width: 100%; min-height: 100vh; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 18px 8px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.25rem; letter-spacing: .04em; text-transform: uppercase; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--clay); font-family: ui-sans-serif, system-ui; font-weight: 800; }
.icon-button, .round-action { min-width: 46px; min-height: 46px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); cursor: pointer; }
.top-actions { display: flex; gap: 8px; }
.message-button { position: relative; }
.message-button b { position: absolute; top: -5px; right: -4px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--lime); color: var(--lime-ink); font-size: .65rem; }
.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; }
main { width: min(100%, 1040px); margin: 0 auto; }
.screen { padding: 12px 14px 24px; }
.screen-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 0 4px; }
.eyebrow { margin: 0 0 4px; color: var(--clay); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(2rem, 7vw, 3rem); font-weight: 400; letter-spacing: .025em; line-height: 1; text-transform: uppercase; }
.count { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.deck-layout { display: grid; gap: 14px; }
.player-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); touch-action: pan-y; transition: transform .2s ease, opacity .2s ease; }
.player-card.is-leaving-left { transform: translateX(-115%) rotate(-7deg); opacity: 0; }
.player-card.is-leaving-right { transform: translateX(115%) rotate(7deg); opacity: 0; }
.court-portrait { min-height: min(49vh, 370px); position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f47b4c 0%, var(--clay) 58%, var(--clay-deep) 100%); }
.court-lines { position: absolute; inset: 26px; border: 2px solid rgba(255,255,255,.52); pointer-events: none; }
.court-lines::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid rgba(255,255,255,.52); }
.court-lines::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid rgba(255,255,255,.52); }
.match-badge { position: absolute; z-index: 2; top: 14px; left: 14px; display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; background: var(--lime); color: var(--lime-ink); font-size: .8125rem; font-weight: 800; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.player-monogram { position: relative; z-index: 1; width: 132px; height: 132px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); color: var(--text); box-shadow: 0 18px 44px rgba(60,25,14,.3); font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 3rem; letter-spacing: .04em; }
.swipe-feedback { position: absolute; z-index: 3; top: 50%; padding: 8px 12px; border: 3px solid currentColor; border-radius: 8px; font-family: Impact, sans-serif; font-size: 1.5rem; letter-spacing: .05em; text-transform: uppercase; opacity: 0; }
.pass-feedback { left: 22px; color: var(--danger); transform: rotate(-9deg); }
.like-feedback { right: 22px; color: var(--lime); transform: rotate(9deg); }
.player-copy { padding: 17px 16px 16px; }
.name-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.name-row h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.rating { color: var(--lime); font-size: 1rem; }
.player-meta { margin: 5px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.tags span { padding: 6px 9px; border-radius: 999px; background: var(--surface-2); font-size: .75rem; }
.card-actions { display: grid; grid-template-columns: 48px 1fr 48px; gap: 9px; }
.primary-action { min-height: 48px; border: 0; border-radius: 15px; padding: 0 18px; background: var(--clay); color: white; font-weight: 800; cursor: pointer; }
.full-width { width: 100%; margin-top: 8px; }
.match-reason { display: none; }
.bottom-nav { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; height: calc(70px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 6px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(23,23,21,.96); backdrop-filter: blur(14px); }
.nav-item { min-height: 52px; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: .72rem; cursor: pointer; }
.nav-item span:first-child { font-size: 1.25rem; line-height: 1; }
.nav-item.is-active { color: var(--lime); }
.text-button { min-height: 44px; border: 0; background: transparent; color: var(--lime); font-weight: 800; cursor: pointer; }
.segment-control { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 14px; background: var(--surface); }
.segment-control button { min-height: 42px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.segment-control button.is-active { background: var(--surface-2); color: var(--text); }
.match-list { display: grid; gap: 10px; }
.match-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.date-block { width: 52px; min-height: 54px; display: grid; place-items: center; align-content: center; border-radius: 13px; background: var(--surface-2); color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.date-block strong { color: var(--lime); font-size: 1.2rem; line-height: 1; }
.match-item-copy strong, .match-item-copy span { display: block; }
.match-item-copy span { margin-top: 3px; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.match-status { color: var(--lime); font-size: .75rem; font-weight: 800; text-align: right; }
.match-status.pending { color: var(--clay); }
.match-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.match-actions .match-status { margin: 0; }
.mini-action { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: .72rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.mini-action.accept { border-color: var(--lime); color: var(--lime); }
.mini-action.danger { color: var(--danger); }
.match-actions-row { display: flex; gap: 6px; }
.empty-state { padding: 42px 20px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }
.ranking-context { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 28px; }
.ranking-context label { color: var(--muted); font-size: .75rem; }
.ranking-context select { width: 100%; min-height: 44px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
.season-pill { padding: 7px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .72rem; }
.podium { min-height: 180px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 7px; margin: 0 8px 22px; }
.podium-player { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 5px 11px; border-radius: 16px 16px 4px 4px; background: var(--surface); }
.podium-player.first { min-height: 172px; background: linear-gradient(180deg, #383729, var(--surface)); }
.podium-player.second { min-height: 142px; }
.podium-player.third { min-height: 126px; }
.podium-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--clay); font-weight: 800; }
.podium-player.first .podium-avatar { width: 58px; height: 58px; background: var(--lime); color: var(--lime-ink); }
.podium-player small { color: var(--muted); }
.podium-player b { position: absolute; bottom: -12px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.leaderboard { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; }
.leaderboard li { display: grid; grid-template-columns: 34px 40px 1fr auto; align-items: center; gap: 10px; min-height: 58px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.leaderboard li.is-you { border: 0; border-radius: 14px; background: var(--clay); color: white; }
.leader-rank { color: var(--muted); text-align: center; }
.leaderboard li.is-you .leader-rank { color: white; }
.leader-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: .75rem; font-weight: 800; }
.leader-name strong, .leader-name small { display: block; }
.leader-name small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.leaderboard li.is-you .leader-name small { color: rgba(255,255,255,.78); }
.leader-score { font-weight: 800; }
.profile-hero { display: grid; grid-template-columns: 72px 1fr 46px; gap: 14px; align-items: center; margin: 10px 2px 22px; }
.profile-avatar { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: var(--clay); font-size: 1.35rem; font-weight: 800; }
.profile-hero h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.profile-hero p:last-child { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.rating-spotlight { display: grid; gap: 18px; padding: 18px; border-radius: var(--radius); background: linear-gradient(145deg, var(--clay), var(--clay-deep)); }
.rating-spotlight .panel-label { margin: 0 0 4px; color: rgba(255,255,255,.78); }
.rating-spotlight strong { display: inline-block; margin-right: 8px; font-family: Impact, sans-serif; font-size: 2.8rem; font-weight: 400; letter-spacing: .03em; }
.rating-movement { font-size: .78rem; font-weight: 800; }
.rating-band { display: grid; gap: 7px; }
.rating-band span { font-weight: 800; }
.rating-band small { color: rgba(255,255,255,.78); }
.rating-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.2); }
.rating-track i { display: block; width: 62%; height: 100%; background: var(--lime); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 26px; }
.stats-grid div { padding: 13px 10px; border-radius: 15px; background: var(--surface); }
.stats-grid span, .stats-grid strong, .stats-grid small { display: block; }
.stats-grid span { color: var(--muted); font-size: .7rem; }
.stats-grid strong { margin: 5px 0 2px; font-size: 1.3rem; }
.stats-grid small { color: var(--muted); font-size: .65rem; }
.profile-section { margin-bottom: 18px; }
.section-title { display: flex; align-items: center; justify-content: space-between; }
.section-title h2 { font-size: 1rem; }
.sport-list { border-top: 1px solid var(--line); }
.sport-list > div { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; min-height: 70px; border-bottom: 1px solid var(--line); }
.sport-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--clay); font-weight: 800; }
.sport-icon.alt { background: #5f8dff; }
.sport-icon.lime { background: var(--lime); color: var(--lime-ink); }
.sport-list p { margin: 0; }
.sport-list p strong, .sport-list p small { display: block; }
.sport-list p small { margin-top: 3px; color: var(--muted); font-size: .74rem; }
.sport-list b { color: var(--lime); }
.post-composer { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.composer-avatar, .post-avatar, .friend-avatar, .thread-avatar { display: grid; place-items: center; border-radius: 50%; background: var(--clay); color: white; font-weight: 800; }
.composer-avatar { width: 44px; height: 44px; }
.post-composer textarea { min-height: 74px; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); color: var(--text); font-size: 1rem; line-height: 1.45; }
.post-composer textarea::placeholder, .message-compose input::placeholder { color: var(--muted); }
.composer-actions { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.photo-button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; color: var(--lime); font-size: .84rem; font-weight: 800; cursor: pointer; }
.photo-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.compact-action { min-height: 42px; padding: 0 18px; }
.photo-preview { grid-column: 2; position: relative; overflow: hidden; border-radius: 14px; background: var(--surface-2); }
.photo-preview img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.photo-preview button { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(23,23,21,.82); color: white; font-size: 1.2rem; cursor: pointer; }
.feed-list { display: grid; gap: 12px; }
.feed-post { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.post-header { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 14px 14px 9px; }
.post-avatar { width: 42px; height: 42px; font-size: .78rem; }
.post-person strong, .post-person small { display: block; }
.post-person small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.post-sport { color: var(--clay); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.post-body { margin: 0; padding: 3px 14px 13px; font-size: .94rem; line-height: 1.5; }
.post-image { display: block; width: 100%; max-height: 440px; object-fit: cover; background: var(--surface-2); }
.post-footer { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 5px 12px; border-top: 1px solid var(--line); }
.like-button { min-height: 42px; border: 0; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.like-button.is-liked { color: var(--lime); }
.post-footer span { color: var(--muted); font-size: .75rem; }
.friend-section-heading { display: flex; justify-content: space-between; align-items: center; margin: 20px 2px 8px; }
.friend-section-heading h2 { margin: 0; font-size: 1rem; }
.friend-section-heading span { color: var(--muted); font-size: .78rem; }
.friend-list { display: grid; gap: 8px; }
.friend-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 11px; align-items: center; min-height: 68px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.friend-avatar { width: 48px; height: 48px; }
.friend-copy strong, .friend-copy small { display: block; }
.friend-copy small { margin-top: 3px; color: var(--muted); font-size: .73rem; }
.friend-action { min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: .78rem; font-weight: 800; cursor: pointer; }
.friend-action.is-added { border-color: var(--lime); color: var(--lime); }
.messenger-layout { display: grid; gap: 10px; }
.conversation-list { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.conversation-list::-webkit-scrollbar { display: none; }
.conversation-button { flex: 0 0 112px; min-height: 72px; display: grid; grid-template-columns: 38px 1fr; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.conversation-button.is-active { border-color: var(--lime); }
.conversation-button .friend-avatar { width: 38px; height: 38px; font-size: .7rem; }
.conversation-button strong, .conversation-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-button small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.message-thread { display: grid; grid-template-rows: auto minmax(310px, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.message-thread > header { display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.thread-avatar { width: 42px; height: 42px; }
.message-thread > header strong, .message-thread > header small { display: block; }
.message-thread > header small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.message-stream { display: flex; flex-direction: column; justify-content: end; gap: 9px; padding: 16px 12px; }
.message-bubble { width: fit-content; max-width: 82%; padding: 10px 12px; border-radius: 15px 15px 15px 4px; background: var(--surface-2); font-size: .9rem; line-height: 1.4; }
.message-bubble.is-mine { align-self: end; border-radius: 15px 15px 4px 15px; background: var(--clay); color: white; }
.message-bubble small { display: block; margin-top: 4px; color: inherit; font-size: .65rem; opacity: .7; }
.message-compose { display: grid; grid-template-columns: 1fr 48px; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.message-compose input { min-width: 0; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); font-size: 1rem; }
.message-compose button { width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--clay); color: white; font-size: 1.1rem; cursor: pointer; }
.challenge-dialog { width: min(calc(100% - 28px), 460px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--text); }
.challenge-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.challenge-dialog form { position: relative; display: grid; gap: 14px; padding: 24px 20px 20px; }
.challenge-dialog h2 { margin: 0; font-size: 1.6rem; }
.dialog-copy { margin: -5px 0 4px; color: var(--muted); line-height: 1.5; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); color: var(--text); }
.challenge-dialog label { display: grid; gap: 7px; color: var(--muted); font-size: .875rem; }
.challenge-dialog input, .challenge-dialog select { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); color-scheme: dark; }
.challenge-dialog input[type="range"] { padding: 0; accent-color: var(--clay); }
.challenge-dialog output { float: right; color: var(--lime); font-weight: 800; }
.score-entry { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.score-entry > span { padding-bottom: 14px; color: var(--muted); }
.score-entry input { text-align: center; font-size: 1.1rem; font-weight: 800; }
.check-row { grid-template-columns: 22px 1fr !important; align-items: center; min-height: 44px; color: var(--text) !important; }
.check-row input { min-height: 20px; width: 20px; accent-color: var(--clay); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 90px; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--lime); color: var(--lime-ink); font-weight: 800; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.dialog-body { position: relative; display: grid; gap: 14px; padding: 24px 20px 20px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
.secondary-action { min-height: 48px; border: 1px solid var(--line); border-radius: 15px; padding: 0 18px; background: transparent; color: var(--text); font-weight: 800; cursor: pointer; }
.membership-gate { padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.membership-gate h2 { margin: 4px 0 6px; font-size: 1.15rem; }
.membership-gate p { margin: 0 0 14px; color: var(--muted); font-size: .85rem; line-height: 1.4; }
.membership-gate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.membership-gate-actions .primary-action, .membership-gate-actions .secondary-action { min-height: 44px; }
.consecutive-note { margin: -6px 0 10px; color: var(--muted); font-size: .75rem; }
.conversation-button.is-invite { border-color: var(--clay); background: linear-gradient(145deg, rgba(240,100,50,.16), var(--surface)); }
.conversation-button.is-invite .friend-avatar { background: var(--clay); color: white; }
.conversation-button.is-match-request { border-color: var(--lime); background: linear-gradient(145deg, rgba(221,242,71,.14), var(--surface)); }
.conversation-button.is-match-request .friend-avatar { background: var(--lime); color: var(--lime-ink); }
.thread-request-card { display: grid; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--lime); border-radius: 15px; background: linear-gradient(145deg, rgba(221,242,71,.1), var(--surface-2)); }
.thread-request-card p { margin: 0; font-size: .85rem; line-height: 1.4; }
.thread-request-card p small { display: block; margin-top: 2px; color: var(--muted); }
.thread-request-actions { display: flex; gap: 8px; justify-content: flex-end; }
.thread-request-actions button { min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: .8rem; font-weight: 800; cursor: pointer; }
.thread-request-actions .accept-btn { border: 0; background: var(--clay); color: white; }
.thread-request-actions .decline-btn, .thread-request-actions .cancel-btn { border: 1px solid var(--line); background: transparent; color: var(--text); }
@media (min-width: 760px) {
  .app-shell { padding-bottom: 28px; }
  .topbar { width: min(100%, 1040px); height: 82px; margin: 0 auto; padding-inline: 24px; }
  .screen { padding: 22px 24px 36px; }
  .deck-layout { grid-template-columns: minmax(390px, 1fr) 300px; align-items: start; }
  .court-portrait { min-height: 400px; }
  .match-reason { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .panel-label { margin: 0 0 13px; font-size: .875rem; font-weight: 700; }
  .match-score-panel { padding: 16px; border-radius: 16px; background: var(--surface-2); }
  .match-score-panel strong { display: block; color: var(--lime); font-size: 2rem; }
  .match-score-panel span { font-weight: 700; }
  .match-score-panel p { margin: 7px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
  .match-reason dl { margin: 14px 0 0; }
  .match-reason dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
  .match-reason dt { color: var(--muted); }
  .match-reason dd { margin: 0; font-weight: 700; }
  .bottom-nav { position: static; width: min(calc(100% - 48px), 992px); height: 68px; margin: 0 auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
  #matches-screen, #feed-screen, #rankings-screen, #profile-screen, #messages-screen { width: min(100%, 760px); margin: 0 auto; }
  .rating-spotlight { grid-template-columns: 1fr 1fr; align-items: center; }
  .messenger-layout { grid-template-columns: 230px 1fr; }
  .conversation-list { display: grid; align-content: start; overflow: visible; }
  .conversation-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Auth (sign in / create account) */
.auth-shell { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 26px; padding: 32px 18px calc(32px + env(safe-area-inset-bottom)); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.4rem; letter-spacing: .04em; text-transform: uppercase; }
.auth-brand .brand-mark { width: 40px; height: 40px; font-size: 1.1rem; }
.auth-card { width: min(100%, 420px); padding: 26px 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.auth-card .eyebrow { margin-bottom: 6px; }
.auth-card h1 { font-size: clamp(1.6rem, 6vw, 2.1rem); margin: 0 0 16px; }
.auth-tabs { margin-bottom: 4px; }
.auth-form { display: grid; gap: 14px; margin-top: 16px; }
.auth-form[hidden] { display: none; }
.auth-form label { display: grid; gap: 7px; color: var(--muted); font-size: .875rem; }
.auth-form input { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); color-scheme: dark; font-size: 1rem; }
.auth-note { margin: -4px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.auth-error { margin: -2px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255,123,104,.14); color: var(--danger); font-size: .82rem; font-weight: 700; }
.auth-guest-row { margin-top: 6px; text-align: center; }

.time-choice.is-closed { opacity: .5; text-decoration: line-through; }
.time-choice.is-closed::after { content: " ✕"; text-decoration: none; }
