/* The page of the modes «Найди своего собеседника» and the bottom bar (owner's references of 2026-11-14…15).
   One card holds every mode; online and check-in lead the page without an extra intro. The start action, priority and preferences
   stay in one vertical column after the card at every viewport size. The five floating shortcuts are: «Главная»
   with the common chat, «Канал», «Поиск», «Настройки», «Профиль». The search action itself is «Кого искать».
   Every color comes from the theme (--lc-*),
   every size from the design system (--ds-*); the drawings are part of the page, nothing is asked from the network. */
:root {
  /* The lit color of the active things on this page: readable on the dark and on the light canvas. */
  --find-lit: color-mix(in srgb, var(--lc-accent) 78%, var(--lc-text));
  --find-glow: color-mix(in srgb, var(--lc-button) 70%, transparent);
}

/* ── The page ── */
.lc-sheet.find {
  --find-ink: var(--lc-text);
  --find-soft: var(--lc-muted);
  --find-warning: var(--ds-amber);
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 35;
  inset: var(--app-offset-top, 0px) var(--app-right-gap, 0px) auto var(--app-offset-left, 0px);
  box-sizing: border-box;
  height: var(--app-height, 100dvh);
  overflow: hidden auto;
  overscroll-behavior: contain;
  /* This sheet already ends at the visual viewport. Reserve the bar (including the safe area) once. */
  padding: 0 0 calc(var(--lc-bar-space) + var(--ds-space-6));
  background: transparent;
  color: var(--find-ink);
  opacity: 0;
  visibility: hidden;
  scrollbar-width: none;
}
.lc-sheet.find::-webkit-scrollbar { display: none; }
/* Labels need their own contrast over catalog art, not a veil, border or glow on the carousel. */
@media (forced-colors: none) {
  html[data-lc-art]:not([data-lc-art="plain"]) .lc-sheet.find {
    --find-ink: #f1f4ff;
    --find-soft: #d1d6e6;
    --find-warning: #f7dc99;
    --find-lit: color-mix(in srgb, var(--lc-accent) 57%, #e0ecff);
    --find-label-shadow: 0 1px 3px rgb(0 0 0 / .75);
  }
}
html[data-lc-sheet="open"] .lc-sheet.find { opacity: 1; visibility: visible; }
html[data-lc-sheet="open"] .lc-home { visibility: hidden; }
/* A page (settings, profile, rules) covers it; closing the page brings it back. */
html[data-hub-overlay="open"] .lc-sheet.find { opacity: 0; visibility: hidden; transition: none; }
.find-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ds-space-4);
  box-sizing: border-box;
  flex: none;
  width: min(100%, 31rem);
  margin: auto;
  padding: var(--ds-space-5) max(var(--ds-space-4), env(safe-area-inset-right)) 0 max(var(--ds-space-4), env(safe-area-inset-left));
}
.find-main, .find-side { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.find-main { gap: var(--ds-space-3); }
/* Keep the centered page still when an announcement has no start action. */
.find-side {
  gap: var(--ds-space-3);
  min-block-size: calc(2 * (var(--ds-touch) + var(--ds-space-2)) + var(--ds-space-3));
}

/* ── Online summary and server-owned daily check-in shortcut ── */
.find-head {
  display: grid;
  flex: none;
  box-sizing: border-box;
  width: min(100%, 31rem);
  min-width: 0;
  padding-block-start: env(safe-area-inset-top);
  padding-inline: calc(max(var(--ds-space-4), env(safe-area-inset-left)) + var(--ds-space-1))
    calc(max(var(--ds-space-4), env(safe-area-inset-right)) + var(--ds-space-1));
}
.find-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3); min-height: var(--ds-touch); }
.find-streak-button {
  display: grid;
  flex: 0 0 var(--ds-touch);
  margin-block: var(--ds-space-2);
  place-items: center;
  inline-size: var(--ds-touch);
  block-size: var(--ds-touch);
  min-inline-size: var(--ds-touch);
  min-block-size: var(--ds-touch);
  margin-inline-start: auto;
  padding: 0;
  border: 0;
  border-radius: var(--ds-radius-full);
  background: transparent;
  color: var(--find-ink);
  box-shadow: none;
  cursor: pointer;
  transition: transform var(--ds-dur-fast) var(--ds-ease-out);
}
.find-streak-icon { display: grid; place-items: center; width: 30px; height: 30px; color: var(--find-lit); }
.find-streak-button .lc-icon { width: 19px; height: 19px; }
.find-streak-button:focus-visible { outline: var(--ds-focus-ring); outline-offset: var(--ds-focus-offset); }
.find-streak-button[hidden] { display: none; }

