/* Forklaringsvideo bag »?« (BESLUTNINGER 06.11.2026; prototype koordination/2026-11-05/videoafspiller/kilde.html).
   Landscape iPad (from 1000 px): a panel on the right beside the task, which stays usable. Otherwise a sheet from
   the bottom over at most 80 % of the screen (70 % on a portrait iPad), the task's question still in view above it.
   Never full screen. 0.–3. klasse: bigger text and buttons, no clock; 4.–9.: a little smaller, the clock shown. */
.video-help { --video-accent: var(--theme-primary, var(--purple)); --video-accent-strong: var(--purple-dark);
  --video-sub-bg: #221d33; --video-sub-fg: #fff; --video-lit: #ffd77d; --video-stage: #f4f0fb; }
.video-help > .video-scrim, .video-help > .video-sheet { display: none; }
.video-help[open] > .video-scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgb(29 20 48 / 18%); }
.video-help[open] > .video-sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 80dvh; overflow: hidden; background: var(--panel); color: var(--ink); border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 30px rgb(29 20 48 / 20%); padding-bottom: env(safe-area-inset-bottom); font-weight: 600; line-height: 1.5; }
html:has(.video-help[open]) { overflow: hidden; }
@media (min-width: 700px) and (orientation: portrait) {
  .video-help[open] > .video-sheet { max-height: 70dvh; }
  .video-help .video-main { max-width: 640px; margin: 0 auto; width: 100%; }
}
@media (min-width: 1000px) and (orientation: landscape) {
  html:has(.video-help[open]) { overflow: auto; }
  .video-help[open] > .video-scrim { background: transparent; pointer-events: none; }
  .video-help[open] > .video-sheet { top: 0; left: auto; width: min(42%, 480px); max-height: none; border-radius: 20px 0 0 20px;
    border-left: 1.5px solid var(--line); box-shadow: -8px 0 28px rgb(29 20 48 / 18%); }
  .task-screen:has(.video-help[open]) .app-shell { margin-right: min(42%, 480px); }
  .video-help .video-grab { display: none; }
}
.video-grab { flex: 0 0 auto; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.video-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px 6px 16px; }
.video-title { display: grid; min-width: 0; line-height: 1.2; }
.video-kicker { font-size: 12px; font-weight: 800; color: var(--muted); }
.video-title strong { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-close { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--page); color: var(--ink); font-weight: 800; }
.video-close .luxi-icon { width: 18px; height: 18px; flex-basis: 18px; }
.video-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.video-main { display: flex; flex-direction: column; min-width: 0; }
/* When the sheet cannot hold it all (5 chapters on two rows on a portrait iPad), the drawing gets lower and stands
   centred in the stage, so the chapters are never cut off at the bottom (prodtest 27.11.2026, M2). */
