#details-panel { position: fixed; z-index: 100; top: 8px; max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; background: #1b1c21; border-radius: 12px; box-shadow: 0 8px 32px #000c; padding: 12px 16px 16px; box-sizing: border-box; }
#details-panel.sheet { top: auto; bottom: 0; left: 0 !important; right: 0; width: auto !important; max-height: 85vh; border-radius: 12px 12px 0 0; }
#details-backdrop { position: fixed; inset: 0; z-index: 99; background: #0008; }
#details-panel .details-header { display: flex; align-items: center; gap: 12px; }
#details-panel h2 { margin: 0; font-size: 22px; }
#details-panel .subtitle { display: block; color: #9a9ca5; font-size: 14px; font-weight: 400; }
#details-panel .details-close { margin-left: auto; flex: none; }
#details-panel .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; padding-bottom: 10px; border-bottom: 1px solid #2f3139; }
#details-panel .actions button.active { background: #4a6cf7; }
#details-panel .actions a { color: #7fb0ff; }
#details-panel .actions .danger:hover { background: #a33a3a; }
#details-panel select { background: #2a2c33; color: inherit; border: 0; border-radius: 6px; padding: 4px; font: inherit; }
#details-panel .meta { color: #9a9ca5; font-size: 13px; margin: 4px 0; }
#details-panel .media-stage { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; margin-top: 8px; }
#details-panel .media-stage.fullscreen { position: fixed; inset: 0; z-index: 200; aspect-ratio: auto; border-radius: 0; background: #000e; }
#details-panel .media-slot { width: 100%; height: 100%; }
#details-panel .media-slot video, #details-panel .media-slot img, #details-panel .media-slot iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
#details-panel .media-slot > img { cursor: zoom-in; }
#details-panel .video-out { position: relative; display: block; width: 100%; height: 100%; }
#details-panel .video-out .play-badge { background: #0006; font-size: 18px; }
#details-panel .media-stage.fullscreen .media-slot > img { cursor: default; }
#details-panel .media-step { position: absolute; top: 0; bottom: 0; z-index: 1; display: flex; align-items: center; width: 18%; padding: 0 20px; border: 0; border-radius: 0; color: #fff; font-size: 56px; text-shadow: 0 1px 6px #000; opacity: 0; transition: opacity 0.2s; cursor: pointer; }
#details-panel .media-step[data-media-step="-1"] { left: 0; justify-content: flex-start; background: linear-gradient(to right, #0009, transparent); }
#details-panel .media-step[data-media-step="1"] { right: 0; justify-content: flex-end; background: linear-gradient(to left, #0009, transparent); }
#details-panel .media-stage.has-video .media-step { bottom: 60px; }
#details-panel .media-stage:hover .media-step { opacity: 0.45; }
#details-panel .media-stage .media-step:hover { opacity: 1; }
#details-panel .media-stage:focus { outline: none; }
#details-panel .media-hint { margin-top: 4px; color: #9a9ca5; font-size: 12px; }
#details-panel .media-strip { position: relative; display: flex; gap: 6px; overflow-x: auto; margin: 8px 0 12px; padding-bottom: 4px; }
#details-panel .media-thumb { position: relative; flex: 0 0 150px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #000; }
#details-panel .media-thumb.active { border-color: #4a6cf7; }
#details-panel .media-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
#details-panel .play-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; text-shadow: 0 1px 4px #000; }
#details-panel .description { line-height: 1.5; font-size: 14px; }
#details-panel .description p { margin: 0 0 10px; }
#details-panel .description img { max-width: 100%; height: auto; }
.info-button { position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; background: #000c; font: italic 700 14px Georgia, serif; }
.info-button:hover { background: #4a6cf7; }
@media (max-width: 760px) {
  #details-panel.sheet { bottom: 56px; max-height: calc(80vh - 56px); }
  .info-button { width: 36px; height: 36px; min-height: 0; }
}
