:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --soft: #f5f5f5;
  --accent: #111111;
  --accent-dark: #000000;
  --ink: #111111;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* 90% прозрачный чёрный — полоса под статус-баром (safe-area). */
  --status-bar-scrim: rgba(0, 0, 0, 0.1);
  /* Вылет медиа под статус-бар и home bar (iOS PWA / iPhone 15). */
  --immersive-bleed-top: var(--safe-top);
  --immersive-bleed-bottom: var(--safe-bottom);
  --immersive-viewport-height: calc(100svh + var(--immersive-bleed-top) + var(--immersive-bleed-bottom));
}

html {
  min-height: 100%;
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
}

/* Фиксированная полоса под статус-баром: контент просвечивает при скролле, хедер поверх. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--safe-top);
  background: var(--status-bar-scrim);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 1;
}

body.detail-open::before,
body.story-viewer-open::before,
body.reel-viewer-open::before,
body.reels2-player-open::before {
  display: none;
}

body.detail-open {
  overflow: hidden;
  touch-action: none;
}

body.page-backgrounded .pin-card.is-ambient-zoom .pin-media-ambient,
body.page-backgrounded .pull-refresh.refreshing span,
body.page-backgrounded .story-progress-segment.active span {
  animation-play-state: paused;
}

.pull-refresh {
  position: fixed;
  top: max(10px, var(--safe-top));
  left: 50%;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(17, 17, 17, 0.92);
  color: white;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -52px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.22, 0.82, 0.24, 1);
}

.pull-refresh.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, var(--pull-offset, 0px)) scale(calc(0.97 + var(--pull-progress, 0) * 0.025));
}

.pull-refresh.visible.ready {
  background: rgba(17, 17, 17, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.pull-refresh.refreshing {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.pull-refresh span {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: white;
  border-radius: 50%;
}

.pull-refresh.refreshing span {
  animation: pull-spin 0.72s linear infinite;
}

.pull-refresh strong {
  font-size: 13px;
  font-weight: 760;
}

@keyframes pull-spin {
  to {
    transform: rotate(360deg);
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.feed-chrome {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  background: transparent;
}

.feed-chrome .topbar,
.feed-chrome .filter-shell {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.feed-chrome .topbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: calc(12px + var(--safe-top)) max(clamp(14px, 4vw, 36px), var(--safe-right)) 10px max(clamp(14px, 4vw, 36px), var(--safe-left));
  background: transparent;
  border-bottom: 0;
  overflow: hidden;
  isolation: isolate;
}

/* Фон topbar ниже статус-бара; полоса safe-area остаётся прозрачной. */
.feed-chrome .topbar::after {
  content: "";
  position: absolute;
  top: var(--safe-top);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.feed-chrome .filter-shell {
  max-width: none;
  margin: 0;
  padding: 0 max(clamp(14px, 4vw, 36px), var(--safe-right)) 10px max(clamp(14px, 4vw, 36px), var(--safe-left));
  background: transparent;
  border-bottom: 0;
  isolation: isolate;
}

.feed-chrome .filter-shell::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: calc(12px + var(--safe-top)) max(clamp(14px, 4vw, 36px), var(--safe-right)) 12px max(clamp(14px, 4vw, 36px), var(--safe-left));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

/* Юридические страницы: topbar в потоке, полоса под статус-баром как на главной. */
body > header.topbar {
  z-index: 2;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
}

.top-auth {
  position: relative;
}

.hidden {
  display: none !important;
}

.top-auth-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 200px;
  max-width: min(240px, calc(100vw - 24px));
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.top-auth-menu-user {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.top-auth-menu-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.top-auth-menu-btn:hover {
  background: #ece8ff;
}

.top-auth-menu-btn.danger {
  color: #c0392b;
}

.top-auth-switch {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.top-auth-switch-copy {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.telegram-widget {
  display: grid;
  gap: 8px;
  min-height: 42px;
}

.auth-login-popup-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #2aabee;
  cursor: pointer;
}

.auth-login-popup-btn:hover {
  background: #229ed9;
}

.auth-other-account-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  background: rgba(120, 120, 128, 0.12);
  cursor: pointer;
}

.auth-other-account-btn:hover {
  background: rgba(120, 120, 128, 0.18);
}

.telegram-widget iframe {
  filter: grayscale(1) contrast(1.35) brightness(0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--text);
  color: white;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
}

.top-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 720;
  text-decoration: none;
}

.primary-button {
  background: var(--text);
  color: white;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled,
.primary-button.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.sell-form-error {
  margin: 0;
  border-radius: 12px;
  background: #fff1f1;
  color: #9b1c1c;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 12px;
}

.secondary-button {
  background: var(--soft);
  color: var(--ink);
  border: 0;
}

.secondary-button.logged-in {
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
}

main {
  padding: 22px max(clamp(14px, 4vw, 36px), var(--safe-right)) 56px max(clamp(12px, 4vw, 36px), var(--safe-left));
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  align-items: center;
  padding: 20px max(clamp(12px, 4vw, 36px), env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(clamp(12px, 4vw, 36px), env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.site-footer a {
  color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-page {
  max-width: 760px;
  margin: 0 auto;
}

.legal-page h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 0.98;
}

.legal-page h2 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.legal-page a {
  color: var(--text);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 420px);
  gap: 18px;
  align-items: end;
  max-width: 1440px;
  margin: 0 auto 16px;
}

.eyebrow {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.intro h1 {
  max-width: 680px;
  margin: 10px 0 0;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1;
  font-weight: 760;
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.filter-shell {
  max-width: 1440px;
  margin: 0 auto 18px;
}

.filter-shell {
  display: grid;
  gap: 10px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-toggle {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  width: fit-content;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  padding: 0 13px;
  font-weight: 680;
}

.filter-toggle span:last-child {
  color: var(--muted);
  font-weight: 560;
}

.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-bar[hidden] {
  display: none;
}

.store-stories-block {
  max-width: 1440px;
  margin: -4px auto 20px;
}

.store-stories-block h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 760;
}

.store-stories-hint {
  margin: -2px 0 10px;
  max-width: 52ch;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

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

.store-stories[hidden],
.live-strip[hidden] {
  display: none;
}

.store-stories::-webkit-scrollbar {
  display: none;
}

.store-story {
  display: grid;
  flex: 0 0 70px;
  gap: 6px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: center;
}

.store-story-image {
  position: relative;
  display: grid;
  flex: 0 0 62px;
  place-items: center;
  width: 62px;
  height: 62px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, #111111, #777777);
  padding: 2px;
  overflow: hidden;
}

.store-story-image--stack .store-story-stack-under,
.store-story-image--stack .store-story-stack-main {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.store-story-image--stack .store-story-stack-under {
  position: absolute;
  inset: 5px;
  z-index: 0;
  opacity: 0.78;
  pointer-events: none;
  transform: rotate(-8deg) scale(0.9);
}

.store-story-image--stack .store-story-stack-main {
  position: relative;
  z-index: 1;
}

.store-story-image img,
.store-story-stack-main img,
.store-story-stack-under img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border: 2px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
}

.store-story-image video,
.store-story-stack-main video,
.store-story-stack-under video {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border: 2px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
}

.store-story.subscribed .store-story-image {
  background: #111111;
}

.store-story span {
  width: 70px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strip-add {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  cursor: pointer;
}

.strip-add-story {
  display: flex;
  flex: 0 0 70px;
  align-items: center;
  justify-content: center;
}

.strip-add-story-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 2px dashed rgba(17, 17, 17, 0.22);
  border-radius: 50%;
  background: #f4f4f4;
}

.strip-add-story-inner {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
}

.strip-add-story-inner svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.strip-add-reel {
  position: relative;
  flex: 0 0 128px;
  height: 178px;
}

.strip-add-reel-surface {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(255, 255, 255, 0.34);
  border-radius: 16px;
  background: linear-gradient(160deg, #1a1a1a 0%, #2e2e2e 100%);
  color: #ffffff;
}

.strip-add-reel-surface svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

body.story-viewer-open {
  overflow: hidden;
  touch-action: none;
  color-scheme: dark;
}

body.reel-viewer-open {
  overflow: hidden;
  touch-action: none;
  color-scheme: dark;
}

.reel-viewer {
  --reel-safe-top: env(safe-area-inset-top, 0px);
  --reel-canvas: #000000;
  --reel-slot: #000000;
  --reel-glass: rgba(255, 255, 255, 0.1);
  --reel-glass-strong: rgba(255, 255, 255, 0.16);
  --reel-glass-edge: rgba(255, 255, 255, 0.14);
  --reel-glass-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
  position: fixed;
  inset: 0;
  z-index: 92;
  display: none;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--reel-canvas);
  color: #f4f4f4;
}

.reel-viewer.open {
  display: block;
  touch-action: none;
  inset: auto;
  top: calc(-1 * var(--immersive-bleed-top));
  right: 0;
  bottom: calc(-1 * var(--immersive-bleed-bottom));
  left: 0;
  width: 100%;
  max-width: 100vw;
  height: var(--immersive-viewport-height);
  min-height: var(--immersive-viewport-height);
}

.reel-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: var(--reel-canvas);
  color: #f4f4f4;
  isolation: isolate;
}

.reel-viewer.open .reel-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  height: 100%;
}

/* Низ затемняем для UI; верх не трогаем — кадр под Dynamic Island. */
.reel-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 125% 92% at 50% 48%, transparent 50%, rgba(0, 0, 0, 0.44) 100%),
    linear-gradient(180deg, transparent 0%, transparent 18%, rgba(0, 0, 0, 0.12) 28%, transparent 48%, transparent 56%, rgba(0, 0, 0, 0.58) 100%);
}

.reel-viewer.open .reel-frame::before {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 52%,
    rgba(0, 0, 0, 0.1) 68%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.story-viewer.open::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: var(--safe-top);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.08) 70%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

.detail-panel.open::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--safe-top);
  background: var(--status-bar-scrim);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 41;
}

.reel-chrome {
  position: absolute;
  top: calc(var(--safe-top) + 8px);
  right: max(10px, var(--safe-right));
  left: max(10px, var(--safe-left));
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.reel-chrome-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.reel-idx {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 2px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--reel-glass-edge);
  background: var(--reel-glass);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: var(--reel-glass-shadow);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  pointer-events: none;
}

.reel-close,
.reel-mute {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--reel-glass-edge);
  border-radius: 50%;
  background: var(--reel-glass-strong);
  color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--reel-glass-shadow);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.reel-close:active,
