/* TopRacer Z7 — дизайн-система в духе лендинга TOPRACER */
:root {
    color-scheme: dark;
    --bg: #0A1628;
    --bg-soft: #0E1D33;
    --card: #122441;
    --ink: #F2F7FC;
    --ink-soft: #A9C0D8;
    --muted: #7E96B3;
    --accent: #38A8E8;
    --accent-dark: #0077B6;
    --accent-soft: rgba(56, 168, 232, 0.12);
    --pink: #EF2FA2;
    --gold: #FFB800;
    --green: #2BD98A;
    --red: #FF6B7A;
    --border: rgba(127, 178, 240, 0.16);
    --radius: 12px;
    --font-h: 'Montserrat', system-ui, sans-serif;
    --font-b: 'Inter Tight', system-ui, sans-serif;
    --pad: clamp(1rem, 4vw, 1.5rem);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-b); background: var(--bg); color: var(--ink); line-height: 1.5; min-height: 100vh;
    background-image: radial-gradient(1100px 500px at 85% -5%, rgba(239, 47, 162, 0.07), transparent 60%),
                      radial-gradient(900px 480px at 8% 4%, rgba(56, 168, 232, 0.09), transparent 60%);
    background-attachment: fixed; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-h); text-transform: uppercase; letter-spacing: -0.02em; line-height: 1.05; }
