/* Heart Player's stylesheet: the docked YouTube player, the sidebar it sits in, its tabs, the line under the video,
   the list of moments under it, the player pinned to a narrow window's foot or to the right half of a phone on its
   side. Vi.ki's own rules (its web/static/app.css, the "article + sidebar", "the video dock", "the moments under the
   video" and "PHONE, LANDSCAPE" sections), copied as they were on Nov 7, 2026 for the sites that have none of their
   own (Offplan.tv first; George: the player "becomes ONE shared component"). Vi.ki and Heartipedia still keep these
   rules in their own app.css; a change here reaches them only when they move onto this file.

   The one difference from Vi.ki's copy: its :root[data-controls="viki"] is :root[data-controls-site] here, the
   attribute a page sets on <html> while the site's own control bar is the one in use.

   What a page provides (the site's own stylesheet sets these):
     --bg --ink --muted --line --tint --link --moment --shadow   the site's colors
     --header-h        the header's height, before dock.js measures it into --hb-top
     --max             the reading column's width beside the player
   and the markup: .with-aside > .page-main + .rails > aside.related > .hb-dock (dock.js's contract, AGENTS.md). */

/* --- article + sidebar ---------------------------------------------------------------------
   The reading column keeps its width; the sidebar holds the video. One column is the default
   (a phone is not a special case) and the second column arrives at 60rem. Every two-column rule
   lives inside that block. */
:root { --toc-w: 14rem; }

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; align-items: start; }
/* .rails is the column beside the article. Below the three-column breakpoint it IS that column,
   one box; above it the wrapper dissolves with display: contents and its children become grid
   items in tracks of their own. */