.reel-mute:active {
  transform: scale(0.96);
}

.reel-close svg {
  width: 20px;
  height: 20px;
}

.reel-close path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.reel-mute svg {
  width: 22px;
  height: 22px;
}

.reel-side-rail {
  position: absolute;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(92px, calc(76px + env(safe-area-inset-bottom)));
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 12, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  pointer-events: auto;
}

.reel-side-rail .reel-more-menu {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 10px);
}

.reel-like {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 48px;
  padding: 4px 2px 2px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.reel-like:active {
  transform: scale(0.96);
}

.reel-like svg {
  width: 30px;
  height: 30px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.75;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.reel-like.liked svg {
  fill: #ff4d6d;
  stroke: #ff4d6d;
}

.reel-like-count {
  font-size: 11px;
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
}

.reel-more {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.reel-more:active {
  transform: scale(0.96);
}

.reel-more svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  opacity: 0.95;
}

.reel-more-menu {
  z-index: 6;
  min-width: 172px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 16, 0.94);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.reel-more-menu[hidden] {
  display: none;
}

.reel-more-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ff6b7a;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.reel-more-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.reel-view-media-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  max-height: none;
  display: block;
  overflow: hidden;
  border-radius: 0;
  background: var(--reel-slot);
}

.reel-viewer.open .reel-view-media-stack,
.reel-viewer.open .reel-view-layer {
  min-height: 100%;
  height: 100%;
}

.reel-view-layer {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: var(--reel-slot);
  transition: opacity 0.14s ease;
}

.reel-view-layer.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.reel-preload-pool {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.reel-view-media-slot {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--reel-slot);
}

/* Прямые потомки слоя — edge-to-edge на iPhone (включая safe-area). */
.reel-view-media-stack .reel-view-layer.is-active > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: center center;
}