/* ── The mode carousel and direct-selection cells ── */
.find-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--ds-space-1);
  overflow: hidden;
  text-align: center;
}
.find-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}
.find-track[data-dragging] { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.find-track::-webkit-scrollbar { display: none; }
.find-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 0 0 100%;
  align-content: start;
  justify-items: center;
  gap: var(--ds-space-1);
  box-sizing: border-box;
  min-width: 0;
  padding: 0 var(--ds-space-5);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.find-slide-title { max-inline-size: 100%; margin: 0; color: var(--find-ink); text-shadow: var(--find-label-shadow, none); font: 800 var(--ds-fs-hero)/1.15 var(--lc-font); text-wrap: balance; overflow-wrap: anywhere; }
.find-slide-text { max-inline-size: min(100%, 22em); margin: 0; color: var(--find-soft); text-shadow: var(--find-label-shadow, none); font: 500 var(--ds-fs-title)/1.4 var(--lc-font); text-wrap: balance; overflow-wrap: anywhere; }
.find-slide { position: relative; }

.find-dashes { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; width: min(100%, 264px); touch-action: pan-y; user-select: none; }
.find-dash { position: relative; display: grid; place-items: center; min-width: 0; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
/* The dash is small, its touch area is not. */
.find-dash::after { content: ''; position: absolute; inset: calc((var(--ds-touch) - 24px) / -2) 0; }
.find-dash::before { content: ''; width: 12px; height: 4px; border-radius: var(--ds-radius-full); background: color-mix(in srgb, var(--find-ink) 60%, var(--ds-surface-inset)); transition: width var(--ds-dur) var(--ds-ease-out), background-color var(--ds-dur) ease; }
.find-dash[aria-current="true"]::before { width: 20px; background: var(--find-lit); }
/* Keep keyboard focus visible on the rounded dash, without outlining the hit box. */
.find-dash:focus-visible { outline: none; }
.find-dash:focus-visible::before {
  outline: var(--ds-focus-ring);
  outline-color: var(--ds-ink);
  outline-offset: var(--ds-focus-offset);
}

/* Who is here now: the real count, the same number the common chat shows. */
.find-online {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--find-ink);
  text-shadow: var(--find-label-shadow, none);
  font: 700 var(--ds-fs-label)/1 var(--lc-font);
  white-space: nowrap;
}
.find-online-label { letter-spacing: .06em; text-transform: uppercase; }
.find-online strong { margin-left: var(--ds-space-1); color: inherit; font-weight: 700; font-variant-numeric: tabular-nums; }
.find-online-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ds-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-green) 22%, transparent), 0 0 10px var(--ds-green); }

/* ── «Начать поиск»: starts the mode in the middle of the card ── */
.find-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-3);
  box-sizing: border-box;
  justify-self: center;
  width: min(100%, 17.75rem);
  min-height: var(--ds-touch);
  padding: var(--ds-space-4) var(--ds-space-6);
  border: 0;
  border-radius: var(--ds-radius-full);
  font: 800 var(--ds-fs-control)/1.15 var(--lc-font);
  cursor: pointer;
}
.find-go .lc-icon { flex: none; width: 20px; height: 20px; }
.find-go-label { min-width: 0; overflow-wrap: anywhere; }

