/* Дизайн-система: холодно-синяя, высокая читаемость. Текст на кнопках подобран по контрасту (WCAG AA). */
:root {
  --midnight: #0A1426;   /* фон */
  --navy: #142B49;       /* панели, карточки */
  --steel: #24496D;      /* границы, вторичные поверхности */
  --cold: #478CCB;       /* акцент, действия (текст на нём — midnight, 5.6:1) */
  --ice: #91CFFF;        /* ссылки, активные состояния */
  --frost: #EAF5FF;      /* основной текст */
  --muted: #A9C3DD;      /* вторичный текст (7.9:1 на midnight) */
  --ok: #6FE3B5; --warn: #FFC66B; --bad: #FF8F8F; /* состояния — всегда вместе с текстом/иконкой */
  --navy-2: #1A3558;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--midnight); color: var(--frost); font: 16px/1.5 var(--font); min-height: 100vh; }
a { color: var(--ice); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3.2vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
hr { border: 0; border-top: 1px solid var(--steel); margin: 16px 0; }
:focus-visible { outline: 3px solid var(--ice); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px;
  border: 1px solid transparent; font: 600 15px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .05s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--cold); color: var(--midnight); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ice { background: var(--ice); color: var(--midnight); }
.btn-ghost { background: transparent; color: var(--frost); border-color: var(--steel); }
.btn-ghost:hover { background: var(--navy-2); }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(255, 143, 143, .5); }
.btn-ok { background: var(--ok); color: var(--midnight); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 17px; }
.btn-block { width: 100%; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* Поверхности */
.card { background: var(--navy); border: 1px solid var(--steel); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.card-tight { padding: 12px; }
.panel { background: var(--navy-2); border-radius: 12px; padding: 12px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.grow { flex: 1; min-width: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Чипы состояний: цвет + иконка + текст */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--steel); color: var(--frost); background: rgba(36, 73, 109, .45); white-space: nowrap; }
.chip.info { color: var(--ice); border-color: rgba(145, 207, 255, .45); }
.chip.ok { color: var(--ok); border-color: rgba(111, 227, 181, .45); background: rgba(111, 227, 181, .08); }
.chip.warn { color: var(--warn); border-color: rgba(255, 198, 107, .45); background: rgba(255, 198, 107, .08); }
.chip.bad { color: var(--bad); border-color: rgba(255, 143, 143, .45); background: rgba(255, 143, 143, .08); }
.chip.live { color: var(--midnight); background: var(--ice); border-color: var(--ice); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Формы */
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--steel); background: var(--midnight);
  color: var(--frost); font: 16px var(--font); }
textarea { min-height: 88px; resize: vertical; }
input[type=checkbox] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--cold); }
.field { margin-bottom: 12px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(36, 73, 109, .6); color: var(--frost); font-size: 15px; margin: 0; }

/* Таблицы */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px; border-bottom: 1px solid var(--steel); }
.table td { padding: 10px 8px; border-bottom: 1px solid rgba(36, 73, 109, .55); vertical-align: middle; }
.table tr.me td { background: rgba(145, 207, 255, .08); }
.table-wrap { overflow-x: auto; }

/* Вкладки и сегменты */
.seg { display: inline-flex; background: var(--navy); border: 1px solid var(--steel); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { background: transparent; border: 0; color: var(--muted); padding: 8px 14px; border-radius: 9px; font: 600 14px var(--font); cursor: pointer; min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--steel); color: var(--frost); }

/* Состояния экрана */
.state { text-align: center; padding: 36px 16px; color: var(--muted); }
.state .icon { width: 40px; height: 40px; color: var(--ice); margin-bottom: 8px; }
.state h3 { color: var(--frost); }
.skel { background: linear-gradient(90deg, var(--navy) 0, var(--navy-2) 50%, var(--navy) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }
.net { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 90; display: none; }
.net.show { display: inline-flex; }
.toast-box { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--frost); color: var(--midnight); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.toast.bad { background: #FFD9D9; }

/* Диалог */
dialog { background: var(--navy); color: var(--frost); border: 1px solid var(--steel); border-radius: 18px; padding: 20px; width: min(94vw, 520px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(5, 10, 20, .7); }

/* Логотип */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .01em; color: var(--frost); text-decoration: none; font-size: 18px; }
.logo svg { width: 32px; height: 32px; }

/* Аватар */
.ava { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.ava-lg { width: 72px; height: 72px; }

/* Прогресс */
.bar { height: 8px; background: var(--midnight); border-radius: 99px; overflow: hidden; border: 1px solid var(--steel); }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cold), var(--ice)); }

