:root {
  --ink: #0b0b0d;
  --surface: #151518;
  --surface-2: #1d1d22;
  --line: #2a2a31;
  --text: #ededee;
  --muted: #8b8b94;
  --muted-2: #61616a;
  --accent: #cda863;          /* приглушённое золото — отсылка к плёнке/свету */
  --accent-soft: rgba(205, 168, 99, 0.14);
  --danger: #d4756a;
  --ok: #7fb38a;
  --frame: #c9a765;           /* рамка обложек/карусели */
  --frame-new: #ef5b6a;       /* рамка, когда есть что-то новое */

  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --pad: 16px;
  --radius: 4px;
}

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

/* ── Zoom-переход между экранами (клон миниатюры "разлетается" на весь экран) ── */
.zoom-clone {
  position: fixed;
  z-index: 950;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  transition:
    left 1s cubic-bezier(0.4, 0, 0.2, 1),
    top 1s cubic-bezier(0.4, 0, 0.2, 1),
    width 1s cubic-bezier(0.4, 0, 0.2, 1),
    height 1s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 1s ease,
    opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Шапка ─────────────────────────────────────────────── */
#topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 10px;
  background: linear-gradient(var(--ink), rgba(11, 11, 13, 0.85));
  backdrop-filter: blur(8px);
}

#navbar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.role-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 10px;
  flex-shrink: 0;
}
.role-badge:empty { display: none; }

/* ── Навигация: вкладки / хлебные крошки ───────────────── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 4px;
  margin-right: 14px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
}
.tab .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-left: 6px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.crumb-back {
  appearance: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  padding: 2px 4px 2px 0;
  cursor: pointer;
  flex-shrink: 0;
}
.crumb-path {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumb-path b { color: var(--text); font-weight: 700; }
.crumb-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(205, 168, 99, 0.4);
  text-underline-offset: 2px;
}

/* ── Контент ───────────────────────────────────────────── */
#content {
  flex: 1;
  padding: var(--pad);
  padding-bottom: calc(env(safe-area-inset-bottom) + 40px);
}
#content.content--home {
  padding: 0;
  overflow: hidden;
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 2px 0 14px;
}


/* Контактный лист (миниатюры фото) */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--frame);
  cursor: pointer;
}

/* ── Рамка всегда мягко пульсирует; если есть новое — пульсирует красным ── */
@keyframes frame-pulse {
  0%, 100% { border-color: var(--frame); }
  50%      { border-color: rgba(201, 167, 101, 0.3); }
}
.thumb, .tile, .mc {
  animation: frame-pulse 2.4s ease-in-out infinite;
}
@keyframes new-frame-pulse {
  0%, 100% { border-color: var(--frame-new); }
  50%      { border-color: rgba(239, 91, 106, 0.3); }
}
.is-new {
  animation: new-frame-pulse 2.4s ease-in-out infinite;
}

/* ── Блик, проезжающий по обложке (модели/альбомы/баннер) ──────── */
@keyframes cover-shine {
  0%   { transform: translateX(-160%) rotate(9deg); }
  100% { transform: translateX(260%) rotate(9deg); }
}
.mc::after,
.mp-banner::after,
.mp-album-row::after,
.tile::after {
  content: '';
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(75deg, transparent 42%, rgba(255, 255, 255, 0.16) 50%, transparent 58%);
  animation: cover-shine 6.5s ease-in-out infinite;
  pointer-events: none;
}
/* В карусели блик должен остаться под тёмным градиентом/текстом/кнопками */
.mc::after { z-index: 3; }
/* Небольшой разброс по времени, чтобы карточки в сетке отдыха не мигали синхронно */
.tile-grid .tile:nth-child(2n)::after { animation-delay: -2.2s; }
.tile-grid .tile:nth-child(3n)::after { animation-delay: -4.4s; }
/* Список альбомов профиля: волна снизу вверх — нижняя строка стартует первой
   (delay 0), каждая выше — на 0.1с позже. Значение задаётся инлайн в JS. */