/* ── The priority of the search ── */
.find-prio { display: grid; justify-items: center; gap: var(--ds-space-2); min-width: 0; }
.find-slider {
  --find-level: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 25rem);
  touch-action: pan-y;
}
.find-slider::before, .find-slider::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(100% / 6);
  height: 4px;
  border-radius: var(--ds-radius-full);
  pointer-events: none;
}
.find-slider::before { right: calc(100% / 6); background: var(--ds-edge); }
.find-slider::after { width: calc((100% - 100% / 3) * var(--find-level)); background: linear-gradient(90deg, var(--lc-button), var(--find-lit)); transition: width var(--ds-dur) var(--ds-ease-out); }
.find-stop {
  min-width: 0;
  overflow-wrap: anywhere;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
  padding: 0 0 var(--ds-space-1);
  border: 0;
  background: transparent;
  color: var(--find-soft);
  text-shadow: var(--find-label-shadow, none);
  font: 600 var(--ds-fs-body)/1.2 var(--lc-font);
  cursor: pointer;
  transition: color var(--ds-dur) ease;
}
.find-stop-dot {
  box-sizing: border-box;
  width: 11.2px;
  height: 11.2px;
  margin-block: 16.4px;
  border: 2px solid var(--ds-edge);
  border-radius: 50%;
  background: var(--lc-bg);
  transition: width var(--ds-dur) var(--ds-ease-out), height var(--ds-dur) var(--ds-ease-out), margin var(--ds-dur) var(--ds-ease-out), border-width var(--ds-dur) ease, box-shadow var(--ds-dur) ease;
}
.find-stop[aria-checked="true"] { color: var(--find-ink); }
.find-stop[aria-checked="true"] .find-stop-dot {
  width: 20.8px;
  height: 20.8px;
  margin-block: 11.6px;
  border: 5px solid var(--ds-ink);
  background: #ffffff;
  box-shadow: none;
}
.find-prio-hint { margin: 0; color: var(--find-soft); text-shadow: var(--find-label-shadow, none); font: 500 var(--ds-fs-body)/1.3 var(--lc-font); text-align: center; }
.find-note { display: flex; align-items: center; justify-content: center; gap: var(--ds-space-2); margin: 0; color: var(--find-warning); text-shadow: var(--find-label-shadow, none); font: 600 var(--ds-fs-body)/1.3 var(--lc-font); }
.find-note[hidden], .find-note[data-locked="false"] { display: none; }
.find-note .lc-icon { width: 16px; height: 16px; flex: none; }

/* ── Preferences ── */
.find-prefs {
  --find-prefs-icon-size: clamp(16px, 1em, 20px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(0, 1fr);
  align-items: center;
  align-self: end;
  justify-self: center;
  gap: var(--ds-space-1);
  box-sizing: border-box;
  width: min(100%, 21rem);
  min-height: 52px;
  padding: 0 var(--ds-space-2);
  appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--find-ink);
  text-shadow: var(--find-label-shadow, none);
  font: 600 var(--ds-fs-title)/1.2 var(--lc-font);
  cursor: pointer;
}
.find-prefs .lc-icon { width: var(--find-prefs-icon-size); height: var(--find-prefs-icon-size); justify-self: center; color: var(--find-lit); scale: 1; }
.find-prefs > span {
  min-width: 0; text-align: center; overflow-wrap: anywhere;
  text-decoration-thickness: 2px; text-underline-offset: .18em;
}
/* Show keyboard focus on the label instead of drawing a frame around the action. */
.find-prefs:focus-visible { outline: none; }
.find-prefs:focus-visible > span { text-decoration-line: underline; }

:is(.find-go, .find-stop):focus-visible, .find-track:focus-visible .find-slide[data-current="true"] { outline: var(--ds-focus-ring); outline-offset: var(--ds-focus-offset); }

