/*
  Mini App. Чёрно-золотая тема Original Game.
  Основная тема тёмная, светлая — тёплая бумага с чёрным знаком.
*/

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---- бренд Original Game ---- */
  --wine-900: #14110c;
  --wine-700: #3a3122;
  --berry: #8d7040;
  --berry-2: #c6a15b;
  --neon: #e6c98a;
  --gold: #e6c98a;
  --leaf: #c6a15b;
  --ink-0: #070605;
  --ink-1: #100e0b;
  --silver: #e4d7c2;
  --bronze: #a88445;

  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
  --radius-sm: 13px;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);

  /* ---- тёмная тема (по умолчанию) ---- */
  --bg: #070605;
  --mesh: linear-gradient(rgba(7, 6, 5, 0.18), rgba(7, 6, 5, 0.18)), url("../img/bg-app.jpg") center top / cover no-repeat;
  --mesh-blur: 0px;
  --blob: none;
  --card: #100e0b;
  --card-2: #1c1812;
  --text: #f6f1e6;
  --hint: #c4b49a;
  --line: rgba(230, 201, 138, 0.16);
  --accent: #c6a15b;
  --accent-hi: #e4c77a;
  --accent-ink: #e8d09a;
  --accent-text: #1a1408;
  --accent-soft: rgba(228, 199, 122, 0.16);
  --ok-ink: #e8d09a;
  --ok-soft: rgba(198, 161, 91, 0.22);
  --gold-ink: #e6c98a;
  --gold-soft: rgba(228, 199, 122, 0.16);
  --danger-ink: #e8d09a;
  --danger-soft: rgba(168, 132, 69, 0.22);
  --shadow: 0 1px 0 rgba(230, 201, 138, 0.06) inset, 0 14px 30px -14px rgba(0, 0, 0, 0.75);
  --nav-bg: rgba(16, 14, 11, 0.88);
  color-scheme: dark;
}

[data-scheme="light"] {
  --bg: #f7f3ea;
  --mesh:
    radial-gradient(58% 42% at 90% 4%, rgba(246, 206, 120, 0.60), transparent 72%),
    radial-gradient(52% 38% at 2% 28%, rgba(240, 168, 150, 0.42), transparent 72%),
    radial-gradient(64% 40% at 80% 60%, rgba(228, 196, 140, 0.40), transparent 74%),
    radial-gradient(60% 38% at 8% 96%, rgba(236, 186, 110, 0.45), transparent 72%);
  --blob: linear-gradient(145deg, rgba(246, 214, 140, 0.55) 0%, rgba(240, 176, 160, 0.38) 55%, rgba(255, 250, 240, 0) 100%);
  --card: #fffdf8;
  --card-2: #efe6d6;
  --text: #1a1408;
  --hint: #6e6250;
  --line: rgba(26, 20, 8, 0.12);
  --accent: #c6a15b;
  --accent-hi: #e4c77a;
  --accent-ink: #6b5218;
  --accent-text: #1a1408;
  --accent-soft: rgba(198, 161, 91, 0.16);
  --ok-ink: #6b5218;
  --ok-soft: rgba(198, 161, 91, 0.18);
  --gold-ink: #6b5218;
  --gold-soft: rgba(198, 161, 91, 0.18);
  --danger-ink: #6b5218;
  --danger-soft: rgba(168, 132, 69, 0.16);
  --shadow: 0 1px 2px rgba(26, 20, 8, 0.06), 0 12px 26px -16px rgba(26, 20, 8, 0.28);
  --nav-bg: rgba(247, 243, 234, 0.92);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font: 500 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* Фон в духе обоев iOS: мягкая градиентная сетка и крупные округлые формы. Цвета берутся из темы. */
html {
  background-color: var(--bg);
}

body {
  background: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

body::before {
  inset: -15%;
  background: var(--mesh);
  filter: blur(var(--mesh-blur, 24px));
}

body::after {
  width: 118vw;
  height: 118vw;
  max-width: 760px;
  max-height: 760px;
  right: -46%;
  bottom: -26%;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background: var(--blob);
  filter: blur(18px);
  opacity: 0.9;
}

.hero.is-link {
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}

.hero.is-link:active {
  transform: scale(0.99);
}

::selection {
  background: var(--accent);
  color: #fff;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(12px + var(--safe-t)) 14px calc(var(--nav-h) + var(--safe-b) + 28px);
}

.back-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px -6px;
  padding: 8px 12px 8px 6px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--hint);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.back-bar[hidden] {
  display: none;
}
.back-bar svg {
  width: 20px;
  height: 20px;
}
.back-bar:active {
  background: var(--card-2);
}

.view.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.view.enter > * {
  animation: rise 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- типографика ---------- */
h1,
h2,
h3,
p {
  margin: 0;
}

.h1 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.12;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

.muted {
  color: var(--hint);
}

.small {
  font-size: 12.5px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 4px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hint);
}

.section-title button {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--accent-ink);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 4px 16px;
}

