/* VNM match archive -- made of the game's materials: kraft cardboard,
   green felt, chalk, photo prints. One bold element (the pitch band);
   everything else keeps quiet. */
:root {
  --kraft: #d8c29a;
  --kraft-deep: #c9ae7f;
  --board: #9c7b4b;
  --ink: #26201a;
  --ink-soft: #5b4d3b;
  --felt: #2b7a46;
  --felt-deep: #1f5f36;
  --chalk: #f6f1e6;
  --print: #fbf8f2;
  --night: #101820;
  --cyan: #25c4ec;
  --pink: #ee4e8b;
  --display: "Luckiest Guy", "Arial Black", Impact, sans-serif;
  --text: "Nunito", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(18px, 4vw, 40px);
  --measure: 62ch;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
html, body { margin: 0; background: var(--kraft); color: var(--ink); font: 400 16px/1.55 var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  filter: url(#grain); background: #000; opacity: .55; mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 1; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--felt); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .02em; line-height: 1; }
p { max-width: var(--measure); }

/* ------------------------------------------------------------ top strip */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gutter);
  padding: 14px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: 400 26px/1 var(--display); letter-spacing: .06em; }
.brand-tag { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 3px; }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 6px; color: var(--ink); }
.nav a:hover { background: rgba(38, 32, 26, .08); }

.app { flex: 1; }
.loading { padding: 60px var(--gutter); color: var(--ink-soft); }