.reel-viewer.open .reel-view-pin-media,
.reel-viewer.open .reel-view-layer img,
.reel-viewer.open .reel-view-layer video,
.reel-viewer.open .reel-view-layer .pin-live-photo,
.reel-viewer.open .reel-view-layer .pin-sequence-clip,
.reel-viewer.open .reel-view-layer .video-with-poster,
.reel-viewer.open .reel-view-layer .photo-sequence,
.reel-viewer.open .reel-view-layer .pin-photo-sequence {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: unset;
  object-fit: cover;
  object-position: center center;
}

.reel-view-media-slot .photo-sequence,
.reel-view-layer .photo-sequence,
.reel-view-media-slot .pin-sequence-clip,
.reel-view-media-slot .pin-live-photo,
.reel-view-media-slot .pin-photo-sequence {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.reel-view-media-slot img,
.reel-view-media-slot video,
.reel-view-media-slot .video-with-poster,
.reel-view-media-slot .pin-photo-sequence,
.reel-view-media-slot .photo-sequence {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  background: var(--reel-slot);
}

.reel-view-layer img,
.reel-view-layer video,
.reel-view-layer .video-with-poster,
.reel-view-layer .pin-photo-sequence,
.reel-view-layer .photo-sequence {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  background: var(--reel-slot);
}

.reel-view-media-stack .video-with-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #000;
}

.reel-view-media-stack .video-with-poster .video-poster,
.reel-view-media-stack .video-with-poster .video-poster-target,
.reel-view-media-stack .video-with-poster video,
.reel-viewer.open .reel-view-layer .video-with-poster .video-poster,
.reel-viewer.open .reel-view-layer .video-with-poster .video-poster-target,
.reel-viewer.open .reel-view-layer .video-with-poster video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #000;
}

.reel-view-media-stack .photo-sequence[data-sequence],
.reel-view-media-stack .pin-photo-sequence[data-sequence] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: unset;
  background: #000;
}

.reel-view-media-slot .photo-sequence[data-sequence],
.reel-view-media-slot .pin-photo-sequence[data-sequence] {
  background-color: #000;
}

.reel-view-media-slot .photo-sequence[data-sequence] img,
.reel-view-media-slot .pin-photo-sequence[data-sequence] img,
.reel-view-layer .photo-sequence[data-sequence] img,
.reel-view-layer .pin-photo-sequence[data-sequence] img,
.reel-viewer.open .reel-view-layer .photo-sequence img,
.reel-viewer.open .reel-view-layer .pin-photo-sequence img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  background-color: #000;
}

@supports (-webkit-touch-callout: none) {
  .reel-viewer.open {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: var(--immersive-viewport-height);
  }
}

.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
}

.story-viewer.open {
  display: block;
  /* Vertical swipe handled in JS; avoids the browser stealing the gesture as scroll. */
  touch-action: none;
  top: calc(-1 * var(--immersive-bleed-top));
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: calc(100dvh + var(--immersive-bleed-top));
  min-height: calc(100dvh + var(--immersive-bleed-top));
}

.story-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  border-radius: 0;
  background: #000;
  color: #ffffff;
  box-shadow: none;
}

.story-viewer.open .story-frame {
  width: 100%;
  min-height: 100%;
  height: 100%;
}

.story-viewer.open .story-media,
.story-viewer.open .story-frame > .story-photo-sequence.story-media,
.story-viewer.open .story-frame > .video-with-poster,
.story-viewer.open .story-frame > .story-sequence-clip,
.story-viewer.open .story-frame > .pin-live-photo,
.story-viewer.open .story-frame > video.story-media,
.story-viewer.open .story-frame > img.story-media {
  top: 0;
  height: 100%;
  min-height: 100%;
}

.story-progress {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  left: max(10px, env(safe-area-inset-left));
  z-index: 3;
  display: flex;
  gap: 4px;
}

.story-progress-segment {
  height: 3px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.story-progress-segment span {
  display: block;
  width: 0;
  height: 100%;
  background: #ffffff;
}

.story-progress-segment.viewed span {
  width: 100%;
}

.story-progress-segment.active span {
  animation: story-progress 5.2s linear forwards;
}

.story-header {
  position: absolute;
  top: calc(max(10px, env(safe-area-inset-top)) + 12px);
  right: max(12px, env(safe-area-inset-right));
  left: max(12px, env(safe-area-inset-left));
  z-index: 3;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: center;
}

.story-avatar {
  display: block;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #222222;
}

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

.story-header strong,
.story-header span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-header strong {
  font-size: 15px;
}

.story-header div > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.story-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.story-close svg {
  width: 20px;
  height: 20px;
}

.story-close path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.story-media,
.story-frame > .story-photo-sequence.story-media,
.story-frame > .video-with-poster,
.story-frame > .story-sequence-clip,
.story-frame > .pin-live-photo,
.story-frame > video.story-media,
.story-frame > img.story-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: none;
  margin: 0;
  object-fit: cover;
  object-position: center top;
  background: #000;
}

.story-frame > .video-with-poster {
  object-fit: unset;
}

.story-frame .video-with-poster {
  line-height: 0;
}

.story-frame .video-with-poster .video-poster,
.story-frame .video-with-poster .video-poster-target,
.story-frame .video-with-poster video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #000;
}

.story-frame .story-photo-sequence[data-sequence] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: unset;
  background: #000;
}

.story-frame .story-photo-sequence[data-sequence] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #000;
}

.story-tap {
  position: absolute;
  top: calc(76px + env(safe-area-inset-top, 0px));
  bottom: max(100px, calc(88px + env(safe-area-inset-bottom, 0px)));
  z-index: 2;
  width: 50%;
  border: 0;
  background: transparent;
}

.story-tap-prev {
  left: 0;
}

.story-tap-next {
  right: 0;
}

.story-footer {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72));
  padding: 28px 12px 12px;
}

.story-footer strong,
.story-footer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-footer strong {
  font-size: 18px;
}