.page-head .muted {
  font-weight: 500;
  line-height: 1.35;
}

/* ---------- фирменная шапка ---------- */
.brandbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 2px 14px;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.brand-sub b {
  font-weight: 800;
}

.brand-right {
  margin-left: auto;
}

/* ---------- масти ---------- */
.suits {
  display: inline-flex;
  gap: 8px;
}

.suits i {
  display: block;
  width: 16px;
  height: 16px;
}

.suits svg {
  display: block;
  width: 100%;
  height: 100%;
}

.suits .s-k {
  color: rgba(246, 241, 230, 0.88);
}

.suits .s-r {
  color: #e6c98a;
}

/* ---------- карточки ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 26px;
  padding: 22px 20px;
  color: #f6f1e6;
  background: linear-gradient(145deg, var(--wine-900) 0%, var(--wine-700) 100%);
  box-shadow: 0 18px 40px -18px rgba(20, 17, 12, 0.8);
}

.hero-photo {
  min-height: 292px;
  display: flex;
  align-items: flex-end;
  padding: 0;
  background: var(--ink-0);
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 28%;
}

/* затемнение к низу, акцентный отблеск сверху, тёмный край */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 6, 5, 0.1) 0%, rgba(7, 6, 5, 0.55) 48%, rgba(7, 6, 5, 0.94) 100%),
    radial-gradient(90% 70% at 100% 0%, rgba(228, 199, 122, 0.28), transparent 65%),
    linear-gradient(90deg, rgba(20, 17, 12, 0.55), transparent 60%);
}

.hero-suits {
  position: absolute;
  top: 16px;
  right: 16px;
  opacity: 0.9;
}

.hero-body {
  position: relative;
  width: 100%;
  padding: 22px 20px 20px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.hero-hello {
  font-size: 13px;
  font-weight: 700;
  color: rgba(246, 241, 230, 0.86);
  margin-bottom: 4px;
}

.hero .h1 {
  font-size: clamp(20px, 6.2vw, 27px);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
  text-wrap: wrap;
  overflow-wrap: break-word;
  max-width: 100%;
}

.hero-text {
  margin-top: 8px;
  color: rgba(246, 241, 230, 0.88);
  font-weight: 500;
}

.hero .btn {
  margin-top: 16px;
}

/* главный блок главной: турнир по центру, кнопки во всю ширину */
.hero-center {
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
}

.hero-center .hero-meta {
  justify-content: center;
}

.hero-center .hero-suits {
  left: 0;
  right: 0;
  justify-content: center;
}

.hero-center .hero-body {
  padding: 40px 20px 22px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.hero-actions .btn {
  margin-top: 0;
}

.hero-plain {
  margin-top: 8vh;
  padding: 26px 24px;
}
.hero-plain .h1 {
  max-width: 16ch;
}
.hero-plain .hero-text {
  max-width: 34ch;
}

.hero-plain .hero-suits {
  top: 18px;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, var(--accent-hi) 0%, var(--accent) 100%);
  color: var(--accent-text);
  box-shadow: 0 10px 22px -10px rgba(198, 161, 91, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.15s var(--ease), filter 0.15s, opacity 0.15s;
}

.btn:active {
  transform: scale(0.97);
  filter: brightness(0.93);
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn.block {
  display: flex;
  width: 100%;
}

.btn.light {
  background: rgba(246, 241, 230, 0.16);
  color: #f6f1e6;
  box-shadow: inset 0 0 0 1px rgba(246, 241, 230, 0.3);
  backdrop-filter: blur(8px);
}

.btn.soft {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: none;
}

.btn.danger {
  background: var(--danger-soft);
  color: var(--danger-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger-ink) 28%, transparent);
}

.btn.sm {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 13.5px;
}

/* ---------- чипы ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--card-2);
  color: var(--hint);
  white-space: nowrap;
}

.chip svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.chip.accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.chip.success {
  background: var(--ok-soft);
  color: var(--ok-ink);
}

.chip.live {
  background: var(--danger-soft);
  color: var(--danger-ink);
}

.chip.gold {
  background: var(--gold-soft);
  color: var(--gold-ink);
}

.chip.glass {
  background: rgba(246, 241, 230, 0.16);
  color: #f6f1e6;
  backdrop-filter: blur(8px);
}

.hero .chip.gold,
.detail-hero .chip.gold {
  background: rgba(242, 182, 50, 0.2);
  color: var(--gold);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -14px 14px;
  padding: 2px 14px;
  scrollbar-width: none;
}

.chips-scroll::-webkit-scrollbar {
  display: none;
}

.pill {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 13.5px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pill.active {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-text);
  box-shadow: 0 8px 18px -8px rgba(198, 161, 91, 0.8);
}

/* ---------- карточка турнира ---------- */
.t-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s var(--ease), border-color 0.2s;
}

.t-card:active {
  transform: scale(0.985);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.t-date {
  flex: none;
  width: 58px;
  border-radius: 15px;
  background: linear-gradient(160deg, var(--wine-700), var(--wine-900));
  color: #f6f1e6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  padding: 9px 0;
  box-shadow: inset 0 0 0 1px rgba(196, 212, 248, 0.14);
}

.t-date b {
  font-size: 23px;
  font-weight: 800;
}

.t-date span {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #bbcdf7;
}

.t-card.is-live .t-date {
  background: linear-gradient(160deg, var(--berry-2), var(--wine-700));
}

.t-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.t-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.t-meta {
  color: var(--hint);
  font-size: 13px;
  font-weight: 600;
}

.t-side {
  flex: none;
  display: flex;
  align-items: center;
  color: var(--hint);
}

.t-side svg {
  width: 18px;
  height: 18px;
}

.day-head {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 20px -14px 8px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hint);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
}

/* ---------- детали турнира ---------- */
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px 20px;
  color: #f6f1e6;
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(228, 199, 122, 0.3), transparent 62%),
    linear-gradient(145deg, var(--wine-900) 0%, var(--wine-700) 100%);
  box-shadow: 0 18px 40px -18px rgba(20, 17, 12, 0.8);
}