/* Таймер (LIVE) */
.clock { font: 800 clamp(40px, 12vw, 64px)/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.blinds { font: 700 22px/1.1 var(--font); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* План запуска клуба */
.launch{margin-bottom:16px;border-color:rgba(233,185,73,.28);background:linear-gradient(180deg,rgba(233,185,73,.06),transparent 60%)}
.launch-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:flex-start}
.launch-head h3{margin:0 0 2px}
.launch-bar{height:6px;border-radius:99px;background:rgba(145,207,255,.12);margin:14px 0 6px;overflow:hidden}
.launch-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#E9B949,#35B8AE);transition:width .4s}
.launch-steps{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.launch-steps li{display:flex;align-items:center;gap:12px;padding:10px 4px;border-bottom:1px solid rgba(36,73,109,.5)}
.launch-steps li:last-child{border-bottom:0}
.launch-steps .ck{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:13px;border:1.5px solid rgba(145,207,255,.3);color:#A9C2DA}
.launch-steps .ck svg{width:15px;height:15px}
.launch-steps li.done .ck{background:#35B8AE;border-color:#35B8AE;color:#06201E}
.launch-steps li.done b{color:#8FA9C2;text-decoration:line-through;text-decoration-color:rgba(143,169,194,.5)}
.launch-steps li.next .ck{border-color:#E9B949;color:#E9B949}
.launch-steps small{display:block}
.launch-mini{display:flex;gap:12px;align-items:center;margin-bottom:14px;flex-wrap:wrap}
.bot-steps{margin:0 0 4px;padding-left:20px;color:#A9C2DA;display:grid;gap:4px}
@media (max-width:600px){.launch-steps li{flex-wrap:wrap}.launch-steps li .btn{margin-left:40px}}

/* Battle Pass сезона */
.bp-hero{background:radial-gradient(120% 140% at 100% 0%,rgba(233,185,73,.16),transparent 55%),linear-gradient(180deg,rgba(53,184,174,.08),transparent);border-color:rgba(233,185,73,.3)}
.bp-title{margin:4px 0 10px;font-size:28px}
.bp-title small{font-size:15px;color:var(--muted);font-weight:600}
.bp-lvl{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;font-size:26px;font-weight:800;color:#1A1405;background:linear-gradient(135deg,#F7D57E,#E9B949 55%,#B8862B);box-shadow:0 8px 24px rgba(233,185,73,.3)}
.bp-bar{height:12px;margin-bottom:8px}
.bp-bar>i,.bp-quest .bar>i{background:linear-gradient(90deg,#E9B949,#35B8AE)}
.bp-next{display:flex;gap:10px;align-items:center;margin-top:12px;padding:10px 12px;border-radius:12px;background:rgba(233,185,73,.08);border:1px solid rgba(233,185,73,.25)}
.bp-next svg{flex:none;color:#E9B949}
.bp-quest{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid rgba(36,73,109,.5)}
.bp-quest .bar{height:6px;margin-top:6px}
.bp-quest .ck{flex:none;width:26px;height:26px;border-radius:50%;border:1.5px solid rgba(145,207,255,.3);display:grid;place-items:center}
.bp-quest.done .ck{background:#35B8AE;border-color:#35B8AE;color:#06201E}
.bp-quest .ck svg{width:14px;height:14px}
.bp-q-r{display:flex;flex-direction:column;align-items:flex-end;min-width:56px}
.bp-q-r small{color:#E9B949;font-weight:700}
.bp-track{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:8px}
.bp-track li{display:flex;gap:12px;align-items:center;padding:10px 12px;border-radius:12px;border:1px solid rgba(36,73,109,.7)}
.bp-track .lv{flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-weight:800;background:rgba(145,207,255,.08);color:var(--muted)}
.bp-track li.got{border-color:rgba(53,184,174,.45);background:rgba(53,184,174,.07)}
.bp-track li.got .lv{background:#35B8AE;color:#06201E}
.bp-track li.next{border-color:rgba(233,185,73,.5)}
.bp-track li.next .lv{background:linear-gradient(135deg,#F7D57E,#E9B949);color:#1A1405}
html.in-tg .topbar{padding-top:var(--tg-content-safe-area-inset-top,0)}
.bp-hero > .row{flex-wrap:nowrap}
.bp-lvl{flex:none}
nav.seg{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
nav.seg::-webkit-scrollbar{display:none}
nav.seg > a{flex:none;white-space:nowrap}