/* ------------------------------------------------------------- the pitch */
.pitch {
  position: relative; overflow: hidden; background: var(--felt); color: var(--chalk);
  border-top: 6px solid var(--felt-deep); border-bottom: 6px solid var(--felt-deep);
}
.pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pitch-lines * { fill: none; stroke: var(--chalk); stroke-width: 3; stroke-linecap: round; opacity: .85; vector-effect: non-scaling-stroke; }
.pitch-lines .draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: chalk 1.6s ease-out forwards; }
.pitch-lines .draw.d2 { animation-delay: .25s; }
.pitch-lines .draw.d3 { animation-delay: .5s; }
@keyframes chalk { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .pitch-lines .draw { stroke-dashoffset: 0; } }
.pitch-inner { position: relative; padding: clamp(56px, 9vw, 110px) var(--gutter) clamp(40px, 6vw, 70px); max-width: 1180px; margin: 0 auto; }
.pitch h1 { font-size: clamp(40px, 7.2vw, 88px); max-width: 12ch; text-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.pitch p { margin: 18px 0 0; font-size: clamp(17px, 1.6vw, 20px); font-weight: 600; color: #e6f2ea; max-width: 40ch; }
/* ON A PHONE the wide-band drawing was sliced to a tall band and its centre
   circle landed under the headline. The same drawing, pushed to the right
   edge and a little larger: the halfway line frames the band, the circle
   peeks in as an arc, the headline keeps a clear column and wraps in three
   short lines; the chalk is lighter behind the words. */
.pitch-lines.phone { display: none; }
.pitch p.live { color: var(--chalk); }
.pitch p .lead { font: 400 1.05em/1 var(--display); letter-spacing: .08em; color: var(--chalk); }
.pitch p:empty::before { content: "\00a0"; }   /* the line's room is kept until the board answers */
.pitch p.live::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); margin: 0 8px 1px 0; box-shadow: 0 0 0 0 rgba(238, 78, 139, .7); animation: live-dot 1.6s ease-out infinite; }
@keyframes live-dot { 70% { box-shadow: 0 0 0 8px rgba(238, 78, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(238, 78, 139, 0); } }
@media (max-width: 560px) {
  .pitch-lines.desk { display: none; }
  .pitch-lines.phone { display: block; opacity: .3; }
  .pitch-lines.phone * { stroke-width: 2; }
  /* the words sit in the middle of the pitch, on their own rows */
  .pitch-inner { text-align: center; }
  .pitch h1, .pitch p { margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) { .pitch p.live::before { animation: none; } }

/* ------------------------------------------------------------ the board */
.board { max-width: 1180px; margin: 0 auto; padding: 30px var(--gutter) 60px; }
.tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 34px; }
.search { flex: 1 1 280px; min-width: 0; position: relative; }
.search input {
  width: 100%; padding: 12px 14px 12px 42px; border-radius: 8px; border: 2px solid var(--board);
  background: var(--print); color: var(--ink); font: inherit; font-weight: 600; outline: none;
}
.search input:focus { border-color: var(--ink); }
.search input::placeholder { color: #8a7a62; font-weight: 400; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: var(--board); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { padding: 9px 14px; border-radius: 8px; border: 2px solid var(--board); font-weight: 800; color: var(--ink-soft); background: transparent; }
.filter:hover { color: var(--ink); }
.filter.on { background: var(--ink); border-color: var(--ink); color: var(--chalk); }

.fixture { margin-bottom: 44px; }
.fixture-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fixture-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
/* the date on its own line under the fixture, on every width -- the way a
   long fixture wrapped it on a phone, which read better than the row */
.fixture-head .when { font-weight: 600; color: var(--ink-soft); flex-basis: 100%; margin-top: -4px; }
.team { display: inline-block; padding: 3px 9px 2px; border-radius: 6px; font: 400 15px/1.3 var(--display); letter-spacing: .06em; color: var(--chalk); background: var(--board); vertical-align: middle; align-self: center; }
.team.vnm { background: var(--cyan); color: var(--night); }
.team.hype { background: var(--pink); }
.halves { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 22px; }

.print {
  display: block; text-decoration: none; background: var(--print); padding: 10px 10px 12px;
  box-shadow: 4px 5px 0 rgba(60, 40, 15, .28); transform: rotate(0deg);
}
.print:hover .print-img::after { opacity: 1; }
.print:focus-visible { outline-offset: 6px; }
.print-img { position: relative; aspect-ratio: 16 / 9; background: var(--night); overflow: hidden; }
.print-img img { width: 100%; height: 100%; object-fit: cover; }
.print-img .empty { position: absolute; inset: 0; display: grid; place-items: center; }
.print-img .empty img { width: 60px; height: 60px; opacity: .5; object-fit: contain; }
.print-img::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(246, 241, 230, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2326201a' d='M9 6v12l10-6z'/%3E%3C/svg%3E") center / 34px no-repeat;
  opacity: 0; transition: opacity .15s;
}
.print-cap { display: flex; align-items: center; gap: 10px; padding: 10px 4px 0; }
/* BADGES CENTRED ON THE LETTERS, NOT ON THE LINE BOX. The display font
   keeps a deep empty descender in its box and browsers place its glyphs
   differently in it (an iPhone drew the badge 5 px below the title's
   centre, Chrome 1.5 px). Trimming the box to the caps makes the centre
   the letters' centre everywhere; older browsers get a nudge instead. */
.fixture-head h2, .work-head b, .print-cap b { text-box: trim-both cap alphabetic; }
@supports not (text-box: trim-both cap alphabetic) {
  .fixture-head .team, .work-head .team, .print-cap .new-tag, .print-cap .parts-tag { transform: translateY(-0.2em); }
  @media (max-width: 760px) { .brand-name { transform: translateY(-0.12em); } }
}
.print-cap > span:last-child { margin-left: auto; }
.print-cap b { font: 400 22px/1 var(--display); letter-spacing: .03em; }
.print-cap span { font-weight: 600; color: var(--ink-soft); font-size: 15px; }
.nothing { color: var(--ink-soft); padding: 40px 0; font-weight: 600; }

/* --------------------------------------------------------- in the works */
/* A chalkboard pinned above the prints: one card per half on its way, as a
   road of steps. Gone when nothing is. */
.works { background: var(--night); color: var(--chalk); padding: 18px 22px 10px; margin-bottom: 34px; box-shadow: 4px 5px 0 rgba(60, 40, 15, .28); border: 6px solid var(--board); }
.works[hidden] { display: none; }
.works-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.works-head:not(:has(.works-status:not(:empty))) { display: none; }
.works-status { font-weight: 600; font-size: 14px; color: var(--pink); }
.works-status:empty { display: none; }
.work { padding: 14px 0 12px; border-top: 1px dashed rgba(246, 241, 230, .22); }
.works-head + .work, .work:first-child { border-top: 0; }
.works-head:not([hidden]) + .work { border-top: 0; }
.work-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.work-head b { font: 400 22px/1 var(--display); letter-spacing: .03em; }
.work-half { font-weight: 600; color: #b9c4bd; font-size: 14px; }
.work-detail { margin-top: 8px; font-size: 14px; font-weight: 600; color: #b9c4bd; }
/* the road and the bar say it; words only when something went wrong */
.work:not(.failed) .work-detail { display: none; }
.part:not(.failed) .part-words { display: none; }
.work.failed .work-detail { color: var(--pink); }
/* the parts of one half */
.parts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.part { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: baseline; font-size: 14px; font-weight: 600; color: #b9c4bd; }
.part-name { font: 400 15px/1 var(--display); letter-spacing: .05em; color: var(--chalk); }
.part-len { color: #7f8b85; }
.part.rendering .part-words { color: var(--cyan); }
.part.failed .part-words { color: var(--pink); }
.part:has(.work-acts) { grid-template-columns: auto auto 1fr auto; }
.work > .work-acts { display: block; margin-top: 10px; }
.btn.work-remove { padding: 5px 12px; font-size: 13px; border-color: rgba(246, 241, 230, .5); color: var(--chalk); }
.btn.work-remove:hover { background: rgba(246, 241, 230, .1); }
/* the road */
.road { list-style: none; margin: 12px 0 0; padding: 0; display: flex; align-items: flex-start; }
.road li { position: relative; flex: 1 1 0; min-width: 0; text-align: center; }
.road li::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: rgba(246, 241, 230, .18); }
.road li:first-child::before { display: none; }
.road li.done::before, .road li.now::before, .road li.busy::before, .road li.bad::before { background: var(--felt); }
.road .dot { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--night); border: 3px solid rgba(246, 241, 230, .3); font-size: 12px; line-height: 1; color: var(--night); }
.road li.done .dot { background: var(--felt); border-color: var(--felt); color: var(--chalk); }
.road li.now .dot { border-color: var(--chalk); background: var(--chalk); }
.road li.busy .dot { border-color: var(--cyan); background: var(--cyan); animation: road-pulse 1.2s ease-in-out infinite; }
.road li.bad .dot { border-color: var(--pink); background: var(--pink); color: var(--night); }
@keyframes road-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 196, 236, .55); } 50% { box-shadow: 0 0 0 7px rgba(37, 196, 236, 0); } }
.road .step { display: block; margin-top: 5px; font: 400 13px/1.15 var(--display); letter-spacing: .05em; color: #8d9994; padding: 0 2px; }
.road li.done .step { color: #b9c4bd; }
.road li.now .step, .road li.busy .step { color: var(--chalk); }
.road li.busy .step { color: var(--cyan); }
.road li.bad .step { color: var(--pink); }
.road li.active .step { font-size: 15px; }
.bar { position: relative; height: 12px; margin-top: 10px; background: rgba(246, 241, 230, .14); overflow: hidden; }
.bar-fill { height: 100%; background: var(--cyan); transition: width .4s linear; }
/* cards arrive and leave with a fade -- once each */
.work.arrive { animation: work-in .5s ease both; }
.work.leave { animation: work-out .5s ease both; pointer-events: none; }
@keyframes work-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes work-out { to { opacity: 0; transform: translateY(-6px); } }
/* ON A PHONE ONLY THE CURRENT STEP IS NAMED. The dots keep their even
   spacing (every li the same width); the one label sits centred under its
   dot and may overhang its silent neighbours. */
@media (max-width: 560px) {
  .road .step { display: none; }
  .road li.active .step { display: block; position: absolute; left: 50%; transform: translateX(-50%); top: 24px; white-space: nowrap; font-size: 15px; }
  .road { padding-bottom: 26px; }
  .part { grid-template-columns: auto 1fr; }
  .part-len { display: none; }
}
@media (prefers-reduced-motion: reduce) { .road li.busy .dot { animation: none; } .work.arrive, .work.leave { animation: none; } }
/* a fresh video on the board */
.new-tag { font: 400 12px/1 var(--display); letter-spacing: .08em; font-style: normal; color: var(--night); background: var(--cyan); padding: 4px 7px 3px; border-radius: 4px; align-self: center; }

/* ---------------------------------------------------------------- watch */
.watch { max-width: 1180px; margin: 0 auto; padding: 8px var(--gutter) 60px; }
.back { display: inline-block; text-decoration: none; font-weight: 800; color: var(--ink-soft); margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.watch-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.watch-head h1 { font-size: clamp(34px, 5vw, 58px); }
.watch-head .sub { margin-top: 8px; font-weight: 600; color: var(--ink-soft); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 8px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-weight: 800; text-decoration: none; }
.btn:hover { background: rgba(38, 32, 26, .08); }
.btn.solid { background: var(--ink); color: var(--chalk); }
.btn.solid:hover { background: #3a3128; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

.stage { background: var(--night); padding: 12px; box-shadow: 4px 5px 0 rgba(60, 40, 15, .28); }
.player { position: relative; background: #000; aspect-ratio: 16 / 9; outline: none; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player.is-fullscreen { aspect-ratio: auto; height: 100vh; }
/* The middle of the picture: the first-play button, the play/pause burst,
   the spinner. All centred on the picture; on a phone, on the part of the
   picture above the control bar (--mid-lift). */
.player { --mid-lift: 0px; }
.big-play {
  position: absolute; left: 50%; top: calc(50% - var(--mid-lift)); width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  background: var(--chalk); display: grid; place-items: center; box-shadow: 0 8px 28px rgba(0, 0, 0, .5), 0 0 0 3px rgba(16, 24, 32, .35);
  transition: opacity .2s, transform .15s;
}
.big-play:hover { transform: scale(1.06); }
.big-play:active { transform: scale(.96); }
.big-play svg { width: 38px; height: 38px; fill: var(--ink); margin-left: 6px; }
.player.playing .big-play, .player.started .big-play { opacity: 0; pointer-events: none; }
.burst {
  position: absolute; left: 50%; top: calc(50% - var(--mid-lift)); width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  background: rgba(16, 24, 32, .6); display: grid; place-items: center; opacity: 0; pointer-events: none; z-index: 1;
}
.burst svg { width: 34px; height: 34px; fill: var(--chalk); }
.burst.go { animation: burst .55s ease-out forwards; }
@keyframes burst { 0% { opacity: .95; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.4); } }
.spinner {
  position: absolute; left: 50%; top: calc(50% - var(--mid-lift)); width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  border: 4px solid rgba(246, 241, 230, .22); border-top-color: var(--chalk); opacity: 0; pointer-events: none; z-index: 1; transition: opacity .2s;
}
.player.buffering .spinner { opacity: 1; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.controls {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 14px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0)); transition: opacity .25s;
}
.player.hide-ui .controls { opacity: 0; pointer-events: none; }
.player.hide-ui { cursor: none; }
.seek { position: relative; height: 22px; cursor: pointer; margin-bottom: 4px; }
.seek-track, .seek-buffer, .seek-fill { position: absolute; left: 0; top: 9px; height: 4px; border-radius: 2px; }
.seek-track { right: 0; background: rgba(255, 255, 255, .25); }
.seek-buffer { width: 0; background: rgba(255, 255, 255, .35); }
.seek-fill { width: 0; background: var(--chalk); }
.seek:hover .seek-track, .seek:hover .seek-buffer, .seek:hover .seek-fill { height: 6px; top: 8px; }
/* a seam: where a card stands in for missing time */
.seam { position: absolute; top: 5px; height: 12px; min-width: 8px; background: var(--pink); border-radius: 3px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .45); pointer-events: auto; z-index: 1; }
.seek:hover .seam { top: 4px; height: 14px; }
.seam-note { margin: 10px 0 0; max-width: 62ch; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.parts-tag { font: 400 12px/1 var(--display); letter-spacing: .06em; font-style: normal; color: var(--chalk); background: var(--pink); padding: 4px 7px 3px; border-radius: 4px; align-self: center; }
.seek-knob { position: absolute; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--chalk); transform: translateX(-50%) scale(0); left: 0; transition: transform .12s; }
.seek:hover .seek-knob, .player.scrubbing .seek-knob { transform: translateX(-50%) scale(1); }
.seek-tip { position: absolute; bottom: 24px; transform: translateX(-50%); background: var(--chalk); color: var(--ink); font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 6px; pointer-events: none; display: none; }
.seek:hover .seek-tip { display: block; }
.ctl-row { display: flex; align-items: center; gap: 2px; }
.ctl-row .spacer { flex: 1; }
.ctl { padding: 7px 8px; border-radius: 6px; color: #fff; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.ctl:hover { background: rgba(255, 255, 255, .16); }
.ctl svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.time { font-size: 13px; font-weight: 800; color: #fff; padding: 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.time .total { opacity: .6; }
/* Who is who: a dot on every character while paused. */
.dots { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.big-play { z-index: 1; }
.controls { z-index: 3; }
.dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: auto; padding: 0;
  background: radial-gradient(circle, var(--chalk) 0 26%, transparent 30%); box-shadow: 0 0 0 2px rgba(246, 241, 230, .9) inset, 0 0 0 1px rgba(0, 0, 0, .55); }
.dot::before { content: ""; position: absolute; inset: -10px; }
.dot:hover, .dot.open { background: radial-gradient(circle, var(--pink) 0 34%, transparent 38%); }
.dot-label { display: none; position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: max-content; white-space: nowrap; background: rgba(16, 24, 32, .94); color: var(--chalk);
  padding: 5px 10px 5px 7px; border-radius: 6px; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); align-items: center; gap: 6px; }
.dot-label b { font-weight: 800; font-size: 14px; }
.dot-label .v2-badge { width: 18px; height: 18px; display: block; }
.dot.open .dot-label { display: inline-flex; }
/* the open dot, and so its label, paints over its neighbours */
.dot.open { z-index: 1; }
@media (max-width: 760px) {
  /* The control bar covers the bottom of a small picture: the middle
     things sit in the middle of what is left, and the button is smaller. */
  .big-play { width: 66px; height: 66px; margin: -33px 0 0 -33px; }
  .big-play svg { width: 30px; height: 30px; margin-left: 5px; }
  .burst { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .burst svg { width: 26px; height: 26px; }
  .spinner { width: 38px; height: 38px; margin: -19px 0 0 -19px; border-width: 3px; }
  .flash { font-size: 14px; padding: 5px 12px; top: 10px; }
  /* A smaller mark on a small screen, the same finger-sized target; and
     above the control bar, which covers the bottom of the picture there. */
  .dots { z-index: 4; }
  .dot { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: radial-gradient(circle, var(--chalk) 0 30%, transparent 34%); }
  .dot::before { inset: -14px; }
  .dot:hover, .dot.open { background: radial-gradient(circle, var(--pink) 0 38%, transparent 42%); }
  .dot-label { bottom: 12px; padding: 4px 8px 4px 6px; gap: 5px; }
  .dot-label b { font-size: 12px; }
  .dot-label .v2-badge { width: 14px; height: 14px; }
  /* while dots are up the bar steps back, so a low dot reads over it */
  .player.dotted .controls { opacity: .4; transition: opacity .25s; }
  .player.dotted .controls:hover, .player.dotted .controls:active { opacity: 1; }
}
.ctl.dots-btn { opacity: .55; }
.ctl.dots-btn.on { opacity: 1; }
.player.hide-ui .dots { display: none; }

/* A word about what just happened (a speed, a skip, the dots toggle):
   a pill at the top of the picture, off the middle and off the dots. */
.flash {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  background: rgba(246, 241, 230, .94); color: var(--ink); padding: 6px 14px; border-radius: 999px;
  font: 400 16px var(--display); letter-spacing: .05em; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35); white-space: nowrap;
}
.flash.on { opacity: 1; }

.after { display: grid; grid-template-columns: 1fr 340px; gap: 28px; margin-top: 28px; align-items: start; }
.after h3 { font-size: 24px; margin-bottom: 10px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-weight: 600; color: var(--ink-soft); font-size: 15px; }
kbd { font: 800 13px/1 var(--text); background: var(--print); border: 2px solid var(--board); border-radius: 6px; padding: 3px 7px; color: var(--ink); white-space: nowrap; }
.final { display: block; background: var(--print); padding: 8px 8px 10px; box-shadow: 4px 5px 0 rgba(60, 40, 15, .28); cursor: pointer; text-align: left; width: 100%; text-decoration: none; color: var(--ink); }
.final img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--night); }
.final span { display: block; padding: 8px 4px 0; font: 400 18px/1.2 var(--display); letter-spacing: .03em; }
.final small { display: block; padding: 2px 4px 0; font-weight: 600; color: var(--ink-soft); }
.facts { margin: 18px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-weight: 600; color: var(--ink-soft); }
.facts dd { margin: 0; color: var(--ink); }

.who-mark { position: absolute; top: 50%; width: 3px; height: 12px; margin-left: -1px; transform: translateY(-50%); background: var(--chalk); opacity: .8; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); pointer-events: auto; z-index: 1; }
.who-mark.bench, .who-mark.leave { background: var(--pink); }
.who-mark.play { background: var(--cyan); }

/* ------------------------------------------------------------ management */
/* The key screen, the dashboard, the bar under a half. Every action shows
   its state: a spinner while it runs, a tick or a cross for a moment. */
.manage { max-width: 900px; margin: 0 auto; padding: 8px var(--gutter) 60px; }
.manage h1 { font-size: clamp(34px, 5vw, 58px); }
.key-form p { color: var(--ink-soft); font-weight: 600; }
.key-row { display: flex; gap: 10px; max-width: 560px; margin-top: 8px; }
.key-row input { flex: 1; padding: 9px 14px; border-radius: 8px; border: 2px solid var(--board); background: var(--print); font: inherit; font-weight: 600; min-width: 0; }
.key-row input:focus { border-color: var(--ink); outline: none; }
.key-row input.key-value { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.key-shown:empty { display: none; }
.key-shown { margin-top: 12px; padding: 12px 14px; background: rgba(43, 122, 70, .12); border-radius: 8px; }
.key-shown p { margin: 0 0 6px; font-weight: 600; color: var(--ink-soft); }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.title-row .manage-who { margin: 0; height: 32px; }

.tabs { display: flex; gap: 4px; margin: 14px 0 18px; border-bottom: 2px solid var(--board); overflow-x: auto; }
.tab { padding: 9px 14px 8px; margin-bottom: -2px; border-bottom: 3px solid transparent; font-weight: 800; color: var(--ink-soft); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.tab i { font: 800 11px/1 var(--text); font-style: normal; background: var(--pink); color: var(--chalk); padding: 3px 6px; border-radius: 999px; }

.manage-body { margin-top: 4px; }
.req-panel { background: var(--print); padding: 14px 16px 12px; box-shadow: 4px 5px 0 rgba(60, 40, 15, .28); margin-bottom: 22px; }
.req-panel h3 { font-size: 22px; margin-bottom: 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.req-panel h3 .more { font: 800 14px var(--text); color: var(--ink-soft); text-decoration: none; letter-spacing: 0; }
.req-panel h3 .more:hover { color: var(--ink); }
.req-panel .nothing { padding: 6px 0 8px; }
.req { padding: 10px 0; border-top: 2px solid rgba(156, 123, 75, .3); }
.req:first-of-type { border-top: 0; }
.req-what, .req-who, .req-why { overflow-wrap: anywhere; }
.req-what b { font-weight: 800; }
.req-what span { color: var(--ink-soft); font-weight: 600; }
.req-who { font-size: 14px; color: var(--ink-soft); font-weight: 600; margin-top: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.req-why { margin-top: 4px; font-size: 13px; font-weight: 600; color: #b0304f; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 400 12px/1 var(--display); letter-spacing: .08em; padding: 5px 8px 4px; border-radius: 999px; background: var(--board); color: var(--chalk); }
.pill.done { background: var(--felt); }
.pill.failed, .pill.rejected { background: #b0304f; }
.pill.pending { background: var(--ink); }
.pill.approved { background: var(--cyan); color: var(--night); }
.pill .mini-spin { width: 10px; height: 10px; border-width: 2px; margin: 0; border-color: rgba(16, 24, 32, .25); border-top-color: var(--night); }
.req-acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* A button that is doing something, then says how it went. */
.mini-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: currentColor; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 8px; }
.mini-spin.dark { border-color: rgba(60, 40, 15, .25); border-top-color: var(--ink); margin-right: 0; }
.btn.busy { pointer-events: none; }
.btn.busy .mini-spin { border-color: rgba(60, 40, 15, .25); border-top-color: currentColor; }
.btn.solid.busy .mini-spin { border-color: rgba(255, 255, 255, .3); border-top-color: var(--chalk); }
.btn.ok, .btn.bad, .btn.held { pointer-events: none; }
.btn.ok { border-color: var(--felt); background: var(--felt); color: var(--chalk); }
.btn.bad { border-color: #b0304f; background: #b0304f; color: var(--chalk); }
.btn.held { border-color: var(--board); background: var(--board); color: var(--chalk); }
.btn.ok svg, .btn.bad svg, .btn.held svg { width: 16px; height: 16px; fill: currentColor; margin-right: 6px; vertical-align: -3px; }
.locked .btn:not(.busy):not(.ok):not(.bad):not(.held) { opacity: .4; pointer-events: none; }
.locked .btn[disabled] { opacity: .3; }

/* Under the video, behind a handle: out of the way until wanted. */
.manage-box { margin: 10px 0 0; }
.manage-handle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.manage-handle svg { width: 16px; height: 16px; fill: currentColor; }
.manage-handle:hover, .manage-box.open .manage-handle { color: var(--ink); background: rgba(60, 40, 15, .08); }
.manage-box .manage-bar { display: none; }
.manage-box.open .manage-bar { display: block; }
.manage-bar { margin: 8px 0 0; padding: 10px 12px; background: var(--print); box-shadow: 4px 5px 0 rgba(60, 40, 15, .28); }
.mrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mrow.cut { margin-top: 10px; padding-top: 10px; border-top: 2px solid rgba(156, 123, 75, .3); }
/* groups of actions stand apart: a word of air and a thin rule between them */
.mgroup { display: flex; gap: 6px; }
.mrow.acts .mgroup + .mgroup { margin-left: 8px; padding-left: 14px; border-left: 2px solid rgba(156, 123, 75, .35); }
.mrow.acts .mgroup.last { margin-left: auto; }
/* the label stands as tall as the buttons beside it, then a word of air */
.manage-who { display: inline-flex; align-items: center; box-sizing: border-box; height: 36px; padding: 0 10px; border-radius: 8px; font: 400 14px/1 var(--display); letter-spacing: .06em; background: var(--ink); color: var(--chalk); margin-right: 8px; }
.manage-bar .btn { box-sizing: border-box; height: 36px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
.manage-bar .btn.danger { border-color: #b0304f; color: #b0304f; }
.manage-bar .btn.danger:hover { background: #b0304f; color: var(--chalk); }
.manage-bar .btn[disabled] { opacity: .4; cursor: default; }
.cut-words { font-size: 14px; font-weight: 600; color: var(--ink-soft); flex: 1; }
.manage-link { font-weight: 800; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.manage-link:hover { color: var(--ink); }

/* Space: a segmented bar against the free tier. */
.space-bar { display: flex; height: 16px; border-radius: 8px; background: rgba(60, 40, 15, .14); overflow: hidden; margin: 8px 0 6px; }
.space-bar .seg { height: 100%; min-width: 2px; }
.seg.videos, .leg.videos::before { background: var(--felt); }
.seg.originals, .leg.originals::before { background: var(--board); }
.seg.other, .leg.other::before { background: var(--cyan); }
.leg.server::before { background: var(--ink-soft); }
.space-scale { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.space-scale b { color: var(--ink); font-weight: 800; }
.space-scale b.hot { color: #b0304f; }
/* the legend is a small table: swatch, kind, size, count -- in columns */
.space-table { display: grid; grid-template-columns: 12px auto auto 1fr; gap: 6px 12px; align-items: center; margin: 12px 0 4px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.space-table .leg { width: 12px; height: 12px; border-radius: 3px; }
.space-table .sk { color: var(--ink); }
.space-table b { color: var(--ink); font-weight: 800; text-align: right; }
.space-table .sc { font-size: 13px; }
.leg.videos { background: var(--felt); }
.leg.originals { background: var(--board); }
.leg.other { background: var(--cyan); }
.leg.server { background: var(--ink-soft); }
.space-words { margin: 8px 0 4px; font-size: 14px; font-weight: 600; color: var(--ink-soft); max-width: none; }
.space-words b { color: var(--ink); font-weight: 800; }
.space-words.dim { font-size: 13px; opacity: .8; }

.hidden-tag { font: 400 12px/1 var(--display); letter-spacing: .08em; font-style: normal; color: var(--chalk); background: var(--ink-soft); padding: 4px 7px 3px; border-radius: 4px; align-self: center; }
.foot-manage { color: var(--ink-soft); text-decoration: none; font-weight: 800; }
.foot-manage:hover { color: var(--ink); }
@media (max-width: 760px) {
  /* On a phone the actions fill a four-column grid: the label and the
     first group on one row, the cut marks and the dangerous pair on the
     next; then the words, the cut and the link. */
  .mrow.acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .mrow.acts .mgroup { display: contents; }
  .mrow.acts .mgroup + .mgroup { margin: 0; padding: 0; border: 0; }
  .manage-who { margin: 0; height: auto; min-height: 36px; padding: 0 4px; justify-content: center; font-size: 13px; }
  .manage-bar .btn { height: auto; min-height: 36px; padding: 4px 4px; font-size: 12.5px; line-height: 1.1; justify-content: center; text-align: center; white-space: normal; min-width: 0; }
  .mrow.cut { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; }
  .cut-words { grid-column: 1 / 3; font-size: 13px; }
  .mrow.cut .btn { min-height: 32px; padding: 0 16px; }
  .manage-link { justify-self: end; }
  .req-acts .btn { padding: 7px 12px; font-size: 14px; }
  /* Six tabs for the owner (Data, 2026-09-25) fit one phone row. */
  .tabs { margin: 10px 0 14px; gap: 0; justify-content: space-between; }
  .tab { padding: 8px 5px 7px; font-size: 13px; }
  .space-legend { gap: 4px 12px; font-size: 13px; }
}

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: var(--chalk); padding: 10px 16px; border-radius: 8px; font-weight: 800; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20; }
.toast.on { opacity: 1; }

/* ----------------------------------------------------------------- foot */
.foot { padding: 22px var(--gutter) 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-soft); font-weight: 600; font-size: 14px; border-top: 2px solid var(--board); }

.btn .short { display: none; }
@media (max-width: 760px) {
  .after { grid-template-columns: 1fr; gap: 16px; margin-top: 18px; }
  .keys-panel { display: none; }
  .ctl.optional { display: none; }
  .brand-tag { display: none; }
  /* alone on its row the name is centred on its letters, not on the
     display font's deep line box, so it sits level with the mark */
  .brand-name { text-box: trim-both cap alphabetic; }
  /* the two actions share one row */
  .actions { flex-wrap: nowrap; width: 100%; gap: 8px; }
  .actions .btn { flex: 1 1 0; justify-content: center; padding: 10px 8px; font-size: 14px; white-space: nowrap; min-width: 0; }
  .btn .long { display: none; }
  .btn .short { display: inline; }
  /* the next half: a small card beside its words, not a second video */
  .final { display: grid; grid-template-columns: 128px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px; }
  .final img, .final .print-img { grid-row: 1 / 3; width: 128px; aspect-ratio: 16 / 9; }
  .final span { padding: 0; font-size: 17px; align-self: end; }
  .final small { padding: 2px 0 0; align-self: start; }
  /* the player: a play button that does not cover the pitch, a seek bar
     a thumb can find */
  .big-play { width: 56px; height: 56px; }
  .big-play svg { width: 24px; height: 24px; margin-left: 4px; }
  .seek { height: 30px; }
  .seek-track, .seek-buffer, .seek-fill { top: 13px; }
  .seek-knob { top: 9px; }
  .seam { top: 9px; }
}

/* ---------------------------------------------------------- live notice */
.notice { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); box-sizing: border-box; background: var(--ink); color: var(--chalk); padding: 10px 10px 10px 16px; border-radius: 10px; font-weight: 700; box-shadow: 0 8px 24px rgba(38, 32, 26, .28); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 21; }
.notice.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.notice > span { flex: 1 1 auto; min-width: 0; }
.notice .btn.solid { flex: none; background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
.notice-x { flex: none; width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.notice-x svg { width: 100%; height: 100%; fill: var(--chalk); }
.notice-x:hover { background: rgba(246, 241, 230, .12); }
@media (max-width: 640px) { .notice { bottom: 14px; width: calc(100% - 32px); font-size: 14px; } }

/* A match held by an open request: the line says what, the buttons wait. */
.mrow.hold { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px solid rgba(156, 123, 75, .3); font-weight: 700; color: var(--ink-soft); gap: 10px; flex-wrap: nowrap; }
.mrow.hold[hidden] { display: none; }
.held-match .btn:not(.busy):not(.ok):not(.bad):not(.held) { opacity: .4; pointer-events: none; }

/* A request's action as a tag: outlined, so it never reads as a status pill. */
.act-tag { display: inline-flex; align-items: center; margin-right: 8px; padding: 3px 7px 2px; border: 2px solid var(--board); border-radius: 5px; font: 400 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); vertical-align: 2px; }
.req-what .req-subject { color: var(--ink); font-weight: 600; }
/* The wait on a held video: three dots filling in, over and over. */
.wait-dots { display: inline-flex; margin-left: 2px; }
.wait-dots i { font-style: normal; opacity: 0; animation: wait-dot 1.5s infinite; }
.wait-dots i:nth-child(2) { animation-delay: .25s; }
.wait-dots i:nth-child(3) { animation-delay: .5s; }
@keyframes wait-dot { 0% { opacity: 0; } 20%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wait-dots i { opacity: 1; } }
.mrow.hold { gap: 0; }
.btn.held-one { opacity: .4; pointer-events: none; }
/* The keyholder's name beside the Manage title: the same badge as on a
   desktop (the phone rule for the Manage bar's grid is not for it). */
@media (max-width: 760px) {
  .title-row .manage-who { height: 30px; min-height: 0; padding: 0 10px; font-size: 13px; }
}
.mrow.hold > span:first-child { min-width: 0; overflow-wrap: anywhere; }


/* ---------------------------------------------------------------- squad */
.squad { padding: 28px var(--gutter) 56px; max-width: 1100px; margin: 0 auto; }
.squad h1 { font-size: clamp(34px, 5vw, 58px); margin: 0; }
.squad-intro { margin: 6px 0 22px; font-weight: 600; color: var(--ink-soft); }
.squad-months { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.squad-count { font-weight: 800; color: var(--ink-soft); margin: 0 0 10px; }
.squad-table { background: var(--print); box-shadow: 4px 5px 0 rgba(60, 40, 15, .28); padding: 6px 14px; }
.squad-row { display: grid; grid-template-columns: 34px minmax(110px, 1fr) 76px 190px minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 9px 0; border-top: 2px solid rgba(156, 123, 75, .25); }
.squad-row:first-child { border-top: 0; }
.squad-row.head { font-size: 13px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; padding: 6px 0; }
.squad-row .rank { font: 400 18px/1 var(--display); color: var(--ink-soft); }
.squad-row .who { font-weight: 800; overflow-wrap: anywhere; }
.squad-row .who-name { cursor: default; }
.squad-row .pts { font: 400 22px/1 var(--display); letter-spacing: .03em; }
.squad-row.head .pts, .squad-row.head .rank { font: inherit; }
.squad-row .mins { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.squad-row.idle .who, .squad-row.idle .pts { color: var(--ink-soft); opacity: .7; }
.strip { display: flex; flex-wrap: wrap; gap: 4px; }
.cell { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 2px solid transparent; flex: none; }
.cell.played { background: var(--felt); }
.cell.lobby { background: var(--board); }
.cell.absent { border-color: rgba(91, 77, 59, .45); }
.cell.none { background: repeating-linear-gradient(45deg, rgba(91, 77, 59, .28) 0 3px, transparent 3px 6px); }
.cell.waiting { border: 2px dashed rgba(91, 77, 59, .5); }
a.cell:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.squad-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.squad-legend span { display: inline-flex; align-items: center; gap: 6px; }
.squad-legend .cell { width: 14px; height: 14px; }
.squad-rule { margin-top: 24px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.squad-rule p { margin: 0 0 2px; }
.squad-rule p.gap { margin-top: 14px; }
/* Phone (the owner, 2026-09-25): one line per player -- the squares FIRST,
   left of the rank, then rank, name, points. The column is as wide as the
   longest strip (wrapping after five), so one match costs one square's
   width. A tap on a square opens .squad-pop. */
@media (max-width: 640px) {
  .squad-row { grid-template-columns: auto 24px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
  .squad-row .mins { display: none; }
  .squad-row .strip { order: -1; }
  /* A phone shows only the newest match's square (the owner, 2026-09-25). */
  .squad-row .strip .cell:not(:last-child) { display: none; }
  .squad-row .pts { text-align: right; }
  /* Rank, name and points sit on the FIRST row of squares, not between two. */
  .squad-row:not(.head) > .rank, .squad-row:not(.head) > .who, .squad-row:not(.head) > .pts {
    height: 18px; display: flex; align-items: center;
  }
  .squad-row:not(.head) > .pts { justify-content: flex-end; }
  /* Luckiest Guy's line box sits its digits high on some phones (the owner
     saw the rank float above the square): centre the digit's own shape. */
  .squad-row:not(.head) > .rank > span, .squad-row:not(.head) > .pts > span {
    display: inline-block; text-box: trim-both cap alphabetic;
  }
  /* The header starts at the left edge: "#" over the squares, "Player"
     from the rank column on. */
  .squad-row.head .strip { display: none; }
  .squad-row.head .rank { grid-column: 1; }
  .squad-row.head .who { grid-column: 2 / 4; }
}
/* Desktop: the last five squares from the MATCHES label's left edge, in
   one line (a form guide). */
@media (min-width: 641px) {
  .squad-row .strip { flex-wrap: nowrap; }
}
.squad-pop {
  position: absolute; z-index: 50; display: flex; flex-direction: column; gap: 2px;
  min-width: 170px; max-width: calc(100vw - 24px); padding: 10px 12px;
  background: var(--print); color: var(--ink); font-size: 14px; font-weight: 600;
  border-radius: 6px; box-shadow: 3px 4px 0 rgba(60, 40, 15, .28), 0 0 0 2px rgba(156, 123, 75, .35);
}
.squad-pop b { font-weight: 800; margin-bottom: 6px; }
.squad-pop .sp-pts { font: 400 20px/1.1 var(--display); letter-spacing: .03em; }
.squad-pop .sp-from { font-size: 13px; color: var(--ink-soft); }
.squad-pop .sp-list { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 2px solid rgba(156, 123, 75, .25); }
.squad-pop .sp-list li { padding: 2px 0; }
.squad-pop .sp-list a { font-weight: 800; color: var(--ink); }
.squad-pop .sp-list span { color: var(--ink-soft); }
/* ------------------------------------------------ manage: the Data tab */
.data-panel .ready-row { margin: 14px 0 6px; }
.data-panel .ready-head { font-size: 14px; margin-bottom: 6px; }
.data-panel .ready-head span { color: var(--ink-soft); font-weight: 600; }
.data-table { margin-top: 14px; }
.data-table .sc { white-space: nowrap; }