.container { max-width: 960px; margin: 0 auto; padding: 0 var(--pad); }
.page { padding-top: 1.75rem; padding-bottom: 3rem; }
.page-title { font-size: clamp(1.6rem, 5.5vw, 2.4rem); margin-bottom: 0.4rem; }
.page-sub { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* Шапка */
.topbar { position: sticky; top: 0; z-index: 100; background: rgba(10, 22, 40, 0.88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.logo { font-family: var(--font-h); font-weight: 800; font-size: 1.4rem; text-decoration: none; letter-spacing: -0.02em; text-transform: uppercase; color: var(--ink); }
.logo-mark { display: inline-flex; align-items: center; gap: 2px; }
.logo-portal { height: 0.72em; width: 0.72em; display: inline-block; vertical-align: 0.02em; margin: 0 0.02em; }
.logo-portal-core { fill: var(--accent); }
.logo-z7 { color: var(--pink); }
.topnav { display: flex; align-items: center; gap: 1.5rem; }
.topnav a { text-decoration: none; font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); position: relative; transition: color 0.2s ease; }
.topnav a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.topnav a:hover { color: var(--ink); }
.topnav a:hover::after, .topnav a.on::after { width: 100%; }
.topnav a.on { color: var(--ink); }
.topnav .admin-link { color: var(--pink); }
.user-chip { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.8rem 0.3rem 0.3rem !important; }
.user-chip img, .user-chip .ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ghost-link { color: var(--muted) !important; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem 1.5rem; font-family: var(--font-h); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 4px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.btn-primary { background: linear-gradient(135deg, #2FB3F5, #0077B6); color: #fff; box-shadow: 0 0 22px rgba(56, 168, 232, 0.35); }
.btn-primary:hover { background: linear-gradient(135deg, #4CC3FF, #0088cc); transform: translateY(-2px); box-shadow: 0 0 34px rgba(56, 168, 232, 0.5); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--border); }
.btn-danger:hover { border-color: var(--red); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.2s ease; display: inline-block; }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.72rem; }
.btn:active { transform: scale(0.97); }

/* Карточки */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; }
a.card:hover { border-color: var(--accent); transform: translateY(-3px); }

/* Светлые островки: формы на тёмном фоне */
.card-light { --bg: #FFFFFF; --card: #FFFFFF; --ink: #002146; --ink-soft: #3E5F83; --muted: #6E8FAE; --border: #D3E2F0; --accent: #0077B6; --accent-soft: rgba(0, 119, 182, 0.08); background: #FFFFFF; color: #002146; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.accent { color: var(--accent); }

/* Hero со свечением */
.hero { text-align: center; padding: 2.5rem 0 1rem; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.hero::before { width: 420px; height: 420px; top: -160px; right: -120px; background: rgba(239, 47, 162, 0.16); animation: blobFloat 9s ease-in-out infinite; }
.hero::after { width: 460px; height: 460px; top: -120px; left: -140px; background: rgba(56, 168, 232, 0.18); animation: blobFloat 11s ease-in-out infinite reverse; }
.hero > * { position: relative; z-index: 1; }
@keyframes blobFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 30px); } }
.hero-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0.4rem 1rem; margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); font-weight: 800; }
.hero h1 .hl { color: var(--accent); }
.hero p { color: var(--ink-soft); font-size: 1.05rem; margin: 1rem auto 1.75rem; max-width: 560px; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 2rem 0; }
.feat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 0.75rem; text-align: center; transition: transform 0.2s ease, border-color 0.2s ease; }
.feat:hover { transform: translateY(-3px); border-color: var(--accent); }
.feat-ic { font-family: var(--font-h); font-weight: 800; font-size: 1.4rem; color: var(--accent); }
.feat h3 { font-size: 0.85rem; margin: 0.5rem 0 0.25rem; }
.feat p { font-size: 0.8rem; color: var(--ink-soft); }
.bonus { background: linear-gradient(160deg, #0E2A4A, #0A1628); color: #fff; border: 1px solid rgba(56, 168, 232, 0.35); border-radius: 16px; padding: 2rem 1.5rem; text-align: center; margin: 2rem 0 1rem; position: relative; overflow: hidden; box-shadow: 0 0 44px rgba(56, 168, 232, 0.16), inset 0 0 60px rgba(239, 47, 162, 0.05); }
.bonus h2 { color: #fff; font-size: clamp(1.3rem, 4.5vw, 1.8rem); }
.bonus h2 .hl { color: #4DFFFF; }
.bonus-row { display: flex; justify-content: center; gap: 3rem; margin-top: 1.25rem; flex-wrap: wrap; }
.bonus-val { font-family: var(--font-h); font-weight: 800; font-size: 2.2rem; color: var(--gold); display: block; }
.bonus-lab { color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* Статистика */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 0.75rem; text-align: center; }
.stat-ic { font-family: var(--font-h); font-weight: 800; color: var(--accent); font-size: 1.2rem; }
.stat-val { font-family: var(--font-h); font-weight: 800; font-size: 1.6rem; line-height: 1.1; margin-top: 0.25rem; }
.stat-lab { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-top: 0.25rem; }
.level-bar { height: 12px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-top: 0.6rem; }
.level-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #4DFFFF); border-radius: 999px; transition: width 0.6s ease; box-shadow: 0 0 12px rgba(77, 255, 255, 0.5); }
.level-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }

/* Списки-строки */
.rows { display: flex; flex-direction: column; }
.rowline { display: flex; align-items: center; gap: 0.9rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 0.6rem; transition: border-color 0.2s ease; }
a.rowline:hover { border-color: var(--accent); }
.rowline-plain { background: none; border: none; border-bottom: 1px dashed var(--border); border-radius: 0; padding: 1rem 0.25rem; }
.rowline-plain:last-child { border-bottom: none; }
.rowline-dim { opacity: 0.55; }
.toverlay { display: inline-block; background: linear-gradient(135deg, #2FB3F5, #0077B6); color: #FFFFFF; padding: 0.3rem 0.8rem; font-family: var(--font-h); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; border-radius: 4px; box-shadow: 0 4px 16px rgba(56, 168, 232, 0.35); }
.tlink { text-decoration: none; transition: color 0.2s ease; }
.tlink:hover { color: var(--accent); }
.tlink .btn-arrow { display: inline-block; transition: transform 0.2s ease; }
.tlink:hover .btn-arrow { transform: translateX(4px); }
.tcard { transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.tcard:hover { border-color: var(--accent); transform: translateY(-3px); }
.rowline .grow { flex: 1; min-width: 0; }
.rowline .t { font-weight: 700; }
.rowline .s { font-size: 0.85rem; color: var(--ink-soft); }
.num { font-family: var(--font-h); font-weight: 800; font-size: 1.25rem; color: var(--accent); white-space: nowrap; }
.pos { font-family: var(--font-h); font-weight: 800; font-size: 1.3rem; min-width: 2.2rem; text-align: center; color: var(--muted); }
.pos-1, .pos-2, .pos-3 { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; }
.pos-1 { background: linear-gradient(135deg, #FFD34D, #E09B00); }
.pos-2 { background: linear-gradient(135deg, #D7DEE8, #8FA0B5); }
.pos-3 { background: linear-gradient(135deg, #E8A87C, #B5651D); }

/* Пилюли, бейджи */
.pill { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.8rem; color: var(--ink-soft); white-space: nowrap; }
.pill-open { border-color: var(--green); color: var(--green); }
.pill-shut { border-color: var(--red); color: var(--red); }
.pill-pink { border-color: var(--pink); color: var(--pink); }
.pill-gold { border-color: var(--gold); color: var(--gold); }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; align-items: center; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #04263E; font-size: 0.75rem; font-weight: 700; }

/* Формы */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.4rem; }
.input, select.input, textarea.input { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.branch-pick { display: grid; gap: 0.6rem; }
.branch-pick input { position: absolute; opacity: 0; pointer-events: none; }
.branch-card { display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.branch-pick input:checked + .branch-card { border-color: var(--accent); background: var(--accent-soft); }
.branch-pick input:focus-visible + .branch-card { box-shadow: 0 0 0 3px var(--accent-soft); }
.branch-card b { display: block; font-family: var(--font-h); text-transform: uppercase; font-size: 0.9rem; }
.branch-card span { font-size: 0.85rem; color: var(--ink-soft); }

/* Выбор карточками + чипы (бронь, запись на турнир) */
.step-no { font-family: var(--font-h); font-weight: 800; color: var(--accent); margin-right: 0.5rem; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.75rem; }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-card { display: flex; gap: 0.7rem; align-items: flex-start; height: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; cursor: pointer; background: var(--card); transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease; }
.pick-card:hover { border-color: var(--accent); }
.pick input:checked + .pick-card { border-color: var(--accent); background: var(--accent-soft); }
.pick input:focus-visible + .pick-card { box-shadow: 0 0 0 3px var(--accent-soft); }
.pick .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; margin-top: 1px; position: relative; transition: border-color 0.15s ease; }
.pick input:checked + .pick-card .radio { border-color: var(--accent); }
.pick input:checked + .pick-card .radio::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.pick-card b { display: block; font-family: var(--font-h); text-transform: uppercase; font-size: 0.85rem; line-height: 1.25; }
.pick-card span { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.4; }
.chip-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chip { border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 0.65rem 1.25rem; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all 0.15s ease; }
.chip-pick input:checked + .chip { background: linear-gradient(135deg, #2FB3F5, #0077B6); border-color: transparent; color: #FFFFFF; box-shadow: 0 0 18px rgba(56, 168, 232, 0.4); }
.chip-pick input:focus-visible + .chip { box-shadow: 0 0 0 3px var(--accent-soft); }
.day-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; margin-bottom: 0.7rem; }
.day-chip { border: 1px dashed var(--muted); background: none; border-radius: 999px; padding: 0.45rem 1rem; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all 0.15s ease; }
.day-chip:hover, .day-chip.on { border-style: solid; border-color: var(--accent); color: var(--accent); }
@media (max-width: 420px) {
    .pick-grid { grid-template-columns: 1fr; }
}

/* Профиль */
.profile-head { display: flex; align-items: center; gap: 1.1rem; }
.avatar-big { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); flex-shrink: 0; }
.avatar-big.def { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-family: var(--font-h); font-weight: 800; font-size: 2rem; }
.avatar-sm { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm.def { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px dashed var(--border); font-size: 0.95rem; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; text-align: right; }

/* QR */
.qr-box { text-align: center; }
.qr-box img { width: min(280px, 70vw); margin: 1rem auto; border: 3px solid var(--accent); border-radius: var(--radius); background: #fff; padding: 8px; }
.qr-code { display: inline-block; background: var(--bg-soft); border-radius: 8px; padding: 0.4rem 0.9rem; font-weight: 700; letter-spacing: 0.05em; }

/* Чаты в духе Telegram */
.chat-list .rowline { text-decoration: none; }
.tg-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; margin-bottom: 0.75rem; }
.tg-back { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }
.tg-name { font-family: var(--font-h); font-weight: 700; text-transform: uppercase; font-size: 0.95rem; }
.tg-sub { font-size: 0.78rem; color: var(--muted); }
.bubble-wrap { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.75rem; max-height: 55vh; overflow-y: auto; padding: 0.25rem; }
.bubble-wrap.tg { background-color: var(--bg-soft); background-image: radial-gradient(rgba(127, 178, 240, 0.09) 1px, transparent 1.4px); background-size: 22px 22px; border-radius: 16px; padding: 1rem 0.75rem; }
.day-div { text-align: center; margin: 0.4rem 0; }
.day-div span { display: inline-block; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.9rem; border-radius: 999px; }
.msg { position: relative; max-width: 78%; padding: 0.55rem 3.4rem 0.55rem 0.9rem; border-radius: 18px; font-size: 0.95rem; line-height: 1.45; overflow-wrap: break-word; animation: messageAppear 0.3s ease; }
@keyframes messageAppear { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.msg .meta { position: absolute; right: 0.6rem; bottom: 0.4rem; font-size: 0.68rem; display: inline-flex; align-items: center; gap: 2px; opacity: 0.85; }
.msg.mine { align-self: flex-end; background: var(--accent); color: #FFFFFF; border-bottom-right-radius: 5px; box-shadow: 0 2px 8px rgba(0, 119, 182, 0.25); }
.msg.mine .meta { color: rgba(255, 255, 255, 0.9); }
.msg .ticks { font-size: 0.75rem; letter-spacing: -0.15em; }
.msg .ticks.rd { color: #4DFFFF; }
.msg.theirs { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.theirs .meta { color: var(--muted); }
.tg-send { display: flex; gap: 0.5rem; align-items: center; position: sticky; bottom: 0; background: var(--bg); padding: 0.5rem 0; }
.tg-send .input { flex: 1; border-radius: 999px; background: var(--card); }
.tg-fab { width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; background: var(--accent); color: #FFFFFF; font-size: 1.35rem; line-height: 1; flex-shrink: 0; box-shadow: 0 8px 22px rgba(0, 119, 182, 0.35); transition: transform 0.15s ease, background 0.2s ease; }
.tg-fab:hover { background: var(--accent-dark); }
.tg-fab:active { transform: scale(0.9); }

/* Таблицы админки */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
.tbl th { background: var(--accent-dark); color: white; text-align: left; padding: 0.7rem 0.9rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; }
.tbl td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); }
.tbl tr:last-child td { border-bottom: none; }
.inline-form { display: inline; }

/* Алерты и тосты */
.flash-wrap { max-width: 960px; margin: 1rem auto 0; padding: 0 var(--pad); }
.alert { padding: 0.9rem 1.1rem; border-radius: var(--radius); margin-bottom: 0.6rem; font-size: 0.92rem; border-left: 4px solid; background: var(--card); border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.alert-success { border-left-color: var(--green); }
.alert-error { border-left-color: var(--red); }
.alert-info { border-left-color: var(--accent); }

/* Футер */
.footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 1.5rem 0 7rem; color: var(--muted); font-size: 0.82rem; }
.footer-in { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Правка турнира: форма + живое превью */
.edit-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1rem; align-items: start; }
.preview-stick { position: sticky; top: 84px; }
@media (max-width: 900px) {
    .edit-grid { grid-template-columns: 1fr; }
    .preview-stick { position: static; }
}

/* Карточки турниров: картинка сверху, текст снизу */
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tcard2 { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; text-decoration: none; transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s, box-shadow 0.35s; }
.tcard2:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 28px rgba(56, 168, 232, 0.18); }
.tcard2-img { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-soft); display: block; }
.tcard2-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.tcard2-img.map { background: #FFFFFF; }
.tcard2-img.map img { object-fit: contain; padding: 12px; }
.tcard2-img.fade::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(to top, var(--card) 8%, rgba(18, 36, 65, 0)); pointer-events: none; }
.tcard2-img .toverlay, .tcard2-img .tcard2-status { z-index: 1; }
.tcard2.on { border-color: var(--accent); background: var(--accent-soft); }
.tcard2-img.letters { background: linear-gradient(135deg, #002146, #0077B6); display: flex; align-items: center; justify-content: center; }
.tcard2-img.letters span { font-family: var(--font-h); font-weight: 800; font-size: 1.6rem; color: #FFFFFF; text-transform: uppercase; letter-spacing: 0.04em; }
.tcard2:hover .tcard2-img img { transform: scale(1.05); }
.tcard2-img .toverlay { position: absolute; top: 0.75rem; left: 0.75rem; }
.tcard2-status { position: absolute; top: 0.75rem; right: 0.75rem; font-family: var(--font-h); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.3rem 0.7rem; border-radius: 999px; background: rgba(0, 33, 70, 0.72); color: #FFFFFF; backdrop-filter: blur(6px); }
.tcard2-status.ok { background: var(--green); }
.tcard2-status.live { background: var(--green); animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(43, 217, 138, 0.5); } 50% { box-shadow: 0 0 0 7px rgba(43, 217, 138, 0); } }
.tcard2-status.shut { background: rgba(0, 33, 70, 0.55); }
.tcard2-status.gold { background: rgba(154, 115, 0, 0.85); }
.tcard2-body { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 1.1rem 1.1rem; }
.tcard2-body b { font-family: var(--font-h); text-transform: uppercase; font-size: 0.95rem; line-height: 1.2; }
.tcard2-meta { font-size: 0.82rem; color: var(--ink-soft); }
.tcard2-prize { font-family: var(--font-h); font-weight: 700; font-size: 0.9rem; color: var(--accent); }
@media (max-width: 768px) {
    .tgrid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .tcard2-body { padding: 0.75rem 0.8rem 0.85rem; }
    .tcard2-body b { font-size: 0.8rem; }
    .tcard2-meta { font-size: 0.72rem; }
    .tcard2-prize { font-size: 0.8rem; }
    .tcard2-img .toverlay { top: 0.5rem; left: 0.5rem; font-size: 0.6rem; }
    .tcard2-status { top: 0.5rem; right: 0.5rem; font-size: 0.55rem; }
}

/* Ачивки */
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.ach { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 0.9rem 0.5rem; text-align: center; display: flex; flex-direction: column; gap: 0.15rem; }
.ach-ic { font-family: var(--font-h); font-weight: 800; color: var(--accent); font-size: 1.1rem; }
.ach b { font-family: var(--font-h); font-size: 0.78rem; text-transform: uppercase; }
.ach span:last-child { font-size: 0.72rem; color: var(--ink-soft); }
.ach.locked { border-color: var(--border); background: none; opacity: 0.5; }
.ach.locked .ach-ic { color: var(--muted); }
@media (max-width: 768px) {
    .ach-grid { grid-template-columns: 1fr 1fr; }
}

/* Окно сканера QR */
#qrReader { overflow: hidden; border-radius: 12px; border: 1px solid var(--border); background: #000; }
#qrReader video { width: 100%; display: block; border-radius: 12px; }

/* Фирменное с лендинга: кикеры, бегущая строка, proof */
.section-number { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.section-number::before { content: ''; width: 30px; height: 1px; background: var(--accent); }
.marquee { padding: 1.25rem 0; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 calc(var(--pad) * -1); }
.marquee-inner { display: inline-flex; white-space: nowrap; will-change: transform; }
.marquee-item { font-family: var(--font-h); font-size: 1.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: -0.02em; color: var(--muted); margin-right: 3rem; }
.marquee-item .dot { display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; margin-left: 3rem; vertical-align: middle; }
.hero-proof { margin-top: 1.25rem; font-size: 0.9rem; color: var(--ink-soft); }
.hero-proof-stars { color: var(--gold); letter-spacing: 0.1em; margin-right: 4px; }
.bonus::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(0, 119, 182, 0.35), transparent 65%); pointer-events: none; }
.bonus > * { position: relative; }
.stat-val { font-family: var(--font-h); font-weight: 700; font-size: 2.2rem; line-height: 1; margin-top: 0.25rem; color: var(--accent); }
.stat-lab { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); font-weight: 500; margin-top: 0.25rem; }

/* Таббар */
.tabbar { display: none; }
@media (max-width: 768px) {
    .topnav { display: none; }
    .feats, .stats-row { grid-template-columns: 1fr 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
    .footer { padding-bottom: 8.5rem; }
    .tg-send { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
    .bubble-wrap { max-height: 52vh; }
    .tabbar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: rgba(10, 22, 40, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px); }
    .tabbar-row { position: relative; display: flex; align-items: stretch; justify-content: space-around; height: 66px; }
    .tabbar .tab { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; min-width: 52px; border-radius: 16px; transition: color 0.2s ease, background 0.2s ease; }
    .tabbar .tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .tabbar .tab.active { color: var(--accent); background: var(--accent-soft); }
    .tab-fab { position: relative; z-index: 1; align-self: center; width: 60px; height: 60px; margin: -24px 2px 0; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-family: var(--font-b); font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; box-shadow: 0 10px 28px rgba(0, 119, 182, 0.3); animation: tabfabPulse 2.6s ease-in-out infinite; }
    .tab-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .tab-fab:active { transform: scale(0.92); }
    @keyframes tabfabPulse { 0%, 100% { box-shadow: 0 0 26px rgba(56, 168, 232, 0.55), 0 10px 28px rgba(0, 119, 182, 0.3); } 50% { box-shadow: 0 0 44px rgba(56, 168, 232, 0.7), 0 10px 36px rgba(0, 119, 182, 0.35), 0 0 0 10px rgba(239, 47, 162, 0.12); } }
}

/* ===== Motion pass: появление страниц, stagger, shimmer, confetti ===== */
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page { animation: pageIn 0.35s ease; }
.btn:active { transform: scale(0.96); }
.btn.busy { opacity: 0.8; pointer-events: none; }
.btn.busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #FFFFFF; animation: spinBtn 0.7s linear infinite; }
.btn-secondary.busy::after, .btn-danger.busy::after { border-color: rgba(0, 119, 182, 0.25); border-top-color: var(--accent); }
@keyframes spinBtn { to { transform: rotate(360deg); } }
.alert { animation: alertIn 0.35s cubic-bezier(0.34, 1.4, 0.64, 1); }
@keyframes alertIn { from { opacity: 0; transform: translateY(-12px) scale(0.98); } to { opacity: 1; transform: none; } }
.rv { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.rv.in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2) { transition-delay: 0.07s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.14s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.21s; }
.stagger.in > *:nth-child(n+5) { transition-delay: 0.28s; }
.shine { position: relative; overflow: hidden; }
.shine::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%); animation: shine 3.4s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0% { transform: translateX(-55%); } 55%, 100% { transform: translateX(55%); } }
.confetti-cv { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .page, .alert { animation: none; }
    .rv, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
    .shine::after { display: none; }
}

/* ===== Неон: розовый + синий ===== */
.logo { text-shadow: 0 0 18px rgba(56, 168, 232, 0.45); }
.logo-z7 { text-shadow: 0 0 18px rgba(239, 47, 162, 0.6); }
.page-title { text-shadow: 0 0 28px rgba(56, 168, 232, 0.28); }
.section-number::before { box-shadow: 0 0 8px var(--accent); }
.marquee-item .dot { box-shadow: 0 0 10px var(--accent); }
.tabbar .tab.active { box-shadow: inset 0 0 18px rgba(56, 168, 232, 0.16), 0 0 16px rgba(56, 168, 232, 0.22); }
a.card:hover { box-shadow: 0 0 30px rgba(56, 168, 232, 0.16); }
.pill-pink { box-shadow: 0 0 14px rgba(239, 47, 162, 0.35); }
.pill-open { box-shadow: 0 0 14px rgba(43, 217, 138, 0.3); }
.avatar-big { box-shadow: 0 0 22px rgba(56, 168, 232, 0.35); }
.stat-val, .num { text-shadow: 0 0 22px rgba(56, 168, 232, 0.35); }
.pos-1 { box-shadow: 0 0 18px rgba(255, 184, 0, 0.55); }
.ticket-stamp { box-shadow: 0 0 14px rgba(239, 47, 162, 0.4); }
.msg.mine { box-shadow: 0 0 18px rgba(56, 168, 232, 0.35); }
.input:focus { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 18px rgba(56, 168, 232, 0.25); }
.qr-box img { box-shadow: 0 0 30px rgba(56, 168, 232, 0.28); }
.count-badge { box-shadow: 0 0 12px rgba(56, 168, 232, 0.5); }
@media (prefers-reduced-motion: reduce) {
    .logo, .logo-z7, .page-title, .stat-val, .num { text-shadow: none; }
}
