/* Shared video UI; the actual picture always occupies an exact 16:9 frame. */
#videos .video-grid { align-items: stretch; }
#videos .video-box { display: flex; flex-direction: column; min-width: 0; box-shadow: none; }
#videos .video-player {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(155deg, #082a38, #03151e 65%, #020f16);
  color: #f4f9f8;
  color-scheme: dark;
  --green: #7bc982;
  --vp-played: 0%;
  --vp-buffered: 0%;
}
#videos .video-player:focus-visible { outline: 2px solid #7bc982; outline-offset: 4px; }
#videos .vp-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
#videos .vp-icon, .video-speed-menu .vp-icon {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#videos .vp-play-symbol { fill: currentColor; stroke: none; }
#videos .vp-icon[hidden], #videos [hidden], .video-speed-menu[hidden] { display: none !important; }
#videos .vp-center {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 60px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(205,233,235,.2);
  border-radius: 16px;
  background: rgba(2,15,22,.6);
  color: #ffffff;
  backdrop-filter: blur(10px);
  transition: background-color .18s, opacity .18s;
}
#videos .vp-center .vp-icon { width: 26px; height: 26px; }
#videos .vp-center:hover:not(:disabled) { background: rgba(47,125,77,.85); }
#videos .vp-center:disabled { opacity: .55; cursor: default; }
#videos .is-playing .vp-center { opacity: 0; pointer-events: none; }
#videos .vp-controls {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  padding: 26px 14px 10px;
  border-radius: 0;
  background: linear-gradient(0deg, rgba(2,15,22,.95), rgba(2,15,22,.55) 65%, rgba(2,15,22,0));
  transition: opacity .18s;
}
#videos .controls-hidden .vp-controls { opacity: 0; pointer-events: none; }
#videos .vp-seek-wrap { position: relative; height: 20px; margin-bottom: 3px; }
#videos input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
#videos .vp-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, #7bc982 var(--vp-played), rgba(244,249,248,.4) var(--vp-played), rgba(244,249,248,.4) var(--vp-buffered), rgba(244,249,248,.19) var(--vp-buffered));
}
#videos .vp-seek::-moz-range-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, #7bc982 var(--vp-played), rgba(244,249,248,.4) var(--vp-played), rgba(244,249,248,.4) var(--vp-buffered), rgba(244,249,248,.19) var(--vp-buffered));
}
#videos input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: #f4f9f8;
}
#videos input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: #f4f9f8; }
#videos .vp-seek-tip {
  position: absolute;
  bottom: 24px;
  padding: 4px 7px;
  border: 1px solid rgba(205,233,235,.14);
  border-radius: 6px;
  background: #08232f;
  color: #f4f9f8;
  font: 400 11px/1.4 var(--font-body);
  pointer-events: none;
}
#videos .vp-markers { position: absolute; inset: 0 5px; pointer-events: none; }
#videos .vp-markers i { position: absolute; top: 8px; width: 2px; height: 4px; background: rgba(2,15,22,.8); }
#videos .vp-control-row, #videos .vp-actions { display: flex; align-items: center; gap: 6px; }
#videos .vp-actions { margin-left: auto; }
#videos .vp-control {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #f4f9f8;
  box-shadow: none;
  transition: background-color .15s;
}
#videos .vp-control:hover:not(:disabled), #videos .vp-control[aria-expanded="true"] { background: rgba(205,233,235,.09); }
#videos .vp-control:disabled { opacity: .4; cursor: default; }
#videos .vp-time { flex: none; color: #bed0d3; font: 400 11px/1.4 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
#videos .vp-time-current { color: #f4f9f8; }
#videos .vp-time-separator { padding-inline: 3px; opacity: .7; }
#videos .vp-volume { width: 58px !important; height: 32px !important; margin-right: 3px !important; }
#videos .vp-volume::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: rgba(244,249,248,.3); }
#videos .vp-volume::-moz-range-track { height: 3px; border-radius: 2px; background: rgba(244,249,248,.3); }
#videos .vp-speed { width: 42px; font: 500 12px/1 var(--font-body); }
.video-speed-menu {
  position: fixed;
  z-index: 100;
  display: grid;
  width: 154px;
  max-height: calc(100dvh - 24px);
  gap: 3px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(205,233,235,.14);
  border-radius: 12px;
  background: #08232f;
  color: #f4f9f8;
  box-shadow: 0 12px 32px rgba(0,0,0,.2);
  color-scheme: dark;
}
.video-speed-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: 400 12px/1.4 var(--font-body);
  text-align: left;
}
.video-speed-menu button:hover, .video-speed-menu button:focus-visible { background: rgba(205,233,235,.065); }
.video-speed-menu button[aria-checked="true"] { background: rgba(123,201,130,.12); color: #b5e5bd; }
.video-speed-menu .vp-icon { width: 15px; height: 15px; opacity: 0; }
.video-speed-menu [aria-checked="true"] .vp-icon { opacity: 1; }
#videos .vp-notice {
  position: absolute;
  z-index: 4;
  inset: 14px 14px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(205,233,235,.14);
  border-radius: 9px;
  background: #08232f;
  color: #f4f9f8;
  font-size: 12px;
}
#videos .vp-retry { border: 0; padding: 4px; background: transparent; color: #b5e5bd; font-size: 12px; white-space: nowrap; }
#videos .video-player:fullscreen { width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; background: #020f16; }
#videos .video-player:fullscreen .vp-controls { padding: 32px max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)); }