.story-footer span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.story-footer button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  padding: 0 14px;
  font-weight: 760;
}

.live-strip {
  display: grid;
  max-width: 1440px;
  margin: -4px auto 20px;
  gap: 10px;
}

.live-strip > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.live-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.live-strip strong {
  font-size: 18px;
  font-weight: 780;
}

.live-reels {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.live-reels::-webkit-scrollbar {
  display: none;
}

.strip-add-reel:focus-visible,
.strip-add-story:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.live-reel {
  position: relative;
  flex: 0 0 128px;
  height: 178px;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #111;
  color: white;
  padding: 0;
  text-align: left;
}

.live-reel.live-reel-user {
  display: block;
}

.live-reel-user-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
}

.live-reel-user-image img,
.live-reel-user-image video,
.live-reel-user-image .reel-strip-live-photo,
.live-reel-user-image .reel-strip-sequence-clip,
.live-reel-user-image .reel-strip-photo-sequence {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-reel-user-image--stack .live-reel-stack-under,
.live-reel-user-image--stack .live-reel-stack-main {
  position: absolute;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.live-reel-user-image--stack .live-reel-stack-under {
  inset: 12px;
  z-index: 0;
  border-radius: 12px;
  opacity: 0.78;
  pointer-events: none;
  transform: rotate(-3deg) scale(0.9);
}

.live-reel-user-image--stack .live-reel-stack-main {
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.live-reel.subscribed {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.media-pause {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.48);
  color: white;
  opacity: 0.9;
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.media-pause svg {
  width: 14px;
  height: 14px;
}

.live-reel img,
.live-reel video,
.photo-sequence {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-sequence {
  position: relative;
  display: block;
  overflow: hidden;
}

/* Legacy stepped animation removed — sequences use data-sequence + JS crossfade. */

.photo-sequence[data-sequence] {
  background-color: var(--soft);
  isolation: isolate;
}

/* Feed cards use soft gray; dark strips / stories match their stage so letterboxing never flashes browser gray. */
.live-reel .photo-sequence[data-sequence],
.reel-photo-sequence[data-sequence] {
  background-color: #111111;
}

.story-photo-sequence[data-sequence],
.store-story-image .story-strip-photo-sequence[data-sequence],
.store-story-stack-main .story-strip-photo-sequence[data-sequence],
.store-story-stack-under .story-strip-photo-sequence[data-sequence] {
  background-color: #111111;
}

.photo-sequence[data-sequence] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background-color: var(--soft);
  animation: none;
  transition: opacity 0.16s ease-in-out;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.live-reel .photo-sequence[data-sequence] img,
.reel-photo-sequence[data-sequence] img {
  background-color: #111111;
}

.story-photo-sequence[data-sequence] img,
.store-story-image .story-strip-photo-sequence[data-sequence] img,
.store-story-stack-main .story-strip-photo-sequence[data-sequence] img,
.store-story-stack-under .story-strip-photo-sequence[data-sequence] img {
  background-color: var(--soft);
}

.photo-sequence.is-sequence-paused img {
  transition-duration: 0s;
}

.pin-card .pin-photo-sequence {
  width: 100%;
  min-height: 180px;
  aspect-ratio: 4 / 5;
}

.detail-photo-sequence {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.story-photo-sequence.story-media {
  position: absolute;
  inset: 0;
}

.store-story-image .story-strip-photo-sequence,
.store-story-stack-main .story-strip-photo-sequence,
.store-story-stack-under .story-strip-photo-sequence {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.reel-photo-sequence {
  position: relative;
  display: block;
  overflow: hidden;
}

.live-reel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.64));
  pointer-events: none;
}

.live-reel strong {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.12;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* One рилс-карточка на продавца: превью как сторис-стек в прямоугольнике. */
.live-reel-user .live-reel-user-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  background: #111111;
}

.live-reel-user-image--stack .live-reel-stack-under,
.live-reel-user-image--stack .live-reel-stack-main {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.live-reel-user-image--stack .live-reel-stack-under {
  position: absolute;
  inset: 10px 8px;
  z-index: 0;
  opacity: 0.78;
  pointer-events: none;
  transform: rotate(-7deg) scale(0.92);
}

.live-reel-user-image--stack .live-reel-stack-main {
  position: relative;
  z-index: 1;
}

.live-reel-user-image img,
.live-reel-stack-main img,
.live-reel-stack-under img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-reel-user-image video,
.live-reel-stack-main video,
.live-reel-stack-under video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-reel-user.subscribed .live-reel-user-image {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: -2px;
}

.live-reel-user.has-unseen .live-reel-user-image {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #111111;
}

.live-reel-user-image .reel-strip-photo-sequence,
.live-reel-stack-main .reel-strip-photo-sequence,
.live-reel-stack-under .reel-strip-photo-sequence {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.live-reel-user-image .reel-strip-photo-sequence[data-sequence],
.live-reel-stack-main .reel-strip-photo-sequence[data-sequence],
.live-reel-stack-under .reel-strip-photo-sequence[data-sequence] {
  background-color: var(--soft);
}

.live-reel-user-image .reel-strip-photo-sequence[data-sequence] img,
.live-reel-stack-main .reel-strip-photo-sequence[data-sequence] img,
.live-reel-stack-under .reel-strip-photo-sequence[data-sequence] img {
  background-color: var(--soft);
}

.chip,
.price-filter {
  flex: 0 0 auto;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  padding: 0 13px;
  font-weight: 680;
}

.chip.active {
  background: var(--text);
  color: white;
  border-color: var(--ink);
}

.price-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.price-filter input {
  width: 86px;
  border: 0;
  outline: 0;
  background: transparent;
}

.feed-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto 18px;
}

.quiet-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-weight: 620;
}

.feed-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 760;
}

.feed-head p {
  margin: 0;
  color: var(--muted);
}

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

.pin-feed {
  column-count: 5;
  column-gap: 14px;
  max-width: 1440px;
  margin: 0 auto;
}

.feed-sentinel {
  width: 100%;
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.pin-card {
  position: relative;
  display: inline-block;
  width: 100%;
  overflow: hidden;
  margin: 0 0 14px;
  border: 0;
  border-radius: 16px;
  background: white;
  padding: 0;
  text-align: left;
  box-shadow: none;
  break-inside: avoid;
  perspective: 900px;
}

.pin-card.is-pin-reveal {
  animation: pin-reveal 0.22s ease both;
  animation-delay: var(--pin-delay, 0ms);
}

.pin-card-flip-stage {
  position: relative;
  display: block;
  width: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.pin-card.is-pin-flipping .pin-card-flip-stage {
  animation: pin-card-flip-reveal var(--pin-flip-duration, 0.52s) ease-in-out;
}

.pin-card.is-pin-leaving {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

@keyframes pin-card-flip-reveal {
  0% {
    transform: rotateY(0deg);
  }

  49% {
    transform: rotateY(88deg);
  }

  51% {
    transform: rotateY(-88deg);
  }

  100% {
    transform: rotateY(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-sequence img:not(:first-child) {
    display: none;
  }

  .photo-sequence img:first-child {
    position: relative;
    opacity: 1;
    animation: none;
    transition: none;
  }

  .pin-card.is-pin-flipping .pin-card-flip-stage {
    animation: none;
  }

  .pin-card.is-pin-reveal {
    animation: none;
  }

  .pin-card.is-ambient-zoom .pin-media-ambient {
    animation: none;
  }
}

.batch-edit-panel {
  display: grid;
  grid-column: 1 / -1;
  width: 100%;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.batch-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.batch-edit-head strong {
  color: var(--text);
}

.batch-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.batch-edit-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  background: #efefef;
  padding: 0;
}

.batch-edit-thumb:disabled {
  cursor: wait;
  opacity: 0.72;
}

.batch-edit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-edit-thumb span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.1;
  padding: 5px 6px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-skeleton {
  display: inline-block;
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 5;
  margin: 0 0 14px;
  border-radius: 16px;
  background: linear-gradient(100deg, #f1f1f1 0%, #fafafa 48%, #eeeeee 100%);
  background-size: 220% 100%;
  break-inside: avoid;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
}

.pin-skeleton.skeleton-2,
.pin-skeleton.skeleton-3,
.pin-skeleton.skeleton-4,
.pin-skeleton.skeleton-5 {
  aspect-ratio: 4 / 5;
}

@keyframes skeleton-shimmer {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

@keyframes story-progress {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes pin-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pin-card:hover img,
.pin-card:hover video,
.pin-card:hover .photo-sequence img {
  filter: brightness(0.96);
}

.pin-card.is-publishing img,
.pin-card.is-publishing video,
.pin-card.is-publishing .photo-sequence img {
  filter: grayscale(0.1) brightness(0.98);
}

.pin-card.publish-failed img,
.pin-card.publish-failed video,
.pin-card.publish-failed .photo-sequence img {
  filter: grayscale(0.2) brightness(0.92);
}

.pin-status {
  position: absolute;
  left: 9px;
  top: 9px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 12px;
  font-weight: 720;
  pointer-events: none;
}

.pin-card.is-publishing .pin-status::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 5px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 2px;
  animation: status-pulse 0.8s ease-in-out infinite;
}

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

.pin-card img,
.pin-card video,
.pin-card .photo-sequence,
.pin-card .video-with-poster,
.pin-card .pin-ambient-frame {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: linear-gradient(100deg, #eeeeee 0%, #fafafa 48%, #e9e9e9 100%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.15s ease-in-out infinite;
}

.pin-card.has-media-loaded img,
.pin-card.has-media-loaded video,
.pin-card.has-media-loaded .photo-sequence,
.pin-card.has-media-loaded .video-with-poster,
.pin-card.has-media-loaded .pin-ambient-frame {
  animation: none;
  background: var(--soft);
}

.video-with-poster {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--soft);
  line-height: 0;
}

.video-with-poster .video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: opacity 0.22s ease;
}

.video-with-poster .video-poster-target {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

.video-with-poster.is-video-ready .video-poster {
  opacity: 0;
  pointer-events: none;
}

.video-with-poster:not(.is-video-ready) .video-poster-target {
  opacity: 0;
}

.live-reel-user-image .video-with-poster,
.live-reel-user-image .video-with-poster .video-poster-target {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.detail-video-poster {
  z-index: 0;
  transition: opacity 0.22s ease;
}

.detail-image-wrap #detailVideo {
  position: relative;
  z-index: 1;
  background: transparent;
}

.detail-image-wrap.is-detail-video-ready .detail-video-poster {
  opacity: 0;
  pointer-events: none;
}

.detail-image-wrap:not(.is-detail-video-ready) #detailVideo:not([hidden]) {
  opacity: 0;
}

.pin-card.is-ambient-zoom .pin-ambient-frame {
  display: block;
  overflow: hidden;
  width: 100%;
  line-height: 0;
  background: var(--soft);
}

.pin-card.is-ambient-zoom .pin-media-ambient {
  display: block;
  width: 100%;
  min-height: 0;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transform-origin: center center;
  animation: pin-ambient-zoom 26s ease-in-out infinite alternate;
  animation-delay: var(--ambient-delay, 0s);
  will-change: transform;
}

@keyframes pin-ambient-zoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.14);
  }
}

.pin-meta {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.pin-social {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.15;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
}

.pin-social-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.pin-social-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.pin-social-val {
  font-variant-numeric: tabular-nums;
}

.pin-social-sep {
  flex-shrink: 0;
  opacity: 0.55;
  font-weight: 520;
}

.pin-social-emoji {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
}

.pin-card:hover .pin-social {
  opacity: 1;
  transform: translateY(0);
}

.pin-reel-badge {
  position: absolute;
  left: 9px;
  top: 9px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: white;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pin-meta span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 15px;
  font-weight: 780;
  box-shadow: none;
}

.pin-meta span:last-child {
  color: #ffffff;
  font-size: 11px;
  font-weight: 520;
  max-width: 82px;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.9);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-meta span:last-child {
  transform: none;
  align-self: center;
}

.pin-title {
  position: absolute;
  left: 9px;
  right: 54px;
  top: 9px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
}

.pin-card:hover .pin-title {
  opacity: 1;
  transform: translateY(0);
}

.pin-card.is-own .pin-title {
  right: 96px;
}

.pin-save,
.pin-delete {
  position: absolute;
  top: 9px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
}

.pin-save {
  right: 9px;
}

.pin-delete {
  right: 51px;
}

.pin-save.saved {
  color: #ffffff;
}

.pin-save.saved svg {
  fill: currentColor;
}

.pin-delete:hover {
  color: #ffffff;
}

.empty-state {
  max-width: 680px;
  margin: 28px auto 0;
  padding: 28px;
  border-radius: 16px;
  background: var(--soft);
  text-align: center;
}

.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: end;
  background: rgba(0, 0, 0, 0.36);
  overscroll-behavior: contain;
  touch-action: none;
}

.detail-panel.open {
  display: flex;
  background: #000;
}

.detail-card {
  position: relative;
  width: min(540px, 100%);
  height: 100%;
  overflow-y: auto;
  background: white;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scroll-padding-bottom: 88px;
}

.detail-image-wrap {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--soft);
}

/* Пин на весь экран, включая зону статус-бара; кнопки в safe-area. */
.detail-panel.open .detail-image-wrap {
  margin-top: calc(-1 * var(--immersive-bleed-top));
  width: 100%;
  min-height: calc(100dvh + var(--immersive-bleed-top));
}

.detail-panel.open .detail-photo-sequence {
  aspect-ratio: unset;
  width: 100%;
  min-height: calc(100dvh + var(--immersive-bleed-top));
  height: calc(100dvh + var(--immersive-bleed-top));
}

.detail-panel.detail-swipe-transition {
  display: block;
  overflow: hidden;
}

.detail-panel.detail-swipe-transition .detail-card {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
}

.detail-card.detail-swipe-current {
  z-index: 1;
  pointer-events: none;
}

.detail-card.detail-slide-over {
  z-index: 2;
  box-shadow: -20px 0 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s cubic-bezier(0.22, 0.72, 0.18, 1);
  will-change: transform;
}

.detail-card.detail-slide-over-left {
  transform: translateX(-100%);
  box-shadow: 20px 0 42px rgba(0, 0, 0, 0.18);
}

.detail-card.detail-slide-over-right {
  transform: translateX(100%);
}

.detail-card.detail-slide-over-active {
  transform: translateX(0);
}

.detail-photo-action {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.detail-photo-back {
  left: 12px;
}

.detail-photo-delete {
  right: 12px;
}

.detail-image-wrap > img,
.detail-image-wrap > video,
.detail-image-wrap > .detail-photo-sequence,
.detail-image-wrap > .video-with-poster {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: var(--soft);
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.22s ease;
}

.detail-panel.open .detail-image-wrap > img,
.detail-panel.open .detail-image-wrap > video,
.detail-panel.open .detail-image-wrap > .detail-photo-sequence,
.detail-panel.open .detail-image-wrap > .video-with-poster {
  aspect-ratio: unset;
  width: 100%;
  min-height: calc(100dvh + var(--immersive-bleed-top));
  height: calc(100dvh + var(--immersive-bleed-top));
  max-height: none;
  object-fit: cover;
  object-position: center top;
}

.detail-panel.open .detail-image-wrap > .detail-photo-sequence img,
.detail-panel.open .detail-image-wrap .video-with-poster video,
.detail-panel.open .detail-image-wrap .video-with-poster .video-poster,
.detail-panel.open .detail-image-wrap .video-with-poster .video-poster-target {
  width: 100%;
  height: 100%;
  min-height: calc(100dvh + var(--immersive-bleed-top));
  object-fit: cover;
  object-position: center top;
}

.story-frame .story-media,
.story-frame .story-photo-sequence,
.story-frame .story-sequence-clip,
.story-frame .video-with-poster,
.reel-view-media-stack .reel-view-layer.is-active img,
.reel-view-media-stack .reel-view-layer.is-active video,
.reel-view-media-stack .reel-view-layer.is-active .video-with-poster,
.reel-view-media-stack .reel-view-layer.is-active .photo-sequence,
.reel-view-media-stack .reel-view-layer.is-active .pin-photo-sequence {
  transform-origin: center center;
  will-change: transform;
}

.detail-image-wrap > .detail-photo-sequence img {
  position: absolute;
  inset: 0;
}

.detail-image-wrap.is-media-zoomed,
.story-frame.is-media-zoomed,
.reel-view-media-stack.is-media-zoomed {
  touch-action: none;
}

.story-frame.is-media-zoomed .story-tap {
  pointer-events: none;
}

.detail-image-wrap.is-media-zoomed {
  cursor: grab;
}

.detail-image-wrap.is-media-zoomed:active {
  cursor: grabbing;
}

.detail-image-wrap.is-media-zoomed .detail-image-search,
.detail-image-wrap.is-media-zoomed .detail-video-toggle,
.detail-image-wrap.zoomed .detail-image-search,
.detail-image-wrap.zoomed .detail-video-toggle {
  opacity: 0;
  pointer-events: none;
}

.detail-image-search {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.detail-video-toggle {
  bottom: 14px;
  cursor: pointer;
  pointer-events: auto;
}

.detail-actions {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px 0;
}

.detail-action-button {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--soft);
  color: var(--text);
  font-weight: 720;
}

.detail-action-button.liked {
  color: #d12d2d;
}

#detailSaveAction {
  margin-left: auto;
}

.detail-action-button.saved {
  color: var(--text);
}

.detail-action-button.liked svg,
.detail-action-button.saved svg {
  fill: currentColor;
}

.detail-action-count {
  min-width: 10px;
  font-size: 12px;
  line-height: 1;
}

.detail-action-count[hidden] {
  display: none;
}

.detail-more-menu {
  position: absolute;
  top: 58px;
  right: 16px;
  z-index: 2;
  display: grid;
  min-width: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}

.detail-more-menu[hidden] {
  display: none;
}

.detail-more-menu button {
  border: 0;
  padding: 12px 14px;
  background: white;
  color: var(--text);
  text-align: left;
  font-weight: 680;
}

.detail-more-menu button:hover {
  background: var(--soft);
}

.detail-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.detail-body h2,
.detail-body p {
  margin: 0;
}

.detail-price {
  font-size: 30px;
  font-weight: 780;
}

.detail-meta {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.full-width {
  width: 100%;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 2px 0 6px;
}

.contact-links a,
.contact-links button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 720;
  font-size: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.contact-links button {
  text-decoration: underline;
}

.contact-links #subscribeStore {
  border-radius: 999px;
  background: var(--text);
  color: white;
  padding: 0 12px;
  min-height: 30px;
  text-decoration: none;
}

.contact-links #subscribeStore.subscribed {
  background: var(--soft);
  color: var(--text);
}

.contact-links a[hidden] {
  display: none;
}

.comments,
.recommendations {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.comments h3,
.recommendations h3 {
  margin: 0;
  font-size: 18px;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment {
  display: grid;
  gap: 6px;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--soft);
  user-select: none;
  -webkit-user-select: none;
}

.comment strong {
  font-size: 13px;
}

.comment p {
  margin: 0;
  color: var(--ink);
  line-height: 1.4;
}

.comment-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.comment-actions button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.comment-actions button.active {
  color: #d12d2d;
}

.comment-replies {
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

.comment-reply {
  display: grid;
  gap: 2px;
  padding: 6px 0;
}

.comment-reply strong {
  font-size: 12px;
}

.comment-reply p {
  color: var(--muted);
  font-size: 14px;
}

.reply-actions {
  display: flex;
  gap: 10px;
}

.reply-actions button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.reply-actions button.active {
  color: var(--text);
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  scroll-margin-bottom: 80px;
}

.comment-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  outline: 0;
}

.comment-form input:disabled,
.comment-form button:disabled {
  cursor: default;
  opacity: 0.55;
}

.recommendation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.recommendation-pin {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: var(--soft);
  text-align: left;
}

.recommendation-pin img,
.recommendation-pin video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.recommendation-pin span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.sell-modal {
  width: min(760px, calc(100% - 28px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: var(--shadow);
}

.sell-modal::backdrop {
  background: rgba(0, 0, 0, 0.36);
}

.sell-modal-surface {
  display: block;
  border-radius: inherit;
  background: #fff;
  overflow: hidden;
}

@keyframes overlay-dismiss-ios {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  45% {
    transform: translate3d(12vw, 0, 0) scale(0.98);
  }
  100% {
    transform: translate3d(110%, 0, 0) scale(0.97);
  }
}

.detail-panel.is-dismiss-animating {
  pointer-events: none;
  overflow: visible;
}

.detail-panel.is-dismiss-animating .detail-card {
  animation: overlay-dismiss-ios 0.34s cubic-bezier(0.22, 0.82, 0.32, 0.98) both;
  will-change: transform;
}

.story-viewer.is-dismiss-animating {
  pointer-events: none;
  overflow: visible;
}

.story-viewer.is-dismiss-animating .story-frame {
  animation: overlay-dismiss-ios 0.34s cubic-bezier(0.22, 0.82, 0.32, 0.98) both;
  will-change: transform;
}

.reel-viewer.is-dismiss-animating {
  pointer-events: none;
  overflow: visible;
}

.reel-viewer.is-dismiss-animating .reel-frame {
  animation: overlay-dismiss-ios 0.34s cubic-bezier(0.22, 0.82, 0.32, 0.98) both;
  will-change: transform;
}

.sell-modal-surface.is-dismiss-animating {
  pointer-events: none;
  animation: overlay-dismiss-ios 0.34s cubic-bezier(0.22, 0.82, 0.32, 0.98) both;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .detail-panel.is-dismiss-animating .detail-card,
  .story-viewer.is-dismiss-animating .story-frame,
  .reel-viewer.is-dismiss-animating .reel-frame,
  .sell-modal-surface.is-dismiss-animating {
    animation: none !important;
    transform: none !important;
  }
}

.sell-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-head h2 {
  margin: 0;
}

.photo-drop {
  position: relative;
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cfcfcf;
  border-radius: 16px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
}

.photo-drop input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.photo-drop span {
  display: grid;
  place-items: center;
  gap: 10px;
}

.photo-drop small {
  max-width: 280px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.35;
}

.photo-drop .photo-live-hint,
.photo-drop .photo-scope-hint {
  display: block;
  max-width: min(320px, 92vw);
  margin: 0 auto;
  padding: 0 12px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.photo-drop .photo-read-error {
  display: block;
  max-width: min(320px, 92vw);
  margin: 0 auto 10px;
  padding: 0 12px;
  color: #b42318;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.photo-drop img,
.photo-drop video {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.cleanup-queue {
  display: grid;
  gap: 8px;
  max-width: 620px;
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.cleanup-queue strong {
  color: var(--text);
}

.cleanup-queue span {
  display: block;
}

.cleanup-reels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 112px;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.cleanup-reels::-webkit-scrollbar {
  display: none;
}

.cleanup-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  width: 112px;
  height: 156px;
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: #111;
  color: white;
  text-align: left;
}

.cleanup-thumb img,
.cleanup-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cleanup-video-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #191919;
  color: white;
}

.cleanup-video-mark svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.cleanup-thumb span,
.cleanup-thumb strong {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
}

.cleanup-thumb span {
  left: 5px;
  bottom: 6px;
  font-weight: 760;
}

.cleanup-thumb strong {
  top: 6px;
  right: 6px;
  font-size: 16px;
  font-weight: 640;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
  gap: 12px;
}

.check-label {
  display: flex !important;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  color: var(--text) !important;
}

.check-label input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
}

.pin-options-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px;
  margin-top: -8px;
}

.smooth-animation-wrap {
  flex: 1 1 100%;
  display: grid;
  gap: 4px;
  min-width: min(100%, 320px);
}

.smooth-animation-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  max-width: 42ch;
}

.combine-photos-clip-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 200px;
  min-width: 0;
}

.combine-clip-hint {
  margin: 0;
  font-size: 10px;
  line-height: 1.25;
  color: var(--muted);
  max-width: 46ch;
}

.pin-option-label {
  display: inline-grid !important;
  width: max-content;
  justify-items: center;
  gap: 3px;
  color: var(--muted) !important;
  font-size: 11px;
  line-height: 1.05;
  font-weight: 650;
}

.pin-option-label input {
  width: 13px;
  min-height: 13px;
}

.pin-option-label span {
  display: block;
}

.sell-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
}

.prompt-field {
  margin-top: -4px;
}

.sell-form input,
.sell-form select,
.sell-form textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  background: white;
  color: var(--text);
  outline: 0;
}

.sell-form textarea {
  min-height: 86px;
  padding-top: 8px;
  resize: vertical;
}

.draft-box {
  display: grid;
  max-width: 620px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--soft);
}

.generation-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.slim-button {
  width: min(100%, 620px);
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
}

@media (max-width: 1180px) {
  .pin-feed {
    column-count: 4;
  }
}

@media (max-width: 900px) {
  .topbar,
  .intro,
  .form-grid,
  .draft-box,
  .generation-actions {
    max-width: none;
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: start;
  }

  .pin-feed {
    column-count: 3;
  }
}

@media (max-width: 640px) {
  .feed-chrome .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: calc(10px + var(--safe-top)) 10px 8px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: calc(10px + var(--safe-top)) 10px 8px;
  }

  .feed-chrome .filter-shell {
    padding: 0 10px 8px;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    display: inline;
    overflow: hidden;
    max-width: 128px;
    text-overflow: ellipsis;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 13px;
  }

  .top-search {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 42px;
    padding-inline: 12px;
    order: 3;
  }

  .top-search input {
    font-size: 16px;
  }

  .top-actions {
    justify-self: end;
    gap: 6px;
    min-width: 0;
  }

  .secondary-button {
    max-width: 132px;
    min-height: 38px;
    padding-inline: 12px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #generateDraft.slim-button {
    justify-self: center;
    width: auto;
    max-width: none;
    min-height: 32px;
    padding: 0 4px;
    background: transparent;
    border-radius: 0;
    color: var(--text);
    font-size: 13px;
  }

  #generateDraft.slim-button.is-loading {
    color: var(--muted);
    pointer-events: none;
  }

  .telegram-widget {
    max-width: 132px;
    min-height: 38px;
    overflow: hidden;
  }

  .telegram-widget iframe {
    max-width: 132px;
  }

  #openSellModal {
    min-height: 40px;
    padding-inline: 14px;
    white-space: nowrap;
  }

  main {
    padding: 14px 8px 42px;
  }

  .intro {
    gap: 8px;
    margin-bottom: 12px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .intro h1 {
    max-width: 100%;
    margin-top: 8px;
    font-size: 30px;
    line-height: 0.98;
  }

  .intro p {
    font-size: 13px;
  }

  .filter-shell,
  .feed-head {
    margin-bottom: 12px;
  }

  .filter-toggle {
    min-height: 36px;
    padding-inline: 12px;
  }

  .filter-bar {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .chip,
  .price-filter {
    flex: 0 0 auto;
  }

  .feed-head {
    align-items: end;
  }

  .feed-head h2 {
    font-size: 22px;
  }

  .feed-head p {
    font-size: 13px;
  }

  .pin-feed {
    column-count: 2;
    column-gap: 8px;
  }

  .pin-card {
    margin-bottom: 8px;
    border-radius: 13px;
  }

  .pin-skeleton {
    margin-bottom: 8px;
  }

  .pin-card img,
  .pin-card video,
  .pin-card .photo-sequence,
  .pin-card .video-with-poster,
  .pin-card .pin-ambient-frame {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .pin-save,
  .pin-delete {
    width: 24px;
    height: 24px;
  }

  .pin-delete {
    right: 42px;
  }

  .pin-title {
    display: none;
  }

  .pin-meta span {
    padding: 6px 8px;
    font-size: 14px;
  }

  .pin-meta span:last-child {
    max-width: 58px;
    font-size: 10px;
    transform: none;
  }

  .pin-social {
    bottom: 46px;
    gap: 5px;
    font-size: 10px;
  }

  .pin-social-icon {
    width: 12px;
    height: 12px;
  }

  .detail-panel {
    justify-content: stretch;
    background: #000;
  }

  .detail-card {
    width: 100%;
    background: #fff;
  }

  .detail-panel.open .detail-image-wrap {
    margin-top: calc(-1 * var(--immersive-bleed-top));
    min-height: calc(100dvh + var(--immersive-bleed-top));
  }

  .detail-panel.open .detail-image-wrap > img,
  .detail-panel.open .detail-image-wrap > video,
  .detail-panel.open .detail-image-wrap > .detail-photo-sequence,
  .detail-panel.open .detail-image-wrap > .video-with-poster {
    aspect-ratio: unset;
    min-height: calc(100dvh + var(--immersive-bleed-top));
    height: calc(100dvh + var(--immersive-bleed-top));
    object-fit: cover;
    object-position: center top;
  }

  .detail-panel:not(.open) .detail-image-wrap > img {
    aspect-ratio: 1 / 1.08;
  }

  .detail-body {
    padding: 16px 14px 28px;
  }

  .detail-price {
    font-size: 26px;
  }

  .sell-modal {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border-radius: 18px 18px 0 0;
  }

  .sell-form {
    max-height: 100dvh;
    overflow-y: auto;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  }

  .modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -18px -14px 0;
    padding: 14px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .modal-head h2 {
    font-size: 28px;
  }

  .photo-drop {
    min-height: 260px;
    border-radius: 14px;
  }

  .photo-drop img {
    max-height: 360px;
  }

  .sell-form input,
  .sell-form select,
  .sell-form textarea {
    min-height: 38px;
    border-radius: 10px;
    font-size: 16px;
  }

  .check-label {
    width: 100%;
    min-height: 44px;
    align-items: center;
    font-size: 15px;
  }

  .pin-options-row {
    gap: 16px;
  }

  .pin-option-label {
    width: max-content;
    min-height: 0;
    font-size: 11px;
  }

  .generation-actions {
    grid-template-columns: 1fr;
  }
}