.rails { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.page-main { min-width: 0; }
@media (min-width: 60.01rem) {
  .with-aside { grid-template-columns: minmax(0, var(--max)) minmax(0, 19rem); gap: 2.5rem; }
  /* With a video docked the sidebar has to hold a 480px player (the floor the YouTube API terms
     set), so its track widens and the shell with it. */
  body.has-dock.dock-side .with-aside { grid-template-columns: minmax(0, var(--max)) 33.5rem; }
  body.has-dock.dock-side.wide { --shell: 82rem; }
}
.related { font-size: .93rem; padding-top: 1.25rem; }
@media (min-width: 60.01rem) {
  /* One scrollbar on the page and no other. The rail scrolls with the page and only the video
     sticks: a reader who is watching wants it in view. */
  .rails { align-self: stretch; padding-left: 1.1rem; }
  .rails > .related { flex: 1 1 auto; }
  /* Two columns: the contents sit ABOVE the article, never beside the video and never below it.
     account.js collapses them to a dropdown beside the title. */
  body.has-toc .with-aside { grid-template-rows: auto 1fr; }
  body.has-toc .toc { grid-column: 1; grid-row: 1; }
  body.has-toc .page-main { grid-column: 1; grid-row: 2; }
  body.has-toc .rails { grid-column: 2; grid-row: 1 / span 2; }
  .related { padding-top: 0; }
  /* The dock sticks inside .related, so .related has to be as tall as the row. It sticks flush
     under the header, and on arrival it starts flush under the header (or the countdown), above
     main's own top padding: YouTube's frame already has a band above the picture (George,
     16 September 2026). --hb-top is the header's measured height (moments.js). */
  .related > .hb-dock { position: sticky; top: var(--hb-top, var(--header-h)); z-index: 5; }
  /* The gap between the header and a stuck video is a window the rest of the rail would scroll
     up through. This fills it with the page's own background, anchored to the dock. */
  .related > .hb-dock::before {
    content: ""; position: absolute; left: -1.2rem; right: -1.2rem; bottom: 100%;
    height: 100vh; background: var(--bg);
  }
  /* And a solid ring around the dock itself, closing the four corner notches of its radius. */
  .related > .hb-dock { box-shadow: 0 0 0 1rem var(--bg); }
  /* With the tabs (George, Nov 7, 2026: "add the "More from Vi.ki" tab in the sidebar as Heartipedia has"; its
     app.css of Nov 6, 2026, mirrored): the tabs stick under the header and the panel shown sticks under them, so
     neither scrolls away with the page. The list of other pages scrolls inside its own panel when it is taller than
     the window, since the page's scrollbar no longer moves it. --side-tabs-h is the tabs' height, set by moments.js. */
  .related.tabbed[data-tab] > .side-tabs {
    position: sticky; top: var(--hb-top, var(--header-h)); z-index: 6;
    box-shadow: 0 -1rem 0 0 var(--bg);
  }
  .related.tabbed[data-tab] > .hb-dock { top: calc(var(--hb-top, var(--header-h)) + var(--side-tabs-h, 2.6rem)); }
  .related.tabbed[data-tab] > .side-more {
    position: sticky; top: calc(var(--hb-top, var(--header-h)) + var(--side-tabs-h, 2.6rem));
    max-height: calc(100vh - var(--hb-top, var(--header-h)) - 1rem - var(--side-tabs-h, 2.6rem));
    overflow-y: auto; overscroll-behavior: contain; padding-right: .3rem;
  }
}
.side-tabs { display: flex; gap: .25rem; margin: 0 0 .8rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.side-tabs[hidden] { display: none; }
.side-tab {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin: 0 0 -1px;
  padding: .55rem .8rem; font: inherit; font-size: .85rem; font-weight: 500; color: var(--muted); cursor: pointer;
}
.side-tab:hover { color: var(--ink); }
.side-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--link); }
.side-tab:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; border-radius: 4px 4px 0 0; }
/* Never both at once: aside[data-tab] (moments.js) names the panel shown. Without it, as without JavaScript, both. */
.related.tabbed[data-tab="video"] > .side-more { display: none; }
.related.tabbed[data-tab="more"] > .hb-dock { display: none; }
/* The tab already names the list, so its heading is kept for screen readers (the aside is labeled by it) only. */
.related.tabbed[data-tab] > .side-more > h2 {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
/* Vi.ki's list goes on to other vikis, each after its game's icon. */
.related .side-more-h { font-size: .8rem; margin: 1.2rem 0 .5rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 500; }
.related .side-vikis li a:has(.side-viki-icon) { display: grid; grid-template-columns: 2rem 1fr; gap: .7rem; align-items: center; }
.related .side-viki-icon { width: 2rem; height: 2rem; border-radius: 6px; display: block; object-fit: cover; }
.related h2 { font-size: .8rem; margin: .3rem 0 .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 500; }
.related .pages { list-style: none; margin: 0 0 .9rem; padding: 0; }
.related .pages li { padding: .42rem 0; }
.related .pages li a { color: var(--ink); display: block; }
.related .pages li a:hover { color: var(--link); }
.related .kind { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: .1rem; }
.related .all { margin: 0; font-size: .88rem; }

/* --- thumbnails in a list --------------------------------------------------------------------
   A row with a picture is two columns: the still, then the title beside it, the shape YouTube's
   sidebar uses because it is the right one for scanning a list of videos. */
.related .pages li a:has(.pg-thumb) {
  display: grid; grid-template-columns: 10rem 1fr; gap: .7rem; align-items: start;
}
.pg-thumb {
  width: 10rem;
  /* height MUST be auto for aspect-ratio to apply; the markup carries width/height attributes. */
  height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 6px; background: var(--tint); display: block;
}
.pg-text { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
/* When there is no still: YouTube answers a missing rendition with a 120x90 gray placeholder,
   which decodes as a valid image. account.js marks those; the box paints its own tint. */
.hb-player.no-still { background: linear-gradient(160deg, var(--tint), var(--bg)); }
.hb-player.no-still img.hb-facade { display: none; }
.pg-thumb.no-still, img.no-still { visibility: hidden; }

/* The table of contents: the left column when the window has room for one, otherwise the head
   of the article as a dropdown. No numbers, and no rules between entries. */
.toc { margin: 0 0 1.1rem; font-size: .9rem; }
.toc summary { font-size: .8rem; margin: .3rem 0 .5rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 500; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { padding: .18rem 0; border: 0; }
.toc li.l3 { padding-left: .9rem; }
.toc li.l4 { padding-left: 1.8rem; }


/* --- the video dock --------------------------------------------------------------------------
   The video is never in the text. It is the top of the sidebar, just under the header, from the
   first paint: a facade that plays nothing until asked, in the same place whichever moment is
   clicked, and it stays there through any amount of scrolling. At least 480x270, because that is
   the floor the YouTube API terms set. On a narrow screen the sidebar is under the article, so
   on first play the dock pins to the foot of the viewport instead, with a Close button.

   THE BUFFER BOX. The player box is taller than the picture: the picture's height PLUS a band
   (--hb-buffer, 242px; 0 for a portrait video) in which YouTube's own control bar and captions
   render, never over the picture. The box cannot be an aspect-ratio box, so it is sized in
   container units: the dock is an inline-size container and the box's height is
   100cqw * h / w + buffer. 100cqw is the dock's CONTENT width, which is what lets the pinned and
   theater docks cap the player with padding alone. The player's own container is .hb-stage, the
   wrapper it shares with Vi.ki's bar, which is as wide as the dock unless capped (the sidebar,
   below). The facade fills the whole box with
   object-fit: contain, so the still sits exactly where YouTube will draw the picture (centered
   in the frame, band below) and nothing moves when the iframe replaces it. */
.hb-dock { --hb-ar-w: 16; --hb-ar-h: 9; --hb-buffer: 242px; container-type: inline-size; }
.hb-stage { container-type: inline-size; }
.hb-dock.hb-dock--portrait { --hb-ar-w: 9; --hb-ar-h: 16; --hb-buffer: 0px; }
/* The reader's "Video controls overlap" (theme.js), for a landscape video in the sidebar: None,
   the default since 17 September 2026, gives YouTube's controls a band of their own
   (heartbeatme.com's buffer 242, above); Minimal lets the tallest of them reach the picture's
   foot (buffer 151); All lets them lie over it (buffer 0). A portrait video and the pinned phone
   player keep no band either way. */
:root[data-overlap="minimal"] .hb-dock:not(.hb-dock--portrait):not(.hb-dock--bottom) { --hb-buffer: 151px; }
:root[data-overlap="all"] .hb-dock:not(.hb-dock--portrait):not(.hb-dock--bottom) { --hb-buffer: 0px; }
/* Vi.ki's controls (theme.js, moments.js): YouTube's are off, so the box is the picture and the bar
   sits under it; how much YouTube's controls overlap no longer applies, and the menu drops it. */
:root[data-controls-site] .hb-dock:not(.hb-dock--portrait):not(.hb-dock--bottom) { --hb-buffer: 0px; }
:root[data-controls-site] #settings-overlap { display: none; }
/* YouTube still draws its title, a play and pause button, a link button, More videos and its logo
   over the picture whenever the pointer moves over the player, even with controls=0 (George,
   16 September 2026, asked for them gone). With Vi.ki's controls the player takes no pointer, so
   they never appear; the box under it plays and pauses on a click (moments.js). */
:root[data-controls-site] .hb-player.live iframe { pointer-events: none; }
:root[data-controls-site] .hb-player.live:not(.failed) { cursor: pointer; }
/* ...and with no pointer, still when it pauses: its title along the top, and its link button, More
   videos and logo along the foot (George, Oct 10, 2026: "on vi.ki can we remove these youtube overlays
   when playing the video ... can we enlarge the video height to remove them without changing the video
   aspect ratio"). So YouTube's frame is taller than the box by a band each way, as Heart Photos' is
   (moment.js place): YouTube centers the video in its frame, so the picture fills the box exactly, and
   what it draws in the bands is cut off by the box. The pause sign it flashes in the middle stays. Its
   captions are drawn in the bottom band too, so with captions on (.cc-on, moments.js) there is no band.
   YouTube's terms ask that its player's branding is not hidden; YouTube's logo stays in the bar, as the
   link to the video. */
:root[data-controls-site] .hb-dock:not(.hb-dock--portrait) .hb-player { --hb-yt-band: clamp(64px, calc(100cqw * var(--hb-ar-h) / var(--hb-ar-w) * .15), 150px); }
:root[data-controls-site] .hb-dock:not(.hb-dock--portrait) .hb-player iframe {
  top: calc(-1 * var(--hb-yt-band)); bottom: auto; height: calc(100% + 2 * var(--hb-yt-band));
}
:root[data-controls-site] .hb-dock:not(.hb-dock--portrait) .hb-player.cc-on iframe { top: 0; height: 100%; }
/* The bar's height (a 1.1rem seek row, a 2.25rem row and .65rem of padding), for the caps that fit
   the whole player in the window. Kept before the first play too, so nothing resizes on it. */
:root[data-controls-site] .hb-dock { --hb-bar-h: 4rem; }
.hb-bar { display: none; }
:root[data-controls-site] .hb-player.live:not(.failed) + .hb-bar {
  display: block; padding: .35rem .2rem .3rem; background: #000; color: #eee;
}
.hb-bar .hb-row { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.hb-bar .hb-gap { flex: 1 1 auto; }
.hb-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 2.25rem; height: 2.25rem; padding: 0 .35rem; border: 0; border-radius: 6px;
  background: none; color: inherit; font: 500 .78rem/1 system-ui, sans-serif; cursor: pointer;
}
.hb-btn:hover, .hb-btn:focus-visible { background: rgba(255, 255, 255, .12); }
/* CC in the speed's pill, as Heart Photos' (George, Oct 10, 2026: "use the same CC style on vi.ki as we use on
   heart.photos"): faint white, brighter under the pointer, the letters dim while off. On, as YouTube marks
   it: the letters white and a short line of the player's red under them, nothing filled (George, Oct 9,
   2026: "When CC is on make it fully colored", then Oct 10, 2026: "Our CC button when enabled is too
   visually distracting please make it less distracting for its "On" state"). */
.hb-btn.hb-cc {
  position: relative; height: 2.25rem; padding: 0 .8rem; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .6); font: 500 .82rem/1 system-ui, sans-serif; transition: background .15s ease, color .15s ease;
}
.hb-btn.hb-cc:hover, .hb-btn.hb-cc:focus-visible { background: rgba(255, 255, 255, .2); color: #fff; }
.hb-cc[aria-pressed="true"] { color: #fff; }
.hb-cc[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 30%; right: 30%; bottom: 6px; height: 2px; border-radius: 2px; background: #e62117;
}
/* The time, with room on each side as if it sat in a pill of its own as YouTube's does, but with no pill
   (George, Oct 10, 2026: "add more space for the time as if it was in its own bubble like youtube ... but don't
   show a bubble"), a button that shows the time left (moments.js) with no look of one but its pointer. */
.hb-time {
  flex: none; height: 2.25rem; padding: 0 .85rem; border: 0; border-radius: 999px; background: none;
  font: .82rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; color: #ccc; cursor: pointer;
}
.hb-time:hover, .hb-time:focus-visible { color: #fff; }
/* The volume is one control (George, Oct 9, 2026: "the volume is one control not two as they currently
   are"): the speaker and its slider in one box that lights as a whole, the speaker no box of its own. */
/* Play and the volume wear Heart Photos' round controls (George, Oct 10, 2026: "use the circular
   background for the play button and the volume controls on vi.ki same as we use on heart.photos"): a
   faint white disc behind play, a pill of the same around the speaker and its slider (a disc while the
   slider is folded away), both brighter under the pointer, as Heart Photos' .ctl (.08, then .2). */
.hb-pp, .hb-volume .hb-mute { width: 2.25rem; min-width: 0; padding: 0; border-radius: 999px; }
.hb-pp { background: rgba(255, 255, 255, .08); transition: background .15s ease; }
.hb-pp:hover, .hb-pp:focus-visible { background: rgba(255, 255, 255, .2); }
.hb-volume {
  display: inline-flex; align-items: center; flex: none; height: 2.25rem; border-radius: 999px;
  background: rgba(255, 255, 255, .08); transition: background .15s ease;
}
.hb-volume:hover, .hb-volume:has(:focus-visible) { background: rgba(255, 255, 255, .2); }
.hb-volume .hb-mute:hover, .hb-volume .hb-mute:focus-visible { background: none; }
/* The slider at YouTube's thickness (George, Oct 9, 2026: "change the thickness of the volume bar to be
   the same as YouTube's"): a 3px line, white as far as the volume goes and faint after it (--hb-vol,
   which moments.js keeps), and a 12px white knob. */
.hb-vol {
  flex: none; width: 4.5rem; height: 1.5rem; margin: 0 .6rem 0 0; background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: width .2s ease, margin .2s ease, opacity .2s ease, visibility 0s;
}
.hb-vol::-webkit-slider-runnable-track {
  height: 2px; border-radius: 1px;
  background: linear-gradient(to right, #fff var(--hb-vol, 100%), rgba(255, 255, 255, .3) var(--hb-vol, 100%));
}
.hb-vol::-moz-range-track {
  height: 2px; border-radius: 1px;
  background: linear-gradient(to right, #fff var(--hb-vol, 100%), rgba(255, 255, 255, .3) var(--hb-vol, 100%));
}
/* Thinner than the seek line (George, Oct 10, 2026: "reduce the thickness of the volume slider by 2px",
   then "increase the volume slider height by 1px"): a 2px line, the knob centered on it. */
.hb-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; border-radius: 50%; background: #fff; border: 0; }
.hb-vol::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
/* Folded away until the speaker is pointed at, opening and closing smoothly (moments.js keeps
   .vol-open on the row while the pointer is in it). */
.hb-row:not(.vol-open) .hb-vol {
  width: 0; margin-right: 0; opacity: 0; visibility: hidden;
  transition: width .2s ease, margin .2s ease, opacity .15s ease, visibility 0s .2s;
}

/* THE CONTROLS AT YOUTUBE'S SIZE, as Heart Photos' (George, Oct 10, 2026: "Propertionally increase all our video
   control font sizes to match YouTube's"). Measured that day on youtube.com at 1920 by 1080: 40px round buttons,
   the time in 14px at weight 500; the speed and CC a quarter bigger with them (moments.js has the icons' sizes). */
.hb-bar .hb-btn { min-width: 2.5rem; height: 2.5rem; }
.hb-bar .hb-pp, .hb-bar .hb-volume .hb-mute { width: 2.5rem; }
.hb-bar .hb-volume { height: 2.5rem; }
.hb-bar .hb-btn.hb-cc, .hb-bar .hb-btn.hb-rate { height: 2.5rem; padding: 0 .95rem; font-size: 1rem; }
.hb-bar .hb-cc[aria-pressed="true"]::after { bottom: 8px; }
.hb-bar .hb-time { height: 2.5rem; font-size: .875rem; font-weight: 500; }
.hb-bar .hb-vol { width: 5rem; margin-right: .95rem; }
/* ...and the speaker's waves shrink into it on mute and grow out of it on unmute, as YouTube's (moments.js turnSpeaker). */
.hb-mute .hb-wave { transform-box: fill-box; transform-origin: left center; }
.hb-mute.waves-in .hb-wave { animation: hb-wave-in .22s ease-out both; }
.hb-mute.waves-in .hb-wave-2 { animation-delay: .05s; }
.hb-mute.waves-out .hb-wave { animation: hb-wave-out .17s ease-in both; }
.hb-mute.big-in .hb-wave-2 { animation: hb-wave-in .2s ease-out both; }
.hb-mute.big-out .hb-wave-2 { animation: hb-wave-out .15s ease-in both; }
@keyframes hb-wave-in { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes hb-wave-out { from { transform: scale(1); opacity: 1; } to { transform: scale(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hb-mute .hb-wave { animation: none !important; } }
/* The speed, in Heart Photos' YouTube-style pills (George, Oct 10, 2026: "use the new heart.photos playback
   speed style on vi.ki"): a pill saying it, beside the round controls, and the chips it opens over the
   video, pills of faint white with no edge, the one chosen brighter, on a rounded dark panel. */
.hb-rate-wrap { position: relative; flex: none; display: inline-flex; }
.hb-btn.hb-rate {
  height: 2.25rem; padding: 0 .8rem; border-radius: 999px; background: rgba(255, 255, 255, .08);
  font: 500 .82rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; transition: background .15s ease;
}
.hb-btn.hb-rate:hover, .hb-btn.hb-rate:focus-visible, .hb-btn.hb-rate[aria-expanded="true"] { background: rgba(255, 255, 255, .2); }
/* The chips open below the pill, and above it where the window has no room below (moments.js rateOpen; George,
   Oct 10, 2026: "open the playback speed below the button not above unless there isn't room in the browser to
   show it below"). */
.hb-rate-pop {
  position: absolute; right: 0; top: calc(100% + .6rem); z-index: 5;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; padding: .6rem;
  width: max-content; max-width: calc(100cqw - 1rem);
  border-radius: .9rem; background: rgba(28, 28, 28, .92); box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
}
.hb-rate-pop[hidden] { display: none; }
.hb-rate-pop.up { top: auto; bottom: calc(100% + .6rem); }
.hb-rate-chip {
  min-width: 3.25rem; padding: .55rem .9rem; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1);
  color: #fff; font: 500 .82rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background .15s ease;
}
.hb-rate-chip:hover, .hb-rate-chip:focus-visible { background: rgba(255, 255, 255, .2); }
.hb-rate-chip[aria-pressed="true"] { background: rgba(255, 255, 255, .34); font-weight: 500; }
/* THE GEAR, AS HEART PHOTOS' (George, Nov 23, 2026: "Yes, add the gear"; dock.js showQuality): a round button in the
   speed's place, a twelfth of a turn while its panel is open, wearing the stream's HD or 4K in red; its panel a line
   for the speed and a line for the quality, each under its name. Without the Heart Photos extension the quality's
   chips are a list, not a choice, and say so by not answering the pointer. */
.hb-bar .hb-btn.hb-rate.hb-set { position: relative; width: 2.5rem; padding: 0; background: none; }
.hb-bar .hb-btn.hb-rate.hb-set:hover, .hb-bar .hb-btn.hb-rate.hb-set:focus-visible, .hb-bar .hb-btn.hb-rate.hb-set[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
.hb-set-gear { display: block; width: 24px; height: 24px; transition: rotate .25s ease; }
.hb-set[aria-expanded="true"] .hb-set-gear { rotate: 30deg; }
@media (prefers-reduced-motion: reduce) { .hb-set-gear { transition: none; } }
.hb-set-tag { position: absolute; top: 5px; right: 3px; padding: 1px 2px; border-radius: 2px; background: #f03; color: #fff; font: 500 8px/1 system-ui, sans-serif; letter-spacing: .02em; pointer-events: none; }
.hb-set-tag[hidden] { display: none; }
.hb-rate-pop.hb-set-pop { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: .75rem; max-width: min(28rem, calc(100cqw - 1rem)); }
.hb-set-line { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.hb-set-name { padding: 0 .25rem; color: rgba(255, 255, 255, .7); font: 500 .75rem/1 system-ui, sans-serif; }
.hb-set-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.hb-res-tag { font-size: .58em; font-weight: 500; line-height: 1; vertical-align: super; margin-left: 2px; opacity: .85; }
.hb-res-chips.hb-res-list .hb-res-chip:not(.hb-res-mode):not([aria-pressed="true"]) { cursor: default; color: rgba(255, 255, 255, .72); }
.hb-res-chips.hb-res-list .hb-res-chip:not(.hb-res-mode):not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .1); }
.hb-res-note { flex-basis: 100%; margin: 0; padding: 2px .25rem 0; color: rgba(255, 255, 255, .7); font: 400 .75rem/1.35 system-ui, sans-serif; white-space: normal; max-width: 26rem; }
.hb-res-note a { color: #fff; }
/* YouTube's logo, at the right just before captions (George, Oct 1, 2026: first "Source: {YouTube
   logo}", then without "Source:"; Oct 9, 2026: "move the YouTube button to the right just before
   the CC button"): one link to the video on YouTube in a new tab. The logo is YouTube's red play
   mark beside the name, as in YouTube's own "Watch on" link: since Oct 10, 2026 YouTube's own
   logo, its 2024 drawing ("make the YouTube logo exactly as the official YouTube logo"). */
.hb-source {
  display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0;
  height: 2.25rem; padding: 0 .45rem; border-radius: 6px;
  color: #eee; text-decoration: none; font: 500 .78rem/1 system-ui, sans-serif; white-space: nowrap;
}
/* No underline, even over the site's own a:hover (George, Oct 1, 2026). */
.hb-source:hover, .hb-source:focus-visible { background: rgba(255, 255, 255, .12); text-decoration: none; }
/* The name goes when the row runs out of room, and only then (George, Oct 1, 2026: "lose
   'YouTube' if there isn't enough space"): the link is the one thing in the row that shrinks,
   and the logo's box is one line tall, so once it is narrower than the mark and the name the
   name wraps onto a second line that is never shown. The red mark always stays. */
.hb-source-logo {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.93px;
  height: 18px; overflow: hidden; min-width: 26.1px;
}
/* The gap is the logo's own between the button and the wordmark, at this height. */
.hb-source-logo svg { display: block; flex: none; }
/* The seek row: the played part in YouTube's red, from --hb-seek, which moments.js keeps. */
.hb-seek {
  display: block; width: 100%; height: 1.1rem; margin: 0; background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.hb-seek::-webkit-slider-runnable-track {
  height: 3px; border-radius: 1.5px;
  background: linear-gradient(to right, #e62117 var(--hb-seek, 0%), rgba(255, 255, 255, .28) var(--hb-seek, 0%));
}
.hb-seek::-moz-range-track {
  height: 3px; border-radius: 1.5px;
  background: linear-gradient(to right, #e62117 var(--hb-seek, 0%), rgba(255, 255, 255, .28) var(--hb-seek, 0%));
}
/* As thin as YouTube's (George, Oct 10, 2026: "change the thickness of the seek bar to match youtube's
   thickness"): a 3px line and a 12px knob, as the volume's. */
.hb-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: #e62117; border: 0; }
.hb-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #e62117; border: 0; }
/* Full screen, as YouTube's (George, Oct 10, 2026: "clicking fullscreen in vi.ki video controls chops off the
   bottom part of the video where the controls are (it shouldn't) instead do what youtube does in full screen:
   overlay the controls over the video and hide them very soon after the mouse stops moving and show them only
   when needed"). The picture takes the whole screen and the bar lies over its foot on a shade, going with the
   pointer while the video plays and nothing moves (.hb-idle, moments.js). With the bar under it the player
   was shorter than the screen, so the picture, fitted to the width of a frame made taller by the band, lost
   its top and foot. The band YouTube's title hides in is kept only where the screen is no wider than the
   video: wider, the picture fits the screen's height, and any band would cut it. */
.hb-stage:fullscreen { display: block; position: relative; background: #000; container-type: size; }
.hb-stage:fullscreen .hb-player { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
:root[data-controls-site] .hb-stage:fullscreen .hb-player {
  --hb-yt-band: min(clamp(64px, calc(100cqw * var(--hb-ar-h) / var(--hb-ar-w) * .15), 150px),
    max(0px, calc((100cqh - 100cqw * var(--hb-ar-h) / var(--hb-ar-w) + 1px) * 1000)));
}
:root[data-controls-site] .hb-stage:fullscreen .hb-player.live:not(.failed) + .hb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 3rem 1rem .6rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .75)); transition: opacity .2s ease;
}
.hb-stage:fullscreen.hb-idle .hb-bar { opacity: 0; pointer-events: none; }
.hb-stage:fullscreen.hb-idle, .hb-stage:fullscreen.hb-idle * { cursor: none !important; }
/* The bar fits the player it sits under (the dock is the container): the volume slider goes first,
   then the speed; mute, captions, full screen and the way to YouTube always stay. */
@container (max-width: 30rem) {
  .hb-vol { display: none; }
}
@container (max-width: 25rem) {
  .hb-rate-wrap { display: none; }
}
.hb-dock { background: var(--bg); border: 0; border-radius: 0; padding: 0; }
.hb-player {
  position: relative; width: 100%; background: #000; border-radius: 8px; overflow: hidden;
  margin: 0; min-height: 0; scroll-margin-top: calc(var(--header-h) + .6rem);
  aspect-ratio: auto;
  height: calc(100cqw * var(--hb-ar-h) / var(--hb-ar-w) + var(--hb-buffer));
}
.hb-player img.hb-facade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.hb-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* The whole still is the button: the link covers the frame and centers YouTube's play button, so it is one link,
   keyboard-reachable, named "Play video", working with no JavaScript. */
.hb-player .hb-play {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 500;
}
/* YouTube's own large play button over the still, as on Heartipedia (George, Oct 21, 2026: "use the same red play icon
   over videos that haven't started playing yet on vi.ki same as on heartipedia"), in place of the black "Play" pill
   drawn here before. Its shape and colors are YouTube's (the 68 by 48 rounded rectangle and the white triangle); the
   word stays for screen readers. Heartipedia's block, copied: keep the two the same. */
.hb-player .hb-yt-btn { width: 68px; height: 48px; display: block; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35)); }
/* ...and animated as YouTube's embed animates it: dark and see-through at rest, solid red once the pointer is anywhere
   over the video, with YouTube's own quick ease. A screen without hover (a phone) keeps it red. */
.hb-player .hb-yt-bg { fill: #f00; transition: fill .1s cubic-bezier(.4, 0, 1, 1), fill-opacity .1s cubic-bezier(.4, 0, 1, 1); }
@media (hover: hover) {
  .hb-player .hb-yt-bg { fill: #212121; fill-opacity: .8; }
  .hb-player:hover .hb-yt-bg, .hb-player .hb-play:focus-visible .hb-yt-bg {
    fill: #f00; fill-opacity: 1; transition: fill .1s cubic-bezier(0, 0, .2, 1), fill-opacity .1s cubic-bezier(0, 0, .2, 1);
  }
}
.hb-player .hb-play:hover, .hb-player .hb-play:focus-visible { text-decoration: none; }
.hb-player .hb-play:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
/* The title is for a screen reader: a control named only "Play" says nothing. */
.hb-player .hb-title {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.hb-player.live .hb-facade, .hb-player.live .hb-play, .hb-player.live .hb-title { display: none; }
/* While the video loads its still stays over the player with a spinner, never a black box (George, Nov 22, 2026:
   "show the thumbnail instead of all black with a loading spinner"; dock.js sets .hb-loading). */
.hb-player.live.hb-loading:not(.failed) .hb-facade { display: block; z-index: 1; pointer-events: none; }
.hb-player.live.hb-loading:not(.failed)::after {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 2; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 4px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: hb-loading-spin .8s linear infinite; pointer-events: none;
}
@keyframes hb-loading-spin { to { transform: rotate(360deg); } }
.hb-player.failed { height: auto; min-height: 0; background: var(--tint); color: var(--ink); }
.hb-player.failed .hb-facade, .hb-player.failed .hb-play, .hb-player.failed .hb-title, .hb-player.failed iframe { display: none; }
.hb-player .hb-fail { margin: 0; padding: 1rem; }
/* The bar that used to sit above the pinned video (its time and a Close) is gone: the header's
   video button shows and hides it now (George, 16 September 2026). `display: none` rather than
   merely hidden, because a flex item that is hidden still claims its track. */
.hb-dock-bar { display: none; margin: 0; }
.related > .hb-dock { margin: 0 0 1rem; }
@media (min-width: 60.01rem) { .related > .hb-dock { margin-top: calc(-1 * var(--main-top, 0px)); } }
/* A WIDE, SHORT WINDOW shows the whole player (George, 16 September 2026): in the sidebar the
   stage is at most as wide as lets the picture, YouTube's band and Vi.ki's bar fit between where
   the dock sticks (under the header, and under the tabs when there are tabs) and the foot of the
   window, and it is centered in the column. 200px is the narrowest YouTube allows an embedded
   player; a window too short even for that keeps it. The moments keep the column's full width.
   Sized as Heartipedia's (George, Nov 7, 2026: "I like how heartipedia video player uses the full vertical width
   available to it ... change vi.ki to be like heartipedia"): the launch clock's height above the dock no longer
   counts (it had taken its 6.8rem off the video on every page with a clock, long after the clock had scrolled
   away), and the tabs' height does, since the dock sticks under them. */
.related > .hb-dock {
  --hb-fit: max(200px, calc((100vh - var(--hb-top, var(--header-h)) - var(--hb-buffer) - var(--hb-bar-h, 0px)) * var(--hb-ar-w) / var(--hb-ar-h)));
}
.related.tabbed[data-tab] > .hb-dock {
  --hb-fit: max(200px, calc((100vh - var(--hb-top, var(--header-h)) - var(--side-tabs-h, 2.6rem) - var(--hb-buffer) - var(--hb-bar-h, 0px)) * var(--hb-ar-w) / var(--hb-ar-h)));
}
.related > .hb-dock .hb-stage { max-width: var(--hb-fit); margin-inline: auto; }
.related > .hb-dock .hb-stage:fullscreen { max-width: none; }
/* A portrait video in the sidebar would be taller than the window at the column's width. The
   same padding cap as the pinned dock, against 70vh, keeps it on screen. */
.related > .hb-dock.hb-dock--portrait {
  padding-inline: max(0px, calc((100% - 70vh * var(--hb-ar-w) / var(--hb-ar-h)) / 2));
}
.hb-dock[hidden] { display: none; }
/* A reader who hid the video keeps it hidden (theme.js marks <html> before the first paint;
   moments.js then hides the dock itself and hands the sidebar back). */
:root[data-video="off"] .related > .hb-dock { display: none; }
/* The players moments.js keeps warm for a quick switch back: in the box, the same size, unseen. */
.hb-player iframe.hb-standby { visibility: hidden; pointer-events: none; }
/* A still is hidden while the next video's loads, so the video left never shows in the switch (dock.js stillReady). */
.hb-player.hb-still-wait .hb-facade { visibility: hidden; }
/* ...and so are the players under it while it loads, or a reused one would show its older video instead. */
.hb-player.live.hb-loading.hb-still-wait iframe { visibility: hidden; }

/* --- the moments under the video ---------------------------------------------------------------
   Under the player in the sidebar, every moment on the page, the playing one marked (George,
   16 September 2026). It travels with the stuck video, so it is in view while the reader is, and
   when it is longer than the room left under the player it scrolls on its own, like the list
   beside a YouTube video. It has no heading (the row is a moment's), and it runs to the foot of
   the window: moments.js sets its max-height to the room below it. A pinned player at the foot of
   a narrow window has no room for it. */
/* Under Vi.ki's controls, the video as youtube.com shows it under its player (George, Nov 5, 2026): the title with
   its views and how long ago at the right of the same line, then the channel's round picture, its name (with the
   check when verified) and its subscribers under the name (moments.js showAbout). From the first paint, before
   anything plays (George, the same day: "even when it's not playing like when first loading the page"); only with
   Vi.ki's controls; as wide as the stage; never under a player pinned to the foot of a narrow window, which has no
   room for it. */
.hb-about { display: none; }
:root[data-controls-site] .hb-dock:not(.hb-dock--bottom) .hb-about:not([hidden]) {
  display: block; padding: .6rem .2rem .2rem;
}
.related > .hb-dock .hb-about { max-width: var(--hb-fit); margin-inline: auto; }
.hb-about-head { display: flex; align-items: baseline; gap: .75rem; min-width: 0; }
.hb-about-title {
  flex: 1 1 auto; min-width: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  color: var(--ink); font-weight: 500; font-size: 1.05rem; line-height: 1.35; text-decoration: none;
}
.hb-about-title:hover, .hb-about-title:focus-visible { text-decoration: underline; }
.hb-about-meta { flex: none; display: inline-flex; gap: .6rem; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.hb-about-channel {
  display: inline-flex; align-items: center; gap: .65rem; max-width: 100%; margin-top: .55rem;
  color: var(--ink); text-decoration: none;
}
.hb-about-channel:hover .hb-about-name, .hb-about-channel:focus-visible .hb-about-name { text-decoration: underline; }
.hb-about-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--tint); }
.hb-about-initial {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 500; font-size: 1.05rem;
}
.hb-about-names { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hb-about-name {
  display: inline-flex; align-items: center; gap: .3rem; min-width: 0;
  font-weight: 500; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hb-about-check { flex: none; color: var(--muted); }
.hb-about-subs { color: var(--muted); font-size: .8rem; }
.hb-moments { margin: .35rem 0 0; }
.hb-moments[hidden], .hb-dock--bottom .hb-moments { display: none; }
@media (max-width: 60rem) { .hb-moments { display: none; } }
.hb-moments-list {
  position: relative; list-style: none; margin: 0; padding: 0 .2rem 0 0;
  max-height: calc(100vh - var(--hb-top, var(--header-h)) - min(100cqw, var(--hb-fit, 100cqw)) * var(--hb-ar-h) / var(--hb-ar-w) - var(--hb-buffer) - var(--hb-bar-h, 0px) - .35rem);
  min-height: 6rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.hb-moments-list li { margin: 0; }
.hb-moments-list ol { list-style: none; margin: 0; padding: 0; }
.hb-mv + .hb-mv { margin-top: .5rem; }
/* Each video's title stays at the top of the list while its moments scroll under it. */
.hb-mv-h {
  position: sticky; top: 0; z-index: 1; margin: 0; padding: .3rem .45rem;
  background: var(--bg); color: var(--muted); font-size: .8rem; font-weight: 500; line-height: 1.35;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.hb-moments-list .moment-ts {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; align-items: baseline;
  padding: .35rem .45rem; border-radius: 6px; font-weight: 500;
}
.hb-moments-list .moment-ts:hover, .hb-moments-list .moment-ts:focus-visible { background: var(--tint); }
/* One line each, so more of them are in view (George, 16 September 2026). */
.hb-moments-list .hb-moment-text {
  color: var(--ink); font-weight: 400; font-size: .88rem; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hb-moments-list .moment-ts:hover .hb-moment-text { color: var(--moment); }
.hb-moments-list li.playing .moment-ts { background: var(--tint); box-shadow: inset 3px 0 0 var(--moment); }
.hb-moments-list li.playing .moment-ts time {
  border-color: var(--moment); background: color-mix(in srgb, var(--moment) 22%, transparent); color: var(--ink);
}

/* Pinned: a band across the foot of the window, not a card floating over one corner. Half the
   viewport is the ceiling, so the reading column always keeps the larger share. The player is
   capped by PADDING on the dock, because the box is sized from the dock's content width: the
   padding centers a content box of at most the capped width, and 100cqw is that width. The cap
   is written as a width, from the height the picture-plus-band may take. It has a floor: on a
   short landscape phone half the viewport would leave the picture a sliver, so the picture is
   never narrower than 320px (and the page under it keeps scrolling, because the body's padding
   follows the dock's published height). Where the cap is wider than the window, as on a phone
   held upright, the player runs edge to edge with no padding at all, so the picture is as big
   as the screen allows (George, 16 September 2026). */
.hb-dock.hb-dock--bottom {
  --hb-cap: max(calc((50vh - var(--hb-buffer)) * var(--hb-ar-w) / var(--hb-ar-h)), 320px);
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; width: auto;
  background: #000;
  padding: 0 max(0px, calc((100% - var(--hb-cap)) / 2)) env(safe-area-inset-bottom, 0px);
}
/* No band under the picture on the pinned dock: the box is the picture, and YouTube's controls
   sit over its foot as they do anywhere else, which leaves the most room for the video. */
.hb-dock.hb-dock--bottom { --hb-buffer: 0px; }
.hb-dock.hb-dock--bottom .hb-player { border-radius: 0; }
/* The text fades to black into the video above it rather than stopping at a hard edge (George,
   16 September 2026). The fade is the dock's own, so it goes wherever the dock goes, and it lets
   clicks through to the text under it. */
.hb-dock.hb-dock--bottom::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 2.5rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000);
  pointer-events: none;
}
body.has-dock.dock-bottom { padding-bottom: calc(var(--hb-dock-h, 0px) + 2.5rem); }
/* PHONE, PORTRAIT: a vertical video takes at most half the screen's height; the cap above does
   that. The page needs more room at its foot than the landscape reservation leaves. */
@media (orientation: portrait) and (max-width: 60rem) {
  body.has-dock.dock-bottom.dock-portrait { padding-bottom: min(62vh, 34rem); }
}


/* PHONE, LANDSCAPE: the screen is short and wide, so the pinned video takes the right half,
   under the header and beside the text, instead of a band across the foot (George, 16 September
   2026). moments.js pins it from the first paint. The picture is as wide as the half allows and no
   taller than the height left under the header (the cap, as padding); the header keeps the full
   width, and the page's own blocks make room on the left. The query is moments.js's too. */
@media (max-width: 60rem) and (orientation: landscape) and (max-height: 33rem) {
  .hb-dock.hb-dock--bottom {
    --hb-cap: calc((100dvh - var(--hb-top, var(--header-h)) - var(--hb-bar-h, 0px)) * var(--hb-ar-w) / var(--hb-ar-h));
    top: var(--hb-top, var(--header-h)); bottom: 0; left: auto; right: 0; width: 50vw;
    padding: 0 max(env(safe-area-inset-right, 0px), calc((50vw - var(--hb-cap)) / 2)) 0 max(0px, calc((50vw - var(--hb-cap)) / 2));
    overflow: hidden;
  }
  .hb-dock.hb-dock--bottom::before { display: none; }
  body.has-dock.dock-bottom, body.has-dock.dock-bottom.dock-portrait { padding-bottom: 0; }
  body.has-dock.dock-bottom > main,
  body.has-dock.dock-bottom > footer.site,
  body.has-dock.dock-bottom > .countdown { margin-right: 50vw; }
}
