/* === Tokens: вебкам / мобильный тёмный UI === */
:root {
  --bg: #0c0c0f;
  --bg-elev: #141418;
  --bg-card: #1a1a1f;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f4;
  --muted: rgba(242, 242, 244, 0.55);
  --yellow: #f5d547;
  --yellow-dim: #c9a832;
  --red: #e63946;
  --red-dark: #9d0208;
  --neon: #39ff14;
  --neon-soft: rgba(57, 255, 20, 0.35);
  --tg: #2aabee;
  --radius: 14px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

/* ========== Flow overlay ========== */
.flow {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  transition: opacity 0.55s var(--ease), visibility 0.55s;
  background: var(--bg);
}

.flow--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.flow__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(100% 80% at 50% 0%, #1f1528 0%, var(--bg) 55%);
}

.flow__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  animation: drift 14s ease-in-out infinite;
}

.flow__glow--1 {
  width: 70vmin;
  height: 70vmin;
  background: #5c1a3a;
  top: -20%;
  left: -20%;
}

.flow__glow--2 {
  width: 60vmin;
  height: 60vmin;
  background: #1a3a5c;
  bottom: -15%;
  right: -15%;
  animation-delay: -5s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(6%, -4%) scale(1.06);
  }
}

.flow__scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.45) 2px,
    rgba(0, 0, 0, 0.45) 4px
  );
  animation: scan-move 6s linear infinite;
}

@keyframes scan-move {
  to {
    transform: translateY(8px);
  }
}

@keyframes rec-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* Steps */
.step {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

#step-age.step--active,
#step-language.step--active {
  max-width: 480px;
  margin: auto;
}

.step--active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ========== Gate cards (18+ и язык) — в стиле сайта ========== */
.gate-card {
  width: 100%;
  padding: 1.25rem 1.15rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(26, 26, 31, 0.98) 0%, rgba(12, 12, 15, 0.99) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
  animation: gate-in 0.55s var(--ease) both;
}

@keyframes gate-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gate-card--lang {
  position: relative;
}

.gate-card__head {
  text-align: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.logo--gate {
  font-size: 0.9rem;
}

.logo--center {
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
}

.logo--drawer {
  font-size: 0.78rem;
}

.gate-card__back {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.gate-card__back:hover {
  border-color: rgba(245, 213, 71, 0.4);
  transform: translateX(-2px);
}

.gate-card__badge-18 {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.65rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, var(--red) 0%, var(--red-dark) 100%);
  box-shadow: 0 8px 28px rgba(230, 57, 70, 0.35);
  animation: badge-pulse 2.5s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%,
  100% {
    box-shadow: 0 8px 28px rgba(230, 57, 70, 0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 8px 36px rgba(230, 57, 70, 0.55);
    transform: scale(1.03);
  }
}

.gate-card__title {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--text);
}

.gate-card__h2 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gate-card__scroll {
  max-height: 110px;
  overflow-y: auto;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.65rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(242, 242, 244, 0.75);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.gate-card__scroll--short {
  max-height: 72px;
}

.gate-card__scroll p {
  margin: 0 0 0.45rem;
}

.gate-card__scroll p:last-child {
  margin-bottom: 0;
}

.gate-card__scroll a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gate-card__btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0.35rem auto 0;
  padding: 0.85rem 1.2rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, filter 0.2s;
}

.gate-card__btn:active {
  transform: scale(0.98);
}

.gate-card__btn--primary {
  color: #111;
  background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-dim) 100%);
  box-shadow: 0 8px 28px rgba(245, 213, 71, 0.3);
  animation: btn-glow 2.4s ease-in-out infinite;
}

@keyframes btn-glow {
  0%,
  100% {
    box-shadow: 0 8px 28px rgba(245, 213, 71, 0.3);
  }
  50% {
    box-shadow: 0 8px 40px rgba(245, 213, 71, 0.5);
  }
}

