/* ShortDrama lightbox — plain CSS (no Tailwind build needed). Mobile-first,
   app-like: full-viewport, safe-area aware, touch-driven. Accent: #E5084A. */

html.lb-lock { overflow: hidden; touch-action: none; }

.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 12px);
  height: 100dvh;
  overscroll-behavior: contain;
}
.lb-overlay.is-open { display: flex; animation: lb-fade 0.18s ease-out; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lb-btn {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.16); }
.lb-btn:active { transform: scale(0.92); }

.lb-close { top: calc(env(safe-area-inset-top) + 10px); right: 12px; width: 44px; height: 44px; }
.lb-counter {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 18px);
  left: 16px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  font: 600 13px/1 ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.lb-nav:active { transform: translateY(-50%) scale(0.92); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }

.lb-stage {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 1100px;
  width: 100%;
  height: 100%;
}
.lb-imgwrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1 1 auto;
  will-change: transform;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  user-select: none;
  -webkit-user-drag: none;
}

.lb-info {
  flex: 0 0 auto;
  width: 100%;
  max-width: 680px;
  text-align: center;
  color: #cfd4dd;
  font: 400 13px/1.5 ui-sans-serif, system-ui, sans-serif;
}
.lb-drama {
  display: block;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  text-decoration: none;
}
.lb-drama.is-link:hover { color: #E5084A; }

.lb-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 8px; }
.lb-chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d6dae2;
  text-decoration: none;
}
.lb-chip.is-link:hover { background: rgba(229, 8, 74, 0.18); border-color: rgba(229, 8, 74, 0.5); color: #fff; }

.lb-foot { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; color: #8b90a0; font-size: 11px; }
.lb-source { color: #E5084A; text-decoration: none; font-weight: 600; }
.lb-source:hover { text-decoration: underline; }

/* Desktop: nav buttons sit just outside the image, info pinned readable */
@media (min-width: 768px) {
  .lb-prev { left: 24px; }
  .lb-next { right: 24px; }
  .lb-info { font-size: 14px; }
}

/* Pointer (mouse) devices: subtle hover cue on the image */
@media (hover: hover) and (pointer: fine) {
  .lb-img { transition: box-shadow 0.2s ease; }
}