.mp-album-row::after { animation-delay: var(--shine-delay, 0s); }

.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  opacity: 0;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.thumb img.loaded { opacity: 1; }
.thumb:active { filter: brightness(1.12); }
.thumb-video-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
/* ── Плитка (альтернатива карусели для моделей/альбомов) ── */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--frame);
  cursor: pointer;
}
.tile-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  opacity: 0;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.tile-img.loaded { opacity: 1; }
.tile:active .tile-img { filter: brightness(1.12); }
.tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}
.tile-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px 10px;
  pointer-events: none;
}
.tile-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

/* ── Пустые состояния ─────────────────────────────────── */
.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.empty .big {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
}
.empty .small { font-size: 13px; line-height: 1.5; }

/* ── Модерация ─────────────────────────────────────────── */
.mod-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--surface);
}
.mod-card img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #000;
  display: block;
}
.mod-video-badge {
  display: inline-block;
  margin: 8px 12px 0;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.mod-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 10px 14px;
}
.mod-meta b { color: var(--text); }
.mod-actions { display: flex; border-top: 1px solid var(--line); }
.mod-actions button {
  flex: 1;
  appearance: none;
  background: none;
  border: none;
  padding: 14px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.mod-actions .reject { color: var(--danger); }
.mod-actions .approve { color: var(--ok); border-left: 1px solid var(--line); }
.mod-actions button:active { background: var(--surface-2); }

/* ── Доступ (пользователи) ─────────────────────────────── */
.user-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}
.user-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.user-info .name { font-size: 14px; color: var(--text); }
.user-info .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 2px;
}
.user-roles {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.user-row select {
  appearance: none;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 12px;
  flex-shrink: 0;
}
.user-row .sel-role2 {
  color: var(--muted-2);
  font-size: 11px;
}
.user-row .owner-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.user-model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 2px;
}
.model-chip {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--muted-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.model-chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.user-model-empty {
  font-size: 12px;
  color: var(--muted-2);
  font-style: italic;
}

/* ── Главный экран — полноэкранное фото ─────────────────── */
.home-fs {
  position: absolute;
  inset: 0;
  background: var(--ink);
  touch-action: none;
  user-select: none;
}
.home-fs-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}
.home-fs-bg--empty {
  background: linear-gradient(160deg, #1c1c22 0%, #0b0b0d 100%);
}
.home-fs-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0)    35%,
    rgba(0,0,0,0)    55%,
    rgba(0,0,0,0.7)  100%
  );
}
.home-fs-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 2;
  background: transparent;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.4);
  font-size: 32px;
  cursor: pointer;
}
.home-fs-half--left  { left: 0;  justify-content: flex-start; padding-left: 12px; }
.home-fs-half--right { right: 0; justify-content: flex-end;   padding-right: 12px; }
.home-fs-half:active { background: rgba(255,255,255,0.05); }