.gate-card__btn--primary:hover {
  filter: brightness(1.05);
}

.gate-card__btn--ghost {
  margin-top: 0.55rem;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: underline;
  max-width: none;
  padding: 0.35rem;
}

.gate-card__btn--ghost:hover {
  color: var(--text);
}

.gate-card__compliance {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.compliance-badge {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  text-transform: uppercase;
}

.gate-card__lang-title {
  margin: 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.gate-card__lang-sub {
  margin: 0.25rem 0 1rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lang-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}

.lang-btn::before {
  content: "🌐";
  font-size: 1rem;
  opacity: 0.7;
}

.lang-btn:hover {
  border-color: rgba(245, 213, 71, 0.45);
  background: rgba(245, 213, 71, 0.06);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.lang-btn:active {
  transform: scale(0.98);
}

/* ========== App ========== */
.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  animation: app-in 0.6s var(--ease) both;
}

.app--hidden {
  display: none;
}

.site-layout {
  display: none;
  min-height: 100dvh;
}

.site-layout:not(.site-layout--hidden) {
  display: block;
}


@keyframes app-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 12, 15, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pill-online {
  display: none;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

@media (min-width: 380px) {
  .pill-online {
    display: inline-flex;
  }
}

.pill-online__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: rec-blink 1.2s ease-in-out infinite;
}

.link-login {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--yellow);
  background: transparent;
  border: 1px solid rgba(245, 213, 71, 0.35);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.link-login:hover {
  border-color: var(--yellow);
  background: rgba(245, 213, 71, 0.08);
}

.header-profile-wrap {
  position: relative;
}

.header-profile-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 120;
  min-width: 9rem;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1a1a22;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.header-profile-menu[hidden] {
  display: none !important;
}

.header-profile-menu__btn {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
  color: #f5d547;
  background: transparent;
  cursor: pointer;
}

.header-profile-menu__btn:hover {
  background: rgba(245, 213, 71, 0.12);
}

.token-balance {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 213, 71, 0.45);
  background: rgba(245, 213, 71, 0.1);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}

.token-balance[hidden] {
  display: none !important;
}

.token-balance__value {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
}

.token-balance__label {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-transform: lowercase;
}

.app-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.icon-ham {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.icon-ham span {
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.logo {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.logo__red {
  color: var(--red);
}

.logo__w {
  color: #e8e8ea;
}

.link-star {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.link-star:hover {
  color: var(--yellow);
}

.chip-ghost {
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.chip-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.cat-strip-wrap {
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.55rem 0.85rem;
}

.cat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.cat-pill {
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.2s var(--ease), box-shadow 0.25s;
}

.cat-pill:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.cat-pill--on {
  color: #111;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dim));
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(245, 213, 71, 0.25);
  transform: translateY(-1px);
}

.cat-count {
  display: inline-block;
  margin-left: 0.2rem;
  padding: 0.05rem 0.35rem;
  border-radius: 6px;
  font-size: 0.58rem;
  background: rgba(230, 57, 70, 0.35);
  color: #ffb4b4;
}

.sort-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.7rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.sort-select {
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  cursor: pointer;
}

.sort-hint {
  font-size: 0.62rem;
  opacity: 0.75;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 1800;
  pointer-events: none;
  visibility: hidden;
}

.drawer--open {
  pointer-events: auto;
  visibility: visible;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer--open .drawer__backdrop {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(340px, 94vw);
  background: linear-gradient(180deg, #141418 0%, #0a0a0d 100%);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform 0.42s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 16px 0 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.drawer__apply {
  flex-shrink: 0;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.drawer__apply.drawer__apply--show {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.drawer__apply-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  color: #111;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dim));
  box-shadow: 0 6px 24px rgba(245, 213, 71, 0.35);
  cursor: pointer;
  transition: transform 0.15s, filter 0.2s;
}

.drawer__apply-btn:hover {
  filter: brightness(1.06);
}

.drawer__apply-btn:active {
  transform: scale(0.98);
}

.drawer__apply-reset {
  width: 100%;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.drawer__apply-reset:hover {
  color: var(--text);
}

.drawer--open .drawer__panel {
  transform: translateX(0);
}

.drawer__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.drawer__x {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.drawer__x:hover {
  border-color: rgba(245, 213, 71, 0.4);
  transform: scale(1.05);
}

.drawer__quick {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.drawer__quick a {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--yellow);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 213, 71, 0.25);
  transition: background 0.2s, transform 0.15s;
}

.drawer__quick a:hover {
  background: rgba(245, 213, 71, 0.1);
  transform: translateY(-1px);
}

.drawer__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.drawer__scroll::-webkit-scrollbar {
  width: 5px;
}

.drawer__scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* —— Filter blocks (Bonga-style) —— */
.filter-block {
  border-bottom: 1px solid var(--line);
}

.filter-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: none;
  background: transparent;
  color: #e85d6a;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.filter-block__head:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #ff7a86;
}

.filter-block__chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-135deg);
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
  margin-left: 0.5rem;
  opacity: 0.85;
}

.filter-block--open .filter-block__chev {
  transform: rotate(45deg);
}

.filter-block__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}

.filter-block--open .filter-block__body {
  grid-template-rows: 1fr;
}

.filter-block__inner {
  overflow: hidden;
  padding: 0 0.85rem;
}

.filter-block--open .filter-block__inner {
  padding-bottom: 0.65rem;
}

.filter-sub {
  margin: 0.45rem 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.filter-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.filter-row input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--yellow);
  cursor: pointer;
}

.filter-row input[type="radio"] {
  border-radius: 50%;
}

.filter-row__label {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(242, 242, 244, 0.88);
  line-height: 1.3;
}

.filter-row__live {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.filter-row:hover .filter-row__live {
  background: rgba(245, 213, 71, 0.08);
  color: var(--text);
}

.filter-row--checked .filter-row__label {
  color: var(--text);
  font-weight: 600;
}

.filter-range {
  padding: 0.5rem 0 0.65rem;
}

.filter-range__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.filter-range__input {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  appearance: none;
  cursor: pointer;
}

.filter-range__input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #22d3ee;
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}

.filter-range__input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.filter-range__input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #22d3ee;
  cursor: pointer;
}

.filter-cats .filter-row {
  padding: 0.32rem 0;
}

.filter-cats .filter-block__inner {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.filter-star::before {
  content: "★ ";
  color: var(--yellow);
  font-size: 0.7rem;
}

.app-footer {
  margin-top: auto;
  padding: 0.85rem;
  text-align: center;
  font-size: 0.65rem;
  color: rgba(242, 242, 244, 0.4);
  line-height: 1.45;
  border-top: 1px solid var(--line);
}

.app-footer p {
  margin: 0;
}

.app-subbar {
  padding: 0.55rem 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.model-chip__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e63946, #6a4c93);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.model-chip__caret {
  color: var(--muted);
  font-size: 0.7rem;
}

.subnav {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.subnav a {
  color: var(--muted);
  text-decoration: none;
}

.subnav a:hover {
  color: var(--text);
}

.app-main {
  flex: 1;
  padding: 0.65rem 0.65rem 1rem;
  max-width: 100%;
}

.grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.grid-hint {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stream-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

@media (min-width: 520px) {
  .stream-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
}

@media (min-width: 900px) {
  .stream-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.55rem;
  }

  .app-main {
    padding: 0.65rem 0.85rem 1rem;
  }
}

@media (min-width: 1280px) {
  .stream-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

.grid-sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.25rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.grid-sentinel__spin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--yellow);
  animation: spin 0.75s linear infinite;
  opacity: 0;
  transition: opacity 0.2s;
}

.grid-sentinel--busy .grid-sentinel__spin {
  opacity: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stream-card--enter {
  animation: card-enter 0.45s var(--ease) both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stream-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  aspect-ratio: 3 / 4;
  background: #111;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}

.stream-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
  z-index: 2;
}

.stream-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  border-color: rgba(245, 213, 71, 0.35);
}

.stream-card__blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(14px) saturate(1.2);
  transform: scale(1.08);
  animation: fake-drift 8s ease-in-out infinite;
}

@keyframes fake-drift {
  0%,
  100% {
    transform: scale(1.08) translate(0, 0);
  }
  50% {
    transform: scale(1.1) translate(-2%, 1%);
  }
}

.stream-card__grain {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stream-card__live {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 4;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  background: var(--red-dark);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.stream-card__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6b6b;
  animation: rec-blink 1s infinite;
}

.stream-card__age {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 24px rgba(230, 57, 70, 0.8), 0 2px 0 #000;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  animation: age-pulse 2.2s ease-in-out infinite;
}

@keyframes age-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
  }
}

.stream-card__meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 0.5rem 0.55rem;
}

.stream-card__name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.stream-card__viewers {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ========== Search panel ========== */
.search-panel {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(4rem, env(safe-area-inset-top)) 1rem 1rem;
}

.search-panel[aria-hidden="true"] {
  display: none;
}

.search-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.search-panel__box {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: search-in 0.35s var(--ease) both;
}

@keyframes search-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.search-panel__head {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.search-panel__input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  background: #0f0f12;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.search-panel__input:focus {
  outline: none;
  border-color: rgba(245, 213, 71, 0.45);
}

.search-panel__close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.search-panel__hint {
  margin: 0;
  padding: 0.55rem 0.9rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.search-panel__list {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0.5rem;
  max-height: min(50vh, 400px);
  overflow-y: auto;
}

.search-panel__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.5rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.search-panel__item:hover,
.search-panel__item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.search-panel__thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.search-panel__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.search-panel__meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.search-panel__empty {
  padding: 1rem 0.9rem 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ========== Model room (full page) ========== */
.room {
  position: fixed;
  inset: 0;
  z-index: 1500;
  overflow: hidden;
}

.room--hidden {
  display: none;
}

.room__backdrop {
  display: none;
}

.room__page {
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  animation: room-fade 0.4s var(--ease) both;
}

@keyframes room-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.room__topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(12, 12, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.room__back {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.room__topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.room__icon-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  background: var(--bg-elev);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.room__live-pill {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffb3b3;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(157, 2, 8, 0.35);
}

.room__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: rec-blink 1s infinite;
}

.room__layout {
  display: flex;
  flex-direction: column;
}

.room__stage {
  flex: 1;
  min-width: 0;
}

.room__video-wrap {
  position: relative;
  background: #050508;
}

.room__video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: min(56vh, 520px);
  margin: 0 auto;
  overflow: hidden;
}

.room__fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.room-fx-like {
  position: absolute;
  bottom: -2rem;
  color: #ff4d8d;
  text-shadow: 0 0 12px rgba(255, 77, 141, 0.65);
  animation: room-like-rise linear forwards;
  opacity: 0;
  line-height: 1;
}

@keyframes room-like-rise {
  0% {
    transform: translateY(0) scale(0.6) rotate(-8deg);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  85% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(-115%) scale(1.15) rotate(12deg);
    opacity: 0;
  }
}

.room-fx-gift {
  position: absolute;
  bottom: 8%;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(245, 213, 71, 0.55);
  box-shadow: 0 6px 20px rgba(245, 213, 71, 0.35);
  animation: room-gift-fly 2.6s ease-in forwards;
  opacity: 0;
}

.room-fx-gift__coin {
  font-size: 1.25rem;
  animation: room-gift-spin 0.8s ease-in-out infinite;
}

.room-fx-gift__amt {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--yellow, #f5d547);
}

@keyframes room-gift-fly {
  0% {
    transform: translate(0, 40px) scale(0.5);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  55% {
    transform: translate(12vw, -35vh) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate(28vw, -52vh) scale(0.85);
    opacity: 0;
  }
}

@keyframes room-gift-spin {
  0%,
  100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(12deg);
  }
}

.room__loves.room__loves--pulse {
  animation: loves-pulse 0.45s ease;
}

@keyframes loves-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
    color: #ff6b9d;
  }
}

.room__fake {
  position: absolute;
  inset: 0;
  background-size: 200% 200%;
  animation: grad-move 8s ease infinite;
}

.room__video.room__video--unlocked .room__fake {
  animation-duration: 14s;
}

@keyframes grad-move {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.room__video-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

.room__gate {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.45);
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

.room__gate--off {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.room__join-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 320px;
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  cursor: pointer;
  color: #111;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dim));
  box-shadow: 0 10px 36px rgba(245, 213, 71, 0.45);
  animation: join-nudge 2.8s ease-in-out infinite;
}

@keyframes join-nudge {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.room__join-title {
  font-weight: 800;
  font-size: 0.95rem;
}

.room__join-bonus {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.85;
}

.room__gate-note {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.room__stream-state {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.25rem;
  background: rgba(5, 5, 10, 0.82);
  text-align: center;
}

.room__stream-state[hidden] {
  display: none !important;
}

.room__stream-loading,
.room__stream-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 320px;
}

.room__stream-error[hidden] {
  display: none !important;
}

.room__stream-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: stream-spin 0.9s linear infinite;
}

@keyframes stream-spin {
  to {
    transform: rotate(360deg);
  }
}

.room__stream-loading-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.room__stream-loading-sub {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.room__stream-error-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #fca5a5;
}

.room__stream-error-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.room__stream-retry {
  margin-top: 0.35rem;
  border: 1px solid rgba(245, 213, 71, 0.5);
  background: rgba(245, 213, 71, 0.12);
  color: var(--yellow);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.room__stream-retry:hover {
  background: rgba(245, 213, 71, 0.22);
}

.room__model-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.room__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--red);
  flex-shrink: 0;
  background-size: cover;
}

.room__model-info {
  flex: 1;
  min-width: 0;
}

.room__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room__loves {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.room__fav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.room__fav-btn--on {
  color: var(--red);
  border-color: rgba(230, 57, 70, 0.5);
}

.room__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
}

.room__mode {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.room__mode--on {
  background: rgba(230, 57, 70, 0.15);
  border-color: rgba(230, 57, 70, 0.45);
  color: #ffb3b3;
}

.room__mode--tokens {
  margin-left: auto;
  color: #111;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dim));
  border-color: transparent;
}

.room__price-bar {
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--yellow);
  background: rgba(245, 213, 71, 0.08);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s;
}

.room__price-bar:hover {
  background: rgba(245, 213, 71, 0.14);
}

.room__nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
}

.room__nav-btn {
  flex: 1;
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.room__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.room__sidebar {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  min-height: 280px;
}

.room__chat-head {
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.02em;
}

.room__topic {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
}

.room__chat {
  flex: 1;
  min-height: 140px;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.82rem;
}

.msg--gift {
  color: #7ec8ff;
  font-weight: 600;
}

.msg__user {
  font-weight: 700;
}

.msg__user--a {
  color: #ffb347;
}

.msg__user--b {
  color: #7ec8ff;
}

.msg__user--c {
  color: #c9a0ff;
}

.msg__user--mod {
  color: #7effa0;
}

.msg__user--f {
  color: #ff9ed8;
}

.room__inputrow {
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.room__input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  background: #0f0f12;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
}

.room__input::placeholder {
  color: rgba(242, 242, 244, 0.35);
}

.room__send {
  width: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--yellow);
  color: #111;
  font-weight: 900;
  cursor: pointer;
}

.room__guest-note {
  margin: 0;
  padding: 0.4rem 0.75rem 0.65rem;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.room__guest-note:hover {
  color: var(--tg);
}

.room__profile {
  padding: 1rem 1rem 2rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.room__profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.room__profile-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.room__profile-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.room__profile-btn {
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  color: #111;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dim));
}

.room__profile-btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.room__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.room__tag {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
}

.room__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.82rem;
}

.room__meta dt {
  color: var(--muted);
  font-weight: 500;
}

.room__meta dd {
  margin: 0;
  font-weight: 600;
}

.room__photos-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.room__photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.room__photo {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s;
}

.room__photo:hover {
  transform: scale(1.03);
}

@media (min-width: 900px) {
  .room__layout {
    flex-direction: row;
    align-items: stretch;
    max-height: calc(100dvh - 52px);
  }

  .room__stage {
    flex: 1.4;
    overflow-y: auto;
  }

  .room__sidebar {
    flex: 0 0 340px;
    border-top: none;
    border-left: 1px solid var(--line);
    max-height: calc(100dvh - 52px);
  }

  .room__chat {
    max-height: none;
    flex: 1;
  }

  .room__video {
    max-height: none;
  }

  .room__profile {
    max-width: calc(100% - 340px);
  }
}

/* ========== Auth modal (Telegram) ========== */
@keyframes auth-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes auth-box-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes auth-icon-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(42, 171, 238, 0.45); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(42, 171, 238, 0); }
}

@keyframes auth-ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
  }
}