/* ── Пять кнопок у нижней границы видимой области. ── */
.lc-nav {
  position: fixed;
  z-index: 40;
  inset: auto var(--app-right-gap, 0px) var(--app-bottom-gap, 0px) var(--app-offset-left, 0px);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  height: var(--lc-bar-height);
  padding: var(--lc-nav-space) var(--lc-chrome-right)
    calc(var(--lc-nav-space) + var(--ds-safe-bottom)) var(--lc-chrome-left);
  background: none;
  pointer-events: none;
  user-select: none;
}
html[data-keyboard-open] .lc-nav { display: none; }
/* The dock returns on Home or when a chat is folded. The live screen only has its composer. */
#app:not(:has(> :is(#screen-landing, #screen-text-chat):not([hidden]))) > .lc-nav { display: none; }
#screen-text-chat:not([hidden]) ~ .lc-nav { z-index: 1001; }
#screen-text-chat:not([hidden]):is([data-chat-state="active"], [data-chat-state="reconnecting"], :has(#chat-1x1-circle:not([hidden]))) ~ .lc-nav { display: none; }
/* Five separate tiles, one per destination — the owner's reference of 28.11.2026 replaces the single
   capsule. Equal squares, equal gaps, no captions: the icon and the fill say where you are. The rail
   paints nothing itself; it still reserves the composer's column, so nothing else on screen moves. */
.lc-nav-tabs {
  --lc-nav-gap: var(--lc-nav-gap-fit);
  display: flex; align-items: center; justify-content: center; gap: var(--lc-nav-gap);
  container-type: inline-size;
  box-sizing: border-box; inline-size: 100%; max-inline-size: var(--lc-column); padding: var(--lc-dock-inset);
  background: none;
}
.lc-nav-tab {
  /* A square of the dock's own bar, never wider than a fifth of the column: the bar grows with the
     root font, and five tiles plus four gaps must still fit at 320px with 200% text. */
  --lc-nav-tile: min(var(--lc-bar-tile), calc((100cqi - 4 * var(--lc-nav-gap)) / 5));
  /* A length, not a percentage: the search glyph sits inside an inline-grid indicator wrapper whose
     width comes from its content, so a percentage here would size against the wrong box. */
  --lc-nav-icon: clamp(18px, calc(var(--lc-nav-tile) * .4), 24px);
  display: flex; align-items: center; justify-content: center;
  flex: none; inline-size: var(--lc-nav-tile); block-size: var(--lc-nav-tile); min-inline-size: var(--ds-touch);
  box-sizing: border-box; padding: 0; border: 0; border-radius: var(--ds-radius-2xl);
  background: transparent; color: var(--ds-ink); cursor: pointer; pointer-events: auto;
  transition: color var(--ds-dur) var(--ds-ease-out);
}
/* Tiles use a flat raised surface; the current destination gets a neutral fill, never an accent glow. */
.lc-nav-face {
  display: flex; align-items: center; justify-content: center; min-inline-size: 0;
  box-sizing: border-box; inline-size: 100%; block-size: 100%;
  border-radius: inherit; background: var(--ds-surface-raised); color: var(--ds-ink);
  box-shadow: 0 3px 10px -5px color-mix(in srgb, var(--ds-shadow-tone) 32%, transparent);
  transition: background var(--ds-dur) var(--ds-ease-out), color var(--ds-dur) var(--ds-ease-out), box-shadow var(--ds-dur) var(--ds-ease-out);
}
.lc-nav-tab[aria-current="page"] .lc-nav-face {
  background: var(--ds-control-tint); color: var(--ds-ink);
  box-shadow: 0 3px 10px -5px color-mix(in srgb, var(--ds-shadow-tone) 32%, transparent);
}
.lc-nav-tab .lc-icon { position: relative; flex: none; width: var(--lc-nav-icon); height: var(--lc-nav-icon); scale: 1; }
.lc-nav-tab:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
/* The reference has no captions. The name stays on the button for screen readers and the tooltip,
   and the span stays in the markup for the text-size contracts; nothing reveals it. */
