/* Нижняя часть главной: вкладки «Мои» / «Столы» (разметка в index.php, логика в assets/app.js).
   Только тёмная тема. Без обводок: вкладки, карточки и кнопки разделяются фоном. */

.ll {
  --ll-ground: #0f1b1d;
  --ll-card: #142325;
  --ll-card-hot: #143328;
  --ll-gold: #f0c777;
  --ll-gold-ink: #16140e;
  --ll-green: #6fe0a8;
  --ll-green-ink: #0b2118;
  --ll-text: #f6f0e3;
  --ll-muted: #c5d0ca;
  --ll-soft: #b9c6c0;
  --ll-tab-text: #d6dfda;
  --ll-away: #f0c777;
  --ll-off: #6b7a7e;
  color: var(--ll-text);
  font-family: Raleway, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.ll .num { font-family: inherit; }
.ll button { font-family: inherit; border: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ll button:focus-visible { outline: 2px solid var(--ll-gold); outline-offset: 2px; }

/* Переключатель: две кнопки на общем фоне */
.ll-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  padding: 4px; margin-bottom: 12px; border-radius: 16px; background: var(--ll-ground);
}
/* До первого ответа сервера вкладки — заглушки той же формы, без текста */
.ll:not(.is-ready) .ll-tab { color: transparent; pointer-events: none; }
.ll:not(.is-ready) .ll-tab > * { visibility: hidden; }
.ll:not(.is-ready) .ll-tab::after {
  content: ""; position: absolute; width: 56px; height: 12px; border-radius: 6px; background: rgba(255,255,255,.08);
  animation: llSkel 1.2s ease-in-out infinite;
}
.ll:not(.is-ready) .ll-tab:first-child { background: rgba(240,199,119,.12); }
.ll-tab { position: relative; }
.ll-tab {
  height: 44px; border-radius: 12px; background: transparent; color: var(--ll-tab-text);
  font-family: Onest, Raleway, sans-serif; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color .15s ease, color .15s ease;
}
.ll-tab.is-active { background: var(--ll-gold); color: var(--ll-gold-ink); font-weight: 800; }
.ll-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ll-green); }
#tabTables .ll-tab-n { color: var(--ll-green); }
#tabTables.is-active .ll-tab-dot { background: #1f7a52; }
#tabTables.is-active .ll-tab-n { color: inherit; }

/* Списки и карточки */
.ll-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.ll-list[hidden] { display: none; }
/* Заглушки строк списка на время загрузки: аватар, две строки, кнопка */
.ll-skel {
  min-height: 72px; box-sizing: border-box; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--ll-card);
  display: flex; align-items: center; gap: 12px;
}
.ll-skel span { display: block; background: rgba(255,255,255,.07); animation: llSkel 1.2s ease-in-out infinite; }
.ll-skel-ava { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; }
.ll-skel .ll-skel-lines { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; background: none; animation: none; }
.ll-skel-lines span { height: 12px; border-radius: 6px; width: 55%; }
.ll-skel-lines span + span { width: 38%; height: 10px; }
.ll-skel-btn { width: 76px; height: 44px; flex-shrink: 0; border-radius: 14px; }
@keyframes llSkel { 50% { opacity: .45; } }
.ll-card {
  box-sizing: border-box; width: 100%; border-radius: 18px; background: var(--ll-card);
  cursor: pointer;
}
/* Нажатие: сжатие сразу по касанию, пружинистое отпускание (assets/press-fx.js, .press-fx в slide-screen.css).
   Карточка большая — сжимается слабее кнопок. */