.detail-hero {
  isolation: isolate;
}

.detail-hero.has-photo {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--ink-0);
}

.detail-hero .hero-img {
  object-position: 50% 45%;
}

.t-thumb {
  flex: none;
  width: 64px;
  align-self: center;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
}

.t-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero .hero-suits {
  top: auto;
  bottom: 14px;
  opacity: 0.55;
}

.detail-hero .chip {
  background: rgba(246, 241, 230, 0.16);
  color: #f6f1e6;
}

.detail-hero .chip.success {
  background: rgba(98, 211, 139, 0.24);
  color: #aef0c6;
}

.detail-when {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-weight: 700;
}

.detail-when small {
  display: block;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(246, 241, 230, 0.74);
}

.kv {
  display: flex;
  flex-direction: column;
}

.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.kv > div:last-child {
  border-bottom: 0;
}

.kv span:first-child {
  color: var(--hint);
}

.kv span:last-child {
  text-align: right;
  font-weight: 700;
}

.prose {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.announcement a {
  color: inherit;
  text-decoration: underline;
}
.announcement blockquote {
  margin: 4px 0;
  padding-left: 10px;
  border-left: 2px solid currentColor;
  opacity: 0.85;
}
.detail-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* ---------- рейтинг ---------- */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.pod {
  position: relative;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 6px 13px;
  min-width: 0;
}

.pod.p1 {
  padding-top: 24px;
  padding-bottom: 20px;
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 24%, var(--card)) 0%, var(--card) 72%);
}

