/* ——— Feed view shell ——— */
/* Page scroller: this view is a block overflow-y port. Not a flex column (that traps height). */
#view-feed.view.view--feed {
  display: block;
  background: var(--feed-canvas, #edeef0);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  min-height: 0;
}

html[data-theme="dark"] .view--feed {
  --feed-canvas: #12161e;
}

#view-feed .view-header {
  position: sticky;
  top: 0;
  z-index: 4;
}

#view-feed .btn-text {
  min-height: 44px;
  min-width: 44px;
}

/* ——— Stories row ——— */
.feed-stories {
  display: flex;
  gap: 12px;
  padding: 14px 12px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

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

.story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  width: 76px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 4px 0 0;
  -webkit-tap-highlight-color: transparent;
}

.story:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 2px;
  border-radius: 12px;
}

.story__ring {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 2px;
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  overflow: hidden;
  box-sizing: border-box;
}

.story--unseen .story__ring {
  background: linear-gradient(135deg, #1e4fd6 0%, #3b82f6 48%, #06b6d4 100%);
}

.story__ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 2px solid var(--surface);
  box-sizing: border-box;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.story__ring-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story--add .story__ring {
  background: var(--surface-2);
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, var(--border));
  padding: 0;
}

.story--add .story__ring-inner {
  border: none;
  background: transparent;
  font-size: 26px;
  font-weight: 400;
  color: var(--accent);
}

.story__label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 76px;
  line-height: 1.2;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.story--skeleton {
  pointer-events: none;
}

.story--skeleton .story__ring,
.story--skeleton .story__label {
  border: none;
  background: var(--surface-2);
}

.story--skeleton .story__label {
  width: 52px;
  height: 10px;
  border-radius: 4px;
}

/* ——— Feed list ——— */
#view-feed .feed-list,
.feed-list {
  display: block;
  height: auto;
  max-height: none;
  min-height: 0;
  flex: none;
  overflow: visible;
  padding: 8px 0 32px;
}

.feed-compose-slot {
  padding: 8px 0 0;
}

.feed-compose-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  min-height: 44px;
  margin: 0 12px 10px;
  padding: 10px 14px;
  border: none;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 450;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s ease, color 0.15s ease;
}

.feed-compose-bar:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-2));
}

.feed-compose-bar:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .feed-compose-bar {
    transition: none;
  }
}

.feed-compose-bar__avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 0;
  background: rgba(30, 79, 214, 0.1);
  color: var(--accent);
}

.feed-compose-bar__avatar svg {
  display: block;
}

/* ——— Post cards ——— */
.feed-card {
  background: var(--surface);
  border-radius: 14px;
  margin: 0 8px 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.feed-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
}

.feed-card__head + .feed-card__body:not(:empty) {
  padding-top: 0;
  padding-bottom: 10px;
}

.feed-card__head + .vy-mosaic,
.feed-card__head + .feed-card__media-wrap {
  margin-top: -2px;
}

.feed-card__body + .vy-mosaic,
.feed-card__body + .feed-card__media-wrap {
  margin-top: 0;
}

.feed-avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.feed-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-avatar--fallback {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.feed-card__meta {
  flex: 1;
  min-width: 0;
}

.feed-card__meta strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.feed-card__meta time {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.feed-card__media-wrap {
  margin: 0;
}

.feed-card__media {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background: var(--surface-2);
}

.feed-card__body {
  margin: 0;
  padding: 2px 14px 12px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.feed-card__body:empty {
  display: none;
}

.feed-card__body + .feed-card__media-wrap,
.feed-card__head + .feed-card__media-wrap {
  margin-top: 0;
}

.feed-card__head + .feed-card__body:not(:empty) {
  padding-top: 0;
}

/* Legacy grid aliases — layout in mosaic.css */
.feed-grid {
  display: grid;
  gap: 2px;
  background: var(--surface-2);
}

/* Skeleton */
.skeleton-shimmer {
  background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: feed-shimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-shimmer {
    animation: none;
  }
}

@keyframes feed-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.feed-card--skeleton .feed-card__head {
  padding-bottom: 12px;
}

.feed-card__avatar-sk {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.feed-card__meta-sk {
  flex: 1;
  height: 32px;
}

.feed-card__media-sk {
  height: 180px;
  border-radius: 0;
  margin: 0;
}

.feed-card__body-sk {
  height: 48px;
  margin: 12px 14px 14px;
}

/* Empty / error states */
.feed-empty,
.feed-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 28px;
  text-align: center;
  color: var(--text-muted);
}

.feed-empty__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  line-height: 0;
  background: rgba(30, 79, 214, 0.1);
  color: var(--accent);
  margin-bottom: 4px;
}

.feed-empty__icon svg {
  display: block;
}

.feed-empty strong,
.feed-error strong {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.feed-empty p,
.feed-error p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  max-width: 280px;
}

.feed-empty__btn {
  width: auto;
  min-width: 180px;
  margin-top: 8px;
  padding: 0 24px;
}

/* ——— Inline feed compose ——— */
.feed-compose-card {
  width: calc(100% - 24px);
  margin: 0 12px 10px;
  padding: 0 0 14px;
  overflow: visible;
}

.feed-compose-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 4px 6px 0 14px;
}

.feed-compose-card__head strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.feed-compose {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px;
}

.feed-compose__input {
  width: 100%;
  min-height: 88px;
  border: none;
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px;
  resize: vertical;
  outline: none;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
}

.feed-compose__input:focus {
  box-shadow: 0 0 0 2px var(--accent-soft-strong);
}

.feed-compose__preview {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}

.feed-compose__preview img,
.feed-compose__preview video {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.feed-compose__preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  line-height: 0;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
  display: grid;
  grid-template: 1fr / 1fr;
  place-items: center;
}

.feed-compose__preview-remove svg {
  display: block;
}

.feed-compose__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feed-compose__attach {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  min-height: 44px;
}

.feed-compose__attach-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 0;
  background: rgba(30, 79, 214, 0.1);
}

