/* Шрифт Inter лежит на самом сервере (web/fonts), из интернета не грузится. Лицензия: fonts/Inter-LICENSE.txt */
@font-face { font-family: "Inter"; font-weight: 200; font-style: normal; font-display: swap; src: url("/fonts/Inter-ExtraLight.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 300; font-style: normal; font-display: swap; src: url("/fonts/Inter-Light.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Inter-Regular.woff2") format("woff2"); }

:root {
  --goldt: #E8B53A; --gold2t: #F2D27A; --gold: #E8B53A; --card: #16263D; --muted: #A9B7C9; --border: #26405F; --panel: #1C3150; --text: #F4F1EA; --muted2: #93A2B7; --bg: #0E1A2B; --panel2: #2E4A6E; --panel3: #1F3552; --text2: #D9DEE6; --gold2: #F2D27A; --muted3: #B8C2D0; --panel4: #3A5578; --panel5: #2A4A75; --panel6: #22385A; --panel7: #1E3354; --bg2: #0F1D30; --bg3: #0B1524; --disabled: #2E4562; --muted4: #7F8EA3; --bg4: #1A2233;
}
/* Мобильная вёрстка. Используем margin-inline/padding-inline, чтобы языки справа налево отображались правильно */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
}
[hidden] { display: none !important; }

.screen {
  max-width: 480px;
  margin-inline: auto;
  padding: 32px 20px;
  min-height: 100%;
}
.logo { font-size: 30px; margin: 0 0 24px; color: var(--goldt); text-align: center; }
h2 { font-size: 22px; margin: 0 0 16px; }
.muted { color: var(--muted); }
.hint { color: var(--gold2t); background: #2E2A1A; padding: 10px 12px; border-radius: 10px; font-size: 14px; }

.form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
label { font-weight: 600; }
input {
  font-size: 18px; padding: 14px; border: 1px solid var(--panel2); border-radius: 12px; background: var(--card); width: 100%;
}
.code-input { letter-spacing: 8px; text-align: center; font-size: 26px; }
.error { color: #FF7A7A; margin: 0; }

button { font-size: 17px; cursor: pointer; font-family: inherit; }
.primary {
  background: var(--gold); color: #fff; border: 0; border-radius: 12px; padding: 15px; font-weight: 600;
}
.primary:disabled { opacity: .5; }
.secondary {
  display: block; width: 100%; margin-top: 10px;
  background: var(--card); color: var(--goldt); border: 1px solid var(--panel2); border-radius: 12px; padding: 13px;
}
.link { background: none; border: 0; color: var(--goldt); padding: 8px 0; }

.lang-list { display: flex; flex-direction: column; gap: 8px; }
.lang-list button {
  text-align: start; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.lang-list button.suggested { border-color: var(--gold); border-width: 2px; font-weight: 600; }

/* Вкладки */
.home { padding: 0; display: flex; flex-direction: column; }
.tab-content { flex: 1; padding: 18px 20px 40px; }

/* Слайдер разделов под выбором вида спорта */
.top-bars { position: sticky; top: 0; z-index: 5; }


/* Полоса с названием «Спартакиада» на языке пользователя */
.brandbar { background: var(--gold); padding: 12px 16px 10px; text-align: center; }
.brand-title {
  font-size: 24px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.2;
  background: linear-gradient(90deg, #ffd34d, #fff3c4 50%, #ffd34d); -webkit-background-clip: text; background-clip: text;
  color: transparent; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

/* Выбор вида спорта - в профиле */
.sport-row { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.sport-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.sport-row select { width: 100%; margin: 0; font-weight: 600; }
.sport-row select.empty { color: #FF7A7A; }
.section-slider { display: flex; align-items: center; gap: 4px;
  background: var(--card); border-bottom: 1px solid var(--border); padding: 6px 8px; }
.section-slider .ss-arrow { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--goldt); padding: 0 8px; }
.section-slider .ss-arrow:disabled { color: var(--panel4); }
.section-slider .ss-side { flex: 1; background: none; border: 0; color: var(--muted2); font-size: 14px; padding: 8px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.section-slider .ss-side[hidden] { display: block; visibility: hidden; }
#ss-left { text-align: start; }
#ss-right { text-align: end; }
.section-slider .ss-current { flex: 1.4; text-align: center; font-size: 20px; font-weight: 700; color: var(--goldt); position: relative; white-space: nowrap; }
.section-slider .badge-dot { position: relative; display: inline-block; top: -8px; inset-inline-end: auto; margin-inline-start: 3px; }





/* Профиль */
.badge { display: inline-block; background: var(--gold); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.field-hint { margin: -4px 0 4px; font-size: 14px; color: var(--muted); }
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 0; background: var(--card); }
legend { font-weight: 600; padding: 0 4px; }
.choice { display: flex; align-items: center; gap: 10px; font-weight: 400; padding: 6px 0; }
.choice input { width: 20px; height: 20px; margin: 0; }
.success { color: #5FD38A; margin: 0; }

/* Правила */
.rules-block { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.rules-block.safety { border: 2px solid #FF6B6B; background: #2A1A22; }
.rules-block h3 { margin: 0 0 8px; font-size: 18px; }
.rules-block ol { margin: 0; padding-inline-start: 22px; }
.rules-block li { margin-bottom: 8px; line-height: 1.4; }
.rules-block p.muted { margin: 0 0 8px; font-size: 14px; }
.rules-block h4 { margin: 12px 0 8px; }
.groups-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.groups-table td { padding: 8px 0; border-bottom: 1px solid var(--panel3); }
.groups-table td:last-child { text-align: end; color: var(--muted); }

/* Страница игрока / команды */
.clickable { cursor: pointer; }
.lead-list li.clickable:active, .team-members li.clickable:active { background: var(--bg); }
.card-back { margin: 0 0 10px; padding: 0; }
.card-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.card-head h2 { margin: 0 0 4px; }
.card-head .badge { margin: 6px 0 0; }




.card-contact { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.card-contact span { display: block; font-size: 13px; }
#tab-card h3 { margin: 16px 0 6px; }
#tab-card .team-members { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 0 14px; }
#tab-card > div > .act { width: 100%; padding: 12px; font-size: 16px; }

.wins-years { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px 14px 8px; margin-bottom: 12px; }
.wins-years h3 { margin: 10px 0 4px !important; }
.wins-year { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--panel3); }
.wins-year:last-child { border-bottom: 0; }
.wins-year b { color: var(--goldt); font-size: 18px; }

/* Игра */
.center { text-align: center; }
.game-safety { margin-bottom: 14px; }
.game-safety ul { margin: 0; padding-inline-start: 20px; }
.game-safety li { margin-bottom: 6px; line-height: 1.35; }







.game-qr { background: var(--card); border-radius: 16px; padding: 10px; margin: 10px auto; max-width: 300px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.game-qr svg { display: block; width: 100%; height: auto; }
.game-code { text-align: center; font-size: 40px; font-weight: 800; letter-spacing: 0.25em; color: var(--goldt); margin: 4px 0 10px;
  font-family: ui-monospace, Menlo, monospace; }
.game-video { width: 100%; border-radius: 14px; margin: 8px 0; background: #000; }
.act.wide { display: block; width: 100%; padding: 12px; font-size: 16px; margin: 10px 0; }
.game-opponent { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 14px; }
.game-opponent h3 { margin: 2px 0; }
.game-opponent .muted { font-size: 13px; }
.game-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.game-result button { border: 0; border-radius: 16px; padding: 22px 8px; font-size: 20px; font-weight: 700; cursor: pointer; }
.game-win { background: #1F8A47; color: #fff; }
.game-lose { background: var(--panel); color: var(--text2); }
.game-warn { background: #2E2A1A; border: 1px solid #6B5A26; border-radius: 12px; padding: 10px 12px; }
.game-done { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px 16px; margin-bottom: 14px; }
.game-done .gd-icon { font-size: 56px; }
.game-done h2 { margin: 6px 0; }
.report-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.link.danger { color: #FF7A7A; }
.contact-mail { text-align: center; font-size: 13px; margin: 14px 0 6px; }
.lead-search { margin: 0 0 10px; }
.lead-search input { width: 100%; box-sizing: border-box; margin: 0; padding-inline-start: 38px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a94a3' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 12px center; }
.match .side.clickable { cursor: pointer; }
.team-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: 4px 0 12px; }
.team-head h2 { margin: 6px 0 0; }
.team-head .badge { margin: 4px 0 0; }


.team-story { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px 14px 12px; margin-bottom: 12px; }
.team-story h3 { margin: 10px 0 6px !important; }
.team-story p { margin: 0; }
.card-more { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin: 14px 0; }
.card-more summary { font-weight: 600; cursor: pointer; }
.card-more .team-members { border: 0 !important; padding: 0 !important; margin-top: 8px; }
.card-more .card-matches { margin-top: 10px; padding: 0; }

/* Победы по годам */
.years-box h3 { margin: 16px 0 6px; }








/* География */
select { font-size: 17px; padding: 12px; border: 1px solid var(--panel2); border-radius: 12px; background: var(--card); width: 100%; margin-bottom: 8px; }
fieldset input[type=text] { margin-bottom: 8px; }
.suggest { border: 1px solid var(--panel2); border-radius: 12px; background: var(--card); overflow: hidden; margin: -4px 0 8px; }
.suggest button { display: block; width: 100%; text-align: start; background: none; border: 0; border-bottom: 1px solid var(--panel3); padding: 12px 14px; }
.suggest button:last-child { border-bottom: 0; }
.suggest small { color: var(--muted); }
.suggest p { margin: 0; padding: 12px 14px; color: var(--muted); }

/* Раскрывающийся список (виды спорта) */









/* Переключатель вида спорта вверху приложения */




/* Карточка профиля */


.icon-btn { background: var(--card); border: 1px solid var(--border); border-radius: 50%; width: 44px; height: 44px; font-size: 20px; }
.profile-card { display: flex; gap: 16px; align-items: center; margin: 16px 0; }
.avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--panel) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; color: var(--goldt); flex-shrink: 0; }
.avatar.big { width: 120px; height: 120px; font-size: 44px; }
.profile-name { font-size: 22px; font-weight: 700; }
.profile-place { color: var(--muted); margin: 4px 0 8px; }
.profile-facts { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin: 0 0 8px; }
.profile-facts dt { font-size: 13px; color: var(--muted); }
.profile-facts dd { margin: 0 0 10px; overflow-wrap: anywhere; }
.photo-edit { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; }

/* Команда */
.team-box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 8px 0; }
.team-box h3 { margin: 0 0 8px; }
.team-name { font-size: 20px; font-weight: 700; margin-bottom: 10px; }


.team-members { list-style: none; margin: 0 0 8px; padding: 0; }
.team-members li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--panel3); }
.team-members li:last-child { border-bottom: 0; }
.team-members .avatar { width: 40px; height: 40px; font-size: 16px; }
.team-members .who { flex: 1; }
.team-members .kick { background: none; border: 0; color: #FF7A7A; font-size: 14px; }
.secondary.danger { color: #FF7A7A; }

.team-box h4 { margin: 14px 0 6px; font-size: 16px; }
.team-members .act { background: var(--gold); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.team-members .act.light { background: var(--panel); color: var(--goldt); }
.team-size-warn { color: var(--gold2t); }

/* Лидеры */
.segmented { display: flex; background: var(--bg3); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.segmented button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 9px; color: var(--muted); }
.segmented button.active { background: var(--card); color: var(--goldt); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; scrollbar-width: none; }
.chips button { flex-shrink: 0; border: 1px solid var(--panel2); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: 15px; }
.chips button.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.lead-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.lead-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--panel3); }
.lead-list li:last-child { border-bottom: 0; }
.lead-list li.me { background: var(--panel6); }
.lead-list .rank { width: 28px; text-align: center; font-weight: 700; color: var(--muted); }
.lead-list .avatar { width: 40px; height: 40px; font-size: 16px; }
.lead-list .who { flex: 1; min-width: 0; }
.lead-list .who small { display: block; color: var(--muted); }
.lead-list .wins { font-weight: 700; font-size: 18px; color: var(--goldt); text-align: end; }
.lead-list .wins small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }

.admin-link { text-align: center; text-decoration: none; box-sizing: border-box; }

/* Значок профиля слева от выбора вида спорта */







.profile-card .pv-edit { margin-inline-start: auto; align-self: flex-start; flex-shrink: 0; }
#tab-profile .profile-card { margin-top: 0; }

/* Новости */
.news-list { list-style: none; margin: 0 0 10px; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.news-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--panel3); }
.news-list li:last-child { border-bottom: 0; }
.news-list .avatar { width: 40px; height: 40px; font-size: 16px; }
.news-list .what { flex: 1; min-width: 0; }
.news-list .what b { display: block; }
.news-list .what span, .news-list .when { color: var(--muted); font-size: 14px; }
.news-list .when { white-space: nowrap; }

/* Новости: оба игрока в одной полоске */
.news-list li.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; padding: 12px 10px; }
.news-list .side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.news-list .side .avatar { width: 52px; height: 52px; font-size: 20px; position: relative; overflow: visible; }
.news-list .side.loser .avatar { opacity: .75; }
.news-list .cup { position: absolute; top: -8px; inset-inline-end: -8px; font-size: 22px; }
.news-list .side .name { font-weight: 600; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.news-list .side.loser .name { font-weight: 400; color: var(--muted); }
.news-list .res { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.news-list .res.win { background: #163D29; color: #5FD38A; }
.news-list .res.lose { background: var(--panel); color: var(--muted); }
.news-list .mid { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 14px; }
.news-list .vs { font-weight: 700; color: var(--goldt); }
.news-list .mid .when { font-size: 12px; color: var(--muted2); text-align: center; white-space: normal; max-width: 80px; }

/* Карточка команды */
.team-card { margin-bottom: 10px; }
.team-photo { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--panel) center/cover no-repeat; margin-bottom: 10px; }
.team-card-head { display: flex; align-items: center; gap: 12px; }
.team-card-head .avatar { width: 56px; height: 56px; font-size: 22px; flex-shrink: 0; }
.team-card-head .team-name { margin: 0; }
.team-history { white-space: pre-wrap; margin: 10px 0; color: var(--text2); }
/* Эмблема команды - круглая */
.avatar.emblem { border-radius: 50%; }
/* Фото игрока в профиле и на странице игрока - обычная прямоугольная фотография */
#pv-avatar, #card-body .card-head .avatar { width: 112px; height: 144px; border-radius: 12px; font-size: 44px; flex-shrink: 0; }

/* Окно создания команды */
.te-photo { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--panel) center/cover no-repeat;
  border: 2px dashed var(--panel4); display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; }
.te-photo.has { border-style: solid; border-color: transparent; }
.te-photo.has span { display: none; }
.te-emblem-row { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.te-emblem-row .avatar { cursor: pointer; }
textarea { font: inherit; font-size: 17px; padding: 12px; border: 1px solid var(--panel2); border-radius: 12px; resize: vertical; width: 100%; box-sizing: border-box; }
.add-row { width: 100%; border: 2px dashed var(--panel4); background: var(--card); color: var(--goldt); border-radius: 12px; padding: 12px; font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.team-members li.invited .who { color: var(--muted); }

/* Кнопки в лидерах и новостях */
.act { background: var(--gold); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.act.light { background: var(--panel); color: var(--goldt); }
.lead-list .act, .news-list .act { background: var(--gold); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font-size: 14px; flex-shrink: 0; }
.lead-list .act.light, .news-list .act.light { background: var(--panel); color: var(--goldt); }
.lead-note { color: var(--muted2); font-size: 12px; flex-shrink: 0; }
.invite-banner { background: #2E2A1A; border: 1px solid #6B5A26; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.invite-banner div { margin-bottom: 10px; }

/* Личные новости */
.notif-list li { align-items: flex-start; }
.notif-list li.unseen { background: var(--panel6); }
.notif-list .what b { font-weight: 600; }
.notif-acts { display: flex; gap: 8px; margin-top: 8px; }
.notif-acts span { color: var(--muted2); font-size: 13px; }

/* Точка «есть новое» на вкладке */

.badge-dot { position: absolute; top: -2px; inset-inline-end: -6px; width: 10px; height: 10px; border-radius: 50%; background: #FF5A4E; border: 2px solid var(--card); }

/* Новость от Спартакиады */
.notif-list li.post { display: block; padding: 0 0 12px; }
.post-photo { width: 100%; aspect-ratio: 16 / 9; background: var(--panel) center/cover no-repeat; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; }
.post-head b { display: block; font-size: 15px; }
.post-head span { color: var(--muted); font-size: 13px; }
.notif-list .post-logo { width: 36px; height: 36px; font-size: 20px; background: var(--gold); }
.notif-list li.post h3 { margin: 8px 14px 4px; font-size: 19px; line-height: 1.25; }
.notif-list li.post p { margin: 0 14px; white-space: pre-wrap; color: var(--text2); }

/* ===== Общий дизайн «Стадион»: тёмно-синий фон, золотой акцент, ===== */
:root { color-scheme: dark; }
body { background: var(--bg); color: var(--text); font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
h1, h2, h3, .logo, .brand-title, .section-slider .ss-current, .profile-name, .team-name, .lead-list .wins, .lead-list .rank, .wins-year b, .game-done h2 {
  font-weight: 600; letter-spacing: 0.01em;
}
h2, h3 { color: var(--text); }
.logo { color: var(--goldt); text-transform: uppercase; letter-spacing: 0.08em; }

/* Верх: надпись и слайдер разделов */
.brandbar { background: var(--bg); padding: 16px 16px 4px; }
.brand-title { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--goldt);
  font-size: 30px; font-weight: 700; letter-spacing: 0.08em; text-shadow: none; }
.section-slider { background: var(--bg); border-bottom: 1px solid var(--border); padding: 4px 6px 8px; }
.section-slider .ss-arrow { color: var(--muted); min-width: 44px; min-height: 44px; }
.section-slider .ss-side { color: var(--muted2); }
.section-slider .ss-current { color: var(--text); text-transform: uppercase; letter-spacing: 0.04em; }
.section-slider .ss-current::after { content: ""; display: block; width: 56px; height: 3px; border-radius: 2px; background: var(--gold); margin: 4px auto 0; }


/* Поля ввода */
input, select, textarea { background-color: var(--bg2); color: var(--text); border-color: var(--panel2); }
input::placeholder, textarea::placeholder { color: var(--muted4); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.sport-row select { background-color: var(--bg); }

/* Кнопки на золотом фоне — тёмный текст */
.primary, .badge, .act, .chips button.active, .team-members .act, .lead-list .act, .news-list .act { color: #1A1405; font-weight: 700; }
.primary { border-radius: 14px; }
.secondary { background: transparent; color: var(--text); }
.act.light, .team-members .act.light, .lead-list .act.light, .news-list .act.light { background: var(--panel); color: var(--text); }
.link { color: var(--goldt); }
.icon-btn { background: transparent; color: var(--muted); }
.segmented button.active { background: var(--gold); color: #1A1405; box-shadow: none; }
.chips button { background: transparent; color: var(--text); }
.lang-list button { color: var(--text); }

/* Карточки */

.badge { font-size: 14px; padding: 5px 12px; }
.lead-list li.me, .notif-list li.unseen { background: var(--panel7); }
.lead-list .rank { color: var(--muted); font-size: 18px; }
.lead-list li:first-child .rank { color: var(--goldt); }
.avatar { color: var(--goldt); }
.avatar.emblem { border: 2px solid var(--gold); }
.notif-list .post-logo { background: var(--gold); color: #1A1405; }
.badge-dot { border-color: var(--bg); }

/* Игра: QR всегда на белом, чтобы камера читала код */
.game-qr { background: #fff; }

.game-code { color: var(--goldt); }
.game-lose { background: var(--panel); color: var(--text); }
.game-warn, .invite-banner, .hint { color: var(--gold2t); }

/* Почта внизу профиля */
#btn-write-us { border-color: var(--gold); color: var(--text); }

/* Игра: свой QR-код и поле для кода соперника на одном экране */
.game-show { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.game-qr { max-width: 240px; }
.game-or { display: flex; align-items: center; gap: 12px; color: var(--muted2); font-size: 14px; margin: 6px 0 12px; }
.game-or::before, .game-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.game-join { margin-bottom: 14px; }
.game-join .act.wide { margin: 0; }

/* ===== «Без окошек» (2026-11-11): никаких рамок и карточек - текст прямо на фоне,
   разделы и строки отделены тонкой чертой. Заливка только у полей ввода и фильтров,
   второстепенные кнопки - просто золотой текст. ===== */
:root { --line: rgba(255,255,255,.09); --field: #18293F; --me: rgba(232,181,58,.10); --danger: #FF8A80; }
.sport-row, .rules-block, fieldset, .card-contact, #tab-card .team-members, .wins-years,
.game-opponent, .game-done, .team-story, .card-more, .profile-facts, .team-box,
.suggest, details, .news-list li, .notif-list li {
  border: 0 !important; border-bottom: 1px solid var(--line) !important; background: transparent !important;
  border-radius: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important;
  margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 14px !important; padding-bottom: 14px !important;
}
.lead-list { border: 0 !important; background: transparent !important; border-radius: 0 !important; overflow: visible; }
.lead-list li { border: 0 !important; border-bottom: 1px solid var(--line) !important; background: transparent !important; border-radius: 0 !important; padding-left: 2px !important; padding-right: 2px !important; }
.lead-list li.me { background: var(--me) !important; }
.groups-table td, .wins-year, .team-members li, .suggest button{ border: 0 !important; }
input, select, textarea, .sport-row select { border: 0 !important; background-color: var(--field) !important; border-radius: 12px !important; }
.secondary, .admin-link, #btn-write-us { border: 0 !important; background: var(--field) !important; border-radius: 12px !important; }
.chips button { border: 0 !important; background: var(--field) !important; }
.chips button.active { background: var(--gold) !important; }
.icon-btn{ border: 0 !important; background: transparent !important; }
.section-slider { border-bottom: 1px solid var(--line) !important; }
.rules-block.safety { background: transparent !important; }
.rules-block.safety h2, .rules-block.safety h3, .rules-block.safety strong, .rules-block.safety b { color: var(--danger) !important; }
.game-or::before, .game-or::after { background: var(--line) !important; }
.lang-list button { border: 0 !important; border-bottom: 1px solid var(--line) !important; background: transparent !important; border-radius: 0 !important; }
.avatar.emblem { border: 0; }
.segmented { background: var(--field) !important; }

/* Списки новостей и истории игр - без общей рамки, строки через черту */
.news-list, .notif-list { border: 0 !important; background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
.news-list li, .notif-list li { padding-left: 0 !important; padding-right: 0 !important; }

/* Второстепенные кнопки (внизу профиля, «Отмена», «Ещё») - золотой текст без фона */
.secondary, .admin-link, #btn-write-us { background: transparent !important; color: var(--goldt) !important; border: 0 !important;
  padding: 12px 0 !important; font-weight: 600; text-decoration: none; }
.secondary.danger { color: #FF8A80 !important; }
.secondary:active, .admin-link:active { opacity: .6; }

/* Слайдер уровня в «Лидерах» и «Новостях»: Район · Город · Страна · Континент · Мир */
.level-slider { display: flex; align-items: center; gap: 2px; margin: 0 0 6px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.level-slider .ls-arrow { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; min-width: 36px; min-height: 44px; padding: 0 6px; }
.level-slider .ls-arrow:disabled { color: var(--disabled); }
.level-slider .ls-side { flex: 1; background: none; border: 0; color: var(--muted2); font-size: 14px; padding: 8px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.level-slider .ls-current { flex: 1.3; text-align: center; font-size: 18px; font-weight: 600; color: var(--text); white-space: nowrap;
 text-transform: uppercase; letter-spacing: 0.04em; }
.level-slider .ls-current::after { content: ""; display: block; width: 32px; height: 2px; border-radius: 2px; background: var(--gold); margin: 3px auto 0; }

/* Заблокированные поля (год рождения и пол после первого сохранения) - приглушены */
input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
.choice:has(input:disabled) { opacity: .7; }

/* Турнир */
.tour-items { list-style: none; margin: 0; padding: 0; }
.tour-item { padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.tour-item .post-photo, .tour-photo { border-radius: 14px; margin-bottom: 10px; }
.tour-item h3 { margin: 0 0 4px; }
.tour-when { color: var(--gold2t); font-size: 14px; margin-top: 4px; }
.tour-mine { color: #7FDBA0; font-weight: 600; margin-top: 6px; }
.small { font-size: 14px; }
#tour-detail h2 { margin: 8px 0 4px; }
.tour-info { white-space: pre-wrap; color: var(--text2); line-height: 1.5; }
.tour-act { padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.tour-match, .tour-bracket { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tour-match h3, .tour-bracket h3 { margin: 0 0 8px; }
.tour-bracket h4 { margin: 12px 0 4px; color: var(--goldt); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.tour-pairs { list-style: none; margin: 0; padding: 0; }
.tour-pairs li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.tour-pairs li.mine { background: var(--me); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.tour-pairs .w { color: var(--goldt); font-weight: 600; }
.tour-pairs small { color: var(--muted2); display: block; font-size: 13px; }
.tour-result { font-size: 20px; font-weight: 600; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tour-podium { padding: 4px 0; font-size: 17px; }
.clickable { cursor: pointer; }

/* Кубки года - полоска под строкой года */
.cup-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.cup-strip::-webkit-scrollbar { display: none; }
.cup-chip { flex: 0 0 auto; width: 72px; background: none; border: 0; padding: 4px 2px; color: var(--text2);
  display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: inherit; }
.cup-chip .cup-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: radial-gradient(circle at 35% 30%, #3A3220, var(--bg4)); box-shadow: 0 0 0 1.5px var(--gold) inset; }
.cup-chip small { font-size: 11px; line-height: 1.15; text-align: center; color: var(--muted3); }
.cup-chip:has(.cup-pic) { width: 112px; }
.cup-pic { width: 108px; height: 72px; object-fit: contain; display: block; }
/* В середине слайдера уровня - уровень вместе с местом («Город Москва»): шире, можно в две строки */
.level-slider .ls-current { flex: 2.4; white-space: normal; line-height: 1.15; font-size: 17px; overflow-wrap: anywhere; }
.level-slider .ls-side { flex: 0.8; }
.level-slider .ls-current { overflow-wrap: normal; hyphens: manual; }
.level-slider .ls-current.long { font-size: 13px; letter-spacing: 0.02em; }

.brand-title, .logo {
}

/* Светлая тема (Профиль → «Тема»): класс light у <html>, выбор хранится в браузере */
html.light {
  color-scheme: light;
  --bg: #F3F0E8; --bg2: #ECE7DC; --bg3: #E6E0D2; --bg4: #EFEAE0;
  --card: #FFFFFF; --panel: #ECE6D8; --panel2: #DCD5C5; --panel3: #F1ECE2; --panel4: #CFC7B5; --panel5: #E3DCCB; --panel6: #E9E3D5; --panel7: #EDE8DD;
  --border: #D8D1C1; --disabled: #C9C2B3;
  --text: #1A2233; --text2: #2C3445;
  --muted: #5A6476; --muted2: #6B7486; --muted3: #5F6878; --muted4: #7A8291;
  --gold: #E8B53A; --gold2: #E9C25A; --goldt: #A0700C; --gold2t: #8C640C;
  --line: rgba(0,0,0,.10); --field: #E9E3D6; --me: rgba(176,125,18,.12); --danger: #C62828;
}
html.light body { background: var(--bg); color: var(--text); }
/* Кнопки с золотым фоном - на светлой теме ярче, текст тёмный */
html.light .primary{ background: #E8B53A !important; color: #1A1405 !important; }


/* ===== Минимализм (выбор заказчика 2026-11-13; эскиз 17 на холсте «Спартакиада — 5 вариантов надписи») =====
   Надпись «Спартакиада»: тонкий Inter 200 с большой разрядкой, над ней золотая точка.
   Весь текст приложения - Inter: заголовки, разделы, имена, числа - тонко (300) с разрядкой, обычный текст - 300.
   Вернуть прежний вид - удалить этот блок (и в index.html/admin.html шрифт Inter снова 400;500;600;700). */
body { font-weight: 300; }
h1, h2, h3, h4, .logo, .brand-title, .section-slider .ss-current, .profile-name, .team-name, .lead-list .wins, .lead-list .rank, .wins-year b, .game-done h2 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-weight: 300; letter-spacing: 0.06em;
}
h1, h2, h3, h4, .section-slider .ss-current { letter-spacing: 0.12em; }
.brandbar { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px 0; background: var(--bg); }  /* точка ровно посередине между надписью и разделами */
/* Золотая точка - под надписью, между ней и разделами (просьба заказчика 2026-11-14) */
.brandbar::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); order: 1; }
.brand-title, html.light .brand-title, .logo {
  font-family: "Inter", sans-serif; font-weight: 200; text-transform: uppercase;
  letter-spacing: 0.42em; margin-inline-end: -0.42em; line-height: 1.15; text-align: center;
  background: none; text-shadow: none; -webkit-mask-image: none; mask-image: none;
}
.brand-title, html.light .brand-title { font-size: clamp(16px, 5.8vw, 30px); color: var(--text); }
.logo { color: var(--text); font-size: clamp(18px, 6vw, 30px); }
.level-slider .ls-current, .level-slider .ls-current.long { font-family: "Inter", sans-serif; font-weight: 300; letter-spacing: 0.08em; }
/* Слайдеры разделов и уровня: подписи соседей по бокам убраны (просьба заказчика 2026-11-13) - остались стрелки и свайп;
   дошли до края - стрелка в эту сторону исчезает */
.level-slider .ls-side, .section-slider .ss-side { visibility: hidden !important; flex: 0.2; }
/* На краю (Профиль, Турнир) пустой сосед не должен пропадать из строки, иначе название съезжает с середины */
.section-slider .ss-side[hidden] { display: block !important; }
.level-slider .ls-current, .section-slider .ss-current { flex: 3; }
.level-slider .ls-arrow:disabled, .section-slider .ss-arrow:disabled { visibility: hidden; }
.section-slider .ss-arrow { position: relative; }
.section-slider .ss-arrow .badge-dot { position: absolute; top: 6px; inset-inline-end: 4px; margin: 0; }
/* «История игр» во вкладке «Новости»: строка тем же шрифтом, что название раздела, галочка справа */
.news-games-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0;
  border-bottom: 1px solid var(--line, rgba(255,255,255,.09)); padding: 8px 2px; margin: 0 0 8px; color: var(--text);
  font-family: "Inter", sans-serif; font-weight: 300; font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; text-align: start; }
/* Шапки списков («Лидеры»: игроки/команды, место, поиск; «Новости»: история игр и место) прилипают под верхней шапкой -
   листаются только люди, команды и игры (просьба заказчика 2026-11-14) */
.list-controls { position: sticky; top: var(--topbars-h, 0px); z-index: 4; background: var(--bg); padding-bottom: 4px;
  /* вплотную к черте разделов с самого начала - тогда при прокрутке шапка списка не сдвигается ни на пиксель */
  margin-top: -18px; padding-top: 10px; }
#news-games-box .list-controls { padding-top: 0; }
.list-controls .lead-search { margin-bottom: 4px; }
.news-games-toggle .ngt-chev { flex: none; color: var(--muted); transition: transform .15s; }
.news-games-toggle.open .ngt-chev { transform: rotate(180deg); }
/* История команды (автоматическая): дата мелко серым, под ней событие */
.team-log { list-style: none; margin: 10px 0 0; padding: 0; }
.team-log li { padding: 8px 0; border-top: 1px solid var(--line, rgba(255,255,255,.09)); }
.team-log .tl-date { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.team-log .tl-text { display: block; }
.team-members .make-captain { background: none; border: 0; color: var(--goldt); font-size: 14px; padding: 4px 6px; }
/* Команда: общее фото сверху, круг с эмблемой в левом нижнем углу, чуть правее края и ниже фото (просьба заказчика 2026-11-14) */
.team-cover { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--panel) center/cover no-repeat;
  margin: 0 0 34px; box-sizing: border-box; }
.team-cover .avatar.team-cover-emblem { position: absolute; left: 14px; bottom: -28px; width: 88px; height: 88px; font-size: 34px;
  border: 4px solid var(--bg); box-sizing: border-box; margin: 0; }
.team-card .team-photo.team-cover { margin-bottom: 34px; }
.team-head .team-cover + h2 { margin-top: 0; }
.team-cover.empty { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--muted); background: transparent; }
.team-cover-none { color: var(--muted); font-size: 14px; }
/* «Последние игры» (свёрнутый список) - тем же шрифтом, что «История игр» и «История команды»: строка с галочкой справа */
.card-more { padding: 0 !important; }
.card-more summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 2px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,.09)); font-family: "Inter", sans-serif; font-weight: 300; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--text); }
.card-more summary::-webkit-details-marker { display: none; }
.card-more summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); margin: -4px 6px 0 0; transition: transform .15s; }
.card-more[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.team-story { margin: 14px 0; border-bottom: 0 !important; padding-bottom: 0 !important; }
/* Профиль: вид спорта выше, ближе к черте разделов; фото и имя - с отступом от черты под видом спорта (просьба заказчика 2026-11-14) */
#tab-profile .profile-card { margin-top: 10px; }
/* Вид спорта - под фото, без черты: выбранный вид обычным текстом и стрелка вниз рядом (просьба заказчика 2026-11-14) */
#tab-profile .sport-row { background: none !important; border: 0 !important; padding: 0 !important; margin: -6px 0 14px !important; border-radius: 0 !important; }
#tab-profile .sport-row label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#tab-profile .sport-row select { -webkit-appearance: none; appearance: none; width: auto; max-width: 100%; min-height: 44px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A9B7C9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center !important;
  border: 0 !important; border-radius: 0 !important; padding: 0 24px 0 0 !important; font-family: "Inter", sans-serif; font-size: 17px; font-weight: 400; color: var(--text); }
#tab-profile .sport-row select.empty { color: #FF7A7A; }
/* При нажатии ничем не выделяем (ни рамки, ни подсветки) */
#tab-profile .sport-row select:focus, #tab-profile .sport-row select:active { outline: none !important; box-shadow: none !important; background-color: transparent !important; }
#tab-profile .sport-row select { -webkit-tap-highlight-color: transparent; }
.settings-fold { margin: 18px 0 !important; }
.settings-fold > button, html.light .settings-fold > button { display: block; width: 100%; margin: 0 !important; padding: 13px 2px !important;
  background: none !important; border: 0 !important; border-bottom: 1px solid var(--line, rgba(255,255,255,.09)) !important; border-radius: 0 !important;
  text-align: start !important; font-family: "Inter", sans-serif !important; font-size: 16px !important; font-weight: 400 !important;
  letter-spacing: 0 !important; color: var(--text) !important; min-height: 0 !important; box-shadow: none !important; }
/* «Как связаться» в карточке игрока: нажатие показывает кнопку «Копировать» */
.card-contact.copyable { cursor: pointer; -webkit-user-select: text; user-select: text; }
.card-contact .cc-copy { display: inline-block; margin-top: 8px; background: none; border: 0; padding: 6px 0; color: var(--goldt); font-size: 15px; font-weight: 500; }
/* Возрастная группа - просто строка текста, без золотой плашки (просьба заказчика 2026-11-13) */
.badge, html.light .badge { display: block; background: none; color: var(--muted); padding: 0; border-radius: 0;
  font-size: 14px; font-weight: 400; letter-spacing: 0.02em; }

.members-count { margin: 4px 0 12px; }

/* Выбор любого места: галочка возле места в слайдере и шторка снизу со списком */
.level-slider .ls-current.pickable { cursor: pointer; }
.level-slider .ls-chev { display: inline-block; vertical-align: middle; margin-inline-start: 4px; color: var(--muted); }
.sheet-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 78vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,.35); padding: 6px 18px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.09)); }
.sheet-title { font-size: 17px; color: var(--text); }
.sheet-close { background: none; border: 0; color: var(--muted); font-size: 20px; min-width: 44px; min-height: 44px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-search { width: 100%; box-sizing: border-box; margin: 12px 0 4px; }
.sheet-item { display: block; width: 100%; text-align: start; background: none; border: 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.09));
  padding: 13px 2px; font-size: 16px; color: var(--text); }
.sheet-item.current { color: var(--goldt); }
.sheet-list > p { padding: 14px 2px; margin: 0; }

/* ===== Один шрифт на всё приложение (решение заказчика 2026-11-14) =====
   Все надписи - Inter обычной (тонкой, 300) насыщенности, без жирного, без разрядки и БОЛЬШИХ БУКВ;
   отличаются только цветом (золотой текст, текст на золотой кнопке и т.п.) и размером.
   Исключение - сама надпись «СПАРТАКИАДА» вверху (логотип). Вернуть как было - удалить этот блок. */
*, *::before, *::after, button, input, select, textarea, summary, b, strong, h1, h2, h3, h4, h5, th, label, dt {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 300 !important; letter-spacing: normal !important; text-transform: none !important;
}
.brand-title, html.light .brand-title, .logo {
  font-weight: 200 !important; text-transform: uppercase !important; letter-spacing: 0.42em !important;
}


/* Город и район - на разных строках; числа группы не разрываются (2026-11-14) */
.profile-place, .place-lines { white-space: pre-line; }
.nowrap { white-space: nowrap; }

/* Согласие родителя */
.parent-box { margin: 8px 0 16px; }
.parent-box .link { padding: 0; }
