/* Post viewer: tapping a tile opens the post here, like Instagram's post view. */
html.pop-lock, html.pop-lock body { overflow: hidden; }
.pop {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.92); color: #fff;
}
.pop.open { display: flex; }
.pop-box { display: flex; max-width: calc(100vw - 140px); max-height: 90vh; background: #000; border: 1px solid #262626; }
.pop-media { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; background: #000; }
.pop-media img, .pop-media video {
  display: block; width: auto; height: auto;
  max-width: min(1080px, calc(100vw - 140px - 361px)); max-height: 90vh;
}
.pop-side { display: flex; flex-direction: column; flex: none; width: 360px; border-left: 1px solid #262626; font-size: 14px; }
.pop-head { padding: 14px 16px; border-bottom: 1px solid #262626; font-weight: 700; text-decoration: none; }
.pop-cap { flex: 1; padding: 14px 16px; overflow-y: auto; white-space: pre-line; line-height: 1.45; overflow-wrap: anywhere; }
.pop-meta { padding: 12px 16px 16px; border-top: 1px solid #262626; }
.pop-counts { font-weight: 600; }
.pop-date { margin-top: 4px; color: #a8a8a8; font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; }
.pop-ig { display: inline-block; margin-top: 12px; padding: 8px 14px; border: 1px solid #555; border-radius: 8px; text-decoration: none; font-weight: 600; }
.pop-ig:hover, .pop-ig:focus-visible { border-color: #fff; }
.pop-watch {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 12px 18px; border: 1px solid #fff; border-radius: 999px;
  background: rgba(0, 0, 0, 0.7); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.pop-btn {
  position: fixed; z-index: 1; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff; font: 400 30px/1 system-ui, sans-serif; cursor: pointer;
}
.pop-btn:hover, .pop-btn:focus-visible { background: rgba(255, 255, 255, 0.28); }
.pop-btn[hidden] { display: none; }
.pop-close { top: 14px; right: 14px; }
.pop-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.pop-next { right: 14px; top: 50%; transform: translateY(-50%); }
.pop-sprev, .pop-snext { position: absolute; top: 50%; width: 32px; height: 32px; font-size: 22px; transform: translateY(-50%); background: rgba(0, 0, 0, 0.55); }
.pop-sprev { left: 10px; }
.pop-snext { right: 10px; }
.pop-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.pop-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.pop-dots span.on { background: #fff; }
@media (max-width: 899px) {
  .pop { align-items: stretch; background: #000; }
  .pop-box { flex-direction: column; width: 100%; max-width: none; max-height: none; overflow-y: auto; border: 0; }
  .pop-media img, .pop-media video { max-width: 100vw; max-height: 75vh; }
  .pop-side { width: auto; border-left: 0; }
  .pop-cap { flex: none; overflow: visible; }
  .pop-close { top: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); }
  /* On phones the post arrows sit on the picture, top left, so they never cover the caption. */
  .pop-prev, .pop-next { top: 10px; transform: none; background: rgba(0, 0, 0, 0.6); }
  .pop-prev { left: 10px; }
  .pop-next { left: 62px; right: auto; }
}