.feed-compose__attach-icon svg {
  display: block;
}

.feed-compose__hint {
  font-size: 12px;
  color: var(--text-muted);
}

#feed-publish {
  min-height: 44px;
}

#feed-publish:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ——— Clips ——— */
.view--clips {
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

html[data-theme="dark"] .view--clips {
  background: var(--bg);
}

.view--clips .view-header {
  background: #fff;
  color: var(--text);
  flex-shrink: 0;
  z-index: 6;
}

html[data-theme="dark"] .view--clips .view-header {
  background: var(--bg);
}

.view--clips .view-header--overlay {
  position: relative;
  padding-top: env(safe-area-inset-top, 0px);
  height: auto;
  min-height: var(--header-h);
  pointer-events: auto;
  z-index: 6;
  background: #fff;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.view--clips .view-header--overlay h1 {
  pointer-events: none;
  text-shadow: none;
  color: var(--text);
}

.view--clips .view-header--overlay .btn-icon {
  pointer-events: auto;
  position: relative;
  z-index: 1;
  background: var(--surface-2);
  color: var(--text);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.view--clips .view-header--overlay .btn-icon.is-unmuted {
  background: var(--accent-soft);
  color: var(--accent);
}

#clips-mute-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  line-height: 0;
}

.view--clips .clips-scroller {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: always;
  scroll-padding: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  touch-action: pan-y;
  overflow-anchor: none;
  --clip-h: 100%;
}

.clips-scroller::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .view--clips .clips-scroller {
    scroll-snap-type: y proximity;
  }
}

.view--clips .clip-slide {
  position: relative;
  height: var(--clip-h, 100%);
  min-height: var(--clip-h, 100%);
  max-height: var(--clip-h, 100%);
  margin: 0;
  padding: 0;
  border: 0;
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-sizing: border-box;
  overflow: hidden;
}

.clip-slide__stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.clip-slide__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.clip-slide__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
}

.clip-slide__playpause {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  line-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity var(--motion-fast), transform var(--motion-fast);
}

.clip-slide__playpause svg {
  display: block;
}

.clip-slide.is-active.is-paused .clip-slide__playpause {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .clip-slide__playpause {
    transition: none;
  }
}

.clip-slide__shade-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
  z-index: 1;
}

.clip-slide__shade-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 88px 10px 16px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  pointer-events: none;
}

.clip-slide__progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.clip-slide__progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  .clip-slide__progress-bar {
    transition: none;
  }
}

.clip-slide__meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  pointer-events: none;
}

.clip-slide__avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.clip-slide__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-slide__avatar--fallback {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.clip-slide__text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.clip-slide__text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  max-height: 3.2em;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.clip-slide__hint {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.view--clips .clips-empty {
  height: var(--clip-h, 100%);
  min-height: var(--clip-h, 100%);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 28px;
  text-align: center;
  color: var(--text);
}

.clips-empty__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  line-height: 0;
  background: var(--surface-2);
  color: var(--accent);
  margin-bottom: 4px;
}

.clips-empty__icon svg {
  display: block;
}

.clips-empty strong {
  font-size: 17px;
  font-weight: 600;
}

.clips-empty span {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted);
  opacity: 1;
  max-width: 280px;
}

