/* Joinmatch — стили. Палитра и шрифты по брендбуку: чёрный, оранжевый, светлый; Anton / Oswald + Archivo. */
:root {
  --bg: #1b1b1d;
  --bg-deep: #141416;
  --card: #262628;
  --raised: #333336;
  --line: #3a3a3e;
  --text: #ffffff;
  --muted: #b3b1ab;
  --orange: #ff5a1f;
  --ink: #111111;
  --wa: #25d366;
  --display: Anton, Oswald, 'Arial Narrow', sans-serif;
  --logo: Anton, Oswald, sans-serif;
  --body: Archivo, Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); text-wrap: pretty; overflow-wrap: break-word; }
img { max-width: 100%; display: block; }
a { color: var(--orange); }
a:hover { color: #ff8a5c; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 900px) { .wrap { padding: 0 40px; } }

h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0.3px; text-transform: uppercase; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 9vw, 76px); line-height: 1.03; }
h2 { font-size: clamp(26px, 4vw, 40px); line-height: 1.05; }
.accent { color: var(--orange); }
.muted { color: var(--muted); }
.section { padding-top: clamp(32px, 6vw, 80px); }

/* Логотип-билет */
.logo { display: inline-flex; align-items: stretch; background: var(--orange); border-radius: 6px; font-family: var(--logo); font-size: 24px; line-height: 1; letter-spacing: 1px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo span { padding: 7px 9px 7px 10px; }
.logo i { border-left: 2px dashed var(--ink); margin: 4px 0; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 24px; border-radius: 14px; border: 0; font: 800 16px var(--body); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--orange); color: var(--ink); border: 3px solid #141414; box-shadow: 0 5px 0 #000; }
.btn-primary:hover { color: var(--ink); filter: brightness(1.06); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text); border: 2px solid var(--text); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.btn-wa { background: var(--wa); color: #0b2414; border: 3px solid #141414; box-shadow: 0 5px 0 var(--orange); }
.btn-wa:hover { color: #0b2414; }
.btn-big { min-height: 62px; font-family: var(--display); font-weight: 400; font-size: 22px; text-transform: uppercase; }
.btn-block { display: flex; width: 100%; }
.btn[aria-disabled='true'], .btn:disabled { opacity: 0.5; pointer-events: none; box-shadow: none; }

/* Шапка */
.top { background: var(--bg-deep); border-bottom: 3px solid var(--orange); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.nav { display: flex; align-items: center; gap: 22px; font-weight: 700; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--orange); }
.nav .hide-s { display: none; }
@media (min-width: 720px) { .nav .hide-s { display: inline-flex; } }

/* Первый экран */
.hero { position: relative; background: var(--bg-deep); border-bottom: 3px solid var(--orange); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: 0.3; }
.hero-shade { position: absolute; inset: 0; background: rgba(20, 20, 22, 0.5); }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; display: grid; gap: 32px; padding-top: 28px; padding-bottom: 40px; align-items: center; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.lead { margin: 0; font-size: clamp(17px, 2vw, 20px); font-weight: 700; line-height: 1.45; max-width: 34ch; }
.sticker { display: inline-block; background: var(--orange); color: var(--ink); font-family: var(--display); font-weight: 400; font-size: clamp(20px, 2.4vw, 26px); line-height: 1; text-transform: uppercase; padding: 13px 20px; border-radius: 999px; transform: rotate(-3deg); box-shadow: 0 5px 0 #000; }
.sticker s { opacity: 0.6; font-size: 0.78em; margin-right: 6px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.seg { display: inline-flex; gap: 6px; background: rgba(255, 255, 255, 0.08); padding: 6px; border-radius: 16px; }
.seg a { min-height: 50px; padding: 0 26px; display: inline-flex; align-items: center; border-radius: 12px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 400; font-size: 21px; text-transform: uppercase; }
.seg a[aria-current='true'] { background: #fff; color: var(--ink); }
.hero-photo { position: relative; display: none; height: 460px; border-radius: 24px; overflow: hidden; border: 3px solid var(--orange); box-shadow: 0 8px 0 var(--orange); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .sticker { position: absolute; left: 20px; bottom: 22px; transform: rotate(-4deg); box-shadow: 0 5px 0 var(--ink); }
@media (min-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding-top: 44px; padding-bottom: 64px; }
  .hero-photo { display: block; }
  .hero-bg, .hero-shade { display: none; }
}

/* Карточки игр */
.games { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-top: 20px; }
.game { background: var(--card); border: 3px solid var(--orange); box-shadow: 0 6px 0 var(--orange); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.game-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chip { display: inline-block; background: var(--orange); color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; padding: 4px 10px; border-radius: 8px; }
.time { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 38px); line-height: 1; margin-top: 6px; }
.price { font-family: var(--display); font-weight: 400; font-size: 24px; white-space: nowrap; }
.seats { display: flex; justify-content: space-between; font-size: 14px; }
.seats b { font-weight: 800; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--orange); border-radius: 4px; }
.game-foot { display: flex; justify-content: flex-end; }
.promo { background: var(--orange); color: var(--ink); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.promo h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.05; text-transform: uppercase; }
.promo p { margin: 0; font-weight: 600; }
.promo .row { display: flex; gap: 10px; flex-wrap: wrap; }
.promo .btn { min-height: 46px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.promo .dark { background: var(--ink); color: #fff; }
.promo .line { border: 2px solid var(--ink); color: var(--ink); background: transparent; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 20px; padding: 24px; color: var(--muted); }

/* Шаги */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 22px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .n { font-family: var(--logo); font-size: 64px; line-height: 0.9; color: var(--orange); min-width: 66px; }
.step h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; line-height: 1.2; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (min-width: 900px) { .step { flex-direction: column; gap: 8px; } .step .n { font-size: 96px; } .step h3 { font-size: 24px; } }

/* Галерея */
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px -20px 0; padding: 0 20px 10px; }
.gallery img { flex: 0 0 min(82%, 420px); height: 300px; object-fit: cover; border-radius: 18px; border: 2px solid var(--line); scroll-snap-align: center; }
@media (min-width: 900px) { .gallery { margin: 22px 0 0; padding: 0 0 10px; } }

/* Факты и вопросы */
.two { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.facts { list-style: none; margin: 16px 0 0; padding: 0; border-top: 2px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 2px solid var(--line); }
.facts span:first-child { color: var(--muted); }
.facts span:last-child { font-weight: 700; text-align: right; }
.faq details { border-bottom: 2px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 17px; }
.faq p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* Группа города и подвал */
.band { margin-top: clamp(40px, 6vw, 80px); background: #111; }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.band p { margin: 8px 0 0; color: var(--muted); }
.band .row { display: flex; flex-wrap: wrap; gap: 12px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; padding-bottom: 30px; font-size: 14px; color: var(--muted); }
.foot a { color: var(--muted); }

/* Страница игры и «Спасибо» */
.back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; }
.cols { display: grid; gap: 28px; align-items: start; padding-bottom: 40px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; } .sticky { position: sticky; top: 20px; } }
.photo { height: clamp(190px, 30vw, 320px); border-radius: 20px; overflow: hidden; border: 2px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 72%; }
.title-s { font-size: clamp(30px, 5vw, 48px); margin-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags span { background: var(--raised); padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.card + .card { margin-top: 14px; }
.rows { display: flex; flex-direction: column; gap: 12px; }
.rows > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.rows > div > span:first-child { color: var(--muted); }
.rows > div > span:last-child { font-weight: 700; text-align: right; }
.big { font-size: 22px; font-weight: 800; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.alert { background: var(--orange); color: var(--ink); border-radius: 14px; padding: 14px 16px; font-weight: 700; margin-bottom: 14px; }
.ticket { background: var(--orange); color: var(--ink); border-radius: 20px; box-shadow: 0 8px 0 #000; }
.ticket-top { padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.ticket-when { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 36px; line-height: 1.05; }
.ticket-cut { position: relative; border-top: 3px dashed var(--ink); margin: 0 12px; }
.ticket-cut::before, .ticket-cut::after { content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.ticket-cut::before { left: -23px; } .ticket-cut::after { right: -23px; }
.ticket-bottom { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ticket-bottom div { display: flex; justify-content: space-between; gap: 12px; }
.ticket-bottom b { font-weight: 800; }
.check { width: 64px; height: 64px; border-radius: 32px; background: var(--orange); display: flex; align-items: center; justify-content: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Кабинет организатора */
.form { display: grid; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.form input, .form select, .form textarea { min-height: 46px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 15px var(--body); }
.form .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.list-row { display: flex; align-items: center; gap: 10px; min-height: 56px; border-bottom: 1px solid var(--line); }
.list-row .who { flex: 1 1 auto; min-width: 0; }
.list-row .who small { display: block; color: var(--muted); font-size: 12px; }
.toggle { min-width: 92px; min-height: 44px; border-radius: 12px; border: 1px solid #4a4a4e; background: transparent; color: var(--muted); font: 700 13px var(--body); cursor: pointer; }
.toggle[aria-pressed='true'] { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.tile b { display: block; font-family: var(--logo); font-size: 26px; font-weight: 400; line-height: 1.1; }
.tile span { font-size: 11px; color: var(--muted); }
.msg { min-height: 22px; font-size: 14px; color: var(--orange); font-weight: 700; }
.admin-game { cursor: pointer; text-align: left; width: 100%; color: inherit; font: inherit; }
.admin-game[aria-current='true'] { border-color: var(--orange); }

/* Галерея: заголовок с подсказкой и наклейка на первом фото */
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gallery .shot { position: relative; flex: 0 0 min(82%, 420px); height: 300px; border-radius: 18px; overflow: hidden; border: 2px solid var(--line); scroll-snap-align: center; }
.gallery .shot img { width: 100%; height: 100%; flex: none; border: 0; border-radius: 0; }
.gallery .shot .sticker { position: absolute; left: 14px; bottom: 16px; font-size: 19px; padding: 11px 16px; transform: rotate(-4deg); box-shadow: 0 5px 0 var(--ink); }
.photo { position: relative; }
.photo .label { position: absolute; left: 16px; bottom: 14px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.total b { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; }
.narrow { max-width: 560px; margin: 0 auto; padding-bottom: 48px; }

/* Аккаунт игрока: ссылка в шапке, профиль, карточка */
.nav .account { border: 2px solid var(--text); border-radius: 12px; padding: 0 14px; white-space: nowrap; }
.nav .account:hover { border-color: var(--orange); }
.me { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.me-photo { width: 72px; height: 72px; flex: none; border-radius: 50%; border: 3px solid var(--orange); object-fit: cover; background: var(--raised); display: flex; align-items: center; justify-content: center; font: 400 28px var(--logo); }
.mygame + .mygame { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.mygame { margin-top: 12px; }
.levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.levels div { background: var(--raised); border-radius: 10px; padding: 8px 6px; text-align: center; border: 2px solid transparent; }
.levels div.on { border-color: var(--orange); }
.levels b { display: block; font-size: 12px; line-height: 1.2; }
.levels span { font-size: 11px; color: var(--muted); }
.invite { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; background: var(--raised); border-radius: 12px; padding: 6px 6px 6px 14px; }
.invite code { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 14px var(--body); }

/* Карточка игрока: свой дизайн в форме билета, цвет зависит от уровня */
.pcard { --c-bg: #f3eee3; --c-ink: #111111; --c-accent: #ff5a1f; --c-line: #111111; width: min(100%, 300px); margin: 14px auto 0; padding: 18px 18px 16px; border-radius: 22px 22px 54px 54px / 22px 22px 40px 40px; background: var(--c-bg); color: var(--c-ink); border: 4px solid var(--c-line); box-shadow: 0 8px 0 #000; text-align: center; }
.pcard.lv1 { --c-bg: #8a857c; --c-ink: #111111; --c-accent: #ffffff; }
.pcard.lv2 { --c-bg: #ff5a1f; --c-ink: #111111; --c-accent: #ffffff; }
.pcard.lv3 { --c-bg: #111111; --c-ink: #ffffff; --c-accent: #ff5a1f; --c-line: #ff5a1f; }
.pcard-top { display: flex; justify-content: space-between; align-items: flex-start; }
.pcard-games { text-align: left; line-height: 1; }
.pcard-games b { display: block; font: 400 54px/0.95 var(--logo); }
.pcard-games span { font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.pcard-logo { display: inline-flex; align-items: stretch; border: 2px solid var(--c-ink); border-radius: 5px; font: 400 14px/1 var(--logo); letter-spacing: 1px; }
.pcard-logo span { padding: 4px 6px; }
.pcard-logo i { border-left: 2px dashed var(--c-ink); margin: 3px 0; }
.pcard-photo { width: 120px; height: 120px; margin: 4px auto 0; border-radius: 50%; object-fit: cover; border: 4px solid var(--c-ink); background: var(--c-accent); color: var(--c-bg); display: flex; align-items: center; justify-content: center; font: 400 46px var(--logo); }
.pcard.lv0 .pcard-photo, .pcard.lv3 .pcard-photo { color: #111111; }
.pcard-name { font: 400 26px/1.1 var(--display); text-transform: uppercase; margin-top: 12px; }
.pcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 12px; padding: 10px 0; border-top: 2px dashed var(--c-ink); border-bottom: 2px dashed var(--c-ink); }
.pcard-stats b { display: block; font: 400 24px/1 var(--logo); }
.pcard-stats span { font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.pcard-level { display: inline-block; margin-top: 12px; padding: 5px 12px; border-radius: 8px; background: var(--c-ink); color: var(--c-bg); font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.pcard.lv3 .pcard-level { background: var(--c-accent); color: #111111; }
.pcard-season { margin-top: 8px; font-size: 10px; font-weight: 800; letter-spacing: 2px; opacity: 0.7; }