.lc-nav-label {
  display: block; min-inline-size: 0; max-inline-size: 0; overflow: hidden; visibility: hidden;
  font: 720 clamp(var(--ds-fs-label), calc(.625rem + .6cqi), var(--ds-fs-control))/1.16 var(--lc-font);
}
.lc-nav-label > span {
  display: block; inline-size: max-content; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
/* The same button looks for a partner and leads back to the chat it found. */
#lc-nav-start[data-chat="search"]:not([aria-current="page"]) .lc-icon { color: var(--ds-ink-accent); }

/* Every screen keeps the same centered, single-column flow; the fixed dock stays separate. */
/* The artwork also has its own short-viewport sizing in find-effects.css. */
@media (max-height: 34rem) {
  .find-page { gap: var(--ds-space-3); padding-top: var(--ds-space-3); }
  .find-side { gap: var(--ds-space-2); }
}
@media (max-width: 359px) and (min-height: 600px) {
  .find-page { gap: var(--ds-space-2); padding-top: var(--ds-space-3); }
  .find-main, .find-head { gap: var(--ds-space-2); }
  .find-card { gap: var(--ds-space-1); }
  .find-side { gap: var(--ds-space-2); }
  .find-slide-title { font-size: var(--ds-fs-title); }
  .find-slide-text { font-size: var(--ds-fs-label); }
}

@media (prefers-reduced-motion: reduce) {
  .lc-nav-label, .lc-nav-tab, .find-slide, .find-go, .find-streak-button, .find-dash::before, .find-stop, .find-stop-dot, .find-slider::after { transition: none; }
}
html[data-hub-motion="reduced"] :is(.lc-nav-tab, .lc-nav-label, .find-streak-button) { transition: none; }
@media (forced-colors: active) {
  .lc-nav-tab, .find-go { border: 1px solid ButtonText; box-shadow: none; }
  .find-slider::before { forced-color-adjust: none; background: CanvasText; }
  .find-slider::after { forced-color-adjust: none; background: Highlight; }
  .find-stop-dot { forced-color-adjust: none; background: Canvas; border-color: CanvasText; }
  .find-stop[aria-checked="true"] .find-stop-dot { border-color: Highlight; }
  .find-stop:focus-visible { outline-color: CanvasText; }
  .find-dash[aria-current="true"]::before, .lc-nav-tab[aria-current="page"] .lc-nav-face { forced-color-adjust: none; background: Highlight; color: HighlightText; box-shadow: none; }
  .find-dash:focus-visible::before { outline-color: Highlight; }
}

/* ── Главная страница ── */
/* State colors come from the same button roles as .hub-action. */
.find-go { box-shadow: 0 2px 6px rgb(0 0 0 / .18); }

/* ── Переписка ── */
/* Само поле рисует свою подложку. Иконки в шапке и инструменты ввода остаются лёгкими. */
.chat-lc-tool, .chat-lc-emoji-btn {
  border: 0;
  border-radius: 50%;
  background: transparent;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}
/* Кнопка отправки — диск, а не плашка: скругление контрола делало её квадратной внутри круглой пилюли
   (владелец, 15.11: «иконка отправки имеет квадратное скругление и не вписывается»). */
.chat-lc-send {
  border-radius: 50%;
  background-color: var(--lc-button);
  background-image: none;
  box-shadow: 0 2px 6px rgb(0 0 0 / .18);
}

.lc-talk-form .chat-lc-send {
  box-shadow: 0 2px 6px rgb(0 0 0 / .18);
}

/* ── Магазин и профиль ── */
.lc-shop-cart {
  background-color: var(--ds-surface-raised);
  box-shadow: var(--ds-shadow-card);
  border-radius: var(--ds-radius-card);
}
.lc-preview-stage {
  background-color: color-mix(in srgb, var(--lc-bg) 46%, transparent);
  box-shadow: inset 0 1px 3px color-mix(in srgb, #000000 24%, transparent);
}

/* Окна и меню получают общую поверхность и свет вместо собственных теней. */
.lc-preview { border-radius: var(--ds-radius-sheet); }