.video-help .video-main { flex: 1 1 auto; min-height: 0; }
.video-help .video-stage { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.video-help .video-scenehead, .video-help .video-model { flex: 0 0 auto; }
.video-help .video-art { flex: 0 1 auto; min-height: 140px; }

/* The stage: the video's own drawing, full width; on a phone it zooms to the scene's focus (SKABELON-KRAV 4). */
.video-stage { position: relative; background: var(--video-stage); cursor: pointer; }
.video-scenehead { padding: 8px 12px 4px; text-align: center; font-size: 16px; font-weight: 800; }
.video-age-small .video-scenehead { font-size: 18px; }
.video-art { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 562.5; --card: var(--panel); --line: #e5dbec; --stage: var(--video-stage);
  --ink: #302744; --muted: #6c627a; --accent: var(--video-accent); --bg: var(--page); font-family: "Nunito", ui-rounded, "Trebuchet MS", system-ui, sans-serif; }
.video-label { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 20px);
  padding: 4px 14px 4px 10px; border-radius: 999px; background: rgb(31 27 46 / 72%); color: #fff; font-size: 16px; font-weight: 800; pointer-events: none; }
.video-label i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #fff; flex: 0 0 auto; }
.video-loading { position: absolute; inset: auto 0 45% 0; text-align: center; font-size: 16px; color: var(--muted); }
.video-end { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px; text-align: center;
  background: rgb(31 27 46 / 90%); color: #fff; cursor: default; }
.video-end p { font-size: 22px; font-weight: 900; }
.video-age-big .video-end p { font-size: 18px; }
.video-end-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.video-endbtn { min-height: 52px; padding: 10px 20px; border-radius: 16px; border: 0; background: #fff; color: #302744; font-size: 17px; font-weight: 900; }
.video-endbtn-main { background: var(--gold); }
.video-model { padding: 2px 12px 6px; text-align: center; font-size: 13px; color: var(--muted); background: var(--video-stage); }

/* Subtitle: one sentence at a time, always shown (pkt. 1). The underline glides under the word being said (pkt. 6):
   no fade, no glow, the word keeps its colour. Off with »Streg« (pkt. 7). */
.video-sub { position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: calc(2 * 1.5em + 26px);
  padding: 12px 16px 14px; background: var(--video-sub-bg); color: var(--video-sub-fg); text-align: center; font-size: 24px; line-height: 1.5; font-weight: 800; }
.video-age-big .video-sub { font-size: 19px; }
@media (max-width: 599px) { .video-age-small .video-sub { font-size: 22px; } }
.video-subtext { min-width: 0; }
.video-tok { white-space: nowrap; }
.video-uline { position: absolute; left: 0; top: 0; height: 4px; width: 0; border-radius: 2px; background: var(--video-lit); pointer-events: none; will-change: transform, width; }
.video-follow-off .video-uline { display: none; }

/* Buttons: »Hør igen« · ‹ · big play · › · speed · underline (pkt. 2, 5, 7). */
.video-controls { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: center; gap: 12px; padding: 12px 12px 6px; }
/* A label never breaks (»Hør igen« went on 2 lines in 0.–3. kl. on a phone, prodtest 22.11.2026): the column is as wide
   as its label, at least 60 px (48 px on a phone, the button's own width). */
.video-ctl { display: grid; justify-items: center; gap: 3px; min-width: 60px; font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; line-height: 1.2; white-space: nowrap; }
.video-age-small .video-ctl { font-size: 13px; }
.video-ctl-mid { align-self: center; width: auto; }
.video-round { width: 52px; height: 52px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: var(--page); color: var(--ink); }
.video-round svg { width: 24px; height: 24px; }
.video-round:disabled { opacity: .35; }
.video-speed { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--video-accent-strong); }
.video-speed.is-fast, .video-follow.is-on { background: var(--lavender); border-color: var(--video-accent); }
.video-follow-word { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; font-weight: 900; color: var(--video-accent-strong); }
.video-bigplay { flex: 0 0 auto; width: 64px; height: 64px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--video-accent); color: #fff; }
.video-age-small .video-bigplay { width: 72px; height: 72px; }
.video-bigplay svg { width: 32px; height: 32px; }
.video-bigplay .video-icon-pause, .video-bigplay.is-playing .video-icon-play { display: none; }
.video-bigplay.is-playing .video-icon-pause { display: block; }

/* Chapters by name; the playing one is marked, seen ones get a tick (pkt. 2). */
.video-chapters { flex: 0 0 auto; display: grid; gap: 8px; padding: 6px 12px 14px; }
.video-chapslabel { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 800; color: var(--muted); }
.video-age-small .video-chapslabel { font-size: 15px; }
.video-clock { font-variant-numeric: tabular-nums; }
.video-age-small .video-clock { display: none; }
.video-chaps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.video-chap { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 12px 8px 8px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--page); color: var(--ink); font-size: 14px; font-weight: 800; }
.video-age-small .video-chap { min-height: 48px; padding: 8px 14px 10px 10px; font-size: 16px; }
.video-cn { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 900; }
.video-chap.is-done { color: var(--muted); }
.video-chap.is-done .video-cn { background: var(--green); border-color: var(--green); color: var(--panel); }
.video-cp { position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p, 0) * 100%); background: var(--video-accent); }
.video-chap.is-done .video-cp { width: 100%; background: var(--green); opacity: .5; }
.video-chap[aria-current="true"] { border-color: var(--video-accent); background: var(--lavender); color: var(--video-accent-strong); box-shadow: 0 0 0 2px var(--video-accent) inset; }
.video-chap[aria-current="true"] .video-cn { background: var(--video-accent); border-color: var(--video-accent); color: #fff; }
.video-bars { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.video-bars i { width: 3px; height: 4px; border-radius: 2px; background: var(--video-accent); }
.is-playing .video-chap[aria-current="true"] .video-bars { display: inline-flex; }
@media (prefers-reduced-motion: no-preference) {
  .is-playing .video-bars i { animation: video-bar .9s ease-in-out infinite; }
  .video-bars i:nth-child(2) { animation-delay: .2s; }
  .video-bars i:nth-child(3) { animation-delay: .4s; }
}
@media (prefers-reduced-motion: reduce) { .is-playing .video-bars i { height: 10px; } }
@keyframes video-bar { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* Phone: the chapters are one row that can be pushed sideways; the playing one moves into view. */
@media (max-width: 599px) {
  .video-chaps { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin-inline: -12px; padding-inline: 12px; padding-bottom: 2px; }
  .video-chaps::-webkit-scrollbar { display: none; }
  .video-chaps li { flex: 0 0 auto; scroll-snap-align: center; }
  .video-chapters { padding-bottom: 10px; gap: 6px; }
  .video-controls { padding-top: 8px; gap: 8px; }
  .video-ctl { min-width: 48px; }
  .video-round { width: 48px; height: 48px; }
  .video-bigplay, .video-age-small .video-bigplay { width: 64px; height: 64px; }
  .video-head { padding-block: 4px; }
}

/* Beside the betjeningsguide (B6) the video's badge is a play symbol, so the two round buttons differ (prodtest 22.11.2026). */
.video-play-badge svg { width: 56%; height: 56%; margin-left: 8%; }

/* The betjeningsguide beside the video (B6) keeps still: only the video's »?« dingles after a wrong answer. */
.task-guides:has(> .video-help) > .guided-intro:not(.video-help) .guided-intro-badge { animation: none; }
.task-guides:has(> .video-help) > .guided-intro:not(.video-help) .guided-intro-badge::after { content: none; }

/* Scrub bar (UI-gennemgang 17.11, V1): one piece per chapter under the subtitle. A drag never scrolls the sheet
   (touch-action: none); the tap area is 44 px high although the bar itself is thin. */
.video-scrub { flex: 0 0 auto; padding: 8px 16px 0; }
.video-track { position: relative; height: 44px; display: flex; align-items: center; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.video-track:focus-visible { outline: 3px solid var(--video-accent); outline-offset: 2px; border-radius: 8px; }
.video-segs { display: flex; gap: 4px; width: 100%; height: 10px; }
.video-seg { position: relative; min-width: 6px; height: 100%; border-radius: 5px; overflow: hidden; background: var(--line); }
.video-seg i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--video-accent); }
.video-thumb { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: #fff; border: 3px solid var(--video-accent); box-shadow: 0 2px 6px rgb(29 20 48 / 25%); pointer-events: none; }
.is-scrubbing .video-thumb { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.video-bubble { position: absolute; bottom: calc(100% - 2px); transform: translateX(-50%); display: grid; justify-items: center;
  padding: 6px 12px; border-radius: 12px; background: var(--video-sub-bg); color: #fff; font-size: 14px; font-weight: 800;
  line-height: 1.25; white-space: nowrap; pointer-events: none; }
.video-bubble small { font-size: 12px; font-weight: 700; opacity: .8; font-variant-numeric: tabular-nums; }
.video-bubble[hidden] { display: none; }
.video-age-small .video-bubble { font-size: 16px; }
.video-age-small .video-bubble small { display: none; }
