/* SportScore — молодёжный спортивный стиль: электрический синий + голубой градиенты, лаймовые акценты */
:root {
  --bg: #f3f2fb; --card: #ffffff; --text: #0a1030; --muted: #5a638a; --line: #e0e2f2;
  --blue: #3b4cff; --blue-dark: #2231d6; --cyan: #12c4ff; --violet: #7b3dff;
  --orange: #ff6a3d; --pink: #ff3d77;
  --lime: #c8ff3a; --lime-ink: #1b2a05;
  --grad: linear-gradient(135deg, #3b4cff 0%, #7b3dff 100%);
  --grad-fire: linear-gradient(135deg, #ff8a1f 0%, #ff3d77 100%);
  --grad-soft: linear-gradient(135deg, #ebe9ff 0%, #e1ecff 100%);
  --danger: #e5384d; --warn: #b45309;
  --radius: 22px; --nav-h: 80px;
  --shadow: 0 10px 28px rgba(35, 25, 120, .14);
  --font-display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  color: var(--text); min-height: 100vh;
  background:
    radial-gradient(480px 300px at -8% -6%, rgba(123, 61, 255, .20), transparent 70%),
    radial-gradient(420px 280px at 108% 4%, rgba(255, 106, 61, .16), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  font: 16px/1.45 var(--font-body);
}
a { color: var(--blue); text-decoration: none; }
.page { max-width: 520px; margin: 0 auto; padding: 18px 16px calc(var(--nav-h) + 44px + env(safe-area-inset-bottom)); }
.page.no-nav { padding-bottom: 32px; }
h1 { font-size: 28px; line-height: 1.15; margin: 6px 0 14px; font-weight: 800; letter-spacing: -.5px; }
h2 { font-size: 18px; margin: 24px 0 10px; font-weight: 800; letter-spacing: -.2px; }
h3 { font-size: 16px; margin: 0 0 6px; }
.muted { color: var(--muted); font-size: 14px; }
.sub { color: var(--muted); margin: -8px 0 16px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; }
.page > a.muted:first-child { display: inline-block; padding: 6px 12px; background: rgba(255,255,255,.7); border-radius: 999px; font-weight: 600; color: var(--blue-dark); backdrop-filter: blur(6px); }

.card { background: var(--card); border: 1px solid rgba(228, 233, 251, .9); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card.link { display: block; color: inherit; transition: transform .12s; }
.card.link:active { transform: scale(.985); }
details.card summary { cursor: pointer; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff; border: 0; border-radius: 999px;
  padding: 14px 22px; font: inherit; font-weight: 700; cursor: pointer; min-height: 52px;
  box-shadow: 0 8px 18px rgba(42, 91, 255, .30); transition: transform .12s, filter .12s;
}
.btn:active { transform: scale(.97); filter: brightness(.95); }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: var(--grad-soft); color: var(--blue-dark); box-shadow: none; }
.btn.white { background: #fff; color: var(--blue-dark); box-shadow: 0 8px 18px rgba(8, 20, 90, .18); }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid rgba(229, 56, 77, .5); box-shadow: none; }
.btn.small { min-height: 42px; padding: 9px 16px; font-size: 14px; }
.btn:disabled { opacity: .45; box-shadow: none; }

/* Поля */
.inp, select.inp, textarea.inp {
  width: 100%; background: #f6f8ff; color: var(--text); border: 1.5px solid transparent;
  border-radius: 16px; padding: 13px 16px; font: inherit; min-height: 52px; margin-bottom: 12px;
  transition: border-color .15s, background .15s;
}
.card .inp, .auth-card .inp, dialog .inp { background: #f3f6ff; }
.inp:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(42, 91, 255, .12); }
.inp.search { background: #fff; box-shadow: var(--shadow); border-radius: 999px; padding-left: 20px; }
textarea.inp { min-height: 84px; resize: vertical; }
label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 5px 4px; }
.score-in { text-align: center; font-size: 30px; font-weight: 800; padding: 10px; }
.pass { position: relative; }
.pass .inp { padding-right: 52px; }
.pass .eye { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border: 0; background: none; font-size: 18px; cursor: pointer; opacity: .7; }
input[type=checkbox] { accent-color: var(--blue); width: 18px; height: 18px; }

/* Уведомления */
.flashes { position: fixed; top: 10px; left: 0; right: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.flash { background: #0f1733; color: #fff; padding: 12px 18px; border-radius: 18px; max-width: 480px; box-shadow: 0 10px 28px rgba(0,0,0,.25); pointer-events: auto; transition: opacity .4s; font-weight: 600; }
.flash.error { background: var(--danger); }
.flash.success { background: linear-gradient(135deg, #0f9d58, #16c172); }
.flash.hide { opacity: 0; pointer-events: none; }
.errors { background: #ffe9ec; color: #a3122a; border-radius: 16px; padding: 11px 15px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.errors ul { margin: 0; padding-left: 18px; }

/* Плавающая нижняя навигация */
.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 496px; z-index: 40; }
.bottom-nav .inner {
  height: var(--nav-h); display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); border: 1px solid rgba(228, 233, 251, .9);
  border-radius: 30px; box-shadow: 0 14px 40px rgba(20, 40, 140, .22);
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #8e98b8; }
.nav-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--blue); }
.nav-item.active svg { stroke-width: 2.4; }

/* Табы */
.tabs { display: flex; background: #fff; border-radius: 999px; padding: 5px; margin-bottom: 14px; box-shadow: var(--shadow); }
.tabs a { flex: 1; text-align: center; padding: 10px 4px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 700; }
.tabs a.active { background: var(--grad); color: #fff; box-shadow: 0 6px 14px rgba(42, 91, 255, .3); }

/* Главная */
.tile { position: relative; overflow: hidden; aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 16px 10px 18px; border-radius: 30px; color: #fff; text-align: center; }
.tile::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.14); }
.tile::before { content: ""; position: absolute; right: 40px; bottom: -60px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.1); }
.tile-blue { background: var(--grad); box-shadow: 0 14px 30px rgba(42, 91, 255, .35); }
.tile-fire { background: var(--grad-fire); box-shadow: 0 14px 30px rgba(255, 70, 100, .35); }
.chev-r { color: var(--muted); font-size: 24px; }

/* Списки */
.item { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad-soft); color: var(--blue-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 104px; height: 104px; font-size: 40px; margin: 0 auto 12px; }
.avatar.xs { width: 28px; height: 28px; font-size: 12px; }
.badge { display: inline-block; font-size: 12px; padding: 3px 11px; border-radius: 999px; background: var(--grad-soft); color: var(--blue-dark); font-weight: 700; }
.badge.gray { background: #eceffa; color: var(--muted); }
.badge.warn { background: #fff1cf; color: var(--warn); }
.nick { color: var(--blue); font-weight: 600; font-size: 14px; }
.pts-chip { display: inline-block; min-width: 34px; text-align: center; background: var(--lime); color: var(--lime-ink); border-radius: 999px; padding: 3px 11px; font-weight: 800; }
.pts { font-weight: 800; font-size: 22px; }

.match-score { font-size: 28px; font-weight: 800; white-space: nowrap; letter-spacing: -1px; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side { text-align: center; }
.side .pl { font-size: 14px; color: var(--muted); margin: 3px 0; }
.side[data-win] { background: linear-gradient(180deg, #f3ffd0, #fff); outline: 2px solid var(--lime); }
.side b.plus { color: #3d8b00; }

/* Таблицы */
.table-wrap { overflow-x: auto; padding: 6px 8px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 11px 4px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.tbl td.l, .tbl th.l { text-align: left; white-space: normal; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:nth-child(2) td { background: linear-gradient(90deg, rgba(200, 255, 58, .18), transparent); }

/* Фильтр */
.filter-wrap { margin-bottom: 14px; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 0; border-radius: 999px;
  padding: 10px 16px; font: inherit; font-weight: 700; color: var(--blue-dark); box-shadow: var(--shadow); cursor: pointer;
}
.filter-toggle .count { background: var(--grad); color: #fff; font-size: 12px; min-width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.filter-toggle .chev { transition: transform .2s; margin-top: -4px; }
.filter-toggle.open .chev { transform: rotate(180deg); margin-top: 4px; }
form.filters { background: #fff; border-radius: var(--radius); padding: 14px; margin-top: 10px; box-shadow: var(--shadow); }
.custom-dates { display: none; gap: 8px; }

/* Конструктор команд */
.team-block { position: relative; }
.team-title { font-weight: 800; margin-bottom: 8px; color: var(--blue); }
.team-remove { border: 0; background: #ffe9ec; color: var(--danger); font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--grad-soft); color: var(--blue-dark); padding: 6px 6px 6px 13px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.chip-x { border: 0; background: rgba(27, 63, 209, .14); color: inherit; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 16px; }
.ps { position: relative; }
.ps-list { display: none; position: absolute; left: 0; right: 0; top: 58px; z-index: 20; background: #fff; border-radius: 18px; box-shadow: 0 16px 40px rgba(20, 40, 140, .25); overflow: hidden; }
.ps-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); padding: 14px 16px; font: inherit; cursor: pointer; }
.ps-item:last-child { border-bottom: 0; }
.ps-item:active, .ps-item:hover { background: #eef2ff; }
.ps-new { color: var(--blue); font-weight: 700; }

/* Окно (bottom sheet) */
dialog.sheet { border: 0; padding: 22px 20px 20px; width: calc(100% - 32px); max-width: 440px; margin: auto; border-radius: 28px; background: #fff; color: var(--text); max-height: 90vh; box-shadow: 0 30px 80px rgba(10, 20, 90, .4); }
dialog.sheet h2 { margin: 0 0 14px; font-size: 22px; }
dialog.sheet[open] { animation: sheet-pop .2s ease-out; }
dialog.sheet::backdrop { background: rgba(10, 20, 70, .55); backdrop-filter: blur(3px); }
@keyframes sheet-pop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

.share-url { font-size: 13px; padding: 9px 12px; min-height: 42px; margin: 10px 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .big { font-size: 44px; margin-bottom: 6px; }
.public-head { text-align: center; margin-bottom: 14px; }
.brand { font-weight: 800; color: var(--blue); letter-spacing: .3px; font-size: 18px; }
.big-code { font-size: 32px; letter-spacing: 10px; text-align: center; font-weight: 800; }
.dev-hint { background: #fff4d2; color: #8a5a00; padding: 11px 15px; border-radius: 16px; margin-bottom: 14px; font-size: 14px; }

/* Экраны входа */
body.auth {
  background:
    radial-gradient(420px 420px at 85% 8%, rgba(255, 255, 255, .28), transparent 70%),
    radial-gradient(380px 380px at -10% 70%, rgba(106, 61, 245, .55), transparent 70%),
    linear-gradient(165deg, #1b3fd1 0%, #2a5bff 45%, #12c4ff 100%);
  background-attachment: fixed; color: #fff;
}
.auth .brandmark { font-size: 54px; line-height: 1; margin: 28px 0 8px; letter-spacing: -2px; color: #fff; }
.auth .brandmark span { font-weight: 300; }
.auth .brandmark b { font-weight: 800; }
.auth-sub { color: rgba(255,255,255,.88); margin: 0 0 22px; }
.auth-card { background: #fff; color: var(--text); border-radius: 28px; padding: 22px 20px; box-shadow: 0 24px 50px rgba(5, 15, 90, .35); }
.auth-card h1 { font-size: 24px; margin-top: 0; }
.auth-card a { color: var(--blue); font-weight: 600; }
.auth-alt { text-align: center; color: rgba(255,255,255,.85); margin: 18px 0 10px; min-height: 8px; }
.auth a { color: #fff; }
.auth .auth-card a { color: var(--blue); }
.auth .btn.white { color: var(--blue-dark); }
.auth .flash { color: #fff; }


/* ---- v3: списки игроков, центр главной, меню профиля ---- */
.card.link.item { display: flex; }
.item { min-width: 0; }
.pname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.pstat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13px; }
.item .pts-chip { flex: none; }
.pcell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.pcell .avatar { flex: none; }
a.pname { color: var(--blue-dark); }

.fab-bar { position: fixed; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 488px; z-index: 35; bottom: calc(var(--nav-h) + 44px + env(safe-area-inset-bottom)); }
.page.has-fab { padding-bottom: calc(var(--nav-h) + 140px + env(safe-area-inset-bottom)); }

.home-center { min-height: calc(100vh - var(--nav-h) - 130px); display: flex; flex-direction: column; justify-content: center; }
.home-center h1 { font-size: 26px; margin-bottom: 22px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 420px; margin: 0 auto; }
.tile > * { position: relative; z-index: 1; }
.tile .art { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 0; padding: 2px 4px 10px; }
.tile .art svg { width: 100%; height: 100%; }
.tile b { font-size: 16px; font-weight: 800; line-height: 1.2; }

.menu-btn { display: flex; align-items: center; gap: 12px; width: 100%; background: #fff; border: 0; border-radius: 22px; padding: 14px 16px; margin-bottom: 12px; font: inherit; font-weight: 700; color: var(--text); text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.menu-btn:active { transform: scale(.985); }
.menu-btn .mi { width: 42px; height: 42px; border-radius: 14px; background: var(--grad-soft); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.menu-btn .grow { flex: 1; }
.menu-btn.danger { color: var(--danger); }
.menu-btn.danger .mi { background: #ffe9ec; }
.link-danger { background: none; border: 0; color: var(--danger); font: inherit; font-weight: 700; padding: 10px; cursor: pointer; }
input[type=file].inp { padding: 10px 12px; }
input[type=file]::file-selector-button { border: 0; background: var(--grad); color: #fff; font: inherit; font-weight: 700; padding: 8px 14px; border-radius: 999px; margin-right: 10px; cursor: pointer; }
dialog.sheet .row { margin-top: 6px; }
.tbl td.l { max-width: 0; width: 100%; }
.pcell { min-width: 0; }
.pcell .pname { min-width: 0; }
.tbl td.l .pname { display: block; }

/* ---- v4: главная (плитки друг под другом + анимация), окно подтверждения, составы ---- */
.home-center { min-height: 0; display: block; }
.home-center h1 { font-size: 24px; margin: 4px 0 16px; }
.tiles { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: none; }
.tile { width: var(--tile); height: var(--tile); aspect-ratio: auto; padding: 10px 8px 14px; border-radius: 30px; transition: transform .15s; animation: tile-in .6s cubic-bezier(.2, .9, .3, 1.25) both; }
.tile:nth-child(2) { animation-delay: .12s; }
.tile:active { transform: scale(.95); }
.tile-blue, .tile-fire { background-size: 220% 220%; animation: tile-in .6s cubic-bezier(.2, .9, .3, 1.25) both, gradmove 7s ease-in-out infinite; }
.tile-fire { animation-delay: .12s, 0s; }
.tile::after { animation: drift 7s ease-in-out infinite alternate; }
.tile::before { animation: drift 9s ease-in-out infinite alternate-reverse; }
.tile .art { animation: float 3.4s ease-in-out infinite; padding: 0 2px 6px; }
.tile-fire .art { animation-delay: -1.2s; }
.tile b { font-size: 15px; }

.tile svg * { transform-box: fill-box; }
.lean { transform-origin: 50% 100%; animation: lean 2.6s ease-in-out infinite; }
.lean-r { animation-delay: -1.3s; }
.eye { transform-origin: center; animation: blink 4.2s infinite; }
.pupil { animation: look 3.2s ease-in-out infinite; }
.brow { transform-origin: 80% 100%; animation: brow 2.6s ease-in-out infinite; }
.mouth { transform-origin: center; animation: grin 2.6s ease-in-out infinite; }
.bolt { transform-origin: center; animation: bolt 1.2s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(200, 255, 58, .9)); }
.spark { transform-origin: center; animation: twinkle 1.8s ease-in-out infinite; }
.spark.s2 { animation-delay: -.5s; } .spark.s3 { animation-delay: -1s; } .spark.s4 { animation-delay: -1.4s; }
.trophy { transform-origin: 50% 95%; animation: wobble 3s ease-in-out infinite; }
.star { transform-origin: center; animation: pulse 1.4s ease-in-out infinite; }
.shine { animation: shine 3s ease-in-out infinite; }

@keyframes tile-in { from { opacity: 0; transform: translateY(24px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes gradmove { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-14px, 12px) scale(1.15); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes lean { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(5px) rotate(5deg); } }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.08); } }
@keyframes look { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.5px); } }
@keyframes brow { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg) translateY(1px); } }
@keyframes grin { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18, 1.35); } }
@keyframes bolt { 0%, 100% { transform: scale(1) rotate(-4deg); opacity: .95; } 50% { transform: scale(1.22) rotate(5deg); opacity: 1; } }
@keyframes twinkle { 0%, 100% { transform: scale(.2) rotate(0); opacity: 0; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-2px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes shine { 0%, 55% { transform: translateX(-4px); opacity: 0; } 70% { opacity: .8; } 100% { transform: translateX(34px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tile, .tile *, .tile::before, .tile::after { animation: none !important; }
}

/* Окно подтверждения */
dialog.confirm { text-align: center; }
dialog.confirm h2 { margin: 4px 0 8px; }
dialog.confirm p { margin: 0 0 16px; font-size: 15px; line-height: 1.4; }
.confirm-ico { font-size: 38px; }
.btn.danger-fill { background: var(--danger); box-shadow: 0 8px 18px rgba(229, 56, 77, .35); }

/* Конструктор команд и составы */
.ps-row { display: flex; gap: 8px; align-items: flex-start; }
.new-player-btn { min-height: 52px; padding: 10px 14px; font-size: 14px; flex: none; }
.chip.ro { padding: 5px 13px 5px 6px; gap: 7px; }
.fixtures { margin-top: 6px; border-top: 1px solid var(--line); }
.fx { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); color: var(--text); }
.fx:last-child { border-bottom: 0; }
.fx-date { color: var(--muted); font-size: 13px; width: 40px; flex: none; }
.fx-opp { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-score { font-size: 17px; }
.res { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; }
.res-w { background: var(--lime); color: var(--lime-ink); }
.res-d { background: #e6eaf7; color: var(--muted); }
.res-l { background: #ffe0e4; color: var(--danger); }
.card.link.row { display: flex; }


/* ---- v5: главная — крупные квадраты на всю высоту экрана ---- */
html { scroll-behavior: smooth; }
.home-center {
  /* зарезервировано: верхний отступ + заголовок + нижняя панель (+ кнопка «Активные турниры») */
  --reserved: 196px;
  --tile: calc(min(calc(100vw - 32px), 440px, calc((100vh - var(--reserved)) / 2)) * .93);
  min-height: calc(100vh - 18px); padding-bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.home-center.has-active { --reserved: 280px; }
@supports (height: 100dvh) {
  .home-center { --tile: calc(min(calc(100vw - 32px), 440px, calc((100dvh - var(--reserved)) / 2)) * .93); min-height: calc(100dvh - 18px); }
}
.home-center .tiles { flex: 1; justify-content: center; }
.tile { padding: 14px 12px 18px; border-radius: 34px; }
.tile b { font-size: clamp(16px, 5.2vw, 21px); }
.tile .art { padding: 4px 6px 10px; }
.active-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 14px;
  min-height: 54px; border: 0; border-radius: 999px; background: #fff; color: var(--blue-dark);
  font: inherit; font-weight: 800; cursor: pointer; box-shadow: var(--shadow);
}
.active-btn:active { transform: scale(.97); }
#active-list { scroll-margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* без активных турниров ниже ничего нет — страница ровно по высоте экрана */
.home-center:not(.has-active) { --reserved: 228px; min-height: calc(100vh - 18px - var(--nav-h) - 44px); padding-bottom: 0; }
@supports (height: 100dvh) {
  .home-center:not(.has-active) { min-height: calc(100dvh - 18px - var(--nav-h) - 44px); }
}
@media (max-height: 720px) {
  .home-center.has-active { --reserved: 302px; }
  .home-center h1 { margin-bottom: 10px; }
}

/* список активных турниров сразу под кнопкой, без заголовка */
.home-center.has-active { padding-bottom: 0; min-height: calc(100vh - 18px - var(--nav-h) - 44px); }
@supports (height: 100dvh) {
  .home-center.has-active { min-height: calc(100dvh - 18px - var(--nav-h) - 44px); }
}
.active-list { margin-top: 16px; scroll-margin-top: 16px; }

select.inp:required:invalid { color: #8a93b4; }
select.inp option { color: var(--text); }

/* ---- v6: страница турнира ---- */
.t-head { margin-bottom: 4px; }
.t-head h1 { margin: 6px 0 8px; overflow-wrap: anywhere; }
.t-actions { margin-top: 12px; gap: 10px; align-items: stretch; }
.t-actions form { margin: 0; }
.head-row { margin: 22px 0 10px; }
.head-row h2 { margin: 0; }
.help-btn { border: 0; background: #fff; color: var(--blue-dark); font: inherit; font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; }
.help-btn.open { background: var(--grad); color: #fff; }
.card.help h3 { margin: 12px 0 4px; font-size: 15px; color: var(--blue-dark); }
.card.help h3:first-child { margin-top: 0; }
.card.help p { margin: 0 0 6px; font-size: 14px; color: var(--text); line-height: 1.45; }

details.fold { margin-bottom: 12px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 22px; padding: 16px 18px; font-weight: 800; box-shadow: var(--shadow); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "⌄"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > summary:active { transform: scale(.985); }
.fold-body { padding-top: 12px; }

.pg-ctl { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.pg-ctl:empty { display: none; }
.pg-btn { border: 0; background: var(--grad-soft); color: var(--blue-dark); font: inherit; font-size: 14px; font-weight: 700; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.pg-btn:active { transform: scale(.96); }
.pg-info { color: var(--muted); font-size: 13px; font-weight: 600; padding: 0 4px; }

.t-actions .btn { padding: 9px 8px; white-space: nowrap; font-size: 14px; }


/* ---- v7: голы игроков, переключатель режимов рейтинга ---- */
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch .slider { position: absolute; inset: 0; border-radius: 999px; background: #d3d9ee; transition: background .2s; }
.switch .slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .slider { background: var(--grad); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.switch input:focus-visible + .slider { outline: 3px solid rgba(42, 91, 255, .35); }

.goals-block { margin: 2px 0 14px; }
.goals-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; padding: 6px 2px; }
.goals-list { margin-top: 8px; }
.goals-team { background: #f3f6ff; border-radius: 18px; padding: 10px 12px; margin-bottom: 10px; }
.goals-team-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: 4px; gap: 8px; }
.goals-team-head .g-count { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.goals-team-head .g-count.over { color: var(--danger); }
.g-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.g-row:first-of-type { border-top: 0; }
.g-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 8px; }
.st-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--blue-dark); font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.st-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.st-btn.plus:not(:disabled) { background: var(--grad); color: #fff; }
.st-val { min-width: 24px; text-align: center; font-weight: 800; font-size: 18px; }
.goals-hint { color: var(--muted); font-size: 14px; padding: 6px 2px; }
.goals-error { margin: 8px 0 0; }
.goal-tag { display: inline-block; font-size: 12px; font-weight: 700; background: #dcfce7; color: #15803d; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }

.mode-switch { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 14px; }
.ms-label { font-weight: 700; font-size: 14px; color: var(--muted); }
.ms-label.on { color: var(--blue-dark); }
.ms-track { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #d3d9ee; flex: none; transition: background .2s; }
.ms-track.right { background: var(--grad); }
.ms-knob { position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .2s; }
.ms-track.right .ms-knob { transform: translateX(22px); }
.rate-chip { display: inline-block; min-width: 40px; text-align: center; background: #dcfce7; color: #15803d; border-radius: 999px; padding: 3px 10px; font-weight: 800; }

@media (max-width: 430px) { .tbl.personal .pcell .avatar { display: none; } .tbl.personal th, .tbl.personal td { padding-left: 3px; padding-right: 3px; } }


/* ---- v8: кнопка «Поделиться» ---- */
.share-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: #fff; color: var(--blue-dark); font: inherit; font-size: 14px; font-weight: 700; padding: 9px 15px; border-radius: 999px; box-shadow: var(--shadow); cursor: pointer; white-space: nowrap; }
.share-btn:active { transform: scale(.96); }
.share-btn:disabled { opacity: .6; }
.filter-wrap { position: relative; }
.share-btn.abs { position: absolute; right: 0; top: 0; }
.share-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.status-row { align-items: center; }
.share-actions { flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.share-actions .btn { flex: 1 1 auto; }
dialog.confirm .share-url { text-align: center; margin: 4px 0 12px; }
.btn.ghost.warn-text { color: var(--danger); }


/* ===== v9: шрифты, контраст, живость ===== */
h1, h2, h3, .btn, .badge, .tile b, .tabs a, .filter-toggle, .help-btn, .share-btn, .pg-btn, .match-score, .pts,
.pts-chip, .rate-chip, .score-in, .st-val, .fx-score, .team-title, .menu-btn, .ms-label, .big-code,
.goals-team-head, .goals-head, .mf-title, .brandmark, .cele-title, .cele-score { font-family: var(--font-display); }
h1 { font-size: 23px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 800; letter-spacing: -.1px; display: flex; align-items: center; }
h2::before { content: ""; width: 6px; height: 18px; border-radius: 3px; background: var(--grad-fire); margin-right: 10px; flex: none; }
dialog.sheet h2::before { display: none; }
h3 { font-size: 15px; }
.btn { font-size: 14px; font-weight: 800; letter-spacing: .2px; box-shadow: 0 10px 22px rgba(80, 50, 230, .34); }
.btn.small { font-size: 12px; }
.btn.ghost { box-shadow: none; }
.btn.white, .btn.danger { box-shadow: none; }
.badge { font-size: 11px; font-weight: 700; }
.tabs a { font-size: 12px; }
.filter-toggle { font-size: 13px; }
.help-btn, .share-btn, .pg-btn { font-size: 12px; }
.menu-btn { font-size: 14px; }
.ms-label { font-size: 12px; }
.pts-chip, .rate-chip { font-size: 14px; }
.team-title { font-size: 14px; }
.card { border-color: rgba(210, 212, 240, .9); }
.nick { font-family: var(--font-body); }

/* нижняя панель: крупнее иконки и подписи */
.nav-item { font-size: 13px; font-weight: 700; gap: 4px; color: #6a7298; }
.nav-item svg { width: 30px; height: 30px; }
.nav-item.active { color: var(--blue); }

/* появление блоков на странице */
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
.page > :not(.fab-bar):not(.home-center):not(dialog):not(script) { animation: rise .5s ease both; }
.page > :nth-child(2) { animation-delay: .05s; } .page > :nth-child(3) { animation-delay: .1s; }
.page > :nth-child(4) { animation-delay: .15s; } .page > :nth-child(5) { animation-delay: .2s; }
.page > :nth-child(6) { animation-delay: .25s; } .page > :nth-child(7) { animation-delay: .3s; }
.page > :nth-child(n+8) { animation-delay: .35s; }
.card.link, .menu-btn, .share-btn, .btn { transition: transform .15s, box-shadow .15s; }
.card.link:hover { transform: translateY(-2px); }
.t-head .badge:not(.gray)::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #16c172; margin-right: 6px; animation: live 1.4s ease-in-out infinite; }
@keyframes live { 0%, 100% { box-shadow: 0 0 0 0 rgba(22, 193, 114, .6); } 50% { box-shadow: 0 0 0 6px rgba(22, 193, 114, 0); } }

/* экраны входа */
body.auth {
  background:
    radial-gradient(420px 420px at 85% 8%, rgba(255, 255, 255, .22), transparent 70%),
    radial-gradient(380px 380px at -10% 75%, rgba(255, 106, 61, .45), transparent 70%),
    linear-gradient(165deg, #1b24c9 0%, #5a35f0 55%, #a03dff 100%);
  background-attachment: fixed;
}
.auth .brandmark { font-size: 40px; letter-spacing: -2px; }
.auth .brandmark span { font-weight: 500; }
.auth .brandmark b { font-weight: 900; }

/* главная */
.home-center h1 {
  width: fit-content; max-width: 100%; margin: 6px auto 16px; padding: 11px 22px; border-radius: 999px;
  background: var(--grad); color: #fff; font-size: clamp(14px, 4.3vw, 18px); text-align: center;
  box-shadow: 0 10px 22px rgba(80, 50, 230, .35); animation: tile-in .6s cubic-bezier(.2, .9, .3, 1.25) both;
}
.tile-blue { background-image: linear-gradient(135deg, #3b4cff 0%, #7b3dff 100%); box-shadow: 0 16px 34px rgba(80, 50, 230, .42); }
.tile-fire { box-shadow: 0 16px 34px rgba(255, 61, 119, .42); }
.tile b { font-size: clamp(21px, 6.6vw, 27px); font-weight: 800; letter-spacing: -.4px; text-shadow: 0 3px 0 rgba(10, 16, 48, .25); }
.tile > .tile-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; color: #fff; opacity: .3; pointer-events: none; }
.deco { transform-box: fill-box; transform-origin: center; animation: deco 7s ease-in-out infinite; }
.deco.d2 { animation-duration: 8.5s; animation-delay: -2s; }
.deco.d3 { animation-duration: 6.2s; animation-delay: -4s; }
.deco.d4 { animation-duration: 9s; animation-delay: -1s; }
.deco.d5 { animation-duration: 7.6s; animation-delay: -5s; }
@keyframes deco { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .deco, .page > * { animation: none !important; } }

/* праздничная анимация после сохранения матча */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cele-pop { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); } 60% { transform: scale(1.06) rotate(1deg); } 100% { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ball { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(180deg); } }
@keyframes score-pulse { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.cele { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(8, 12, 40, .72); backdrop-filter: blur(4px); animation: fade-in .25s ease both; transition: opacity .35s; }
.cele.out { opacity: 0; }
.cele-card { position: relative; overflow: hidden; width: min(90vw, 380px); border-radius: 32px; padding: 26px 18px 22px; text-align: center; color: #fff; background: var(--grad); box-shadow: 0 30px 80px rgba(30, 20, 120, .6); animation: cele-pop .65s cubic-bezier(.2, 1.4, .4, 1) both; }
.cele-card::before { content: ""; position: absolute; inset: -60%; background: conic-gradient(from 0deg, rgba(255,255,255,0), rgba(255,255,255,.22), rgba(255,255,255,0) 30%); animation: spin 3.2s linear infinite; }
.cele-card > * { position: relative; }
.cele-ball { font-size: 52px; display: inline-block; animation: ball 1s ease-in-out infinite; }
.cele-title { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; opacity: .92; margin-top: 4px; }
.cele-score { font-size: 56px; font-weight: 900; line-height: 1; margin: 10px 0 6px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.cele-score .n { display: inline-block; min-width: 1ch; animation: score-pulse .6s ease both; }
.cele-score .win { color: var(--lime); text-shadow: 0 0 22px rgba(200, 255, 58, .7); }
.cele-teams { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 800; opacity: .95; }
.cele-teams span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cele-hint { opacity: .7; font-size: 12px; margin-top: 12px; }
canvas.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 201; }


/* ===== v10: ваши картинки на плитках; форма матча — один цельный элемент ===== */
.tile .art img.art-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(10, 16, 48, .35)); }
.tile b { font-size: clamp(16px, 5.4vw, 21px); white-space: nowrap; }
.tile .art { padding: 0 0 4px; }

.match-form { padding: 14px; }
.mf { padding: 0; margin: 0; }
.mf + .mf { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.mf-title { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.mf-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mf-date .mf-title { margin: 0; white-space: nowrap; }
.mf-date .inp { flex: 1; width: auto; min-height: 40px; padding: 7px 12px; margin: 0; font-size: 14px; border-radius: 12px; }
.mf-side { padding: 0; background: none; border: 0; }
.mf-side .inp { margin-bottom: 8px; }
.mf-side .inp:last-child { margin-bottom: 0; }
.mf-side .score-in { font-size: 26px; min-height: 54px; padding: 6px; }
.mf-side .lbl { text-align: center; font-weight: 700; color: var(--text); }
.mf-goals .goals-block { margin: 0; }
.goals-head { min-height: 38px; padding: 0 2px; font-size: 13px; }
.goals-list { margin-top: 6px; }
.goals-team { background: #f5f6fc; border: 0; border-radius: 14px; padding: 6px 10px; margin-bottom: 8px; }
.goals-team-head { margin-bottom: 2px; font-size: 12px; }
.g-row { padding: 4px 0; }
.g-name { font-size: 14px; }
.st-btn { width: 30px; height: 30px; font-size: 18px; box-shadow: none; background: #fff; border: 1px solid var(--line); }
.st-btn.plus:not(:disabled) { border-color: transparent; }
.st-val { min-width: 20px; font-size: 16px; }
.goals-error { margin: 6px 0 0; padding: 8px 12px; font-size: 13px; }
.btn.save { background: var(--grad); box-shadow: 0 10px 22px rgba(80, 50, 230, .34); font-size: 14px; min-height: 52px; margin-top: 12px; }


/* ===== v11: друзья, приглашения, ID ===== */
.nav-item { position: relative; }
.nav-badge { position: absolute; top: -2px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(255, 61, 119, .5); }
.live-dot { color: #16a34a; font-weight: 800; font-size: 13px; }
.pend-dot { color: var(--warn); font-weight: 800; }
.global-link { display: block; margin: -2px 0 12px; padding: 12px 16px; border-radius: 16px; background: var(--grad-soft); color: var(--blue-dark); font-weight: 700; font-size: 14px; }
.card.req { border-left: 5px solid var(--orange); }
.id-card { display: flex; align-items: center; gap: 12px; }
.id-big { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: 2px; color: var(--blue-dark); margin-top: 2px; }
.invite-box { margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--grad-soft); }
.invite-box h3 { margin-bottom: 4px; }
.invite-box p { margin: 0 0 10px; }
.invite-box .share-url { background: #fff; }
.invite-note { background: rgba(255, 255, 255, .18); color: #fff; border-radius: 16px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; font-weight: 600; }

.card.req .pstat, .pname.wrap { white-space: normal; overflow: visible; text-overflow: clip; }

.id-big { font-size: 22px; letter-spacing: 1.5px; white-space: nowrap; }
.id-card .btn { flex: none; }

.you-badge { display: inline-block; font-family: var(--font-display); font-size: 10px; font-weight: 800; letter-spacing: .4px; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #fff; vertical-align: 1px; }


/* ===== v12: реальные игроки (зелёная галочка) и «Это я» ===== */
.av { position: relative; display: inline-flex; flex: none; }
.av .avatar { margin: 0; }
.av.big { display: flex; width: 104px; height: 104px; margin: 0 auto 12px; }
.av-check { position: absolute; right: -3px; bottom: -3px; z-index: 2; width: 19px; height: 19px; border-radius: 50%;
  background: #16c172; color: #fff; border: 2px solid #fff; font-style: normal; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(22, 193, 114, .5); }
.av.big .av-check { width: 28px; height: 28px; font-size: 16px; right: 2px; bottom: 2px; border-width: 3px; }
.card.link.item.group-gap { margin-top: 20px; }
.real-mark { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%;
  background: #16c172; color: #fff; font-style: normal; font-size: 10px; font-weight: 900; vertical-align: 1px; }
.claim-chip { border: 0; background: none; padding: 0; margin: 0; font: inherit; font-weight: inherit; color: var(--blue-dark); cursor: pointer;
  text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 3px; text-align: left; }
.claim-chip:active { opacity: .6; }
.claim-hint { background: linear-gradient(135deg, #fff4d6, #ffe9c7); border: 1.5px solid #ffd77a; color: #7a4a00; border-radius: 16px;
  padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }

/* ===== v13: выбор вида спорта → выбор формата ===== */
.home-sports h1 { font-size: 24px; margin: 4px 0 16px; }
.sport-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 440px; margin: 0 auto; }
.sport-tile { position: relative; overflow: hidden; aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 8px 14px; border-radius: 30px; color: #fff; text-align: center; background: var(--grad); background-size: 200% 200%; box-shadow: 0 12px 26px rgba(42, 91, 255, .32); transition: transform .18s, box-shadow .18s; animation: tile-in .6s cubic-bezier(.2, .9, .3, 1.25) both, gradmove 8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .07s), 0s; }
.sport-tile::after { content: ""; position: absolute; right: -36px; top: -36px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.14); animation: drift 7s ease-in-out infinite alternate; }
.sport-tile > * { position: relative; z-index: 1; }
.sport-tile .art { flex: 1; width: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; animation: float 3.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.5s); }
.sport-tile .art-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.sport-tile b { font-size: clamp(15px, 4.6vw, 19px); font-weight: 800; line-height: 1.2; }
.sport-tile:active { transform: scale(.95); }
.sport-tile:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
.st-football { background-image: linear-gradient(135deg, #1fa85a, #1f6bff); box-shadow: 0 12px 26px rgba(31, 140, 120, .35); }
.st-padel { background-image: linear-gradient(135deg, #5b3dff, #1f8bff); }
.st-hockey { background-image: linear-gradient(135deg, #17b8e8, #2a4bff); box-shadow: 0 12px 26px rgba(23, 150, 232, .35); }
.st-tennis { background-image: linear-gradient(135deg, #8ac81f, #1f77ff); box-shadow: 0 12px 26px rgba(90, 170, 60, .35); }
.st-basketball { background-image: linear-gradient(135deg, #ff7a1f, #4a3dff); box-shadow: 0 12px 26px rgba(255, 110, 40, .35); }
.st-volleyball { background-image: linear-gradient(135deg, #ffb81f, #2a6bff); box-shadow: 0 12px 26px rgba(255, 170, 40, .35); }
.sport-chip { display: inline-block; padding: 5px 14px; border-radius: 99px; color: #fff; font-family: var(--font-head, inherit); font-weight: 700; font-size: 13px; margin: 2px 0 10px; box-shadow: none; }
.sport-page .sport-chip { display: table; margin: 8px auto 4px; }
.sport-page .back-link, .page > .back-link { display: inline-block; }
.sport-page .tile { animation-delay: .05s, 0s; }
.sport-page .tile:nth-child(2) { animation-delay: .17s, 0s; }

/* анимация перехода между страницами */
@keyframes pg-in-fwd { from { opacity: 0; transform: translateX(34px) scale(.97); } }
@keyframes pg-in-back { from { opacity: 0; transform: translateX(-34px) scale(.97); } }
.page.enter-fwd > * { animation: pg-in-fwd .38s cubic-bezier(.2, .8, .25, 1) backwards; }
.page.enter-back > * { animation: pg-in-back .38s cubic-bezier(.2, .8, .25, 1) backwards; }
.page.leaving { pointer-events: none; }
.page.leaving > * { transition: opacity .26s ease, transform .26s ease; opacity: 0; transform: translateX(-30px) scale(.96); }
.page.leaving.go-back > * { transform: translateX(30px) scale(.96); }
.page.leaving .picked { opacity: 1; transform: scale(1.12); z-index: 5; transition: transform .26s ease, opacity .26s ease .1s; }
.page.leaving .picked { animation: none; }
.page.leaving > .keep-parent { opacity: 1; transform: none; }
.page.leaving .keep-parent .sport-tile:not(.picked), .page.leaving .keep-parent .tile:not(.picked) { opacity: 0; transform: scale(.9); transition: opacity .22s, transform .22s; }
@media (prefers-reduced-motion: reduce) {
  .sport-tile, .sport-tile *, .sport-tile::after { animation: none !important; }
  .page.enter-fwd > *, .page.enter-back > * { animation: none; }
  .page.leaving > * { transition: none; }
}