@keyframes auth-step-pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes auth-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes auth-spinner {
  to { transform: rotate(360deg); }
}

@keyframes auth-success-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes auth-code-glow {
  0%, 100% { border-color: var(--line); }
  50% { border-color: rgba(42, 171, 238, 0.7); box-shadow: 0 0 20px rgba(42, 171, 238, 0.25); }
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-modal[aria-hidden="true"] {
  display: none;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  animation: auth-backdrop-in 0.4s ease both;
}

.auth-modal__box {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 1.5rem 1.35rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: auth-box-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

.auth-modal--success .auth-modal__panels,
.auth-modal--success .auth-modal__tg,
.auth-modal--success .auth-modal__secondary,
.auth-modal--success .auth-modal__steps,
.auth-modal--success .auth-modal__title,
.auth-modal--success .auth-modal__text,
.auth-modal--success .auth-modal__note {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 0.25s, transform 0.25s;
}

.auth-modal--success .auth-modal__success {
  display: flex;
}

.auth-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal__icon-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 0.65rem;
}

.auth-modal__icon {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  margin: 4px auto 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: rgba(42, 171, 238, 0.15);
  border: 1px solid rgba(42, 171, 238, 0.35);
  color: var(--tg);
}

.auth-modal__icon--pulse {
  animation: auth-icon-pulse 2.2s ease-in-out infinite;
}

.auth-modal__icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--tg);
  border-right-color: rgba(42, 171, 238, 0.35);
  animation: auth-ring-spin 3s linear infinite;
  opacity: 0.7;
}

