:root { color-scheme: dark; --bg: #08080c; --card: #111117; --elevated: #19191f; --line: rgba(243,168,18,.18); --gold: #f3a812; --light: #fbcb50; --muted: #958b7c; --ivory: #f6f4ee; --ruby: #d92644; --green: #10b77f; --tg-top: 0px; --tg-bottom: 0px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; }
/* ── Сплэш-экран с логотипом при загрузке WebApp ──────────────────────── */
.splash { position:fixed; z-index:60; inset:0; display:grid; align-content:center; justify-items:center; gap:24px; padding: calc(12px + max(var(--tg-top), env(safe-area-inset-top, 0px))) 20px calc(16px + max(var(--tg-bottom), env(safe-area-inset-bottom, 0px)) + 7vh); background:radial-gradient(circle at 50% 38%, rgba(243,168,18,.09), transparent 55%), var(--bg); transition:opacity .22s ease, visibility .22s ease; }
.splash--hidden { opacity:0; visibility:hidden; pointer-events:none; }
/* Логотип показывается только когда файл полностью загружен — никогда «частями». */
.splash-logo { display:block; width:min(60vw,192px); height:auto; aspect-ratio:3 / 1; object-fit:contain; opacity:0; transition:opacity .18s ease; }
.splash-logo--ready { opacity:1; }
.splash-spinner { width:30px; height:30px; border-radius:50%; border:3px solid rgba(243,168,18,.16); border-top-color:var(--gold); animation:splashSpin 1s linear infinite; }
@keyframes splashSpin { to { transform:rotate(360deg); } }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 65% -10%, rgba(243,168,18,.11), transparent 33rem), var(--bg); color: var(--ivory); font-family: 'DM Sans', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
/* Скрытый контейнер первого экрана появляется целиком после загрузки, без поэтапной прорисовки. */
/* Telegram уже учитывает safe-area в своих inset'ах, поэтому берём максимум
   из tg-inset и env(), а не сумму — иначе сверху двойной отступ. */