.pod .medal {
  width: 36px;
  height: 36px;
  margin: 0 auto 9px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0d1527;
  background: linear-gradient(145deg, #e7eaf0, var(--silver));
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.pod.p1 .medal {
  width: 44px;
  height: 44px;
  font-size: 18px;
  background: linear-gradient(145deg, #ffd96b, var(--gold));
  box-shadow: 0 8px 18px -6px rgba(242, 182, 50, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.pod.p3 .medal {
  background: linear-gradient(145deg, #e8a36c, var(--bronze));
}

.pod .nick {
  font-weight: 700;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.pod .pts {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hint);
  margin-top: 2px;
}

.pod.p1 .pts {
  color: var(--gold-ink);
}

.pod.me,
.r-row.me {
  outline: 2px solid var(--neon);
}

.r-list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.r-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.r-row:last-child {
  border-bottom: 0;
}

.r-row.me {
  outline-offset: -2px;
  background: color-mix(in srgb, var(--neon) 12%, transparent);
}

.r-place {
  flex: none;
  width: 30px;
  font-weight: 800;
  color: var(--hint);
  font-variant-numeric: tabular-nums;
}

.r-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--hint);
}

.r-pts {
  flex: none;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* статистика игрока в профиле */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 82px;
  padding: 12px 6px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat b {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat b small {
  font-size: 12px;
  font-weight: 700;
  color: var(--hint);
}

.stat > span {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--hint);
}

.stats-series {
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.stats-hint {
  margin: 18px 4px 0;
  text-align: center;
}

/* ---------- записи ---------- */
.reg {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.reg .grow {
  flex: 1;
  min-width: 0;
}

.reg-title {
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ---------- списки профиля ---------- */
.group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row .grow {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.row .val {
  color: var(--hint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
}

.ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.ico svg {
  width: 19px;
  height: 19px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--berry-2), var(--neon));
  box-shadow: 0 10px 24px -10px rgba(198, 161, 91, 0.55);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 6px 4px 18px;
}

.switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 31px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  transition: background 0.2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease);
}

.switch[aria-checked="true"] {
  background: var(--leaf);
  border-color: transparent;
}

.switch[aria-checked="true"]::after {
  transform: translateX(21px);
}

.brand-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding: 26px 16px 8px;
  text-align: center;
  color: var(--hint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-foot .suits i {
  width: 13px;
  height: 13px;
}

[data-scheme="light"] .suits .s-k {
  color: var(--wine-900);
}

[data-scheme="light"] .suits .s-r {
  color: #8d7040;
}

[data-scheme="light"] .hero .suits .s-k,
[data-scheme="light"] .detail-hero .suits .s-k {
  color: rgba(246, 241, 230, 0.88);
}

[data-scheme="light"] .hero .suits .s-r,
[data-scheme="light"] .detail-hero .suits .s-r {
  color: #e6c98a;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: none;
}
.logo-on-light {
  display: none;
}
[data-scheme="light"] .logo-on-dark {
  display: none;
}
[data-scheme="light"] .logo-on-light {
  display: block;
}
.foot-logo {
  width: 132px;
  height: auto;
}

/* ---------- состояния ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 40px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty .emoji {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 7%, transparent);
}

.empty .emoji svg {
  width: 32px;
  height: 32px;
}

.empty .emoji .suit {
  width: 30px;
  height: 30px;
}

.empty .emoji.plain {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.empty .btn {
  margin-top: 10px;
}

.empty p {
  max-width: 30ch;
}

.banner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent);
}

.banner svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--gold-ink);
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 8%, transparent), transparent);
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.sk-card {
  height: 90px;
}

.view > .skeleton + .skeleton,
.view > .brandbar + .skeleton,
.view > .page-head + .skeleton {
  margin-top: 10px;
}

/* ---------- сплэш ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(70% 45% at 85% 0%, rgba(228, 199, 122, 0.28), transparent 70%),
    radial-gradient(80% 50% at 0% 100%, rgba(198, 161, 91, 0.3), transparent 70%),
    var(--ink-0);
  transition: opacity 0.5s ease, visibility 0.5s;
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
}

.splash-dots {
  display: flex;
  gap: 7px;
  margin-top: 18px;
}

.splash-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon);
  animation: dots 1s ease-in-out infinite;
}

.splash-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.splash-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dots {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes splash-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

/* ---------- нижняя навигация ---------- */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 10px calc(8px + var(--safe-b));
  pointer-events: none;
}

.nav-inner {
  position: relative;
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 540px;
  height: var(--nav-h);
  padding: 6px;
  border-radius: 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--line);
}

.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 18px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--hint);
  transition: color 0.2s;
}

.nav-item svg {
  width: 23px;
  height: 23px;
  transition: transform 0.3s var(--ease);
}

.nav-item.active {
  color: var(--text);
}

.nav-item.active svg {
  color: var(--accent-ink);
  transform: translateY(-1px) scale(1.08);
}

.nav-glow {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 3);
  border-radius: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 34%, transparent), color-mix(in srgb, var(--neon) 20%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 8px 20px -10px rgba(198, 161, 91, 0.8);
  transition: transform 0.4s var(--ease);
}

/* ---------- toasts и шторка ---------- */
.toasts {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(12px + var(--safe-t));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  color: #f6f1e6;
  background: rgba(16, 14, 11, 0.96);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(218, 228, 251, 0.14);
  animation: toast-in 0.3s var(--ease) both;
}

.toast.error {
  background: #1b397e;
}

.toast.success {
  background: #1f5e38;
}

.toast.out {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(6, 8, 14, 0.62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s ease both;
}

.sheet {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border-radius: 26px 26px 0 0;
  box-shadow: inset 0 1px 0 var(--line);
  padding: 10px 18px calc(18px + var(--safe-b));
  animation: sheet-up 0.35s var(--ease) both;
}

.sheet .grab {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0 auto 14px;
}

.input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  margin: 14px 0 6px;
  border-radius: 15px;
  border: 1.5px solid var(--line);
  background: var(--card-2);
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
  color: var(--hint);
  font-weight: 500;
}

.input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--neon) 18%, transparent);
}

.field-error {
  min-height: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger-ink);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}

/* ---------- успех ---------- */
.success-burst {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 6px auto 12px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok-ink);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--leaf) 10%, transparent);
  animation: pop 0.5s var(--ease) both;
}

.success-burst svg {
  width: 44px;
  height: 44px;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.5s 0.2s ease forwards;
}

@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.center {
  text-align: center;
}

.mt {
  margin-top: 14px;
}

.search {
  margin: 0 0 12px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