/* Editorial information belongs below the frame, never over the cover. */
#videos .video-detail { display: flex; flex: 1; flex-direction: column; padding: 22px; }
#videos .video-detail > h4 { margin: 0 0 10px; font: 500 19px/1.35 var(--font-body); color: var(--ink); }
#videos .video-detail > p { margin: 0; font: 400 14px/1.55 var(--font-body); color: var(--muted-on-light); }
#videos .video-topics { min-width: 0; margin-top: auto; padding-top: 22px; }
#videos .video-topics-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#videos .video-topics-head h5 { margin: 0; color: var(--muted-on-light); font: 500 12px/1.4 var(--font-body); }
#videos .chapter-navigation { display: flex; gap: 4px; }
#videos .chapter-step { display: grid; place-items: center; width: 30px; height: 30px; padding: 6px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); }
#videos .chapter-step .vp-icon { width: 18px; height: 18px; }
#videos .chapter-step:not(:disabled):hover { background: rgba(38,75,89,.065); }
#videos .chapter-step:disabled { opacity: .3; cursor: default; }
#videos .chapters {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 136px;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 2px 2px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  overscroll-behavior-x: contain;
  list-style: none;
}
#videos .chapters::-webkit-scrollbar { display: none; }
#videos .chapter-item { display: flex; min-width: 0; scroll-snap-align: start; }
#videos .chapter {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--border-light);
  border-radius: 11px;
  background: #f2f5f5;
  color: var(--ink);
  font: 400 12px/1.4 var(--font-body);
  text-align: left;
  transition: background-color .15s, border-color .15s;
}
#videos .chapter:hover { border-color: #a6b9bf; background: #edf2f2; }
#videos .chapter[aria-current="true"] { border-color: #74a486; background: #e8f3ec; }
#videos .chapter-visual { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: linear-gradient(145deg, #193b48, #08232f); }
#videos .chapter-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#videos .chapter-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(205,233,235,.19); }
#videos .chapter-placeholder .vp-icon { width: 23px; height: 23px; }
#videos .chapter.has-frame .chapter-placeholder { display: none; }
#videos .chapter time { position: absolute; inset: auto auto 5px 5px; padding: 2px 4px; border-radius: 4px; background: rgba(2,15,22,.82); color: #ffffff; font: 400 10px/1.4 var(--font-body); font-variant-numeric: tabular-nums; }
#videos .chapter-label { display: block; flex: 1; min-height: 3.9em; margin: 9px 4px 5px; overflow-wrap: anywhere; }
@media (max-width: 575px) {
  #videos .video-player { border-radius: 13px 13px 0 0; }
  #videos .vp-center { top: calc(50% - 16px); width: 54px; height: 50px; border-radius: 13px; }
  #videos .vp-controls { padding: 22px 9px 7px; }
  #videos .vp-control-row, #videos .vp-actions { gap: 3px; }
  #videos .vp-control { width: 36px; height: 36px; }
  #videos .vp-speed { width: 42px; }
  #videos input.vp-volume { display: none; }
  #videos .vp-time { font-size: 10px; }
  #videos .video-detail { padding: 20px 18px; }
  #videos .video-detail > h4 { min-height: 0; font-size: 18px; }
  #videos .video-topics { padding-top: 18px; }
  #videos .chapters { grid-auto-columns: 132px; }
}