.ll-card.press-fx.is-pressed { transform: scale(.98) !important; }
.ll-mine { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ll-mine.is-myturn { background: var(--ll-card-hot); }
.ll-row { display: flex; align-items: center; gap: 12px; }
.ll-tbl { min-height: 72px; padding: 12px 12px 12px 14px; display: flex; align-items: center; gap: 12px; }
.ll-tbl.is-near, .ll-tbl.is-far { background: var(--ll-card-hot); }
.ll-tbl.is-away { background: var(--ll-card); }
.ll-tbl.is-ready, .ll-tbl.is-invited { background: var(--ll-ground); cursor: default; }

.ll-ava { width: 44px; height: 44px; flex-shrink: 0; display: block; object-fit: contain; }
.ll-ava.is-faded { opacity: .7; }
.ll-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ll-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 16px; font-weight: 800; line-height: 1.25; }
.ll-name-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ll-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--ll-off); }
.ll-dot.is-on { background: var(--ll-green); }
.ll-dot.is-away { background: var(--ll-away); }
.ll-status { font-size: 13px; font-weight: 700; color: var(--ll-muted); }
.ll-status.is-my { color: var(--ll-green); }
.ll-sub { font-size: 13px; font-weight: 600; color: var(--ll-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-rank { color: var(--ll-gold); font-weight: 700; }

.ll-score { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.ll-score-n { font-family: Onest, Raleway, sans-serif; font-size: 22px; font-weight: 800; line-height: 1; white-space: nowrap; }
.ll-score-l { margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--ll-soft); white-space: nowrap; }

/* Полоска лунок (только первая карточка «Моих»): 9 столбцов × 2 ряда */
.ll-cells { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.ll-cells span { height: 12px; border-radius: 6px; }

/* Кнопки */
.ll-bell {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
}
.ll-bell { color: var(--ll-gold); }
.ll-sit {
  height: 44px; padding: 0 18px; flex-shrink: 0; border-radius: 14px;
  background: var(--ll-green); color: var(--ll-green-ink); font-size: 15px; font-weight: 800;
}
.ll-call {
  height: 44px; padding: 0 16px; flex-shrink: 0; border-radius: 14px;
  background: rgba(240,199,119,.14); color: var(--ll-gold); font-size: 14px; font-weight: 700;
}
.ll-called {
  height: 44px; padding: 0 6px; flex-shrink: 0; display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--ll-soft);
}
.ll-called svg { color: var(--ll-green); }
.ll button:disabled { opacity: .6; cursor: default; }

.ll-empty { padding: 20px 8px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ll-soft); }

@media (prefers-reduced-motion: reduce) {
  .ll-tab { transition: none; }
  .ll-skel span, .ll:not(.is-ready) .ll-tab::after { animation: none; }
}

/* ---- Верх главной во время подбора (index.php #searchPanel, assets/app.js paintSearch) ----
   Высота верха не меняется, кнопки игры остаются на месте: медаль плавно гаснет, на её месте
   появляется «Вы VS Соперник»; монета и кнопки справа плавно уменьшаются, освобождая место. */
#rankBlock .hv2-medal,
#rankBlock > .absolute.right-0,
#rankBlock #coinsBanner, #rankBlock #inviteBanner, #rankBlock #coinsVisitedDot {
  transition: opacity .35s ease, transform .35s ease, visibility 0s;
}
#rankBlock > .absolute.right-0 { transform-origin: top right; }
#rankBlock #coinsBanner, #rankBlock #inviteBanner { transform-origin: top left; }
#rankBlock.is-searching .hv2-medal { opacity: 0; transform: scale(.92); visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility 0s .25s; }
#rankBlock.is-searching > .absolute.right-0 { transform: scale(.8); }
#rankBlock.is-searching #coinsBanner, #rankBlock.is-searching #inviteBanner { transform: scale(.8); }
#rankBlock.is-searching #coinsVisitedDot { transform: translate(-7px, 0) scale(.8); }

