/* OSS — тёмный бойцовский стиль в цветах Ataman Fight Club */
:root {
  --gold: #FFD700;
  --fire: #FF4500;
  --dark: #0a0a0a;
  --dark2: #111;
  --dark3: #1a1a1a;
  --text: #F0E8D0;
  --muted: #8a8070;
  --border: rgba(255, 215, 0, .15);
  --ok: #3ccf6e;
  --bad: #ff4d4d;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--dark); color: var(--text); }
body { font: 16px/1.45 'Noto Sans', system-ui, sans-serif; padding-bottom: calc(76px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
a { color: var(--gold); text-decoration: none; }
h1, h2, h3, .logo, .hero-title, .btn, .tabs a, .tabbar a, .stats b { font-family: 'Oswald', sans-serif; letter-spacing: .02em; }
h1 { font-size: 28px; margin: 0 0 6px; text-transform: uppercase; line-height: 1.1; }
h2.sec { font-size: 15px; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }
h3 { margin: 0 0 8px; font-size: 18px; }
p { margin: 0 0 10px; }
small, .muted, .hint { color: var(--muted); }
.hint { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }

.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: rgba(10, 10, 10, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.logo { font-size: 24px; font-weight: 700; color: var(--gold); letter-spacing: .12em; }
.me { color: var(--text); font-size: 14px; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }

.card { display: block; background: var(--dark2); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 10px; color: var(--text); }
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.flash { background: rgba(255, 215, 0, .12); border: 1px solid var(--gold); color: var(--gold); padding: 12px 14px; border-radius: var(--r); margin-bottom: 14px; }
.err { color: var(--bad); }
.hero { text-align: center; padding: 36px 0 22px; }
.hero-title { font-size: 44px; font-weight: 700; color: var(--gold); text-transform: uppercase; line-height: 1; text-shadow: 0 0 30px rgba(255, 69, 0, .35); }
.hero p { color: var(--muted); margin-top: 10px; }

.btn { display: block; width: 100%; padding: 14px 18px; margin: 8px 0; border: 0; border-radius: 12px; background: var(--gold); color: #111; font-size: 17px; font-weight: 600; text-align: center; text-transform: uppercase; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn-fire { background: linear-gradient(135deg, var(--fire), #ff8a00); color: #fff; }
.btn-ghost { background: transparent; color: var(--gold); border: 1px solid var(--border); }
.btn.sm { display: inline-block; width: auto; padding: 9px 14px; font-size: 14px; margin: 0; }
.btn.danger { color: var(--bad); border-color: rgba(255, 77, 77, .35); }
.btn.sticky { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); }

.form label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
input, select { display: block; width: 100%; margin-top: 4px; padding: 12px; background: var(--dark3); color: var(--text); border: 1px solid var(--border); border-radius: 10px; font: inherit; }
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
.check { display: flex !important; gap: 10px; align-items: flex-start; color: var(--text) !important; font-size: 14px !important; }
.check input { width: auto; margin: 3px 0 0; }
.row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.seg { display: flex; gap: 8px; margin-bottom: 12px; }
.seg label { flex: 1; margin: 0; }
.seg input { display: none; }
.seg span { display: block; text-align: center; padding: 11px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.seg input:checked + span { border-color: var(--gold); background: rgba(255, 215, 0, .1); color: var(--gold); }
.copy { display: flex; gap: 8px; align-items: center; }
.copy input, .copy select { margin: 0; flex: 1; min-width: 0; }
.inline { display: inline-block; }
.actions { display: flex; gap: 6px; margin-top: 10px; }
.stack .btn { margin: 6px 0; }
.geo-box { border: 1px dashed var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; font-size: 14px; }

.me-card { display: flex; gap: 16px; align-items: center; padding: 18px; background: radial-gradient(circle at 20% 0, rgba(255, 69, 0, .18), transparent 60%), var(--dark2); border: 1px solid var(--border); border-radius: 20px; }
.me-info { flex: 1; min-width: 0; }
.avatar { flex: none; border-radius: 50%; }
.char-full { flex: none; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); }
.char-crop { position: relative; display: inline-block; overflow: hidden; background: radial-gradient(circle at 50% 30%, #2a2418, var(--dark3)); border: 1px solid var(--border); }
.char-crop img { position: absolute; width: 340%; left: -120%; top: -6%; max-width: none; }
.me-card .char-full { width: 120px; height: 150px; margin: -10px -8px; }
.stats { display: flex; gap: 6px; margin-top: 10px; }
.stats div { flex: 1; background: var(--dark3); border-radius: 10px; padding: 6px 4px; text-align: center; }
.stats b { display: block; font-size: 20px; color: var(--gold); }
.stats span { font-size: 11px; color: var(--muted); }
.xp { margin-top: 10px; }
.xp-top { display: flex; justify-content: space-between; font-size: 13px; }
.xp-top b { color: var(--gold); font-family: 'Oswald', sans-serif; }
.xp-bar { height: 8px; background: var(--dark3); border-radius: 8px; overflow: hidden; margin-top: 4px; }
.xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--fire), var(--gold)); border-radius: 8px; }

.belt { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0; }
.belt-bar { position: relative; width: 74px; height: 14px; border-radius: 3px; background: var(--belt); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.belt-tip { position: absolute; right: 8px; top: 0; bottom: 0; width: 24px; background: #111; display: flex; gap: 2px; justify-content: flex-end; padding: 0 2px; }
.belt-tip.red { background: #c1121f; }
.belt-tip i { width: 3px; background: #fff; }
.belt-name { font-size: 13px; }
.unv { font-style: normal; color: var(--fire); font-size: 11px; }

.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); margin: 2px 4px 2px 0; }
.tag-owner { color: var(--gold); border-color: var(--gold); }
.tag-head_coach, .tag-coach { color: var(--fire); border-color: rgba(255, 69, 0, .5); }
.chip { display: inline-block; padding: 7px 12px; margin: 3px 4px 3px 0; border-radius: 20px; border: 1px solid var(--border); background: var(--dark3); color: var(--text); font: 13px 'Noto Sans', sans-serif; cursor: pointer; }
.chip.on { background: rgba(255, 215, 0, .15); border-color: var(--gold); color: var(--gold); }
.chip:disabled:not(.on) { opacity: .4; }
.badge-num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--fire); color: #fff; font-weight: 700; font-size: 13px; }
.badge-num.sm { min-width: 18px; height: 18px; font-size: 11px; }

.club-row { display: flex; align-items: center; gap: 10px; }
.club-row > div { flex: 1; }
.chev { color: var(--muted); font-size: 24px; }
.club-head { margin: 8px 0 14px; }
.person, .kid-row { display: flex; align-items: center; gap: 12px; }
.person > div { flex: 1; min-width: 0; }
.hist { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.hist:last-child { border: 0; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs a { flex: none; padding: 9px 14px; border-radius: 10px; color: var(--muted); text-transform: uppercase; font-size: 14px; }
.tabs a.on { background: var(--dark3); color: var(--gold); }
.perm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.perm-row select { width: 150px; margin: 0; padding: 8px; }
.qr { display: flex; justify-content: center; padding: 14px; background: #fff; border-radius: 12px; margin: 10px auto; width: fit-content; }
details summary { cursor: pointer; color: var(--gold); font-family: 'Oswald', sans-serif; text-transform: uppercase; }
details[open] summary { margin-bottom: 12px; }

.checkin-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.checkin-card .btn { margin: 4px 0 0; }
.checkin-card.done { border-color: var(--ok); }

/* Колода свайпов */
.deck { position: relative; height: 340px; margin: 6px 0 4px; touch-action: pan-y; user-select: none; }
.swipe { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 18px; text-align: center;
  background: linear-gradient(180deg, var(--dark3), var(--dark2)); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  transition: transform .26s ease, opacity .26s ease; --yes: 0; --no: 0; cursor: grab; }
.swipe h3 { font-size: 24px; margin: 8px 0 0; text-transform: uppercase; }
.swipe:nth-last-child(3) { transform: translateY(8px) scale(.97); }
.swipe:nth-last-child(4) { transform: translateY(16px) scale(.94); }
.swipe.out-right { transform: translateX(130%) rotate(18deg) !important; opacity: 0; }
.swipe.out-left { transform: translateX(-130%) rotate(-18deg) !important; opacity: 0; }
.stamp { position: absolute; top: 22px; padding: 4px 12px; border: 3px solid; border-radius: 8px; font: 700 22px 'Oswald', sans-serif; letter-spacing: .08em; }
.stamp.yes { left: 18px; color: var(--ok); transform: rotate(-12deg); opacity: var(--yes); }
.stamp.no { right: 18px; color: var(--bad); transform: rotate(12deg); opacity: var(--no); }
.deck-empty { position: absolute; inset: 0; display: grid; place-items: center; border: 1px dashed var(--border); border-radius: 22px; color: var(--muted); z-index: -1; }
.deck-btns { display: flex; justify-content: center; gap: 40px; margin: 12px 0 4px; }
.round { width: 66px; height: 66px; border-radius: 50%; border: 2px solid; background: var(--dark2); font-size: 28px; cursor: pointer; }
.round.yes { color: var(--ok); border-color: var(--ok); }
.round.no { color: var(--bad); border-color: var(--bad); }
.round:active { transform: scale(.92); }
.kudos { margin-top: 4px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; background: rgba(17, 17, 17, .96); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(8px); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.tabbar a span { font-size: 22px; line-height: 1.1; }
.tabbar a.on { color: var(--gold); }
.top-r { display: flex; align-items: center; gap: 14px; }
.lang { font-size: 13px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 20px; }
.alert { display: flex; justify-content: space-between; align-items: center; border-color: var(--fire); background: rgba(255, 69, 0, .1); }
.alert-card { border-color: var(--fire); }
.tag.live, .live { color: var(--fire); border-color: var(--fire); }
.league { display: inline-block; font: 600 13px 'Oswald', sans-serif; padding: 2px 10px; border-radius: 20px; margin: 4px 0; }
.league-bronze { background: rgba(205, 127, 50, .18); color: #e09a5a; }
.league-silver { background: rgba(192, 192, 192, .15); color: #d8d8d8; }
.league-gold { background: rgba(255, 215, 0, .15); color: var(--gold); }
.league-diamond { background: rgba(120, 220, 255, .15); color: #8fe3ff; }
.rank { width: 26px; font: 700 20px 'Oswald', sans-serif; color: var(--muted); text-align: center; }
.stamp-chip { display: inline-block; margin: 3px 6px 3px 0; padding: 6px 10px; border-radius: 10px; background: var(--dark3); font-size: 13px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.row-btns .btn { margin: 0; }
.hist-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.reg-form + .reg-form { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 10px; }

/* Сетка */
.bracket { display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 12px; }
.b-round { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; min-width: 170px; }
.b-match { display: block; background: var(--dark2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; color: var(--text); font-size: 13px; }
.b-match span { display: block; padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-match span + span { border-top: 1px solid rgba(255, 255, 255, .06); }
.b-match .win { color: var(--gold); font-weight: 700; }
.b-match.live { border-color: var(--fire); }
.b-match.bye { opacity: .5; }
.podium { display: grid; gap: 6px; }
.place { display: flex; gap: 10px; align-items: center; font: 600 17px 'Oswald', sans-serif; }

/* Табло */
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.clock { grid-column: 1 / -1; text-align: center; font: 700 64px/1 'Oswald', sans-serif; padding: 10px 0; color: var(--text); }
.clock.running { color: var(--gold); }
.clock.over { color: var(--bad); }
.net { grid-column: 1 / -1; text-align: center; font-size: 13px; color: var(--fire); min-height: 1em; }
.side { border-radius: 16px; padding: 12px; background: var(--dark2); border: 2px solid var(--border); }
.side-a { border-color: rgba(31, 95, 209, .7); }
.side-b { border-color: rgba(255, 69, 0, .6); }
.side.won { box-shadow: 0 0 0 3px var(--gold); }
.side-name { font: 600 16px 'Oswald', sans-serif; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-score { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; }
.side-score b { font: 700 56px/1 'Oswald', sans-serif; }
.side-score span { color: var(--muted); font-size: 14px; }
.side-score i { font-style: normal; color: var(--text); font-weight: 700; }
.side-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.side-btns button { padding: 14px 0; border-radius: 10px; border: 1px solid var(--border); background: var(--dark3); color: var(--text); font: 600 16px 'Oswald', sans-serif; cursor: pointer; }
.side-btns button:active { background: var(--gold); color: #111; }
.side-btns .pen { color: var(--bad); }
.board-ctl { grid-column: 1 / -1; }
.live-board .side-score b { font-size: 72px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: 90vw; padding: 12px 18px; border-radius: 12px; background: var(--gold); color: #111; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
