/* =========================================================
   Feed Visual View
   Media-only full-screen projection of the existing Feed order.
   This is intentionally presentation-only: no new ranking/state.
   ========================================================= */
.feed-visual-launch {
  gap: .45rem;
  white-space: nowrap;
}

.feed-visual-launch[hidden] {
  display: none !important;
}

.feed-visual-launch-icon {
  font-size: 1rem;
  line-height: 1;
}


html.feed-visual-open,
body.feed-visual-open {
  overflow: hidden !important;
}

.feed-visual-viewer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  color: #fff;
}

.feed-visual-viewer[hidden] {
  display: none !important;
}

.feed-visual-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #000;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

.feed-visual-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
}

.feed-visual-media[hidden] {
  display: none !important;
}

.feed-visual-embed {
  border: 0;
  object-fit: initial;
}


.feed-visual-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.34) 0%, rgba(0,0,0,0) 18%),
    linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.34) 24%, rgba(0,0,0,0) 48%);
}

.feed-visual-close,
.feed-visual-mode-label,
.feed-visual-counter,
.feed-visual-actions,
.feed-visual-copy,
.feed-visual-hint,
.feed-visual-end,
.feed-visual-toast {
  position: absolute;
  z-index: 3;
}

.feed-visual-close {
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(0,0,0,.48);
  color: #fff;
  display: grid;
  place-items: center;
  font: 400 2rem/1 system-ui, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.feed-visual-mode-label {
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: .42rem .72rem;
  border-radius: 999px;
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.16);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.feed-visual-counter {
  top: max(22px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  color: rgba(255,255,255,.82);
  font-size: .78rem;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0,0,0,.65);
}

.feed-visual-copy {
  left: max(18px, env(safe-area-inset-left));
  right: 86px;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  min-width: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,.78);
}

.feed-visual-author-line {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .45rem;
}

.feed-visual-author-line strong {
  font-size: .98rem;
  font-weight: 950;
}

.feed-visual-author-line span {
  color: rgba(255,255,255,.74);
  font-size: .82rem;
  font-weight: 750;
}

.feed-visual-title {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 .28rem;
  color: #fff;
  text-decoration: none;
  font-size: clamp(1rem, 3.8vw, 1.22rem);
  font-weight: 950;
  line-height: 1.2;
}

.feed-visual-title[hidden] {
  display: none !important;
}

.feed-visual-caption {
  margin: 0;
  max-width: 760px;
  color: rgba(255,255,255,.94);
  font-size: clamp(.88rem, 3.4vw, 1rem);
  line-height: 1.42;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  white-space: pre-line;
}

.feed-visual-actions {
  right: max(10px, env(safe-area-inset-right));
  bottom: max(116px, calc(env(safe-area-inset-bottom) + 96px));
  display: grid;
  gap: .72rem;
  justify-items: center;
}

.feed-visual-action {
  position: relative;
  width: 58px;
  min-height: 58px;
  padding: 4px 2px;
  border: 0;
  border-radius: 18px;
  background: rgba(0,0,0,.34);
  color: #fff;
  text-decoration: none;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  cursor: pointer;
  text-shadow: 0 1px 6px rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.feed-visual-action[hidden] {
  display: none !important;
}

.feed-visual-action-icon {
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1;
}

.feed-visual-action-count {
  font-size: .72rem;
  font-weight: 950;
  line-height: 1;
}

.feed-visual-action-label {
  font-size: .66rem;
  font-weight: 850;
  line-height: 1.15;
}

.feed-visual-action:hover,
.feed-visual-action:focus-visible,
.feed-visual-close:hover,
.feed-visual-close:focus-visible {
  background: rgba(18,18,18,.7);
  outline: 2px solid rgba(255,255,255,.78);
  outline-offset: 2px;
}

.feed-visual-hint {
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: .28rem .58rem;
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  color: rgba(255,255,255,.64);
  font-size: .68rem;
  font-weight: 800;
  pointer-events: none;
  transition: opacity .22s ease;
}

.feed-visual-hint.is-used {
  opacity: 0;
}

.feed-visual-toast {
  left: 50%;
  top: 78px;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  padding: .58rem .8rem;
  border-radius: 999px;
  background: rgba(0,0,0,.74);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (min-width: 900px) {
  .feed-visual-stage {
    max-width: 760px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 0 80px rgba(0,0,0,.8);
  }

  .feed-visual-viewer::before,
  .feed-visual-viewer::after {
    content: "";
    position: absolute;
    inset-block: 0;
    width: calc((100vw - min(760px, 100vw)) / 2);
    background: #050505;
  }

  .feed-visual-viewer::before { left: 0; }
  .feed-visual-viewer::after { right: 0; }
}

@media (max-width: 520px) {
  .feed-visual-copy {
    left: max(14px, env(safe-area-inset-left));
    right: 76px;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  }

  .feed-visual-actions {
    right: max(7px, env(safe-area-inset-right));
    gap: .58rem;
    bottom: max(105px, calc(env(safe-area-inset-bottom) + 84px));
  }

  .feed-visual-action {
    width: 54px;
    min-height: 54px;
    border-radius: 17px;
  }

  .feed-visual-caption {
    -webkit-line-clamp: 3;
  }
}


.feed-visual-end {
  left: 50%;
  bottom: max(52px, calc(env(safe-area-inset-bottom) + 42px));
  transform: translateX(-50%);
  width: min(88vw, 360px);
  padding: .8rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  background: rgba(0,0,0,.62);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.feed-visual-end[hidden] {
  display: none !important;
}

.feed-visual-end-text {
  grid-column: 1 / -1;
  color: rgba(255,255,255,.9);
  font-size: .84rem;
  font-weight: 800;
}

.feed-visual-load-more,
.feed-visual-back {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  padding: .58rem .8rem;
  font: 800 .78rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.feed-visual-load-more {
  background: #fff;
  color: #111;
}

.feed-visual-load-more[hidden] {
  display: none !important;
}

.feed-visual-back {
  background: rgba(255,255,255,.09);
  color: #fff;
}

.feed-visual-load-more:disabled {
  opacity: .65;
  cursor: wait;
}