.ls-search {
  position: absolute; left: 50%; top: 0; z-index: 1;
  width: min(272px, calc(100% - 84px)); height: 222px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 2px 0 0;
  color: #f6f0e3; font-family: Raleway, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums;
  opacity: 0; visibility: hidden; transform: translate(-50%, 10px);
  transition: opacity .3s ease, transform .3s ease, visibility 0s .3s;
}
#rankBlock.is-searching .ls-search {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
  transition: opacity .35s ease .12s, transform .35s ease .12s, visibility 0s;
}
.ls-head { display: flex; align-items: baseline; justify-content: center; gap: 8px; max-width: 100%; }
#searchTitle { font-family: Onest, Raleway, sans-serif; font-size: 18px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-timer { font-family: Onest, Raleway, sans-serif; font-size: 17px; font-weight: 800; color: #f0c777; }
.ls-vs { width: 100%; display: flex; align-items: flex-start; justify-content: center; gap: 6px; }
.ls-side { width: calc((100% - 32px) / 2); display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ls-ava {
  position: relative; width: 88px; height: 88px; margin-bottom: 6px; border-radius: 50%; background: rgba(7,17,19,.72);
  display: flex; align-items: center; justify-content: center;
}
.ls-ava img { width: 66px; height: 58px; object-fit: contain; display: block; }
/* круг соперника: значки рангов лежат друг на друге и плавно сменяются (app.js startOppCycle) */
#searchOppAva img {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: auto;
  opacity: 0; transform: scale(.94); transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
}
#searchOppAva img.is-on { opacity: 1; transform: none; }
.ls-ava.is-ask { background: #142325; }
/* Пока ищем — от круга соперника медленно расходятся два мягких кольца */
/* круг соперника во время подбора: без колец и свечения, только очень мягкое «дыхание» */
.ls-ava.is-ask { animation: lsBreath 4.5s ease-in-out infinite; }
@keyframes lsBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(.95); } }
/* круги «Вы» и «Соперник» — на размытом фоне, чтобы мягкое «дыхание» было видно */
#searchPanel .ls-ava { background: rgba(10,22,24,.5) !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ls-ava.is-ask img.is-on { opacity: .85; }
.ls-vs-t { width: 20px; height: 88px; display: flex; align-items: center; justify-content: center; font-family: Onest, Raleway, sans-serif; font-size: 15px; font-weight: 800; color: #f0c777; }
.ls-name { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 800; line-height: 1.2; }
.ls-search.is-found #searchTitle { color: #6fe0a8; }
.ls-hint { max-width: 100%; margin: 0; text-align: center; font-size: 12px; font-weight: 600; line-height: 1.25; color: #b9c6c0; }
.ls-hint[hidden] { display: block; visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .ls-ava.is-ask { animation: none; }
  #searchOppAva img { transition: none; }
  #rankBlock .hv2-medal, #rankBlock > .absolute.right-0, #rankBlock #coinsBanner, #rankBlock #inviteBanner,
  #rankBlock #coinsVisitedDot, .ls-search, #rankBlock.is-searching .ls-search, #rankBlock.is-searching .hv2-medal { transition: none; }
}

/* Главная пришла уже в виде подбора (index.php) — без анимации перестройки при открытии */
#rankBlock.ls-noanim, #rankBlock.ls-noanim * { transition: none !important; }

/* Telegram: самолётик приглашения во время подбора — без круга и фона, зона нажатия 44 px.
   Перелетает с места монеты (#inviteBanner) к кнопке подбора и обратно (app.js paintSearchInvite). */
.ls-invite {
  position: absolute; left: 0; top: 0; z-index: 5; width: 44px; height: 44px; border: 0; padding: 0; background: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
  opacity: 0; transform: scale(0); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease; /* уходит сразу */
}
/* появляется справа, когда самолётик слева уже уменьшился */
.ls-invite.is-in { opacity: 1; transform: none; pointer-events: auto; transition: opacity .3s ease .3s, transform .35s cubic-bezier(.2,.8,.3,1.15) .3s; }
.ls-invite:focus-visible { outline: 2px solid #f0c777; outline-offset: 2px; border-radius: 12px; }
/* самолётик на месте монеты: при подборе уменьшается до нуля сразу, возвращается после того, как правый ушёл */
#rankBlock #inviteBanner { transition: opacity .3s ease .3s, transform .35s cubic-bezier(.2,.8,.3,1.15) .3s; }
#rankBlock #inviteBanner.ls-flown { opacity: 0; transform: scale(0); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
/* мягкий медленный перелив — спокойнее, чем у самолётика на месте монеты */
.ls-invite-ico {
  font-size: 22px;
  background: linear-gradient(110deg, #2aabee 0%, #2aabee 38%, #bfe9ff 50%, #2aabee 62%, #2aabee 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: lsInviteShimmer 6s ease-in-out infinite; filter: drop-shadow(0 2px 6px rgba(42,171,238,.25));
}
.ls-invite:active .ls-invite-ico { opacity: .8; }
@keyframes lsInviteShimmer { 0% { background-position: 100% 0; } 45%, 100% { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .ls-invite-ico { animation: none; } .ls-invite, .ls-invite.is-in, #rankBlock #inviteBanner, #rankBlock #inviteBanner.ls-flown { transition: none; } }

/* Содержимое экрана рейтинга (index.php) скрыто, пока rating-screen.js не перенесёт его в свой экран:
   класс .flex иначе перебивает атрибут hidden, и вкладки «Ранг / Рейтинг / Репутация» мелькали внизу */
#ratingScreenContent[hidden] { display: none !important; }

/* Экран лайков (assets/app.js, выезжает справа). Только тёмная тема, без обводок. */
.lk { width: 100%; max-width: 448px; padding-top: 4px; box-sizing: border-box;
  color: #f6f0e3; font-family: Raleway, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: lining-nums tabular-nums; }
.lk .num { font-family: Onest, Raleway, sans-serif; }
.lk-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0 18px; }
.lk-total { font-size: 48px; font-weight: 800; line-height: 1; color: #f0c777; }
.lk-total-l { font-size: 14px; font-weight: 700; color: #c5d0ca; }
.lk-place { margin-top: 8px; padding: 6px 14px; border-radius: 999px; background: #0f1b1d; font-size: 14px; font-weight: 700; color: #c5d0ca; }
.lk-place b { color: #f6f0e3; font-weight: 800; }
.lk-h { margin: 4px 0 10px; font-family: Onest, Raleway, sans-serif; font-size: 16px; font-weight: 800; }
.lk-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.lk-top-c { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px 12px; border-radius: 18px; background: #142325; min-width: 0; }
.lk-top-c:first-child { background: #143328; }
.lk-medal { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #16140e; }
.lk-m1 { background: #f0c777; } .lk-m2 { background: #c9d2d6; } .lk-m3 { background: #d19a6a; }
.lk-top-ava { width: 44px; height: 44px; object-fit: contain; display: block; }
.lk-top-n { max-width: 100%; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-cnt { font-size: 15px; font-weight: 800; color: #f0c777; white-space: nowrap; }
.lk-list { display: flex; flex-direction: column; gap: 8px; }
.lk-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; border-radius: 16px; background: #142325; box-sizing: border-box; }
.lk-ava { width: 36px; height: 36px; flex-shrink: 0; object-fit: contain; display: block; }
.lk-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lk-name { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-ago { font-size: 13px; font-weight: 700; color: #b9c6c0; }
.lk-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 12px; border-radius: 18px; background: #142325; text-align: center; }
.lk-empty b { font-size: 16px; font-weight: 800; }
.lk-empty span { font-size: 14px; font-weight: 700; color: #c5d0ca; }
.lk-btn { display: flex; align-items: center; justify-content: center; height: 52px; margin-top: 16px; border-radius: 16px; background: #f0c777; color: #16140e;
  font-family: Onest, Raleway, sans-serif; font-size: 15px; font-weight: 800; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.lk-btn:active { filter: brightness(1.1); }

/* Экран монет (assets/coins-screen.js). Без обводок, как лайки. */
.cn { position: relative; width: 100%; max-width: 448px; padding-top: 4px; box-sizing: border-box;
  color: #f6f0e3; font-family: Raleway, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: lining-nums tabular-nums; }
.cn .num { font-family: Onest, Raleway, sans-serif; }
.cn-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 18px; }
.cn-coin { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }
.cn-coin-lg { width: 64px; height: 64px; filter: drop-shadow(0 0 14px rgba(240,199,119,.35)); margin-bottom: 6px; }
.cn-bal { font-size: 44px; font-weight: 800; line-height: 1; color: #f0c777; }
.cn-bal-l { font-size: 14px; font-weight: 700; color: #c5d0ca; }
.cn-h { margin: 6px 0 10px; font-family: Onest, Raleway, sans-serif; font-size: 16px; font-weight: 800; }
.cn-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cn-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px 10px 14px; border-radius: 16px; background: #142325; box-sizing: border-box; }
.cn-row.is-done { background: #0f1b1d; }
.cn-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: rgba(240,199,119,.14); color: #f0c777; display: grid; place-items: center; font-size: 18px; }
.cn-net-telegram { background: rgba(42,171,238,.16); color: #5cc3f5; }
.cn-net-instagram { background: rgba(225,48,108,.16); color: #f07aa6; }
.cn-net-tiktok, .cn-net-threads { background: rgba(255,255,255,.08); color: #f6f0e3; }
.cn-net-facebook { background: rgba(24,119,242,.16); color: #6aa8ff; }
.cn-net-youtube { background: rgba(255,0,0,.14); color: #ff6b6b; }
.cn-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cn-main b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-main span { font-size: 13px; font-weight: 700; color: #b9c6c0; }
.cn-plus { flex-shrink: 0; font-size: 18px; font-weight: 800; color: #f0c777; white-space: nowrap; }
.cn-btn { flex-shrink: 0; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: #f0c777; color: #16140e;
  font-family: Onest, Raleway, sans-serif; font-size: 14px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.cn-btn-go { background: rgba(240,199,119,.16); color: #f0c777; }
.cn-btn:disabled { opacity: .55; }
.cn-btn:active:not(:disabled), .cn-shop:active { filter: brightness(1.1); }
.cn-done { flex-shrink: 0; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #b9c6c0; }
.cn-done i { color: #6fe0a8; font-size: 11px; }
.cn-shop { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin-top: 4px; border: 0; border-radius: 16px;
  background: #f0c777; color: #16140e; font-family: Onest, Raleway, sans-serif; font-size: 15px; font-weight: 800; cursor: pointer; }
.cn-note { margin-top: 10px; text-align: center; font-size: 13px; font-weight: 700; color: #b9c6c0; }
.cn-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 80;
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px; background: #0f1b1d; color: #f6f0e3; font-size: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.45); }

/* красная точка на кнопках, которые можно нажать (как точка на монете на главной) */
.cn-dot { position: relative; }
.cn-dot::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px #142325; }
.cn-dot:disabled::after { display: none; }
.cn-link { align-self: flex-start; margin-top: 4px; padding: 0; border: 0; background: none; color: #5cc3f5; font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; }
.lk-top-c, .lk-row { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lk-top-c:active, .lk-row:active { filter: brightness(1.12); }