.view--clips .clips-skeleton {
  height: var(--clip-h, 100%);
  min-height: var(--clip-h, 100%);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Desktop polish */
@media (min-width: 861px) {
  .feed-stories {
    padding-left: 16px;
    padding-right: 16px;
  }

  .feed-list,
  .feed-compose-slot {
    max-width: 720px;
    width: 100%;
    height: auto;
    overflow: visible;
    margin-left: auto;
    margin-right: auto;
  }

  .feed-compose-bar,
  .feed-compose-card {
    margin-left: 16px;
    margin-right: 16px;
    width: calc(100% - 32px);
  }

  .feed-card {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* Post meta — wall chips (compact face, 44px hit) */
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 8px 0 8px;
}

.post-meta__reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  min-width: 0;
}

.react-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.react-chip__face {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
}

.react-chip__em {
  font-size: 14px;
  line-height: 1;
}

.react-chip__n {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.react-chip:focus-visible {
  outline: none;
}

.react-chip:focus-visible .react-chip__face {
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 2px;
}

.react-chip.is-mine .react-chip__face {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: var(--accent-soft);
}

.react-chip.is-mine .react-chip__n {
  color: var(--accent);
}

.react-chip--add .react-chip__face {
  background: transparent;
  color: var(--text-muted);
}

.react-chip--add .react-chip__plus {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
  margin-left: -1px;
}

@media (hover: hover) {
  .react-chip:hover .react-chip__face {
    background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
  }
}

.post-meta__views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.post-meta__views-ico::before {
  content: "";
  display: block;
  width: 16px;
  height: 11px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.55;
}

.feed-card__comments {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 4px 14px 10px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.feed-card__comments:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: -2px;
}

.feed-card__comments--empty {
  color: var(--accent);
}

.feed-card__thread {
  border-top: 1px solid var(--border);
}

.feed-card__comments-list {
  padding: 0 14px;
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.feed-card__comments-list .comments-empty,
.feed-card__comments-list .loading {
  padding: 16px 4px;
}

.feed-card__comments-list .comment-row:last-child {
  border-bottom: none;
}

.feed-card__comment-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 14px 12px;
}

.feed-card__comment-input {
  flex: 1;
  min-height: 44px;
  max-height: 100px;
  font-size: 16px;
}

/* Clips — action rail */
.view--clips .clip-rail {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 48px;
  pointer-events: auto;
}

.clip-rail__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.clip-rail__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 12px;
}

.clip-rail__ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  line-height: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
}

.clip-rail__ico svg {
  display: block;
}

.clip-rail__btn.is-active .clip-rail__ico {
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.22);
}

.clip-rail__btn.is-active .clip-rail__ico svg {
  fill: currentColor;
}

.clip-rail__btn.is-pulse .clip-rail__ico {
  animation: clip-like-pulse 0.35s ease;
}

@keyframes clip-like-pulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .clip-rail__btn.is-pulse .clip-rail__ico {
    animation: none;
  }
}

.clip-slide__dbl-heart {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  font-size: 88px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
}

.clip-slide__dbl-heart.is-pop {
  animation: clip-dbl-heart 0.75s ease forwards;
}

@keyframes clip-dbl-heart {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .clip-slide__dbl-heart.is-pop {
    animation: none;
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
}

.clip-rail__n {
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.clip-slide__views {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.85;
}

@media (min-width: 861px) {
  .view--clips .clip-slide {
    padding: 12px 0 20px;
  }

  .view--clips .clip-slide__stage {
    width: min(380px, calc((var(--clip-h, 100%) - 32px) * 9 / 16), calc(100% - 48px));
    height: auto;
    max-height: calc(100% - 16px);
    aspect-ratio: 9 / 16;
    border-radius: 24px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  }

  .view--clips .clip-slide__video {
    object-fit: cover;
  }

  .view--clips .clip-slide__shade-bottom {
    padding: 88px 12px 24px 20px;
  }
}

@media (max-width: 860px) {
  .view--clips .clip-slide__stage {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .view--clips .clip-slide__video {
    object-fit: cover;
  }
}

#comments-scrim {
  z-index: 79;
}

.app[data-view="clips"] ~ #comments-scrim:not(.hidden) {
  background: rgba(15, 23, 42, 0.42);
}

.comments-sheet--clips {
  z-index: 90;
}

#comments-sheet.comments-sheet--clips {
  z-index: 90;
}

@media (min-width: 861px) {
  .comments-sheet--clips {
    width: min(400px, 100%);
  }
}

#comments-sheet {
  z-index: 80;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--surface);
  padding-bottom: 0;
  overflow: hidden;
}

.comments-sheet .comments-list {
  flex: 1;
  overflow: auto;
  padding: 8px 16px;
  min-height: 120px;
  max-height: 50vh;
}

.comments-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.comments-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.comments-compose__input {
  flex: 1;
  min-height: 44px;
  max-height: 100px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 14px;
  resize: none;
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
}

.comments-compose__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft-strong);
}

.comments-compose .btn-send {
  min-width: 44px;
  min-height: 44px;
}

.comment-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.comment-row strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.comment-row p {
  margin: 0;
  font-size: 14px;
}

.comment-row time {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.react-picker {
  position: fixed;
  z-index: 210;
  display: grid;
  grid-template-columns: repeat(4, 44px);
  justify-content: center;
  justify-items: center;
  gap: 4px;
  max-width: calc(100vw - 16px);
  padding: 8px;
  box-sizing: border-box;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
}

.react-picker[hidden] {
  display: none !important;
}

.react-picker.is-open {
  display: grid;
}

.react-picker__btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  grid-template: 1fr / 1fr;
  place-items: center;
  -webkit-appearance: none;
  appearance: none;
}

.react-picker__btn:hover {
  background: var(--surface-2);
}

@media (prefers-reduced-motion: reduce) {
  .react-picker,
  .react-picker__btn {
    transition: none;
  }
}