/* ── Лайтбокс ──────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  touch-action: none;   /* перехватываем все жесты сами */
  user-select: none;
}
.lightbox[hidden] { display: none; }
.lb-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.lb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  will-change: transform;
  -webkit-user-drag: none;
}
.lb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 5;
  display: none;
  touch-action: manipulation;
}
.lb-video.active { display: block; }
.lb-close {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  left: 12px;
  z-index: 10;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-close:active { background: rgba(0, 0, 0, 0.7); }
.lb-download {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  right: 12px;
  z-index: 10;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-download:active { background: rgba(0, 0, 0, 0.7); }
.lb-menu-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  right: 12px;
  z-index: 10;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-menu-btn:active { background: rgba(0, 0, 0, 0.7); }
.lb-counter {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 12px;
  border-radius: 100px;
}
.lb-counter .cur { color: var(--accent); }
/* На Android/ПК нативная панель видео сидит выше — приподнимаем счётчик так же,
   как лайк/комменты, чтобы не перекрывался. */
html:not(.platform-ios) .lb-counter { bottom: calc(env(safe-area-inset-bottom) + 56px); }
.lightbox.video-active .lb-menu-btn {
  display: none;
}
/* На видео счётчик/лайк/комменты/скачать видны только на паузе/остановке —
   во время воспроизведения нативная панель плеера остаётся на экране и не
   должна перекрываться. */
.lightbox.video-active .lb-cmt-btn,
.lightbox.video-active .lb-like-btn,
.lightbox.video-active .lb-download,
.lightbox.video-active .lb-counter {
  display: none;
}
.lightbox.video-active.video-paused .lb-cmt-btn {
  display: flex;
}
.lightbox.video-active.video-paused .lb-like-btn {
  display: flex;
}
.lightbox.video-active.video-paused .lb-download {
  display: flex;
}
.lightbox.video-active.video-paused .lb-counter {
  display: block;
}
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  border: none;
  background: none;
  color: #fff;
  font-size: 54px;
  line-height: 1;
  cursor: pointer;
  padding: 16px 12px;
  transition: opacity 0.2s;
  text-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.lb-prev { left: 0; }
.lb-next { right: 0; }

/* ── Splash ────────────────────────────────────────────── */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 10px;
}
.splash-mark {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  font-size: 18px;
  color: var(--text);
}
.splash-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
}
.splash.error .splash-sub { color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── Комментарии ────────────────────────────────────────── */
.lb-cmt-btn {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  left: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 20px;
  padding: 9px 13px;
  color: #fff;
  cursor: pointer;
}
.lb-cmt-btn:active { background: rgba(0, 0, 0, 0.7); }
/* На Android нативная панель видео сидит выше — приподнимаем кнопки, чтобы не перекрывались */
html:not(.platform-ios) .lb-cmt-btn { bottom: calc(env(safe-area-inset-bottom) + 56px); }
.lb-cmt-icon { font-size: 15px; line-height: 1; }
.lb-cmt-count { font-family: var(--font-mono); font-size: 12px; }

.lb-like-btn {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  right: 12px;
  z-index: 10;
  pointer-events: auto;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 20px;
  padding: 9px 13px;
  color: #fff;
  cursor: pointer;
}
.lb-like-btn:active { background: rgba(0, 0, 0, 0.7); }
html:not(.platform-ios) .lb-like-btn { bottom: calc(env(safe-area-inset-bottom) + 56px); }
.lb-like-icon { font-size: 15px; line-height: 1; }
.lb-like-count { font-family: var(--font-mono); font-size: 12px; }

/* ── Двойной тап по фото — вспышка сердца, как в Instagram ── */
.lb-like-burst {
  position: absolute;
  transform: translate(-50%, -50%) scale(0);
  font-size: 84px;
  line-height: 1;
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
  animation: lb-like-burst 0.7s cubic-bezier(0.17, 0.89, 0.32, 1.49) forwards;
}
@keyframes lb-like-burst {
  0%   { transform: translate(-50%, -50%) scale(0);    opacity: 0; }
  20%  { transform: translate(-50%, -50%) scale(1.15);  opacity: 1; }
  40%  { transform: translate(-50%, -50%) scale(0.95);  opacity: 1; }
  60%  { transform: translate(-50%, -50%) scale(1.05);  opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1);     opacity: 0; }
}