.app-shell { display:flex; flex-direction:column; width: min(100%, 760px); min-height:100vh; min-height:100svh; margin: 0 auto; padding: calc(6px + max(var(--tg-top), env(safe-area-inset-top, 0px))) 18px calc(92px + max(var(--tg-bottom), env(safe-area-inset-bottom, 0px))); opacity:0; transition:opacity .25s ease; }
.app-shell.app-shell--ready { opacity:1; transition:none; }
.app-shell main { flex:1; width:100%; }
.auth-gate { display:grid; align-content:center; width:min(100%, 520px); min-height:100vh; min-height:100svh; margin:0 auto; padding: calc(12px + max(var(--tg-top), env(safe-area-inset-top, 0px))) 22px calc(20px + max(var(--tg-bottom), env(safe-area-inset-bottom, 0px)) + 9vh); text-align:center; }
/* Логотип клуба на экране входа — полный фирменный знак. */
.auth-brand { display:grid; place-items:center; width:min(68vw,216px); height:auto; margin:0 auto 16px; overflow:visible; }
.auth-brand img { width:100%; height:auto; object-fit:contain; }
.auth-gate h1 { margin:8px 0 12px; font-size:42px; }.auth-lead { max-width:300px; margin:0 auto 24px; }
.auth-form { margin-top:24px; padding:18px; border:1px solid var(--line); border-radius:18px; background:rgba(17,17,23,.9); text-align:left; }
.auth-form.auth-form--link { display:grid; align-content:center; min-height:calc(100vh - 56px); margin:0; padding:24px 18px; border:0; border-radius:0; background:#17212b; text-align:center; }
.auth-form.auth-form--link > *:not(#telegram-link-confirm) { display:none !important; }
.auth-form.auth-form--link #telegram-link-confirm { display:block !important; margin:0 auto; width:min(100%,420px); }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:16px; }.auth-tab { border:1px solid rgba(255,255,255,.08); border-radius:8px; padding:10px; color:var(--muted); background:var(--elevated); cursor:pointer; }.auth-tab--active { border-color:var(--gold); color:var(--gold); }
 .auth-form label { display:block; margin-top:13px; color:var(--muted); font-size:11px; letter-spacing:.08em; text-transform:uppercase; }.auth-form input { display:block; width:100%; margin-top:7px; padding:12px; border:1px solid rgba(255,255,255,.1); border-radius:8px; outline:none; color:var(--ivory); background:var(--bg); font:inherit; font-size:16px; }.auth-form input:focus { border-color:var(--gold); }.auth-hint { font-size:12px; margin:0 0 12px; }.auth-submit { width:100%; margin-top:18px; padding:13px; border:0; border-radius:8px; color:var(--bg); background:var(--gold); font-weight:700; cursor:pointer; }.auth-note { margin:18px auto 0; max-width:360px; color:var(--muted); font-size:11px; }.auth-error { margin:12px auto; padding:10px; border:1px solid rgba(217,38,68,.4); border-radius:8px; color:#ff9aaa; background:rgba(217,38,68,.1); font-size:12px; }
.link-confirm { margin-top:0; padding:28px 18px 16px; border:0; border-radius:0; background:#17212b; text-align:center; }.link-confirm-mark { display:grid; place-items:center; width:64px; height:64px; margin:0 auto 18px; border:0; border-radius:50%; color:#fff; background:#2aabee; font-size:27px; font-weight:700; transform:rotate(-35deg); }.telegram-step-label { margin:0 0 10px; color:#8b9aa8; font-size:10px; font-weight:700; letter-spacing:.16em; }.link-confirm h2 { margin:0 0 20px; color:#fff; font-family:'DM Sans',system-ui,sans-serif; font-size:25px; font-weight:600; letter-spacing:0; line-height:1.15; }.link-account-card { padding:15px 16px; border:1px solid rgba(255,255,255,.1); border-radius:10px; background:#202b36; text-align:left; }.link-account-label { display:block; margin-bottom:6px; color:#8b9aa8; font-size:9px; font-weight:700; letter-spacing:.13em; }.link-player-name { display:block; margin:0; color:#fff; font-size:16px; font-weight:600; }.link-confirm-copy { max-width:310px; margin:17px auto 22px; color:#aab8c4; font-size:13px; line-height:1.5; }.link-confirm .auth-submit { margin-top:0; color:#fff; background:#2aabee; }.link-cancel { display:block; width:100%; margin-top:10px; padding:12px; border:0; border-radius:8px; color:#8b9aa8; background:transparent; cursor:pointer; }
/* Логотип центрирован по вертикали в верхней полосе Telegram (ряд кнопок «Закрыть»/меню):
   поднимаем шапку на половину высоты системного отступа, но не более 40px. */
.topbar { position:relative; display:flex; align-items:center; justify-content:center; gap:12px; padding: 0 2px 8px; margin-top: max(calc(max(var(--tg-top), env(safe-area-inset-top, 0px)) / -2), -40px); }
.topbar-logo { height:72px; width:auto; max-width:78%; object-fit:contain; transform:translateY(22px); }
.topbar-logo.topbar-logo--horizontal {width:min(270px,78%);height:auto;aspect-ratio:3/1;transform:none}
.splash-logo--horizontal,.auth-logo--horizontal,.topbar-logo--horizontal {mix-blend-mode:lighten}
.brand-mark { display:grid; place-items:center; width:42px; height:42px; border:1px solid var(--line); border-radius:13px; color:var(--gold); background:rgba(243,168,18,.06); overflow:hidden; }
.brand-mark img { width:80%; height:88%; object-fit:contain; }
.eyebrow, .card-kicker { margin:0; color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.16em; }
h1,h2,h3,p { margin-top:0; } h1,h2,h3 { font-family:'Bebas Neue', sans-serif; letter-spacing:.06em; font-weight:400; } h1 { margin:2px 0 0; color:var(--gold); font-size:27px; line-height:1; } h2 { font-size:37px; line-height:.98; } h3 { font-size:25px; margin:5px 0 4px; } p { color:var(--muted); line-height:1.5; font-size:13px; }
.hero-card { position:relative; overflow:hidden; min-height:250px; padding:26px 24px; border:1px solid var(--line); border-radius:22px; background:linear-gradient(135deg, rgba(243,168,18,.14), rgba(17,17,23,.97) 56%); }
.hero-glow { position:absolute; width:230px; height:230px; right:-65px; top:-80px; border-radius:50%; background:rgba(243,168,18,.13); filter:blur(8px); }
.hero-card h2 { position:relative; max-width:320px; margin:18px 0 12px; } .hero-card h2 span { color:var(--gold); } .hero-copy { max-width:310px; }
.telegram-state { position:relative; display:inline-flex; margin-top:17px; padding:9px 12px; border:1px solid rgba(243,168,18,.3); border-radius:9px; color:var(--light); background:rgba(8,8,12,.35); font-size:12px; }
.section-heading { display:flex; justify-content:space-between; align-items:end; margin:34px 2px 14px; } .section-heading h2 { margin:4px 0 0; font-size:29px; }
.live-pill, .soon-tag, .closed-tag { font-size:9px; font-weight:700; letter-spacing:.12em; } .live-pill { color:var(--green); } .live-pill i { display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:var(--green); }
.feature-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; } .feature-card { position:relative; min-height:175px; padding:18px; border:1px solid rgba(255,255,255,.07); border-radius:16px; background:var(--card); } .feature-card--wide { grid-column:1/-1; display:flex; align-items:center; gap:16px; min-height:125px; } .feature-card p { margin-bottom:0; } .feature-icon { color:var(--gold); font-size:28px; margin-bottom:19px; } .feature-card--wide .feature-icon { margin:0; font-size:38px; } .soon-tag, .closed-tag { position:absolute; right:14px; bottom:15px; color:var(--gold); } .closed-tag { color:var(--ruby); } .feature-card--online { border-color:rgba(217,38,68,.18); }
.locked-card { display:flex; align-items:flex-start; gap:15px; margin-top:12px; padding:18px; border:1px dashed rgba(255,255,255,.13); border-radius:16px; background:rgba(17,17,23,.62); } .lock-icon { color:var(--muted); font-size:24px; } .locked-card h3 { font-size:21px; } .locked-card p { margin:0; }
.content-panel { margin-top:12px; padding:18px 16px; border:1px solid var(--line); border-radius:16px; background:var(--card); }
/* ── Профиль (1:1 с карточкой игрока на сайте) ─────────────────────────── */
.medal-gold { color:var(--gold); } .medal-silver { color:#cbd5e1; } .medal-bronze { color:#d97706; } .medal-plain { color:var(--muted); }
.score-green { color:var(--green); } .score-gold { color:var(--light); } .score-gold,.score-green { font-variant-numeric:tabular-nums; }
.profile-identity { display:flex; align-items:center; gap:14px; }.profile-identity h2 { margin:3px 0; font-size:32px; }
.profile-avatar { display:grid; place-items:center; width:62px; height:62px; border-radius:50%; overflow:hidden; color:var(--gold); background:rgba(243,168,18,.1); border:2px solid rgba(243,168,18,.3); font-size:26px; font-weight:700; }
.profile-avatar-img { width:100%; height:100%; object-fit:cover; }
.profile-level { margin:2px 0 0; color:var(--ivory); font-size:12px; }
.profile-quick { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:20px 0 4px; }
.quick-tile { padding:12px 6px; border:1px solid rgba(255,255,255,.08); border-radius:10px; background:var(--elevated); text-align:center; }
.quick-tile strong { display:block; font-size:20px; } .quick-tile span { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.profile-section { margin-top:14px; }
.profile-section-title { margin:0 0 10px; color:var(--gold); font-size:12px; font-weight:700; letter-spacing:.14em; background:linear-gradient(90deg,var(--light),var(--gold)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.profile-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.stat-tile { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid rgba(255,255,255,.07); border-radius:10px; background:var(--elevated); }
.stat-icon { font-size:15px; } .stat-label { flex:1; color:var(--muted); font-size:12px; } .stat-tile strong { font-size:13px; }
.profile-history { display:grid; gap:8px; }
.game-row,.rating-entry { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:10px 14px; border:1px solid rgba(255,255,255,.07); border-radius:10px; background:var(--elevated); }
.game-row-main strong,.rating-entry span:first-child { display:block; color:var(--ivory); font-size:13px; font-weight:600; }
.game-row-main span { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.game-row-side,.rating-entry-side { display:grid; justify-items:end; gap:2px; white-space:nowrap; }
.game-row-side p { margin:0; font-size:12px; font-weight:700; } .game-row-side span { color:var(--muted); font-size:11px; }
.ko-points { font-style:normal; color:var(--gold); font-size:11px; font-weight:700; }
.rating-entry { align-items:center; } .rating-entry-side { display:flex; align-items:center; gap:14px; } .rating-entry-side b { font-size:14px; } .rating-entry-side .score-green { font-size:12px; font-weight:700; }
.profile-since { display:flex; align-items:center; gap:10px; margin-top:14px; padding:12px 14px; border:1px solid rgba(255,255,255,.07); border-radius:10px; background:var(--elevated); }
.profile-since span { color:var(--muted); font-size:12px; } .profile-since strong { color:var(--gold); font-size:13px; }
.empty-note { margin:0; padding:18px 0; color:var(--muted); font-size:13px; text-align:center; line-height:1.6; }
.profile-edit { margin-top:22px; padding-top:16px; border-top:1px solid rgba(255,255,255,.08); }.profile-edit summary { color:var(--gold); cursor:pointer; font-size:13px; }
.profile-form label { display:block; margin-top:13px; color:var(--muted); font-size:11px; letter-spacing:.08em; text-transform:uppercase; }
.profile-form input { display:block; width:100%; margin-top:7px; padding:12px; border:1px solid rgba(255,255,255,.1); border-radius:8px; outline:none; color:var(--ivory); background:var(--bg); font:inherit; font-size:16px; }
.profile-form input:focus { border-color:var(--gold); }
.profile-form input:disabled { opacity:.55; }
.profile-form .auth-submit { margin-top:18px; padding:13px; }
/* ── Рейтинг (1:1 со страницей /rating) ────────────────────────────────── */
.rating-panel { padding-bottom:18px; }
.rating-state { margin-top:16px; color:var(--muted); font-size:13px; }
.rating-podium-head { margin:26px 0 4px; text-align:center; }
.podium-suits span { margin:0 6px; color:rgba(243,168,18,.35); font-size:12px; } .podium-suits span:nth-child(2) { color:rgba(243,168,18,.22); font-size:10px; }
.podium-title { margin:8px 0 0; font-size:30px; letter-spacing:.14em; background:linear-gradient(180deg,#fff,var(--light) 55%,var(--gold)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.podium-season { margin:6px 0 0; font-style:italic; font-size:12px; }
.podium-rule { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:10px; } .podium-rule i { width:64px; height:1px; background:linear-gradient(90deg,transparent,rgba(243,168,18,.4)); } .podium-rule i:last-child { background:linear-gradient(90deg,rgba(243,168,18,.4),transparent); } .podium-rule span { color:var(--ruby); font-size:11px; }
.rating-podium { display:flex; align-items:flex-end; justify-content:center; gap:18px; padding:22px 0 14px; }
.podium-col { display:flex; flex-direction:column; align-items:center; border:0; background:none; color:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.podium-avatar { display:grid; place-items:center; width:56px; height:56px; margin-bottom:8px; border-radius:50%; overflow:hidden; border:2px solid rgba(255,255,255,.2); background:rgba(243,168,18,.08); font-size:22px; font-weight:700; }
.podium-avatar--1 { width:72px; height:72px; border-color:var(--gold); box-shadow:0 0 22px rgba(243,168,18,.35); }
.podium-avatar--2 { border-color:rgba(203,213,225,.6); } .podium-avatar--3 { border-color:rgba(217,119,6,.6); }
.podium-medal { font-size:20px; } .podium-name { max-width:130px; margin-top:6px; font-size:13px; text-align:center; } .podium-points { margin-top:3px; font-size:12px; font-weight:700; }
.rating-tabs { display:flex; gap:4px; margin-top:14px; overflow-x:auto; border-bottom:1px solid rgba(243,168,18,.15); padding-bottom:4px; scrollbar-width:none; }
.rating-tabs::-webkit-scrollbar { display:none; }
.rating-tab { flex-shrink:0; padding:8px 12px; border:0; border-bottom:2px solid transparent; border-radius:0; margin-bottom:-5px; color:var(--muted); background:none; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; cursor:pointer; white-space:nowrap; }
.rating-tab--active { border-bottom-color:var(--gold); color:var(--gold); }
.rating-search { position:relative; margin-top:14px; }
.rating-search-icon { position:absolute; left:14px; top:50%; transform:translateY(-52%); color:var(--muted); font-size:17px; }
.rating-search input { width:100%; padding:12px 14px 12px 40px; border:1px solid rgba(243,168,18,.15); border-radius:12px; outline:none; color:var(--ivory); background:var(--bg); font:inherit; font-size:16px; }
.rating-search input:focus { border-color:rgba(243,168,18,.5); }
.rating-search input::placeholder { color:var(--muted); }
.rating-list-head { display:flex; align-items:baseline; justify-content:space-between; margin:20px 0 12px; }
.rating-list-title { margin:0; font-size:22px; letter-spacing:.1em; background:linear-gradient(90deg,var(--light),var(--gold)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.rating-count { color:var(--muted); font-size:12px; }
.rating-list { display:grid; gap:8px; }
.rating-card { position:relative; display:grid; grid-template-columns:30px 44px 1fr auto; align-items:center; gap:12px; overflow:hidden; padding:12px 14px; border:1px solid rgba(255,255,255,.07); border-radius:12px; background:var(--elevated); color:inherit; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.rating-card--top.rating-card--1 { border-color:rgba(243,168,18,.35); } .rating-card--top.rating-card--2 { border-color:rgba(203,213,225,.3); } .rating-card--top.rating-card--3 { border-color:rgba(217,119,6,.3); }
.rating-shimmer { position:absolute; inset:0; pointer-events:none; background:linear-gradient(115deg,transparent 30%,rgba(243,168,18,.08) 48%,transparent 62%); animation:ratingShimmer 3.2s linear infinite; }
@keyframes ratingShimmer { from { transform:translateX(-100%);} to { transform:translateX(100%);} }
.rating-card-rank { text-align:center; font-size:18px; font-weight:700; }
.rating-card-avatar { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; overflow:hidden; border:2px solid rgba(255,255,255,.12); background:rgba(243,168,18,.06); font-size:17px; font-weight:700; color:var(--ivory); }
.rating-card-avatar--gold { border-color:var(--gold); color:var(--gold); box-shadow:0 0 14px rgba(243,168,18,.25); }
.rating-card-avatar--silver { border-color:rgba(203,213,225,.6); } .rating-card-avatar--bronze { border-color:rgba(217,119,6,.6); }
.rating-card-name { min-width:0; } .rating-card-name strong { display:block; overflow:hidden; color:var(--ivory); font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
.rating-card-name small { display:block; margin-top:2px; overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.rating-card-score { justify-self:end; text-align:right; } .rating-card-score strong { display:block; font-size:15px; } .rating-card-score small { display:block; margin-top:2px; color:var(--muted); font-size:11px; }
/* ── Модалка игрока ────────────────────────────────────────────────────── */
.player-modal { position:fixed; z-index:30; inset:0; }
.player-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.6); backdrop-filter:blur(6px); }
.player-modal-sheet { position:absolute; bottom:0; left:50%; width:min(100%,760px); max-height:94vh; overflow-y:auto; padding:26px 20px 30px; transform:translateX(-50%); border:1px solid rgba(243,168,18,.2); border-bottom:0; border-radius:20px 20px 0 0; background:linear-gradient(180deg,var(--card),var(--bg) 70%); box-shadow:0 -18px 60px rgba(0,0,0,.5); animation:modalUp .32s cubic-bezier(.22,1,.36,1); }
@keyframes modalUp { from { transform:translate(-50%,60px); opacity:0; } to { transform:translate(-50%,0); opacity:1; } }
.player-modal-glow { position:absolute; top:0; left:0; width:100%; height:1px; background:linear-gradient(90deg,transparent,rgba(243,168,18,.6),transparent); }
.player-modal-close { position:absolute; top:14px; right:14px; z-index:2; display:grid; place-items:center; width:34px; height:34px; border:1px solid rgba(255,255,255,.12); border-radius:50%; color:var(--muted); background:var(--elevated); cursor:pointer; }
.modal-avatar { display:grid; place-items:center; width:78px; height:78px; border-radius:50%; overflow:hidden; border:2px solid rgba(243,168,18,.3); background:rgba(243,168,18,.08); color:var(--gold); font-size:30px; font-weight:700; }
.modal-avatar--leader { border-color:var(--gold); box-shadow:0 0 24px rgba(243,168,18,.35); }
.modal-socials { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }
.social-btn { display:grid; place-items:center; padding:12px 8px; border-radius:10px; font-weight:700; font-size:13px; text-align:center; text-decoration:none; cursor:pointer; }
.social-btn--follow { border:1px solid rgba(243,168,18,.35); color:var(--gold); background:rgba(243,168,18,.1); }
.social-btn--follow.is-following { border-color:rgba(255,255,255,.12); color:var(--ivory); background:var(--elevated); }
.social-btn--follow:disabled { opacity:.6; }
.social-btn--message { border:0; color:#fff; background:#2aabee; }
.social-btn--message[hidden] { display:none !important; }
.player-modal-head { display:flex; align-items:center; gap:16px; } .player-modal-title { min-width:0; } .player-modal-title h2 { margin:0; font-size:28px; }
@media (min-width:640px) {
  .player-modal-sheet { top:50%; bottom:auto; transform:translate(-50%,-50%); width:min(100%,560px); max-height:88vh; border-radius:20px; border-bottom:1px solid rgba(243,168,18,.2); animation:modalCenter .32s cubic-bezier(.22,1,.36,1); }
  @keyframes modalCenter { from { transform:translate(-50%,-46%); opacity:0; } to { transform:translate(-50%,-50%); opacity:1; } }
}
.bottom-nav { position:fixed; z-index:4; bottom:0; left:50%; display:grid; grid-template-columns:repeat(5,1fr); width:min(100%,760px); padding:7px 8px calc(7px + max(var(--tg-bottom), env(safe-area-inset-bottom, 0px))); transform:translateX(-50%); border-top:1px solid rgba(255,255,255,.08); background:rgba(8,8,12,.92); backdrop-filter:blur(18px); } .nav-item { border:0; color:var(--muted); background:none; cursor:pointer; } .nav-item .nav-icon { display:block; width:28px; height:26px; margin:0 auto 3px; } .nav-item .nav-icon canvas, .nav-item .nav-icon svg { width:100%; height:100%; display:block; } .nav-item small { font-size:10px; } .nav-item--active { color:var(--gold); }
/* ── Главная: баннер, правила, меню, игра, соцсети ─────────────────────── */
.home-section { display:grid; gap:10px; }
.promo-banner { position:relative; width:min(100%, 522px); margin-inline:auto; overflow:hidden; border:1px solid var(--line); border-radius:20px; background:var(--card); }
.nav-item [data-nav-animation] { position:relative; }
.nav-item [data-nav-animation] img { display:block; width:100%; height:100%; object-fit:contain; }
.nav-icon-animation { position:absolute; inset:0; }
@media (prefers-reduced-motion:no-preference) { .nav-icon--animated > img:first-child { visibility:hidden; } }
@media (prefers-reduced-motion:reduce) { .nav-item [data-nav-animation] .nav-icon-animation { display:none; } }
.promo-track { display:flex; height:clamp(148px, 52vw, 304px); transition:transform .55s cubic-bezier(.22,1,.36,1); touch-action:pan-y; }
.promo-slide { display:block; flex:0 0 100%; min-width:0; height:100%; border:0; padding:clamp(8px, 1.6vw, 14px); background:none; cursor:zoom-in; }
.promo-slide img { display:block; width:100%; height:100%; object-fit:contain; }
.promo-slide img:not([src]) { visibility:hidden; }
.promo-slide:focus-visible { outline:2px solid var(--gold); outline-offset:-4px; }
.promo-dots { display:flex; justify-content:center; gap:4px; padding:2px 8px; }
.promo-dot { display:grid; place-items:center; width:30px; height:26px; border:0; border-radius:8px; background:none; cursor:pointer; }
.promo-dot::after { content:""; width:7px; height:7px; border-radius:5px; background:var(--muted); }
.promo-dot--active::after { width:18px; background:var(--gold); }
@media (prefers-reduced-motion:reduce) { .promo-track { transition:none; } }
.rules-card { display:flex; align-items:center; gap:14px; width:100%; padding:18px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(135deg,rgba(243,168,18,.12),var(--card) 60%); color:inherit; text-align:left; cursor:pointer; }
.rules-card-suits { color:var(--gold); font-size:17px; letter-spacing:2px; } .rules-card-suits em { color:var(--ruby); font-style:normal; }
.rules-card-body { flex:1; min-width:0; } .rules-card-body h3 { margin:4px 0; font-size:24px; } .rules-card-body p { margin-bottom:0; }
.rules-card-arrow { color:var(--gold); font-size:26px; }
.home-menu { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.menu-tile { display:grid; justify-items:center; gap:3px; padding:14px 6px; border:1px solid rgba(255,255,255,.07); border-radius:14px; background:var(--card); color:inherit; cursor:pointer; }
.menu-tile-icon { color:var(--gold); font-size:21px; } .menu-tile strong { font-size:12px; } .menu-tile small { color:var(--muted); font-size:9px; letter-spacing:.05em; }
.menu-tile--soon { opacity:.55; }
.next-game-card { padding:13px 14px; border:1px solid var(--line); border-radius:16px; background:var(--card); }
.next-game-head h3 { margin:4px 0 0; font-size:24px; }
.next-game-body { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:12px; margin-top:12px; }
.next-game-main strong { display:block; color:var(--ivory); font-size:15px; } .next-game-main span { display:block; margin-top:3px; color:var(--muted); font-size:12px; text-transform:capitalize; }
.next-game-side { display:grid; justify-items:center; padding:8px 12px; border:1px solid rgba(243,168,18,.25); border-radius:10px; background:rgba(243,168,18,.07); } .next-game-side b { color:var(--gold); font-size:17px; } .next-game-side span { color:var(--muted); font-size:9px; }
.next-game-link { grid-column:1/-1; color:var(--gold); font-size:12px; font-weight:700; text-decoration:none; }
.socials-card { padding:13px 14px; border:1px solid rgba(255,255,255,.07); border-radius:16px; background:var(--card); }
.socials-row { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:12px; }
.social-link { display:grid; justify-items:center; gap:2px; padding:10px 4px 9px; border:1px solid rgba(255,255,255,.07); border-radius:14px; background:var(--elevated); color:inherit; text-align:center; text-decoration:none; }
.social-icon { display:grid; place-items:center; width:34px; height:34px; margin-bottom:4px; border-radius:50%; }
.social-icon svg { width:20px; height:20px; }
.social-icon--tg { color:#fff; background:#2aabee; } .social-icon--ig { color:#fff; background:linear-gradient(45deg,#f09433,#dc2743,#bc1888); }
.social-link strong { font-size:12px; } .social-link small { color:var(--muted); font-size:10px; }
.club-address { margin:6px 0 0; color:var(--light); font-size:13px; font-weight:600; }
.map-card { overflow:hidden; border:1px solid rgba(255,255,255,.07); border-radius:16px; background:var(--card); }
.map-toggle { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; justify-content:space-between; width:100%; padding:14px; border:0; text-align:left; background:none; color:var(--ivory); cursor:pointer; }
.map-toggle strong { color:var(--gold); }
.map-panel { position:relative; display:grid; align-content:center; justify-items:center; gap:8px; min-height:220px; padding:12px; text-align:center; background:var(--bg); }
.map-panel p { margin:0; color:var(--ivory); }
.map-panel iframe { position:absolute; inset:0; display:block; width:100%; height:100%; border:0; }
.map-panel iframe[inert] { visibility:hidden; }
.map-links { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding:8px; }
.map-link { display:flex; align-items:center; justify-content:center; gap:6px; min-width:0; padding:8px 6px; border:1px solid rgba(243,168,18,.3); border-radius:10px; color:var(--gold); background:rgba(243,168,18,.07); font-size:12px; font-weight:700; text-decoration:none; }
.map-link img { flex:0 0 18px; width:18px; height:18px; object-fit:contain; }
.map-link:active { background:rgba(243,168,18,.15); }
.profile-links { margin-top:14px; border-top:1px solid rgba(255,255,255,.08); padding-top:14px; }
.profile-link { padding:10px 0; border:0; color:var(--gold); background:none; font-size:13px; cursor:pointer; }
/* ── Турниры: вкладки и списки ─────────────────────────────────────────── */
.tournaments-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:12px; }
.tournament-tab { padding:10px; border:1px solid rgba(255,255,255,.08); border-radius:10px; color:var(--muted); background:var(--elevated); font-weight:700; font-size:13px; cursor:pointer; }
.tournament-tab--active { border-color:var(--gold); color:var(--gold); }
.tournaments-list { display:grid; gap:6px; margin-top:12px; }
.tournament-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; border:1px solid rgba(255,255,255,.07); border-radius:12px; background:var(--elevated); }
.tournament-row-side { display:grid; justify-items:center; padding:7px 11px; border:1px solid rgba(243,168,18,.25); border-radius:10px; background:rgba(243,168,18,.07); } .tournament-row-side b { color:var(--gold); font-size:15px; } .tournament-row-side span { color:var(--muted); font-size:9px; }
.past-game { padding:14px; border:1px solid rgba(255,255,255,.07); border-radius:12px; background:var(--elevated); }
.past-game--open { width:100%; color:inherit; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.past-game-head strong { display:block; color:var(--ivory); font-size:14px; } .past-game-head span { display:block; margin-top:2px; color:var(--muted); font-size:11px; text-transform:capitalize; }
.past-game-row { display:grid; grid-template-columns:26px 26px 1fr auto; align-items:center; gap:8px; margin-top:8px; padding-top:8px; border-top:1px solid rgba(255,255,255,.05); font-size:12px; }
.past-game-row b { font-size:13px; } .past-game-row span { color:var(--ivory); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .past-game-row em { font-style:normal; font-weight:700; font-size:12px; }
.past-game-avatar,.tr-avatar { display:grid; place-items:center; width:26px; height:26px; border-radius:50%; overflow:hidden; background:rgba(243,168,18,.08); border:1px solid rgba(255,255,255,.1); color:var(--gold); font-size:11px; font-weight:700; }
.past-game-more { display:block; margin-top:10px; color:var(--gold); font-size:11px; font-weight:700; text-align:right; }
.tr-row { display:grid; grid-template-columns:32px 30px 1fr auto; align-items:center; gap:10px; padding:10px 14px; border:1px solid rgba(255,255,255,.07); border-radius:10px; background:var(--elevated); font-size:12px; }
.tr-row b { font-size:14px; } .tr-name { color:var(--ivory); font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .tr-score { white-space:nowrap; } .tr-score i { font-style:normal; font-size:10px; }
.tr-row--player { cursor:pointer; } .tr-row--player:active { border-color:rgba(243,168,18,.35); }
.modal-avatar--wide { border-radius:16px; background:rgba(243,168,18,.12); border-color:rgba(243,168,18,.3); }
.tournament-meta { margin-top:18px; display:flex; }
/* ── Модалка правил ────────────────────────────────────────────────────── */
.rules-sheet { padding-top:30px; }
.rules-modal-head { text-align:center; padding-bottom:14px; border-bottom:1px solid rgba(243,168,18,.2); }
.rules-modal-suits span { margin:0 4px; font-size:18px; color:var(--gold); } .rules-modal-suits span:nth-child(even) { color:var(--ruby); }
.rules-modal-head h2 { margin:8px 0 0; font-size:27px; letter-spacing:.1em; background:linear-gradient(90deg,var(--light),var(--gold)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.rules-modal-head p { margin:8px 0 0; color:var(--muted); font-size:10px; letter-spacing:.18em; text-transform:uppercase; }
.rules-content { display:grid; gap:16px; margin-top:16px; }
.rules-section-head { display:flex; align-items:baseline; gap:8px; margin-bottom:8px; } .rules-section-head b { color:var(--gold); font-size:19px; font-family:'Bebas Neue',sans-serif; } .rules-section-head h3 { margin:0; font-size:19px; letter-spacing:.06em; text-transform:uppercase; }
.rules-section ul { margin:0; padding:0; list-style:none; } .rules-section li { display:flex; gap:10px; margin-bottom:8px; font-size:12px; line-height:1.55; color:rgba(246,244,238,.82); }
.rules-section li > span { flex-shrink:0; width:26px; padding-top:2px; color:rgba(243,168,18,.6); font-size:10px; font-variant-numeric:tabular-nums; }
.rules-section li p { margin:0 0 4px; font-size:12px; } .rules-section li ul { padding-left:6px; }
.rules-footer { margin:18px 0 0; color:rgba(243,168,18,.45); font-size:10px; letter-spacing:.2em; text-align:center; text-transform:uppercase; }
/* ── Профиль: компактная карточка игрока в языке клуба ──────────────────── */
.profile-card { overflow:hidden; padding:18px 16px 0; border:1px solid rgba(243,168,18,.28); border-radius:18px; background:linear-gradient(150deg, rgba(243,168,18,.1), var(--card) 45%); }
.profile-card-top { position:relative; display:flex; align-items:center; gap:14px; }
.profile-avatar--card { width:64px; height:64px; flex-shrink:0; font-size:28px; box-shadow:0 8px 22px rgba(0,0,0,.4); }
.profile-card-id { flex:1; min-width:0; }
.profile-card-id h2 { margin:0; font-size:25px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.profile-nick { margin:2px 0 0; color:var(--gold); font-size:12px; font-weight:700; letter-spacing:.04em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.profile-level-chip { display:inline-flex; align-items:center; gap:4px; margin-top:6px; padding:4px 10px; border:1px solid rgba(243,168,18,.3); border-radius:999px; color:var(--light); background:rgba(243,168,18,.08); font-size:10px; font-weight:700; }
.profile-card-rank { flex-shrink:0; display:grid; justify-items:center; gap:1px; align-self:start; padding:8px 12px; border:1px solid rgba(255,255,255,.08); border-radius:12px; background:rgba(255,255,255,.04); text-align:center; }
.profile-card-rank b { font-size:20px; font-variant-numeric:tabular-nums; }
.profile-card-rank span { color:var(--muted); font-size:8px; letter-spacing:.1em; text-transform:uppercase; }
.profile-counters { display:grid; grid-template-columns:repeat(3,1fr); margin-top:16px; border-top:1px solid rgba(255,255,255,.07); }
.profile-counters .counter { display:grid; justify-items:center; gap:2px; padding:13px 6px; }
.profile-counters .counter + .counter { border-left:1px solid rgba(255,255,255,.07); }
.profile-counters .counter b { font-size:18px; font-variant-numeric:tabular-nums; }
.profile-counters .counter span { color:var(--muted); font-size:9px; letter-spacing:.1em; text-transform:uppercase; }
.profile-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.profile-action { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:11px 14px; border:1px solid rgba(255,255,255,.1); border-radius:12px; color:var(--ivory); background:var(--elevated); font-size:13px; font-weight:700; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.profile-action:active { border-color:rgba(243,168,18,.4); }
.profile-action--main { border-color:rgba(243,168,18,.35); color:var(--gold); background:rgba(243,168,18,.08); }
.profile-action--danger { color:var(--ruby); border-color:rgba(217,38,68,.3); }
.profile-action--danger.profile-action--confirm { color:#fff; background:var(--ruby); border-color:var(--ruby); }
.profile-stats--three { grid-template-columns:repeat(3,1fr); }
.telegram-state--small { display:block; width:fit-content; margin:10px auto 0; padding:5px 10px; font-size:10px; }
.profile-edit-title { margin:2px 40px 6px 0; font-size:27px; }
@media (max-width:380px) { .profile-actions { grid-template-columns:1fr 1fr; } .profile-actions .profile-action--danger { grid-column:1/-1; } }
.avatar-edit { display:flex; align-items:center; gap:14px; margin-bottom:6px; }
.avatar-edit-actions { display:grid; gap:8px; }
.avatar-upload { display:inline-block; padding:8px 14px; border:1px solid rgba(243,168,18,.35); border-radius:9px; color:var(--gold); background:rgba(243,168,18,.08); font-size:12px; font-weight:700; cursor:pointer; }
.avatar-remove { padding:8px 14px; border:0; border-radius:9px; color:var(--ruby); background:rgba(217,38,68,.08); font-size:12px; cursor:pointer; }
@media (min-width:640px) { .app-shell { padding-top: calc(12px + max(var(--tg-top), env(safe-area-inset-top, 0px))); } }

body.link-confirm-mode { background:#17212b; }
.auth-gate.auth-gate--link { display:block; width:100%; min-height:100svh; margin:0; padding:0; text-align:center; }
.auth-gate.auth-gate--link > *:not(#auth-form) { display:none !important; }
.auth-gate.auth-gate--link #auth-form { display:flex !important; align-items:center; justify-content:center; width:100%; min-height:100svh; margin:0; padding:24px 20px; border:0; border-radius:0; background:#17212b; text-align:center; }
.auth-gate.auth-gate--link #auth-form > *:not(#telegram-link-confirm) { display:none !important; }
.auth-gate.auth-gate--link #telegram-link-confirm { display:block !important; width:min(100%,360px); margin:0 auto; padding:0; border:0; border-radius:0; background:transparent; text-align:center; }
.auth-gate.auth-gate--link .link-confirm-mark { display:grid; place-items:center; width:58px; height:58px; margin:0 auto 16px; border:0; border-radius:50%; color:#fff; background:#2aabee; font-size:25px; font-weight:700; transform:rotate(-35deg); }
.auth-gate.auth-gate--link .telegram-step-label { margin:0 0 8px; color:#8b9aa8; font-size:10px; font-weight:700; letter-spacing:.16em; }
.auth-gate.auth-gate--link .link-confirm h2 { margin:0 0 18px; color:#fff; font-family:'DM Sans',system-ui,sans-serif; font-size:25px; font-weight:600; letter-spacing:0; line-height:1.15; }
.auth-gate.auth-gate--link .link-account-card { padding:13px 15px; border:1px solid rgba(255,255,255,.1); border-radius:10px; background:#202b36; text-align:left; }
.auth-gate.auth-gate--link .link-account-label { display:block; margin-bottom:5px; color:#8b9aa8; font-size:9px; font-weight:700; letter-spacing:.13em; }
.auth-gate.auth-gate--link .link-player-name { display:block; margin:0; color:#fff; font-size:16px; font-weight:600; }
.auth-gate.auth-gate--link .link-confirm-copy { max-width:310px; margin:15px auto 18px; color:#aab8c4; font-size:13px; line-height:1.5; }
.auth-gate.auth-gate--link .link-confirm .auth-submit { margin:0; color:#fff; background:#2aabee; }
.auth-gate.auth-gate--link .link-cancel { display:block; width:100%; margin-top:8px; padding:10px; border:0; border-radius:8px; color:#8b9aa8; background:transparent; cursor:pointer; }
/* Онлайн: спокойное состояние ожидания в общей системе кабинета. */
.online-panel { padding:4px 0 0; }
.online-heading { margin:4px 0 24px; }
.online-heading h2 { margin:0; color:var(--ivory); font:700 30px/1.2 'DM Sans', sans-serif; letter-spacing:-.02em; }
.online-empty { display:flex; flex-direction:column; align-items:center; padding:30px 16px 20px; text-align:center; }
.online-table-mark { position:relative; width:232px; height:190px; margin-bottom:30px; flex:0 0 auto; }
.online-table-outline { position:absolute; inset:62px 0 4px; border:1px solid var(--line); border-radius:50%; background:var(--card); }
.online-table-outline::after { content:""; position:absolute; inset:11px; border:1px solid var(--line); border-radius:50%; }
.online-playing-card { position:absolute; display:flex; align-items:center; justify-content:center; width:92px; height:134px; border-radius:12px; }
.online-playing-card--dark { top:8px; left:35px; color:var(--gold); background:var(--elevated); border:1px solid var(--line); }
.online-playing-card--ivory { top:28px; right:27px; color:var(--ruby); background:var(--ivory); }
.online-card-rank { position:absolute; top:10px; left:11px; font:600 18px/1 'DM Sans', sans-serif; }
.online-card-rank--bottom { inset:auto 11px 10px auto; transform:rotate(180deg); }
.online-card-suit { width:34px; height:41px; }
.online-empty-title { max-width:100%; margin:0; color:var(--ivory); font:700 26px/1.25 'DM Sans', sans-serif; letter-spacing:-.02em; text-wrap:balance; }
.online-empty-text { max-width:32ch; margin:14px 0 0; color:#b7afa3; font-size:14px; line-height:1.8; }
.online-empty-actions { display:flex; flex-direction:column; align-items:stretch; width:100%; max-width:312px; gap:12px; margin-top:30px; }
.online-tournaments-button { display:flex; justify-content:center; align-items:center; gap:12px; width:100%; min-height:50px; padding:13px 18px; border:0; border-radius:10px; background:var(--gold); color:var(--bg); font:700 14px/1.5 'DM Sans', sans-serif; cursor:pointer; transition:background .15s ease; }
.online-tournaments-button svg { width:18px; height:18px; flex:0 0 18px; }
.online-tournaments-button:hover { background:var(--light); }
.online-tournaments-button:active { background:var(--gold); }
.online-announcements { display:flex; justify-content:center; align-items:center; gap:6px; min-height:44px; padding:8px; color:#b7afa3; font-size:13px; line-height:1.6; text-decoration:none; text-underline-offset:4px; }
.online-announcements svg { width:16px; height:16px; flex:0 0 16px; }
.online-announcements:hover { color:var(--ivory); text-decoration:underline; }
.online-tournaments-button:focus-visible, .online-announcements:focus-visible { outline:2px solid var(--light); outline-offset:4px; }
.online-panel ::selection { background:var(--gold); color:var(--bg); }
@media (min-width:640px) {
  .online-empty { padding-top:38px; }
  .online-table-mark { margin-bottom:34px; }
  .online-empty-title { font-size:30px; }
}
@media (max-width:359px) {
  .online-empty { padding-inline:4px; padding-top:18px; }
  .online-table-mark { margin-bottom:22px; }
  .online-empty-title { font-size:24px; }
}
@media (prefers-reduced-motion:reduce) { .online-tournaments-button { transition:none; } }
/* Поля ввода не мельче 16px — иначе iOS zoom при фокусе. */
input, select, textarea { font-size:16px; }

/* Стабильная область приложения Telegram и браузера. Прокрутка остаётся внутри
   длинного содержимого, поэтому фокус поля не прокручивает всю страницу. */
:root { --app-height: 100vh; }
@supports (height:100dvh) { :root { --app-height:100dvh; } }
html, body { width:100%; height:100%; min-height:0; overflow:hidden; }
.splash { height:var(--app-height); }
.auth-gate { height:var(--app-height); min-height:0; max-height:var(--app-height); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; }
.auth-gate.auth-gate--link { height:var(--app-height); min-height:0; max-height:var(--app-height); overflow-y:auto; }
.auth-gate.auth-gate--link #auth-form { height:var(--app-height); min-height:0; max-height:var(--app-height); overflow-y:auto; overscroll-behavior:contain; }
.app-shell { height:var(--app-height); min-height:0; max-height:var(--app-height); overflow:hidden; }
.app-shell main { min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior-y:contain; scrollbar-width:none; }
.app-shell main::-webkit-scrollbar { display:none; }
.topbar { flex:none; }
#section-rating, #section-rating > *, #rating-content { min-width:0; width:100%; }
.rating-panel { margin-inline:0; }
.rating-podium { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; justify-items:center; gap:clamp(4px,3vw,18px); width:100%; }
.podium-col { min-width:0; max-width:100%; padding-inline:2px; }
.podium-name { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rating-tabs { width:100%; min-width:0; }
.rating-search, .rating-list-head, .rating-list { width:100%; min-width:0; }
.rating-card { grid-template-columns:30px 44px minmax(0,1fr) auto; min-width:0; }
.rating-card-score { min-width:max-content; }
.player-modal { height:var(--app-height); }
.player-modal-sheet { max-height:calc(var(--app-height) - max(var(--tg-top), env(safe-area-inset-top, 0px)) - max(var(--tg-bottom), env(safe-area-inset-bottom, 0px))); padding-bottom:calc(30px + max(var(--tg-bottom), env(safe-area-inset-bottom, 0px))); }
.auth-gate:not(.auth-gate--link) { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; overflow:hidden; }
@supports (justify-content:safe center) {
  .auth-gate:not(.auth-gate--link) { justify-content:safe center; }
}
.auth-gate:not(.auth-gate--link) > :not(#auth-form) { flex:0 0 auto; }
.auth-gate:not(.auth-gate--link) #auth-form:not([hidden]) { flex:0 1 auto; width:100%; min-height:0; max-height:100%; overflow-y:auto; overscroll-behavior:contain; }
/* Экран публичного соглашения: тот же каркас, что у формы входа, — прокручивается
   только текст соглашения, кнопка принятия остаётся на месте. */
.auth-gate:not(.auth-gate--link) #agreement-gate:not([hidden]) { flex:0 1 auto; display:flex; flex-direction:column; width:100%; min-height:0; max-height:100%; margin-top:24px; padding:18px; border:1px solid var(--line); border-radius:18px; background:rgba(17,17,23,.9); text-align:left; }
.agreement-head { flex:0 0 auto; }
.agreement-head h2 { font-size:22px; }
.agreement-content { flex:1 1 auto; min-height:0; margin-top:4px; overflow-y:auto; overscroll-behavior:contain; padding-right:6px; }
.agreement-preamble { margin:0; font-size:12px; line-height:1.55; color:rgba(246,244,238,.82); }
#agreement-gate .auth-submit, #agreement-gate .auth-note { flex:0 0 auto; }
.auth-gate--editing .auth-brand, .auth-gate--editing .auth-lead { display:none; }
.auth-gate--editing h1 { margin:0 0 8px; font-size:28px; }
.auth-gate--editing #auth-form:not(.auth-form--link) { margin-top:8px; padding:10px; }
@media (max-width:380px) {
  .app-shell { padding-inline:12px; }
  .rating-panel { padding-inline:12px; }
  .rating-podium { gap:2px; }
  .rating-card { grid-template-columns:24px 38px minmax(0,1fr) auto; gap:8px; padding-inline:9px; }
  .rating-card-avatar { width:38px; height:38px; }
}
@media (max-width:639px) {
  .auth-gate:not(.auth-gate--link) { padding-bottom:calc(18px + max(var(--tg-bottom), env(safe-area-inset-bottom, 0px))); }
  .auth-gate h1 { font-size:clamp(32px,9vw,38px); white-space:nowrap; }
  .auth-lead { margin-bottom:14px; }
  .auth-form:not(.auth-form--link) { margin-top:12px; padding:14px; }
  .auth-form:not(.auth-form--link) label { margin-top:9px; }
  #agreement-gate:not([hidden]) { margin-top:12px; padding:14px; }
}

/* ── Просмотр афиши (увеличение баннера по нажатию) ───────────────────── */
.image-viewer { position:fixed; inset:0; z-index:12; display:flex; align-items:center; justify-content:center; padding:12px; padding-top:calc(12px + max(var(--tg-top), env(safe-area-inset-top, 0px))); padding-bottom:calc(12px + max(var(--tg-bottom), env(safe-area-inset-bottom, 0px))); }
.image-viewer[hidden] { display:none; }
.image-viewer-backdrop { position:absolute; inset:0; background:rgba(5,5,9,.96); }
.image-viewer-figure { position:relative; z-index:1; display:grid; grid-template-rows:minmax(0, 1fr) auto; gap:10px; width:min(100%,1200px); height:100%; margin:0; pointer-events:none; }
.image-viewer-stage { display:flex; overflow:auto; overscroll-behavior:contain; touch-action:pan-x pan-y; pointer-events:auto; }
.image-viewer-stage img { display:block; flex:none; width:auto; height:auto; max-width:100%; max-height:100%; margin:auto; object-fit:contain; cursor:zoom-in; }
.image-viewer-stage--zoomed img { width:max(150%, 720px); max-width:none; max-height:none; align-self:flex-start; cursor:zoom-out; }
.image-viewer-stage p { margin:auto; text-align:center; }
.image-viewer-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.image-viewer-actions > * { width:auto; margin:0; pointer-events:auto; }
.image-viewer-link { display:block; text-align:center; text-decoration:none; }

/* ── Модалка «Подробнее о турнире» ────────────────────────────────────── */
.scheduled-modal-description { margin:10px 0 4px; padding:10px 12px; border:1px solid rgba(255,255,255,.08); border-radius:10px; background:rgba(255,255,255,.03); color:var(--ivory); font-size:13px; }