.auth-modal__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.auth-modal__step {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s, color 0.35s, border-color 0.35s;
}

.auth-modal__step--active {
  color: #fff;
  background: linear-gradient(180deg, #35b6f5, var(--tg));
  border-color: transparent;
  animation: auth-step-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-modal__step--done {
  color: #7effa0;
  border-color: rgba(126, 255, 160, 0.4);
  background: rgba(126, 255, 160, 0.12);
}

.auth-modal__step-line {
  width: 28px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  transition: background 0.4s, transform 0.4s;
}

.auth-modal__step-line--fill {
  background: linear-gradient(90deg, var(--tg), rgba(42, 171, 238, 0.4));
  transform: scaleX(1.05);
}

.auth-modal__step-line--optional {
  opacity: 0.35;
}

.auth-modal--step-password .auth-modal__step-line--optional,
.auth-modal--step-password .auth-modal__step--optional {
  opacity: 1;
}

.auth-modal__panels {
  position: relative;
  min-height: 0;
  text-align: left;
}

.auth-modal__panel {
  display: none;
  overflow: hidden;
}

.auth-modal__panel--active {
  display: block;
  animation: auth-panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-modal__panel--active .auth-modal__label,
.auth-modal__panel--active .auth-modal__input,
.auth-modal__panel--active .auth-modal__secondary,
.auth-modal__panel--active .auth-modal__code-note {
  animation: auth-panel-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-modal__panel--active .auth-modal__input { animation-delay: 0.05s; }
.auth-modal__panel--active .auth-modal__secondary { animation-delay: 0.1s; }
.auth-modal__panel--active .auth-modal__code-note { animation-delay: 0.08s; }

.auth-modal__input--glow:focus {
  outline: none;
  border-color: rgba(42, 171, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.15);
}

.auth-modal__input--code {
  font-size: 1.35rem;
  letter-spacing: 0.35em;
  text-align: center;
  font-weight: 700;
}

.auth-modal--step-code .auth-modal__input--code:not(:placeholder-shown),
.auth-modal--step-code .auth-modal__input--code:focus {
  animation: auth-code-glow 1.8s ease-in-out infinite;
}

.auth-modal__code-note {
  margin: -0.35rem 0 0.5rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.auth-modal__hint--status {
  text-align: center;
  margin: 0 0 0.65rem;
  min-height: 1.1em;
  transition: opacity 0.3s;
}

.auth-modal__hint--status:not([hidden]) {
  animation: auth-panel-in 0.35s ease both;
}

.auth-modal__hint--error {
  color: #ff8a8a;
}

.auth-modal__hint--ok {
  color: #7effa0;
}

.auth-modal__btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spinner 0.7s linear infinite;
}

.auth-modal--loading .auth-modal__btn-spinner {
  display: inline-block;
}

.auth-modal--loading .auth-modal__btn-text {
  opacity: 0.85;
}

.auth-modal--loading .auth-modal__secondary,
.auth-modal--loading .auth-modal__tg {
  pointer-events: none;
  opacity: 0.85;
}

.auth-modal__success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0 0.5rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: #7effa0;
  animation: auth-success-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-modal__success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  background: rgba(126, 255, 160, 0.15);
  border: 2px solid rgba(126, 255, 160, 0.5);
}

.auth-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.auth-modal__text {
  margin: 0 0 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.auth-modal__tg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(180deg, #35b6f5, var(--tg));
  box-shadow: 0 8px 28px rgba(42, 171, 238, 0.45);
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s, opacity 0.35s, max-height 0.35s;
  animation: auth-panel-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-modal__tg[hidden] {
  display: none;
}

.auth-modal__tg:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.auth-modal__tg--ready {
  animation: auth-code-glow 1.5s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(42, 171, 238, 0.55);
}

.auth-modal__tg-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.auth-modal__note {
  margin: 0.75rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
}

.auth-modal__box--wide {
  max-width: 420px;
  text-align: left;
}

.auth-modal__widget {
  display: flex;
  justify-content: center;
  min-height: 48px;
  margin-bottom: 0.5rem;
}

.auth-modal__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.auth-modal__divider::before,
.auth-modal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-modal__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.auth-modal__input {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f0f12;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.auth-modal__secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.65rem;
  border: 1px solid rgba(42, 171, 238, 0.45);
  border-radius: 10px;
  background: rgba(42, 171, 238, 0.1);
  color: var(--tg);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.auth-modal__secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(42, 171, 238, 0.25);
}

.auth-modal__hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.auth-modal__hint a {
  color: var(--tg);
}

.auth-modal__warn {
  font-size: 0.8rem;
  color: #ffb347;
}

.link-login--in {
  color: #7effa0;
  border-color: rgba(126, 255, 160, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