.lb-cmt-wrap {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.lb-cmt-wrap[hidden] { display: none; }

.lb-cmt-backdrop {
  flex: 1;
  background: transparent;
  cursor: pointer;
}

.lb-cmt-sheet {
  height: 52%;
  background: rgba(11, 11, 13, 0.18);
  backdrop-filter: blur(20px);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.lb-cmt-sheet.open { transform: translateY(0); }

.lb-cmt-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.lb-cmt-title { font-size: 14px; font-weight: 600; color: #fff; }
.lb-cmt-x {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.lb-cmt-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lb-cmt-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  padding: 24px 0;
}
.lb-cmt-item { display: flex; flex-direction: column; gap: 3px; }
.lb-cmt-item-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lb-cmt-item-right { display: flex; align-items: center; gap: 6px; }
.lb-cmt-author { font-size: 12px; font-weight: 600; color: var(--accent); }
.lb-cmt-time { font-family: var(--font-mono); font-size: 10px; color: rgba(255, 255, 255, 0.35); }
.lb-cmt-del {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.lb-cmt-del:active { color: var(--danger); }
.lb-cmt-text { font-size: 13px; color: rgba(255, 255, 255, 0.82); line-height: 1.45; }

.lb-cmt-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.lb-cmt-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 9px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}
.lb-cmt-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.lb-cmt-input:focus { border-color: var(--accent); }
.lb-cmt-send {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lb-cmt-send:disabled { opacity: 0.4; }

/* ── Загрузка фото — bottom sheet ──────────────────────────── */
.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
}
.upload-overlay[hidden] { display: none; }

.upload-sheet {
  width: 100%;
  max-height: 88vh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}
.upload-sheet.open { transform: translateY(0); }

.upload-sheet-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.upload-sheet-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
.up-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.up-nav-btn:active { opacity: 0.7; }
.up-nav-btn[hidden] { visibility: hidden; }

.upload-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Шаг 1 — выбор каталога */
.up-catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.up-catalog-btn {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.up-catalog-btn:active { background: var(--surface-3, #222); }
.up-catalog-icon { font-size: 32px; line-height: 1; }

/* Шаги 2–3 — списки */
.up-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.up-list-item {
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.up-list-item:last-child { border-bottom: none; }
.up-list-item:active { background: var(--surface-3, #222); }
.up-list-new {
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.up-new-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.up-new-form .up-btn-primary { align-self: flex-end; }

.up-list-album {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.up-album-name {
  font-size: 15px;
  color: var(--text);
}
.up-album-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}
.up-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.up-input:focus { border-color: var(--accent); outline: none; }
.date-wheel {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 4px;
  height: 180px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 70%, transparent 100%);
}
.dw-col {
  flex: 1;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  text-align: center;
}
.dw-col::-webkit-scrollbar { display: none; }
.dw-pad { height: 72px; }
.dw-item {
  height: 36px;
  line-height: 36px;
  scroll-snap-align: center;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--muted-2);
  transition: color 0.15s;
}
.dw-item.active { color: var(--text); font-weight: 600; }
.dw-highlight {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}

.up-btn-primary {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.up-btn-primary:disabled { opacity: 0.4; cursor: default; }
.up-btn-primary:not(:disabled):active { opacity: 0.85; }

.up-context-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

/* Шаг 4 — файлы */
.up-file-zone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.up-file-zone:active, .up-file-zone.has-files { border-color: var(--accent); }
.up-file-hint { font-size: 14px; color: var(--muted-2); }
.up-file-count { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

.up-progress {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.up-progress[hidden] { display: none; }
.up-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0;
  transition: width 0.2s;
}

.up-success {
  font-size: 14px;
  color: #4caf77;
  padding: 12px 0;
}
.up-error {
  font-size: 13px;
  color: var(--danger);
  padding: 10px 0;
}
.up-loading {
  font-size: 13px;
  color: var(--muted-2);
  padding: 20px 0;
  text-align: center;
}

/* ── Карусель моделей ───────────────────────────────────── */
#content.content--carousel { padding: 8px 12px; overflow: hidden; position: relative; }

.mc {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--frame);
  background: var(--ink);
  touch-action: none;
  cursor: pointer;
}
.mc-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.mc-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    transparent 35%,
    transparent 45%,
    rgba(0,0,0,0.8) 100%
  );
}
.mc-body {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 56px);
  left: 0;
  right: 0;
  z-index: 5;
  padding: 0 24px;
  text-align: center;
  pointer-events: none;
}
.mc-name {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.mc-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
  letter-spacing: 0.06em;
}
.mc-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.mc-arrow {
  background: none;
  border: none;
  color: #fff;
  font-size: 54px;
  line-height: 1;
  padding: 16px 12px;
  cursor: pointer;
  pointer-events: all;
  transition: opacity 0.2s;
  text-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.mc-counter {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 14px;
  border-radius: 100px;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Пикер обложки ──────────────────────────────────────── */
.cpicker-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
}
.cpicker-sheet {
  width: 100%;
  max-height: 85vh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}
.cpicker-sheet.open { transform: translateY(0); }
.cpicker-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.cpicker-title { font-size: 15px; font-weight: 600; color: var(--text); }
.cpicker-close {
  background: none; border: none;
  color: var(--muted); font-size: 20px; cursor: pointer; padding: 2px 6px; line-height: 1;
}
.cpicker-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cpicker-upload-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.cpicker-upload-btn:active { border-color: var(--accent); background: var(--accent-soft); }

/* ── Редактор позиционирования обложки (зум + пан) ─────── */
.crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
}
.crop-sheet {
  width: 100%;
  height: min(92vh, 680px);
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}
.crop-sheet.open { transform: translateY(0); }
.crop-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.crop-title { font-size: 15px; font-weight: 600; color: var(--text); }
.crop-cancel {
  background: none; border: none;
  color: var(--muted); font-size: 14px; cursor: pointer; padding: 4px 6px;
}
.crop-frame-wrap {
  flex: 1;
  min-height: 0;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.crop-frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  border: 1px solid var(--frame);
  cursor: grab;
  touch-action: none;
}
.crop-frame:active { cursor: grabbing; }
.crop-img {
  position: absolute;
  top: 50%; left: 50%;
  max-width: none;
  transform-origin: 0 0;
  will-change: transform;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 16px;
}
.crop-zoom-icon { color: var(--muted); font-size: 16px; flex-shrink: 0; }
.crop-zoom {
  flex: 1;
  accent-color: var(--accent);
}
.crop-foot {
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  flex-shrink: 0;
}
.crop-done {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.crop-done:active { opacity: 0.85; }

.publish-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.publish-tag {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}
.publish-tag.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.publish-add-row {
  display: flex;
  gap: 8px;
}
.publish-add-row .up-btn-primary {
  flex-shrink: 0;
  padding: 10px 18px;
}
.publish-time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.publish-time-btn {
  padding: 14px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}
.publish-time-btn:active { background: var(--accent-soft); border-color: var(--accent); }
.cpicker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 3px;
}
.cpicker-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  border-radius: 2px;
}
.cpicker-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0; transition: opacity 0.25s;
}
.cpicker-thumb img.loaded { opacity: 1; }
.cpicker-thumb:active { filter: brightness(1.2); }

/* ── Drag-and-drop в сетке фото ─────────────────────────── */
.thumb--dragging { opacity: 0.2; }
.thumb--ghost {
  overflow: hidden;
  border-radius: 4px;
}
.thumb--ghost img { opacity: 1 !important; }

/* ── Управление моделями ────────────────────────────────── */
.mgm-list { display: flex; flex-direction: column; }

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

.mgm-info {
  flex: 1;
  min-width: 0;
}
.mgm-name {
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mgm-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 3px;
}

.mgm-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mgm-btn {
  appearance: none;
  border-radius: var(--radius);
  padding: 7px 11px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  line-height: 1;
}
.mgm-btn--rename {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 15px;
}
.mgm-btn--rename:active { opacity: 0.65; }

.mgm-btn--delete {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  font-size: 12px;
  font-weight: 500;
}
.mgm-btn--delete:active { background: rgba(212, 117, 106, 0.12); }

.mgm-btn--ok {
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 16px;
  padding: 7px 13px;
}
.mgm-btn--ok:active { opacity: 0.8; }

.mgm-btn--cancel {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.mgm-btn--cancel:active { opacity: 0.65; }

.mgm-input {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
}

/* ── Bounce-анимация края карусели ─────────────────────── */
@keyframes mc-bounce-fwd {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(18px); }
  100% { transform: translateX(0); }
}
@keyframes mc-bounce-bwd {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(-18px); }
  100% { transform: translateX(0); }
}
.mc-bounce-fwd { animation: mc-bounce-fwd 0.28s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
.mc-bounce-bwd { animation: mc-bounce-bwd 0.28s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

/* ── Три точки в карусели ───────────────────────────────── */
.mc-menu-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.mc-menu-btn[hidden] { display: none; }
.mc-menu-btn:active { background: rgba(0, 0, 0, 0.7); }

.mc-menu-popup {
  position: absolute;
  top: 56px;
  right: 14px;
  z-index: 20;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 170px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
.mc-menu-item {
  display: block;
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.mc-menu-item:last-child { border-bottom: none; }
.mc-menu-item:active { background: var(--line); }
.mc-menu-item--danger { color: var(--danger); }
.mc-menu-divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ── Листок переименования ──────────────────────────────── */
.rename-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 900;
  display: flex;
  align-items: flex-end;
}
.rename-sheet {
  background: var(--surface-2);
  border-radius: 18px 18px 0 0;
  width: 100%;
  padding: 24px 20px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.rename-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text);
}
.rename-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.rename-input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-body);
  margin-bottom: 14px;
  outline: none;
}
.rename-input:focus { border-color: var(--accent); }
.rename-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.rename-btn {
  flex: 1;
  padding: 13px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  touch-action: manipulation;
}
.rename-btn--cancel { background: var(--surface); color: var(--text); }
.rename-btn--ok { background: var(--accent); color: var(--ink); }

/* ── Шапка страницы фотографий с кнопкой ⋮ ─────────────── */
.photos-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  position: relative;
}
.photos-hd .section-label {
  flex: 1;
  padding: 0;
  margin: 0;
  color: var(--accent);
}
.photos-menu-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  position: relative;
}
.photos-menu-btn:active { background: var(--line); }
.photos-menu-popup {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ── Профиль модели (баннер + статистика + список альбомов) ─── */
.mp {
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 0;
}
.mp-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 320px;
  overflow: hidden;
  background: var(--surface-2);
}
.mp-banner-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.mp-banner-img--empty {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.mp-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--ink) 0%, transparent 40%);
}
.mp-head {
  padding: 0 var(--pad) 16px;
  margin-top: -28px;
  position: relative;
}
.mp-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  color: var(--text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.mp-stats {
  display: flex;
  gap: 24px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.mp-stat { display: flex; flex-direction: column; }
.mp-stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
}
.mp-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 2px;
}
.mp #mp-menu-hd { padding: 0 var(--pad); }
.mp-album-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 var(--pad) var(--pad);
}
.mp-album-row {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 4px;
  cursor: pointer;
}
.mp-album-row:active { background: var(--surface); border-radius: 10px; }
.mp-album-thumb {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--frame);
  animation: frame-pulse 2.4s ease-in-out infinite;
}
.mp-album-row.is-new .mp-album-thumb {
  animation: new-frame-pulse 2.4s ease-in-out infinite;
}
.mp-album-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mp-album-thumb img.loaded { opacity: 1; }
.mp-album-info { flex: 1; min-width: 0; }
.mp-album-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-album-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.mp-album-arrow {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--muted-2);
}

/* ── Режим выбора фотографий ────────────────────────────── */
.thumb--selected::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(205, 168, 99, 0.35);
  pointer-events: none;
}
.thumb--selected::before {
  content: '✓';
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 22px;
  text-align: center;
  pointer-events: none;
}
.batch-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  gap: 10px;
  align-items: center;
}
.batch-count {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.batch-btn {
  padding: 11px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  touch-action: manipulation;
}
.batch-btn--cancel { background: var(--surface); color: var(--text); }
.batch-btn--action { background: var(--accent); color: var(--ink); }
.batch-btn--danger { background: var(--danger); color: #fff; }
