/* onlygoals.tv -- one stylesheet for every page.

   The rules of the design, kept small on purpose:
   - THREE text sizes: --fs-s (small print, meta lines), --fs-m (everything else), --fs-l (page titles). Phones get
     slightly bigger values of the same three (iOS Safari zooms the page into any text field under 16px).
   - ONE button: every button, tab, chip, tag and angle switch shares height, border, radius and "on" state; verdict
     buttons only change colour.
   - TIGHT corners: --r on buttons, fields, cards and pictures; --r-s on small labels. A radius stays well under half
     the height, so every button has four straight sides -- never a pill.
   - LIGHT shades: an off-white page, white cards, soft grey lines, near-black text, one blue for links. Video sits
     on black. */

:root {
  --fs-s: 12px; --fs-m: 14px; --fs-l: 20px;
  --h: 30px;                                   /* the height of every button and one-line field */
  --r: 6px; --r-s: 3px;

  --bg: #f4f5f7;          /* the page */
  --surface: #ffffff;     /* cards, bars, panels */
  --surface-2: #eceef1;   /* quiet fills: placeholders, hover */
  --line: #e0e3e8;        /* card edges, dividers */
  --line-2: #c8cdd5;      /* control edges */
  --text: #1c2026;
  --dim: #5f6875;
  --ink: #1c2026;         /* a chosen button: filled dark */
  --ink-text: #ffffff;
  --link: #1d5fd1;
  --focus: #1d5fd1;

  /* verdict and status colours: text on a pale tint, with a mid-tone edge */
  --yes: #17753f;   --yes-bg: #e6f4ec;   --yes-line: #9ccfb0;   --on-solid: #ffffff;   /* text on a solid verdict */
  --no: #b4233a;    --no-bg: #fcebee;    --no-line: #eeaab5;
  --warn: #8f5500;  --warn-bg: #fff3dd;  --warn-line: #eec57f;
  --early: #6536b8; --early-bg: #f1ebfd; --early-line: #c9b4f1;
  --info: #0f5f8c;  --info-bg: #e5f2fa;  --info-line: #9fcbe6;
  --star: #f0a800;  --star-off: #cdd2d9;
  --ink-hover: #3a414b; --hover-line: #b3b9c3; --row-cur: #e3e8f0;
  --shadow-rgb: 20, 24, 31;                               /* shadows and the dialog backdrop */
  --shade: rgba(20, 24, 31, .08); --shade-press: rgba(20, 24, 31, .18);   /* the sideways Previous/Next corners */
  color-scheme: light;

  /* old names still used by some rules; they follow the palette above */
  --panel: var(--surface); --accent: var(--link);
  --sp-bg: var(--bg); --sp-bar: var(--surface); --sp-card: var(--surface); --sp-input: var(--surface);
  --sp-line: var(--line); --sp-line-soft: var(--line-2); --sp-text: var(--text); --sp-dim: var(--dim);
  --sp-accent: var(--ink); --sp-accent-bg: var(--surface-2); --sp-accent-text: var(--text);
  --sp-radius: var(--r); --sp-radius-sm: var(--r); --sp-radius-pill: var(--r);
}
/* DARK: the same design, darker shades. theme.js sets data-theme on <html> when someone picks Light or Dark; with no
   choice ("Auto") the device's own setting decides. The two dark blocks are identical on purpose. */
:root[data-theme="dark"] {
  --bg: #111317; --surface: #1a1d22; --surface-2: #252930; --line: #2a2e35; --line-2: #3b414b;
  --text: #e8eaed; --dim: #9aa3ae; --ink: #e8eaed; --ink-text: #111317; --link: #7aa7ff; --focus: #7aa7ff;
  --yes: #5fd08f;   --yes-bg: #15301f;   --yes-line: #2e6b45;   --on-solid: #0d1410;
  --no: #ff8a9a;    --no-bg: #3a171d;    --no-line: #7a2e3a;
  --warn: #f2c26b;  --warn-bg: #33270f;  --warn-line: #7a5a22;
  --early: #c3a6ff; --early-bg: #271c40; --early-line: #55408a;
  --info: #7cc4f0;  --info-bg: #0f2a3a;  --info-line: #2c5a78;
  --star: #f5b400;  --star-off: #4a505a;
  --ink-hover: #ffffff; --hover-line: #525a66; --row-cur: #2a3140;
  --shadow-rgb: 0, 0, 0;
  --shade: rgba(255, 255, 255, .07); --shade-press: rgba(255, 255, 255, .16);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --surface: #1a1d22; --surface-2: #252930; --line: #2a2e35; --line-2: #3b414b;
    --text: #e8eaed; --dim: #9aa3ae; --ink: #e8eaed; --ink-text: #111317; --link: #7aa7ff; --focus: #7aa7ff;
    --yes: #5fd08f;   --yes-bg: #15301f;   --yes-line: #2e6b45;   --on-solid: #0d1410;
    --no: #ff8a9a;    --no-bg: #3a171d;    --no-line: #7a2e3a;
    --warn: #f2c26b;  --warn-bg: #33270f;  --warn-line: #7a5a22;
    --early: #c3a6ff; --early-bg: #271c40; --early-line: #55408a;
    --info: #7cc4f0;  --info-bg: #0f2a3a;  --info-line: #2c5a78;
    --star: #f5b400;  --star-off: #4a505a;
    --ink-hover: #ffffff; --hover-line: #525a66; --row-cur: #2a3140;
    --shadow-rgb: 0, 0, 0;
    --shade: rgba(255, 255, 255, .07); --shade-press: rgba(255, 255, 255, .16);
    color-scheme: dark;
  }
}
@media (pointer: coarse) { :root { --fs-s: 13px; --fs-m: 16px; --fs-l: 22px; --h: 32px; } }      /* buttons just taller than their text (owner's call, over the 44px guideline) */

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-m)/1.45 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
       -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; }
h1 { font-size: var(--fs-l); margin: .2em 0 .4em; }
h2, h3, h4 { font-size: var(--fs-m); margin: 1.4em 0 .6em; }
h4 { color: var(--dim); }
:where(a) { color: var(--link); }                /* zero weight: a link styled as a button keeps the button's colours */
h1 a, h2 a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.dim { color: var(--dim); font-size: var(--fs-s); }
.small, .hint, .keys { font-size: var(--fs-s); }
.err { color: var(--no); padding: 12px; }
.err.small { color: var(--no); padding: 0; }
p.ok { color: var(--yes); } p.err { color: var(--no); padding: 0; }
.score { font-variant-numeric: tabular-nums; font-weight: 700; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* ---------- the one button ----------
   :where() keeps these rules at zero weight, so a component's own class (a star, a timeline handle) always wins. */
:where(button, .act, .tag, .ang, .chip, .tab, .bigbtn, .csend) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--h); padding: 0 12px; margin: 0;
  font: inherit; font-size: var(--fs-m); font-weight: 500; line-height: 1.15; text-align: center; text-decoration: none; white-space: nowrap;
  color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background .12s, border-color .12s, color .12s;
}
:where(button, .act, .tag, .ang, .chip, .tab, .bigbtn, .csend):hover:not(:disabled) { background: var(--surface-2); border-color: var(--hover-line); }
:where(button, .act, .tag, .ang, .chip, .tab, .bigbtn, .csend):disabled { opacity: .45; cursor: default; }
/* chosen: filled dark, the same on every kind of button */
:where(.act, .tag, .ang, .chip, .tab, button).on,
:where(.act, .tag, .ang, .chip, .tab, button).on:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
/* the main action on a page */
:where(.bigbtn, .csend, .card button, .primary, #ytform button, button[type=submit]) { background: var(--ink); border-color: var(--ink); color: var(--ink-text); font-weight: 600; }
:where(.bigbtn, .csend, .card button, .primary, #ytform button, button[type=submit]):hover:not(:disabled) { background: var(--ink-hover); border-color: var(--ink-hover); }
.bigbtn { display: flex; margin: 16px 0; }
.bigbtn.alt { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.bigrow { display: flex; gap: 12px; flex-wrap: wrap; }
.bigrow .bigbtn { flex: 1 1 14rem; margin: 8px 0; }
.act.small, .small.act { min-height: calc(var(--h) - 6px); padding: 0 10px; font-size: var(--fs-s); }

/* "yes" outside the judging box means "the main action here" (Save, Sign in, Watch): the main button */
.act.yes { background: var(--ink); border-color: var(--ink); color: var(--ink-text); font-weight: 600; }
.act.yes:hover:not(:disabled) { background: var(--ink-hover); border-color: var(--ink-hover); }
.act.no { color: var(--no); border-color: var(--no-line); }            /* a destructive action anywhere */

/* verdicts (the judging box, the judging tool): coloured text and edge, a pale fill when chosen */
:is(#judge, .verdicts, #verdicts, .mgoal) .act.yes, .v.yes { background: var(--surface); color: var(--yes); border-color: var(--yes-line); font-weight: 500; }
:is(#judge, .verdicts, #verdicts, .mgoal) .act.yes:hover:not(:disabled) { background: var(--surface-2); border-color: var(--yes); }
.act.no, .v.no, .ovb.no            { color: var(--no); border-color: var(--no-line); }
.act.late                          { color: var(--warn); border-color: var(--warn-line); }
.act.early                         { color: var(--early); border-color: var(--early-line); }
.act.unsure, .v.unsure, .ovb.unsure { color: var(--dim); }
:is(#judge, .verdicts, #verdicts, .mgoal) .act.yes.on, .v.yes.on, :is(#judge, .verdicts, #verdicts, .mgoal) .act.yes.on:hover:not(:disabled) { background: var(--yes); border-color: var(--yes); color: var(--on-solid); font-weight: 600; }
/* chosen = a SOLID fill (the owner: empty or full, never a pale tint) */
.act.no.on, .v.no.on, .ovb.no.on, .act.no.on:hover:not(:disabled)     { background: var(--no); border-color: var(--no); color: var(--on-solid); font-weight: 600; }
.act.late.on, .act.late.on:hover:not(:disabled)                       { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.act.early.on, .act.early.on:hover:not(:disabled)                     { background: var(--early-bg); border-color: var(--early); color: var(--early); }
.act.crash, .act.moment            { color: var(--info); border-color: var(--info-line); }
.act.crash.on, .act.crash.on:hover:not(:disabled),
.act.moment.on, .act.moment.on:hover:not(:disabled)                   { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.act.unsure.on, .v.unsure.on, .ovb.unsure.on, .act.unsure.on:hover:not(:disabled) { background: var(--dim); border-color: var(--dim); color: var(--on-solid); font-weight: 600; }

/* buttons that are not buttons to look at */
.linkish { min-height: 0; padding: 0; border: 0; background: none; color: var(--dim); text-decoration: underline; font-size: inherit; font-weight: inherit; }
.linkish:hover:not(:disabled) { background: none; color: var(--text); }
kbd { display: inline-block; min-width: 1.4em; padding: 0 4px; font: inherit; font-size: var(--fs-s); line-height: 1.4; text-align: center;
      color: var(--dim); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); }
.act.on kbd, .tag.on kbd { background: transparent; color: inherit; border-color: currentColor; opacity: .7; }

/* ---------- fields ---------- */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select, textarea) {
  min-height: var(--h); padding: 4px 9px; font: inherit; font-size: var(--fs-m); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); min-width: 0;
}
:where(input, select, textarea):focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(29, 95, 209, .15); }
textarea { resize: vertical; line-height: 1.45; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); }
input[type=range] { accent-color: var(--ink); }

/* small labels: badges on tiles, a request's status */
.badge, .status, .delivbadge { display: inline-flex; align-items: center; align-self: flex-start; padding: 1px 6px; font-size: var(--fs-s); font-weight: 500; line-height: 1.5;
                               white-space: nowrap; color: var(--text); background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-s); }
.badge.blocked { color: var(--info); background: var(--info-bg); }
.badge.pending { color: var(--warn); background: var(--warn-bg); }
.badge.notgoal { color: var(--no); background: var(--no-bg); }
.status.done { color: var(--yes); background: var(--yes-bg); }
.status.failed { color: var(--no); background: var(--no-bg); }
.status.running { color: var(--dim); border-color: var(--line-2); background: var(--surface); }
.delivbadge { color: var(--warn); background: var(--warn-bg); }

/* ---------- surfaces: every card is the same card ---------- */
:where(.pcard, .card, .tcard, .gtile, .sresult, .mrow2, .tbtn, .rteam, .rbox, .stat, .gcard, .prow, .grow, .tcardrow, .odialog) {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--text);
}
:where(.tcard, .gtile, .sresult, .tbtn, .prow, .grow, .tcardrow):hover { border-color: var(--line-2); box-shadow: 0 1px 4px rgba(var(--shadow-rgb), .08); }
.sitepage .hint, .signprompt { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin: 8px 0; color: var(--dim); line-height: 1.5; }
.signprompt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text); }
.signprompt a { text-decoration: none; }

/* ================= the public site ================= */
.sitepage { height: auto; min-height: 100%; overflow: auto; }
#bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; min-height: 52px; padding: 8px 20px;
       background: var(--surface); border-bottom: 1px solid var(--line); }
#brand { flex: 0 0 auto; color: var(--text); text-decoration: none; font-size: var(--fs-l); font-weight: 700; letter-spacing: -.02em; }
#brand span { color: var(--dim); font-weight: 500; }
.previewtag { margin-left: 8px; padding: 1px 6px; border: 1.5px solid #e5252a; border-radius: 4px; color: #e5252a; font-size: .62em;
              font-weight: 800; letter-spacing: .08em; vertical-align: middle; white-space: nowrap; }   /* not the public site */
#searchbar { display: flex; flex: 1 1 10rem; max-width: 22rem; min-width: 0; }
#searchbar input { flex: 1 1 auto; border-radius: var(--r) 0 0 var(--r); border-right: 0; background: var(--bg); }
#searchbar input:focus { background: var(--surface); }
#searchbar button { flex: 0 0 auto; padding: 0 12px; border-radius: 0 var(--r) var(--r) 0; color: var(--dim); background: var(--surface); border-color: var(--line-2); }
#searchbar button:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.searchicon { display: block; width: 16px; height: 16px; }
#who { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; flex: 0 0 auto; margin-left: auto; font-size: var(--fs-m); }
#who a { color: var(--dim); text-decoration: none; }
#who a:hover { color: var(--text); }
#who a.me { color: var(--text); font-weight: 600; }
#who a.signin { display: inline-flex; align-items: center; min-height: var(--h); padding: 0 12px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--ink); color: var(--ink-text); font-weight: 600; }
/* the theme switch: Auto -> Light -> Dark (theme.js); the icon shows the current choice */
.themebtn { flex: 0 0 auto; width: var(--h); padding: 0; color: var(--dim); }
.themebtn .ti { width: 18px; height: 18px; display: none; }
.themebtn[data-choice="auto"] .ti-auto, .themebtn[data-choice="light"] .ti-light, .themebtn[data-choice="dark"] .ti-dark { display: block; }
#adminbar .themebtn { width: calc(var(--h) - 6px); padding: 0; }
#main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 64px; }
#foot { text-align: center; padding: 32px 16px 24px; font-size: var(--fs-s); color: var(--dim); }
#foot a { color: var(--dim); }
.sitepage a:not([class]) { color: var(--link); }
.sitepage a:not([class]):hover { text-decoration: underline; }
.sitepage :is(h1, h2, h3) a:not([class]) { color: inherit; }                 /* a heading that is a link still reads as a heading */
.widepage #main { max-width: none; }                                        /* the goal editor uses the whole screen */
input[type=file] { font: inherit; font-size: var(--fs-s); color: var(--dim); }
input[type=file]::file-selector-button { min-height: calc(var(--h) - 6px); margin-right: 10px; padding: 0 10px; font: inherit; font-size: var(--fs-s);
  color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--surface-2); }
@media (max-width: 640px) {
  #bar { gap: 8px 12px; padding: 8px 16px; }
  #searchbar { order: 3; flex-basis: 100%; max-width: none; }
  .themebtn { order: 1; margin-left: auto; }                       /* up beside the name ... */
  #who { order: 2; flex: 1 1 100%; margin-left: 0; }               /* ... the account links on the next line */
  #main { padding: 16px 16px 48px; }
}

/* tabs: a row of buttons over a hairline */
.ttabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ttabs.subtabs { margin: 8px 0 4px; padding-bottom: 0; border-bottom: 0; }                 /* a second row inside a tab: quieter */
.ttabs.subtabs .tab { font-size: var(--fs-s); }
.psearch { width: 100%; max-width: 24rem; margin: 4px 0 12px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* lists of things */
.tcard, .gtile, .sresult, .mrow2 { display: flex; flex-direction: column; gap: 4px; padding: 12px; text-decoration: none; }
.tcard { margin-bottom: 8px; }
.sresult { margin-bottom: 6px; }
.mrow2 { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.mrow2 strong { flex: 1 1 12rem; }
.tlist { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tbtn { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; }
.tbtn strong { font-size: var(--fs-m); }
.psort { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--dim); font-size: var(--fs-s); }
.psort select { width: auto; }
.plist { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.prow { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; text-decoration: none; min-width: 0; }
.prow .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 34rem; }   /* the number stays near the name */
.prank .prow { flex-direction: row; align-items: center; gap: 12px; }
.prank .prk { flex: 0 0 2.2em; text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }
.prank .pwho { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.prank .pwho .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the number nearly fills the card's height, its word small beside it on the same baseline */
.prank .pnum { display: flex; align-items: baseline; gap: 5px; flex: 0 0 auto; margin: -8px 0; line-height: 1; }   /* never makes the card taller */
.prank .pnum strong { font-size: 44px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.prank .pnum .dim { font-size: var(--fs-s); line-height: 1; }
.pointrules { max-width: 34rem; margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--yes); background: var(--yes-bg); }
.pointrules ul { margin: 6px 0 0; padding-left: 18px; }
.who { color: var(--text); font-weight: 600; }

/* thumbnail tiles: a picture, a bold title, a quiet line */
.gridwrap { display: grid; gap: 24px 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.gtile.vtile, .vtile { display: flex; flex-direction: column; gap: 8px; padding: 0; min-width: 0; background: none; border: 0; box-shadow: none; text-decoration: none; color: inherit; }
.vtile:hover { box-shadow: none; }
.vtile .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); border-radius: var(--r); }
.vtile .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.vtile:hover .thumb img { transform: scale(1.03); }
.vtile:hover .thumb, .vtile:focus-visible .thumb { box-shadow: 0 0 0 2px var(--ink); }
.vtile .thumb.ph { display: flex; align-items: center; justify-content: center; color: var(--line-2); font-size: var(--fs-l); }
.vtile .flags { position: absolute; left: 6px; top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.vtile .flags .badge { background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text); }
.vtile .flags .badge.blocked { color: var(--info); }
.vtile .flags .badge.pending { color: var(--warn); }
.vtile .flags .badge.notgoal { color: var(--no); }
.vtile .len { position: absolute; right: 6px; bottom: 6px; padding: 0 5px; border-radius: var(--r-s); background: rgba(0, 0, 0, .75); color: #fff;
              font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.vtile .tt { font-size: var(--fs-m); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vtile .mm { color: var(--dim); font-size: var(--fs-s); line-height: 1.35; }
.ptile .thumb video { display: block; width: 100%; height: 100%; background: #000; }
.ptile .thumb:not(.on) { cursor: pointer; }
.ptile .thumb:not(.on) video { object-fit: cover; }
/* an admin's Hide / Delete for a clip (site.js clipAdmin); a hidden penalty is dimmed for the admin who still sees it */
.clipadmin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ptile.hiddenclip > .thumb { opacity: .45; }
.odialog .dlgbtns { display: flex; gap: 8px; margin-top: 12px; }
.ptile .pstill { position: absolute; inset: 0; }
.ptile .pplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff;
               font-size: var(--fs-l); text-shadow: 0 1px 4px rgba(0, 0, 0, .8); pointer-events: none; }
@media (max-width: 520px) { .gridwrap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } }

/* compact goal rows (my goals) */
.glist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.grow { display: flex; align-items: center; gap: 12px; padding: 6px 8px; text-decoration: none; min-width: 0; }
.rthumb { position: relative; flex: 0 0 auto; width: 64px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-s); background: var(--surface-2); }
.rthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rthumb.ph { display: flex; align-items: center; justify-content: center; color: var(--line-2); font-size: var(--fs-s); }
.gmain { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.gt { font-size: var(--fs-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm { color: var(--dim); font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gextra { flex: 0 1 45%; min-width: 0; text-align: right; font-size: var(--fs-s); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mystars { color: var(--star); letter-spacing: .05em; white-space: nowrap; }
/* My page, Goals Judged: what you said about a clip, as small labels */
.said { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.said .badge.yes { color: var(--yes); border-color: var(--yes-line); background: var(--yes-bg); }
.said .badge.no { color: var(--no); border-color: var(--no-line); background: var(--no-bg); }
#mygoals .chips { margin: 8px 0 12px; }
.mycomment q { color: var(--dim); }
@media (max-width: 520px) { .gextra { display: none; } }

/* the tournaments gallery: one column, a picture for each */
.tgallery { display: flex; flex-direction: column; gap: 12px; max-width: 52rem; }
.tcardrow { display: flex; align-items: center; gap: 16px; padding: 8px; text-decoration: none; }
.tcardrow .thumb { position: relative; flex: 0 0 min(40%, 20rem); aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-s); background: var(--surface-2); }
.tcardrow .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tcardrow .thumb.ph { display: flex; align-items: center; justify-content: center; color: var(--line-2); font-size: var(--fs-l); }
.tinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tinfo strong { font-size: var(--fs-l); }
@media (max-width: 600px) { .tcardrow { flex-direction: column; align-items: stretch; } .tcardrow .thumb { flex-basis: auto; } }

/* the home page: latest tournaments on the left, latest players on the right, the goals between them. Narrower, the
   two panels move under the goals (side by side, then one above the other on a phone). */
.homepage #main { max-width: 1680px; }
/* The tabs have a row of their own over the goals, so the side panels start level with the first row of pictures. */
#homegrid { display: grid; gap: 0 32px; grid-template-columns: 15rem minmax(0, 1fr) 15rem;
            grid-template-areas: ". tabs ." "left main right"; align-items: start; }
#htabs { grid-area: tabs; }
#htabs:empty { display: none; }
#home { grid-area: main; min-width: 0; }
#sideT { grid-area: left; }
#sideP { grid-area: right; }
.hside { position: sticky; top: 68px; min-width: 0; }
.hside h2 { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: var(--fs-m); }
.hside .hsub { margin-top: 28px; }                                  /* a second list in the same panel (Archives) */
.slist { display: flex; flex-direction: column; gap: 2px; }
.srow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: var(--r); color: var(--text); text-decoration: none; min-width: 0; }
.srow:hover { background: var(--surface-2); }
.srow .rthumb { width: 56px; }
.srow .gm { white-space: normal; }                                  /* a narrow panel: the quiet line wraps rather than cuts off */
.smore { display: inline-block; margin-top: 8px; font-size: var(--fs-s); }
.sitelinks { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--fs-s); }
.sitelinks .ytlink { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.sitelinks p { margin: 10px 0 0; color: var(--dim); }
.sitelinks p a { color: var(--dim); }
@media (max-width: 1180px) {
  #homegrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "tabs tabs" "main main" "left right"; }
  .hside { position: static; margin-top: 32px; }
}
@media (max-width: 700px) {
  #homegrid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tabs" "main" "left" "right"; }
}

/* ================= goal and match pages ================= */
#g { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
@media (max-width: 800px) { #g { grid-template-columns: minmax(0, 1fr); } }
/* a phone held upright (and any narrow window): the video runs edge to edge; everything under it keeps the page margin */
@media (max-width: 800px) {
  body.player #main { padding-left: 0; padding-right: 0; padding-top: 0; }
  body.player #stage .vwrap, body.player #stage video { border-radius: 0; }
  body.player #stage > :not(.vwrap), body.player #side, body.player #comments { margin-left: 16px; margin-right: 16px; }
  /* more goals: one column, pictures edge to edge like the video, their words keep the margin */
  body.player #related .gridwrap { grid-template-columns: 1fr; gap: 20px; }
  body.player #related h2, body.player #related .vtile > :not(.thumb) { margin-left: 16px; margin-right: 16px; }
  body.player #related .vtile .thumb { border-radius: 0; }
  /* the playing video stays in view: it pins to the top of the screen while everything under it scrolls (the header
     scrolls away on these pages, so it does not cover the picture) */
  body.player #bar { position: static; }
  body.player #stage { display: contents; }
  body.player #stage .vwrap { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 8; background: #000; }
}
body.player #stage { height: auto; background: none; }
.vwrap { position: relative; }
.vwrap video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
#stage video { width: 100%; background: #000; border-radius: var(--r); max-height: 70vh; }

.pcard { padding: 14px 16px; margin: 0 0 10px; }
.pcard h3, .pcard h4 { margin: 0 0 8px; }
.pcard h4 { margin-top: 14px; }
#titlecard .sidehead { display: flex; align-items: center; gap: 8px; }
#titlecard h1 { margin: 0; font-size: var(--fs-l); line-height: 1.25; }
#titlecard h1 a { color: inherit; text-decoration: none; }
#titlecard .sub { margin: 4px 0 0; font-weight: 600; }
#titlecard #gwhen, #titlecard #gno { margin: 2px 0 0; }
#gshooter { margin: 8px 0 0; font-weight: 600; }
#gshooter :where(a) { color: var(--link); }                /* zero weight: a link styled as a button keeps the button's colours */
h1 a, h2 a { color: inherit; text-decoration: none; }
#gflags:empty { display: none; }
#gflags span + span { margin-left: 8px; }
#gwhere .badge { margin-left: 8px; }

/* under the video: angles, speed, previous / next / share -- one row of same-sized buttons */
.stagecontrols { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.stagecontrols .bars, .stagecontrols .navrow { margin: 0; }
.trimbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; flex-basis: 100%; }      /* admins: in and out points, on their own row */
.trimbar[hidden] { display: none; }
.bars { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; }
.angles { display: flex; flex-wrap: wrap; gap: 4px; }
.bars .angles, .bars .speed { margin-top: 0; }
.speed { display: flex; align-items: center; gap: 4px; }
.navrow { display: flex; gap: 6px; margin: 10px 0; }
.navrow .act { flex: 1; }
.share { flex: 1.3; }
.sharebox { width: 100%; margin-top: 6px; }
.judgenav { margin-top: 10px; }
#moreBtn, #moreClose, .back, #tip { display: none; }
#touch { display: none; position: absolute; inset: 0 0 56px 0; touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#toast { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); padding: 4px 12px; border-radius: var(--r);
         background: rgba(0, 0, 0, .7); color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap; }
#toast.show { opacity: 1; }

/* judging */
.judgebox { margin: 4px 0; }
.judgebox > summary { cursor: pointer; font-weight: 600; padding: 2px 0; list-style-position: inside; }
.judgebox[open] > summary { margin-bottom: 6px; }
.verdicts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
/* the Tags card (judge.js): a tag you gave is filled; the number is how many people gave it */
.tagcard .cardhead { margin: 0 0 4px; font-size: var(--fs-l); }
.tagcard .cardsub { margin: 12px 0 4px; font-size: var(--fs-s); font-weight: 600; color: var(--dim); }
.tagbtn.on, .tagbtn.on:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
/* coloured by meaning (judge.js TONE), a row per colour: only the words are coloured until it is yours, then solid */
.tagset .tagrowc { margin: 6px 0; }
.tagbtn.tone-bad { color: var(--no); } .tagbtn.tone-warn { color: var(--warn); }
.tagbtn.tone-good { color: var(--yes); } .tagbtn.tone-info { color: var(--link); }
.tagbtn.tone-bad.on, .tagbtn.tone-bad.on:hover:not(:disabled) { background: var(--no); border-color: var(--no); color: var(--on-solid); }
.tagbtn.tone-warn.on, .tagbtn.tone-warn.on:hover:not(:disabled) { background: var(--warn); border-color: var(--warn); color: var(--on-solid); }
.tagbtn.tone-good.on, .tagbtn.tone-good.on:hover:not(:disabled) { background: var(--yes); border-color: var(--yes); color: var(--on-solid); }
.tagbtn.tone-info.on, .tagbtn.tone-info.on:hover:not(:disabled) { background: var(--link); border-color: var(--link); color: var(--on-solid); }
/* the same weight on and off: bold text is wider, and a tag growing as it was tapped wrapped the row (the owner) */
#judge .tagbtn, #judge .tagbtn.on, #judge .tagbtn.no.on, #judge .tagbtn.on:hover:not(:disabled) { font-weight: 500; }
/* the count sits on the button's corner, so a number appearing never widens the button or wraps the row */
.tagbtn { position: relative; }
.tagbtn .tagn { position: absolute; top: -7px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
                border-radius: 9px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
                font-size: 11px; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.tagbtn .tagn:empty { display: none; }
/* the judging panel (judge.js): two questions, then Submit -- nothing is saved before it */
.jq { margin: 10px 0 -2px; font-size: var(--fs-s); font-weight: 600; color: var(--dim); }
.jsubmitrow { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.jflash { margin: 0 0 4px; height: 1.2em; font-size: var(--fs-s); color: var(--yes); opacity: 0; transition: opacity .4s; }   /* "Submitted", for a moment */
.jflash.on { opacity: 1; transition: none; }
:is(.jsubmit, .jsubmitnext).unsaved::after { content: "•"; margin-left: 2px; }
.stars { display: flex; align-items: center; gap: 2px; margin: 8px 0; }
.star { min-height: 0; padding: 0 2px; border: 0; background: none; font-size: var(--fs-l); line-height: 1; color: var(--star-off); cursor: pointer; }
.star:hover:not(:disabled) { background: none; color: var(--star); }
.star.on, .star.on:hover:not(:disabled) { background: none; color: var(--star); }
.tagrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.tagchips { display: contents; }
.newtag { width: 8rem; border-style: dashed; }
.newtag:focus { border-style: solid; }
#judge textarea { width: 100%; }
.keys { line-height: 1.7; margin-top: 12px; color: var(--dim); }

/* people on a goal */
.fact { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
/* the names are what most needs filling in: a strong label, a field that stands out (the owner, 2026-10-09) */
.fact label { flex: 0 0 8rem; color: var(--no); font-weight: 650; }      /* the field names in light red (the owner, 2026-10-13) */
.fact input, .fact select { flex: 1 1 8rem; min-width: 7rem; border: 1.5px solid var(--line-2); font-weight: 500; }
.fact .shownname > a { font-weight: 650; }
.tagcard #peopleSummary { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 16px; color: var(--text); font-weight: 700; }
.tagcard .fact label { flex: 1 0 100%; margin-bottom: -4px; }     /* in the narrow card: the label on its own line, never wrapped */
.fact .signfield { cursor: pointer; }
.factbody { flex: 1 1 12rem; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.factbody > .dim { flex: 1 0 100%; margin: 0; }
.factbody > .dim:empty { display: none; }
.factbody > .shownname { flex: 1 0 100%; }
.shownname { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
/* a named person or team: white (the text colour), underlined as the link it is, and an × beside it to take it down */
.shownname a, .sitepage .shownname a:not([class]) { font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.shownname .del { color: var(--text); text-decoration: none; font-size: 1.15em; line-height: 1; }
.shownname .del:hover { color: var(--no); }
.sugwrap { position: relative; display: inline-block; flex: 1 1 10rem; min-width: 8rem; }
.sugwrap input { width: 100%; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; min-width: 14rem; max-height: 15rem; margin: 2px 0 0; padding: 4px 0; list-style: none; overflow-y: auto;
           background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 8px 24px rgba(var(--shadow-rgb), .12); }
.suggest li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 6px 10px; cursor: pointer; }
.suggest li.on, .suggest li:hover { background: var(--surface-2); }
.suggest .aka { color: var(--warn); font-size: var(--fs-s); }
.suggest .det { color: var(--dim); font-size: var(--fs-s); margin-left: auto; }
.hrow { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.mgoal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.mgoal .act { flex: 1 1 auto; justify-content: flex-start; }

/* the other goals from this match */
.related { margin-top: 20px; }
.related h2 { margin: 0 0 10px; }
.related .gridwrap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .related .gridwrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* comments */
.comments { margin-top: 24px; max-width: 60rem; }
.comments .chrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sitepage .comments h2 { margin: 0 0 10px; }
.compose { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.compose .cwrap { flex: 1 1 auto; min-width: 0; }
.cbox { width: 100%; min-height: 2.6em; }
.crow { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.cstatus { flex: 1; color: var(--no); font-size: var(--fs-s); }
.comment { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.avatar { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r);
          background: var(--surface-2); color: var(--text); font-weight: 600; text-transform: uppercase; }
.cbody-wrap { flex: 1 1 auto; min-width: 0; }
.cmeta { margin-bottom: 2px; }
.cwho { font-weight: 600; }
.cbody { white-space: pre-wrap; overflow-wrap: anywhere; }
.cfoot { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.cvote { min-height: calc(var(--h) - 6px); padding: 0 8px; font-size: var(--fs-s); color: var(--dim); font-variant-numeric: tabular-nums; }
.cvote.on, .cvote.on:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }

/* favourites (the judging tool's panel) */
#favs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#favLists { display: contents; }
#newList { flex: 1 1 130px; min-width: 110px; }
#delList { color: var(--no); border-color: var(--no-line); }
#favMsg { color: var(--no); font-size: var(--fs-s); }

/* ---------- desktop: the goal page is a tall picture with the panel beside it; the panel scrolls on its own ---------- */
@media (min-width: 801px) and (min-height: 521px), (min-width: 801px) and (pointer: fine) {
  body.player #main { max-width: none; width: 100%; margin: 0; padding: 12px 16px 32px; }
  body.player #g { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto auto 1fr; align-items: start; }
  body.goalpage #g { grid-template-columns: minmax(0, 1fr) max(340px, 25vw); }
  body.player #stage { grid-column: 1; grid-row: 1; min-width: 0; }
  body.player #stage .vwrap { height: calc(100vh - 88px); min-height: 320px; background: #000; border-radius: var(--r); overflow: hidden; }
  body.goalpage #stage .vwrap { height: auto; aspect-ratio: 16 / 9; max-height: calc(100vh - 88px); }
  body.player #stage .vwrap video { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: contain; border-radius: 0; }
  body.player #related { grid-column: 1; grid-row: 2; min-width: 0; }
  body.player #comments { grid-column: 1; grid-row: 3; min-width: 0; }
  body.player #side { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 64px; max-height: calc(100vh - 76px);
                      min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
}

/* ================= plain cards: sign in, account, verify ================= */
#login, body.plain { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.card { width: 100%; max-width: 420px; padding: 24px; }
.card h1 { margin: 0 0 8px; }
.card p { color: var(--dim); }
.card input { width: 100%; margin: 6px 0 12px; }
.card button { width: 100%; }
.card.narrow { max-width: 30rem; margin: 32px auto; padding: 22px; }
.card.narrow h2 { margin: 0 0 8px; }
.card.narrow input[type=text], .card.narrow input[type=password] { width: 100%; margin: 4px 0; }
.acctgrid { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px; }
.acctgrid .card.narrow { flex: 1 1 22rem; margin: 16px 0; }
#umsg { margin-left: 10px; color: var(--no); }

/* dialogs */
.odialog { width: calc(100% - 32px); max-width: 30rem; padding: 20px 22px; border-color: var(--line-2); box-shadow: 0 16px 48px rgba(var(--shadow-rgb), .2); }
.odialog::backdrop { background: rgba(var(--shadow-rgb), .45); }
.odialog h3 { margin: 0 0 6px; }
.signdlg { max-width: 22rem; position: relative; }
.signdlg form { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.signdlg .dlgclose { position: absolute; top: 10px; right: 12px; }
.signdlg .err { padding: 0; margin: 0; } .signdlg .err:empty { display: none; }
#ytdialog form, #ytform { display: flex; flex-direction: column; gap: 10px; }
#ytform { max-width: 36rem; }
#ytdialog label, #ytform label { display: flex; flex-direction: column; gap: 4px; }
#ytform button { align-self: flex-start; }
.ytrow { margin: 8px 0; } .ytrow a { color: var(--text); }

/* a page of text */
.prose { max-width: 42rem; margin: 0 auto; padding: 16px; line-height: 1.6; }
.prose h2 { margin: 28px 0 6px; }
.prose li { margin: 6px 0; }
.prose :where(a) { color: var(--link); }                /* zero weight: a link styled as a button keeps the button's colours */
h1 a, h2 a { color: inherit; text-decoration: none; }

/* ================= tournament teams page ================= */
.rteams { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 12px; }
.rteam { padding: 12px 14px; min-width: 0; }
.rteam h3 { margin: 0 0 2px; }
.rteam.edit { grid-column: 1 / -1; }
.rplayers { list-style: none; margin: 6px 0 0; padding: 0; } .rplayers li { margin: 2px 0; }
.rrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.rrow > input[type=text] { flex: 1 1 9rem; }
.rfield { display: flex; flex-direction: column; gap: 2px; } .rfield input { width: 100%; }
.rbox { padding: 10px 14px; margin: 10px 0; }
.rbox summary { cursor: pointer; font-weight: 600; }
/* a player's page: "same person as another player?" */
.samebox { margin: 6px 0 14px; } .samebox > summary { cursor: pointer; color: var(--dim); font-size: var(--fs-s); }
.samebox[open] > summary { margin-bottom: 6px; }
.samelist { margin: 4px 0 8px; padding-left: 18px; } .samelist li { margin: 3px 0; }
.claimbox .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.samebox .acts { align-items: center; } .samebox .sugwrap { flex: 0 1 22rem; } .samebox .sugwrap input { width: 100%; }
.tscroll { overflow-x: auto; }
.sched td { padding: 3px 5px 3px 0; } .sched input { width: 100%; min-width: 4.5rem; } .sched input.narrow { min-width: 3.2rem; width: 4.5rem; }
.mv { display: flex; gap: 3px; }
.jsonbox { width: 100%; margin: 8px 0; font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-s); }
.importout { margin-top: 10px; white-space: pre-wrap; } .importout.good { color: var(--yes); } .importout.bad { color: var(--no); }
.cluster .plate, .rteam.cluster .plate { width: 100%; max-width: 327px; image-rendering: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-s); }
.cluster .acts { gap: 8px; align-items: center; }
.cluster input[type=text] { flex: 1 1 12rem; min-width: 8rem; }

/* ================= admin ================= */
body.adminpage { overflow: auto; }
#pwcard.offer { border-color: var(--yes); box-shadow: 0 0 0 2px var(--yes-bg); }   /* just signed in by link: a password offered */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ngcard { display: flex; flex-direction: column; gap: 6px; }                         /* admin: a goal tagged Not a Goal */
.ngcard.hidden .gtile { opacity: .55; }
.ngline { margin: 0; font-size: var(--fs-s); }
.ngacts { display: flex; align-items: center; gap: 6px; }
#adminbar { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 8px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
#adminbar nav { display: flex; align-items: center; gap: 14px; color: var(--dim); }
#adminbar a:not(.act) { color: var(--link); text-decoration: none; }
.adminbrand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }   /* the logo, Back to the site under it */
.adminbrand .act { flex-shrink: 0; }
#tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 20px; }
#tabs a.tab { text-decoration: none; }
.adminpage .help, #empty { margin: 0 20px 12px; }
#cards { display: grid; gap: 14px; padding: 0 20px 24px; }
.gcard { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 14px; padding: 14px; }
.gcard video { width: 100%; border-radius: var(--r); background: #000; }
.ginfo h3 { margin: 0 0 4px; } .ginfo p { margin: 4px 0; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.media { margin-top: 8px; } .media h4 { margin: 6px 0; } .mrow { margin: 3px 0; }
.handles input[type=number] { width: 72px; }
@media (max-width: 800px) { .gcard { grid-template-columns: 1fr; } }
.traffic { grid-column: 1 / -1; }
.tbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; }
.stat strong { font-size: var(--fs-l); line-height: 1.2; font-variant-numeric: tabular-nums; }
.traffic h3 { margin: 22px 0 8px; }
.ttable { border-collapse: collapse; min-width: 22rem; }
.ttable th, .ttable td { text-align: left; padding: 6px 18px 6px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ttable th { color: var(--dim); font-weight: 600; font-size: var(--fs-s); }
.ttable th .thsort { all: unset; cursor: pointer; color: inherit; font: inherit; white-space: nowrap; }   /* a heading that sorts */
.ttable th .thsort:hover, .ttable th[aria-sort=ascending] .thsort, .ttable th[aria-sort=descending] .thsort { color: var(--ink); }
.ttable th .thsort:focus-visible { outline: 2px solid var(--focus, var(--link)); outline-offset: 2px; }
/* the statistics pages: denser (the editor's scale), every section folds away */
.tdense { --fs-s: 11px; --fs-m: 12px; --fs-l: 18px; font-size: var(--fs-m); line-height: 1.35; }
body[data-page=today] :is(#tabs, .help), body[data-page=stats] :is(#tabs, .help) { padding-bottom: 6px; margin-bottom: 6px; }
.tsec { border-top: 1px solid var(--line); padding: 2px 0 8px; }
.tsec > summary { cursor: pointer; display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-weight: 600; list-style: none; }
.tsec > summary::-webkit-details-marker { display: none; }
.tsec > summary::before { content: "▶"; color: var(--dim); width: 10px; font-size: 8px; transition: transform .1s; }
.tsec[open] > summary::before { transform: rotate(90deg); }
.tsec > summary .dim { font-weight: 400; }
.tdense .tbar { margin-bottom: 6px; }
.tdense .stats { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.tdense .stat { padding: 6px 10px; gap: 0; }
.tdense .ttable { min-width: 0; }
.tdense .ttable th, .tdense .ttable td { padding: 2px 14px 2px 0; }
.tdense .tsec > p { margin: 4px 0; }
.tpair { display: flex; flex-wrap: wrap; gap: 8px 40px; align-items: flex-start; }
.adduser { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.adduser input, .wide { min-width: 15rem; }

/* a goal's admin page: views, YouTube, the editor */
#goaladmin { max-width: min(1800px, 100%); margin: 0 auto; padding: 8px 16px 16px; }
#goaladmin .pcard { margin-bottom: 14px; }
.gahead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.gahead h1 { margin: 0; }
.gahead #gaback { text-decoration: none; }
.viewshead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.viewshead h2 { margin: 0; }
.barchart { display: flex; align-items: stretch; gap: 2px; height: 14rem; margin-top: 12px; }
.barcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.barslot { flex: 1; width: 100%; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line-2); }
.bar { width: 100%; min-height: 1px; background: var(--ink); border-radius: 2px 2px 0 0; }
.bar.zero { background: transparent; }
.barn, .barlabel { height: 16px; font-size: var(--fs-s); color: var(--dim); white-space: nowrap; }
.barlabel { margin-top: 3px; }

/* ---------- the editor: laid out like an NLE (a computer's screen; on a narrow one it says so and steps aside) ----------
   Picture and inspector side by side, the timeline full width under them. The picture is as big as the height left over
   allows (--edchrome is what sits above and below it: the transport and the whole timeline card, so
   picture and timeline fit the window without scrolling), and never tiny. */
.edshell { --edchrome: 346px; --lane: 32px; --lanes-label: 50px; }
/* The look (colours, type, sizes) comes from editor-tokens.css: dark, dense and quiet like a desktop editor, whatever
   the site's theme. The shell is the darkest surface; the viewer, inspector and timeline are panels one step up. */
.edshell { padding: 8px; background: var(--ed-bg-0); border: 1px solid var(--ed-border); border-radius: 4px; -webkit-font-smoothing: antialiased; }
.edshell .pcard, .edshell .edside { background: var(--ed-bg-1); border: 1px solid var(--ed-border); border-radius: 4px; box-shadow: none; }
.edshell h2, .edshell h3 { font-size: var(--ed-fs-cap); font-weight: 600; letter-spacing: var(--ed-cap-track); text-transform: uppercase; color: var(--ed-text-2); }
.edshell .dim { color: var(--ed-text-2); }
.edshell :where(button, .act, .tab, .ang) { min-height: var(--ed-ctl-h); height: var(--ed-ctl-h); padding: 0 var(--ed-ctl-px); font-size: var(--ed-fs-label);
  background: var(--ed-bg-2); border-color: var(--ed-border-strong); color: var(--ed-text); transition: background var(--ed-ease), color var(--ed-ease), border-color var(--ed-ease); }
.edshell :where(button, .act, .tab, .ang):hover:not(:disabled) { background: var(--ed-bg-3); border-color: var(--ed-border-strong); }
.edshell :where(button, .act, .tab, .ang):disabled { opacity: .4; }
/* chosen: the hover shade and the accent, never a white fill */
.edshell :where(.act, .tab, .ang, button).on, .edshell :where(.act, .tab, .ang, button).on:hover:not(:disabled) {
  background: var(--ed-bg-3); border-color: var(--ed-border-strong); color: var(--ed-accent); }
.edshell :focus-visible { outline: 1px solid var(--ed-accent); outline-offset: 1px; }
.edshell :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), select) {
  min-height: var(--ed-ctl-h); height: var(--ed-ctl-h); padding: 0 6px; font-size: var(--ed-fs-label); color: var(--ed-text);
  background: var(--ed-bg-0); border: 1px solid var(--ed-border-strong); border-radius: var(--ed-r); box-shadow: none; }
.edshell :where(input, select):focus { border-color: var(--ed-accent); box-shadow: none; }
.edshell input[type=range], .edshell input[type=checkbox] { accent-color: var(--ed-accent); }
/* sliders: a hairline track and a small light knob, as in a desktop editor */
.edshell input[type=range] { -webkit-appearance: none; appearance: none; height: 16px; background: none; cursor: pointer; }
.edshell input[type=range]::-webkit-slider-runnable-track { height: 2px; border-radius: 1px; background: var(--ed-bg-3); }
.edshell input[type=range]::-moz-range-track { height: 2px; border-radius: 1px; background: var(--ed-bg-3); }
.edshell input[type=range]::-moz-range-progress { height: 2px; background: var(--ed-accent-line); }
.edshell input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; margin-top: -4px; border: 0; border-radius: 50%;
  background: var(--ed-text-2); transition: background var(--ed-ease); }
.edshell input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--ed-text-2); }
.edshell input[type=range]:hover::-webkit-slider-thumb { background: var(--ed-text); }
.edshell input[type=range]:hover::-moz-range-thumb { background: var(--ed-text); }
/* an icon: Lucide's 24-unit drawing at 14px, in the button's text colour */
.edi { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* a segmented control: one box, 1px dividers inside, no gaps */
.edseg { display: inline-flex; align-items: stretch; border: 1px solid var(--ed-border-strong); border-radius: var(--ed-r); background: var(--ed-bg-2); overflow: hidden; }
.edshell .edseg > :where(button, .act, .tab, .ang) { border: 0; border-radius: 0; background: transparent; height: calc(var(--ed-ctl-h) - 2px); min-height: 0; }
.edshell .edseg > :where(button, .act, .tab, .ang) + :where(button, .act, .tab, .ang) { border-left: 1px solid var(--ed-border); }
.edshell .edseg > :where(button, .act, .tab, .ang):hover:not(:disabled) { background: var(--ed-bg-3); }
.edshell .edseg > :where(button, .act, .tab, .ang).on { background: var(--ed-bg-3); color: var(--ed-accent); }
.edseglabel { font-size: var(--ed-fs-cap); letter-spacing: var(--ed-cap-track); text-transform: uppercase; color: var(--ed-text-2); }
/* The editor is a tool, laid out like a video editor: it runs denser than the reading pages -- the same three text
   sizes and the same button, one step smaller -- so the picture and the timeline get the room. */
@media (pointer: fine) {
  #goaladmin { --fs-s: 11px; --fs-m: 12px; --fs-l: 16px; --h: 24px; font-size: var(--fs-m); }
  #goaladmin .pcard { padding: 10px 12px; margin-bottom: 10px; }
  #goaladmin > :not(.edshell) :where(button, .act, .tag, .ang, .chip, .tab) { padding: 0 8px; }   /* the editor sizes its own */
  #goaladmin .gahead { margin-bottom: 4px; }
  #goaladmin .edtop { grid-template-columns: minmax(0, 1fr) 280px; gap: 10px; }

  #goaladmin .edsfxrow { grid-template-columns: 1fr 90px auto; }
  #goaladmin .edtlcard { margin-top: 10px !important; padding: 8px 10px !important; }
  #goaladmin .edmain { padding: 8px 10px !important; }
}   /* the header, the edit bar and the transport; the timeline is a short scroll below on a laptop */
body.quickedit #editcard { display: none; }   /* a phone: the quick editor (quickedit.js) instead */
.edtop { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.edmain { margin-bottom: 0 !important; padding: 10px 12px !important; }
/* the goal's title and the way back, at the head of the side panel (the site's header is left out of the editor: see below) */
.edshell .edback { display: inline-flex; align-items: center; justify-content: center; width: var(--ed-ctl-h); height: var(--ed-ctl-h);
  border-radius: var(--ed-r); color: var(--ed-text-2); text-decoration: none; transition: background var(--ed-ease), color var(--ed-ease); }
.edshell .edback:hover { background: var(--ed-bg-3); color: var(--ed-text); text-decoration: none; }
.edshell .edtitle { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--ed-fs); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ed-text); }
.edshell .edtitle a { color: inherit; text-decoration: none; }
.edshell .edtitle a:hover { text-decoration: underline; }
.edsub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* On a computer the editor has the whole window: no site header or footer, so the picture and the timeline both fit
   without scrolling. (On a narrow screen, where the editor steps aside, the header stays.) */
@media (min-width: 901px) {
  body.editorpage #bar, body.editorpage #foot { display: none; }
  body.editorpage #main { padding-top: 8px; }
  body.editorpage #goaladmin { padding-top: 0; }
}
.edundo { display: inline-flex; align-items: center; gap: 4px; }
.edfullbtn .i-min, .edfullbtn.full .i-max { display: none; }
.edfullbtn.full .i-min { display: block; }
.edprogress { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.edshell #edprogbtn.on, .edshell #edprogbtn.on:hover:not(:disabled) { color: var(--ed-key); }
#edsaved { margin-left: auto; font-size: var(--fs-s); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the side panel's head: title, the way back, full screen; then undo, In progress, Saved and the Tangent chip */
.edsidehead { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--ed-border); }
.edhrow { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.edshell .edhrow .edtitle { flex: 1 1 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }   /* the whole title, on two lines if need be */
.edhrow .previewtag { margin: 0; font-size: 10px; }
.edsidehead .edsub { font-size: var(--fs-s); }
.edshell .edsidehead #edprognote { width: 100%; }
.edstage { position: relative; width: min(100%, max(560px, calc((100vh - var(--edchrome)) * 16 / 9)));   /* never smaller than 560 px wide */ margin: 0 auto; aspect-ratio: 16 / 9; overflow: hidden;
           background: #000; border-radius: var(--r); touch-action: none; }
.edstage.preview.square { aspect-ratio: 1; width: min(100%, max(400px, calc(100vh - var(--edchrome)))); }
.edstage.preview.vertical { aspect-ratio: 9 / 16; width: min(100%, max(300px, calc((100vh - var(--edchrome)) * 9 / 16))); }
.edvids { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; }
/* the cameras not on screen are see-through, not hidden: a browser (Safari) stops decoding a hidden video, and a camera
   switched back in then stood still on its last frame */
.edvids video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.edvids video.on { opacity: 1; }
.edframe { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); cursor: move; }
.edframe.onkey { border-color: #fcd34d; }
/* the frame's corners: drag one to zoom */
.edcorner { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid #111; border-radius: 2px; touch-action: none; }
.edcorner.nw { left: -8px; top: -8px; cursor: nwse-resize; }   .edcorner.se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.edcorner.ne { right: -8px; top: -8px; cursor: nesw-resize; }  .edcorner.sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.edframe.fixed .edcorner { display: none; }
.edstage.preview .edframe { display: none; }
.edframe.fixed { border-style: dashed; border-color: rgba(255, 255, 255, .6); cursor: default; }   /* transform off: a centred frame, not moved */
.edshell .edtfon { margin-left: auto; margin-right: 6px; }
.edshell .edtfon:not(.on) { color: var(--ed-text-3); }
#transformcard.tfoff .kfnav, #transformcard.tfoff .edtfactions { display: none; }
/* the transport: the timecode in a recessed well on the left, play in the middle, the cameras on the right */
.edtransport { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 8px 0 0; }
/* (the cameras take all the room right of the play buttons: with four cameras, Angles and Views did not fit in half of it
   and 4-up was pushed out of sight; on a narrow window Views wraps to a second line rather than going missing) */
.edtime { justify-self: start; padding: 3px 10px; border-radius: var(--ed-r); background: var(--ed-bg-0); box-shadow: var(--ed-inset);
          font: 500 var(--ed-fs-time)/1.2 var(--ed-mono); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ed-text); white-space: nowrap; }
.edtimedur { color: var(--ed-text-2); font-size: .72em; }
.edshell .edplayseg > button { width: 34px; padding: 0; }
.edshell .edplayseg > .edplaybtn { width: 42px; }
.edplaybtn .i-pause, .edplaybtn.playing .i-play { display: none; }
.edplaybtn.playing .i-pause { display: block; }
.edplaybtn .edi { fill: currentColor; stroke-width: 1.5; }
.edtcenter { display: inline-flex; align-items: center; gap: 8px; }
.edshell .edtkeys > button { width: 28px; padding: 0; }
.edcams { justify-self: end; display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 10px; min-width: 0; max-width: 100%; }
.edcams > .edangles { flex: none; }
.edcheck { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--fs-s); }

/* the inspector: one panel at a time, chosen with tabs */
.edside { position: sticky; top: 8px; display: flex; flex-direction: column; max-height: calc(100vh - 16px); overflow-y: auto;
          background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
/* the inspector's tabs: an underline tab bar, the chosen one underlined in the accent */
.edtabs { position: sticky; top: 0; z-index: 1; display: flex; gap: 0; padding: 0 var(--ed-pad); background: var(--ed-bg-1); border-bottom: 1px solid var(--ed-border); }
.edshell .edtabs .tab, .edshell .edtabs .tab:hover:not(:disabled), .edshell .edtabs .tab.on, .edshell .edtabs .tab.on:hover:not(:disabled) {
  flex: 0 0 auto; height: 32px; padding: 0 9px; border: 0; border-radius: 0; background: none; color: var(--ed-text-2);
  box-shadow: inset 0 -1px 0 transparent; }
.edshell .edtabs .tab:hover:not(:disabled) { color: var(--ed-text); }
.edshell .edtabs .tab.on, .edshell .edtabs .tab.on:hover:not(:disabled) { color: var(--ed-text); box-shadow: inset 0 -1px 0 var(--ed-accent); }
.edpanel { padding: var(--ed-pad); }
.edpanel:not([hidden]) ~ .edpanel:not([hidden]) { border-top: 1px solid var(--ed-border); }   /* two sections on one tab */
.edpanel h3 { margin: calc(var(--ed-gap) * 2) 0 var(--ed-gap); }
.edpanel h3:first-child, .edpanel .insphead h3 { margin-top: 0; }
.edpanel .tabs { display: flex; flex-wrap: wrap; }
.edpanel .tabs.edseg { display: inline-flex; flex-wrap: nowrap; }
.edpanel p { margin: var(--ed-gap) 0 0; }
#edsrc { order: -1; flex: 0 1 auto; min-width: 0; font: var(--ed-fs-label) var(--ed-mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insphead { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--ed-gap); }
.edshell .kfnav > button { padding: 0 6px; color: var(--ed-text-2); }
.edshell .kfbtn.on, .edshell .kfbtn.on:hover:not(:disabled) { background: var(--ed-bg-3); color: var(--ed-key); }
.kfbtn .edi { width: 12px; height: 12px; }
.kfbtn.on .edi { fill: currentColor; }
/* a numeric row, as in Resolve's inspector: the label right-aligned, the value in a mono well, a reset */
.insprow { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: var(--ed-gap); margin: var(--ed-gap) 0; }
.insprow label.scrub { cursor: ew-resize; user-select: none; text-align: right; font-size: var(--ed-fs-label); color: var(--ed-text-2); }
.insprow.scrubbing label.scrub { color: var(--ed-accent); }
.edshell .insprow input { width: 100%; font-family: var(--ed-mono); font-variant-numeric: tabular-nums; }
.edshell .insprow .reset { width: 20px; min-height: 0; padding: 0; border: 0; background: none; color: var(--ed-text-3); }
.edshell .insprow .reset:hover:not(:disabled) { background: none; color: var(--ed-text); }
.edtfactions { display: flex; margin-top: var(--ed-gap); }
/* fades: a row per fade in the Fades panel; on the timeline a dark ramp over the faded part; on the picture, black */
.edh3note { margin-left: 4px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ed-text-3); }
.edfaderow { display: grid; grid-template-columns: 76px 72px 1fr; align-items: center; gap: var(--ed-gap); margin: var(--ed-gap) 0; }
.edfaderow label { text-align: right; font-size: var(--ed-fs-label); color: var(--ed-text-2); }
.edshell .edfaderow input { font-family: var(--ed-mono); font-variant-numeric: tabular-nums; }
.edfaderow output { font-family: var(--ed-mono); font-variant-numeric: tabular-nums; }
.edfaderow.off label { color: var(--ed-text-3); }
/* a mark: a small round dot on a clip, its sound, an unlinked sound or an effect (chosen: the accent) */
.edmark { position: absolute; top: 50%; z-index: 4; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; cursor: pointer;
          background: #f1f1f3; box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); transition: transform var(--ed-ease); }
.edmark:hover { transform: scale(1.25); }
.edmark.sel { background: var(--ed-accent); box-shadow: 0 0 0 1px #fff; }
.edsndblock .edmark, .edmusicblock .edmark, .edsfxmark .edmark { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; }
/* a named mark: its name just after the dot, cut short with … when it does not fit */
.edmarkname { position: absolute; top: 50%; z-index: 4; max-width: 90px; margin: -6px 0 0 7px; overflow: hidden; text-overflow: ellipsis;
              white-space: nowrap; pointer-events: none; font: 10px/12px var(--ed-mono); color: #f1f1f3; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.edmarkname.sel { color: var(--ed-accent); }
.edshell .edmarkname-input { width: 15ch; font: var(--ed-fs-label) var(--ed-mono); }
.edramp { position: absolute; top: 0; bottom: 0; z-index: 1; pointer-events: none; }
.edramp.in { left: 0; background: linear-gradient(to bottom right, rgba(0, 0, 0, .55) 50%, transparent 50%); }
.edramp.out { right: 0; background: linear-gradient(to bottom left, rgba(0, 0, 0, .55) 50%, transparent 50%); }
.edfade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.edshell .edtfactions > button { flex: 1 1 0; gap: 4px; }

/* the Sound panel */
.edmixrow { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: var(--ed-gap); margin: var(--ed-gap) 0; }
.edmixrow label { font-size: var(--ed-fs-label); color: var(--ed-text-2); }
.edmixrow input[type=range] { width: 100%; }
.edmixrow output { min-width: 3.2em; text-align: right; font-family: var(--ed-mono); font-variant-numeric: tabular-nums; }
.edmixrow .ednum { width: 5.5rem; }
.edmixrow > .act { justify-self: start; }
.edsoundname { padding: 6px 8px; margin-bottom: 4px; border-radius: var(--ed-r); background: var(--ed-bg-2); font-weight: 500; overflow-wrap: anywhere; }
.edsoundname.sel { outline: 1px solid var(--ed-accent); }
.edtimechip { font-family: var(--ed-mono); font-variant-numeric: tabular-nums; }
.edsfxlist { display: flex; flex-direction: column; gap: 4px; }
.edsfxrow { display: grid; grid-template-columns: 1fr 110px auto; align-items: center; gap: 6px; padding: 4px 6px; border-radius: var(--r); }
.edsfxrow.sel { background: var(--ed-bg-3); box-shadow: inset 1px 0 0 var(--ed-accent); }
.edsfxrow .linkish { justify-content: flex-start; text-align: left; white-space: normal; font-size: var(--fs-s); color: var(--text); text-decoration: none; }
.edsfxvol { display: flex; align-items: center; gap: 4px; }
.edsfxvol input { width: 100%; min-width: 0; }
.edsfxvol output { font: var(--ed-fs-label) var(--ed-mono); font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; }

/* the timeline card: tools, lanes (ruler, video, music, effects) with their labels, and the start/end row */
.edtlcard { margin-top: 14px !important; padding: 10px 12px !important; }
.edtools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: -8px -10px 8px; padding: 6px 10px; border-bottom: 1px solid var(--ed-border); }
.edtoolgroup { display: inline-flex; align-items: center; gap: 6px; }
.edseltext { margin-left: auto; font: var(--ed-fs-label) var(--ed-mono); font-variant-numeric: tabular-nums; color: var(--ed-text-2); }
/* the timeline: track headers on the left (a 1px divider), the lanes on the darkest ground so what is on them stands out.
   Rows: ruler, video, then the three sound lanes; 1px between them, alternating shades so each reads as its own row. */
.edtimeline { display: grid; grid-template-columns: var(--ed-head-w) minmax(0, 1fr); gap: 0; margin: 0 -10px; user-select: none;
              background: var(--ed-bg-0); border-top: 1px solid var(--ed-border); border-bottom: 1px solid var(--ed-border); }
.edtimeline, .edlanelabels, .edtrack { --ed-rows: var(--ed-ruler-h) var(--ed-video-h) var(--ed-audio-h) var(--ed-audio-h) var(--ed-audio-h); }
.edlanelabels { display: grid; grid-template-rows: var(--ed-rows); gap: var(--ed-lane-gap); background: var(--ed-bg-1); border-right: 1px solid var(--ed-border-strong); }
.edlanelabels span { display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font-size: var(--ed-fs-label); color: var(--ed-text-2);
                     background: var(--ed-bg-1); box-shadow: 0 1px 0 var(--ed-border); }
.edlanelabels span:nth-child(1) { grid-row: 2; } .edlanelabels span:nth-child(2) { grid-row: 3; } .edlanelabels span:nth-child(3) { grid-row: 4; } .edlanelabels span:nth-child(4) { grid-row: 5; }
.edtrack { position: relative; display: grid; grid-template-rows: var(--ed-rows); gap: var(--ed-lane-gap); margin: 0 10px 16px 0; }
/* the ruler: labelled ticks with fainter ones between; its labels sit on a backing above the playhead's line, so the
   line never covers them (the playhead's triangle stays in the top part, clear of the labels) */
.edruler { position: relative; background: var(--ed-bg-1); box-shadow: inset 0 -1px 0 var(--ed-border-strong); cursor: text; }
.edtick { position: absolute; bottom: 0; top: 0; z-index: 7; border-left: 1px solid var(--ed-border-strong); pointer-events: none;
          font: var(--ed-fs-cap)/1 var(--ed-mono); font-variant-numeric: tabular-nums; color: var(--ed-text-2); white-space: nowrap; }
.edtick:not(.minor) { padding: 11px 4px 0 3px; background: linear-gradient(to bottom, transparent 10px, var(--ed-bg-1) 10px); }
.edtick.minor { top: auto; height: 5px; z-index: 0; border-left-color: var(--ed-border); }
.edlane { position: relative; border-radius: 0; background: var(--ed-lane-a); }
.edtrack > .edlane:nth-child(odd) { background: var(--ed-lane-b); }
.edvideo { overflow: visible; }
/* a clip: a muted fill for its camera, a 1px lighter top edge, its name small in the corner. Chosen: a 1.5px accent
   outline and a slightly brighter fill, with a grip on each edge to drag */
.edclip { position: absolute; top: 0; bottom: 0; overflow: hidden; border-radius: var(--ed-r-clip); cursor: grab; color: var(--ed-clip-text);
          box-shadow: var(--ed-clip-bevel), inset 0 0 0 1px rgba(0, 0, 0, .35); }
.edclip.PGM { background: var(--ed-cam-pgm); } .edclip.CAM_2 { background: var(--ed-cam-2); } .edclip.CAM_3 { background: var(--ed-cam-3); } .edclip.CAM_4 { background: var(--ed-cam-4); }
.edclip:active { cursor: grabbing; }
.edclip.sel { z-index: 2; overflow: visible; filter: var(--ed-clip-sel-lift);
              box-shadow: var(--ed-clip-bevel), 0 0 0 var(--ed-sel-w) var(--ed-accent); }
.edcliplabel { position: absolute; left: 6px; top: 4px; right: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
               font-size: var(--ed-fs-label); font-weight: 500; line-height: 1.2; pointer-events: none; }
.edclipedge { position: absolute; top: 0; bottom: 0; width: 8px; z-index: 3; cursor: ew-resize;
              background: linear-gradient(var(--ed-accent), var(--ed-accent)) center / 2px 50% no-repeat; }
.edclipedge:hover { background-size: 2px 80%; }
.edclipedge.in { left: -4px; }
.edclipedge.out { right: -4px; }
.edratebadge { position: absolute; right: 3px; top: 3px; padding: 1px 4px; border-radius: 2px; font: 600 var(--ed-fs-cap)/1.2 var(--ed-mono);
               background: rgba(0, 0, 0, .4); color: var(--ed-text); pointer-events: none; }
/* a join between two touching clips: a small diamond on the edit point (a bigger, see-through button to hit), and its dissolve */
.edshell .edjoin { position: absolute; top: 50%; z-index: 5; width: 16px; height: 16px; min-height: 0; margin: -8px 0 0 -8px; padding: 0; border: 0;
          background: none; color: transparent; font-size: 0; box-shadow: none; }
.edjoin::after { content: ""; position: absolute; left: 50%; top: 50%; width: var(--ed-join); height: var(--ed-join); margin: calc(var(--ed-join) / -2) 0 0 calc(var(--ed-join) / -2);
                 transform: rotate(45deg); background: var(--ed-bg-1); box-shadow: 0 0 0 1px var(--ed-border-strong); transition: background var(--ed-ease), box-shadow var(--ed-ease); }
.edshell .edjoin:hover:not(:disabled) { background: none; }
.edjoin:hover::after { background: var(--ed-text); }
.edjoin.has::after { background: var(--ed-text-2); }
.edjoin.sel::after, .edjoin.sel:hover::after { background: var(--ed-accent); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.eddissolve { position: absolute; top: 0; bottom: 0; z-index: 3; pointer-events: none;
              background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); }
.edendmark { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--ed-text-2); pointer-events: none; }
.edgoal { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--ed-goal); z-index: 2; pointer-events: none; }
.edshell .edkeymark { position: absolute; bottom: 5px; z-index: 4; width: 8px; height: 8px; min-height: 0; margin-left: -4px; padding: 0; border: 0; border-radius: 0;
             transform: rotate(45deg); background: var(--ed-key); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); cursor: pointer; }
.edshell .edkeymark:hover:not(:disabled) { background: #ecd08a; }
.edshell .edkeymark.sel { background: var(--ed-text); outline: 1px solid var(--ed-key); outline-offset: 1px; }
.edmusiclane, .edsfxlane { overflow: hidden; }
/* the sound lanes: each piece a dark tint of its colour (a clip's sound: its camera's; music; effects) with its waveform
   drawn in that colour at --ed-wave-opacity. TODO: real waveforms need peak data per file (worked out once on the
   server, drawn to a canvas); until then a flat centre line stands in for it. Moved ends (an L or J cut) are edged amber. */
.edsoundlane { overflow: visible; }
.edsndblock, .edmusicblock, .edsfxmark {
  --wave: color-mix(in srgb, var(--c) calc(var(--ed-wave-opacity) * 100%), transparent);
  background: linear-gradient(var(--wave), var(--wave)) center / 100% 1px no-repeat, color-mix(in srgb, var(--c) 38%, var(--ed-bg-0));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--c) 60%, transparent), inset 0 0 0 1px rgba(0, 0, 0, .35); }
.edsndblock { position: absolute; top: 3px; bottom: 3px; border-radius: var(--ed-r-clip); cursor: pointer; }
.edsndblock.PGM { --c: var(--ed-cam-pgm); } .edsndblock.CAM_2 { --c: var(--ed-cam-2); } .edsndblock.CAM_3 { --c: var(--ed-cam-3); } .edsndblock.CAM_4 { --c: var(--ed-cam-4); }
.edsndblock.moved { box-shadow: inset 0 0 0 1px var(--ed-key); }
.edsndblock.sel { z-index: 2; box-shadow: 0 0 0 var(--ed-sel-w) var(--ed-accent); }
/* unlinked sound (editor-sound): with free pieces on the lane, clips' own sound takes the top half and free pieces the bottom */
.edsoundlane.hasfree .edsndblock { bottom: 50%; }
.edsoundlane.hasfree .edsndblock.free { top: 50%; bottom: 1px; }
.edsndblock.free { cursor: grab; box-shadow: inset 0 1px 0 color-mix(in srgb, var(--c) 60%, transparent), inset 0 0 0 1px var(--ed-border-strong); }
.edsndblock.free:active { cursor: grabbing; }
.edsndblock.free.sel { box-shadow: 0 0 0 var(--ed-sel-w) var(--ed-accent); }
.edmusicblock, .edsfxmark { position: absolute; top: 3px; bottom: 3px; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
                            font-size: var(--ed-fs-label); line-height: 1.2; color: var(--ed-clip-text); border-radius: var(--ed-r-clip); cursor: grab; }
.edmusicblock { --c: var(--ed-music); }
.edsfxmark { --c: var(--ed-sfx); min-width: 8px; }
.edmusicblock:active, .edsfxmark:active { cursor: grabbing; }
.edmusicblock.sel, .edsfxmark.sel { overflow: visible; z-index: 2; box-shadow: 0 0 0 var(--ed-sel-w) var(--ed-accent); }
.edmusicblock .edcliplabel, .edsfxmark .edcliplabel { top: 3px; left: 6px; }
/* several chosen at once: the same accent outline as one chosen thing, without edge handles; and the box being drawn */
.edclip.grp, .edsndblock.grp, .edmusicblock.grp, .edsfxmark.grp { z-index: 2; box-shadow: 0 0 0 var(--ed-sel-w) var(--ed-accent); }
.edclip.grp { filter: var(--ed-clip-sel-lift); }
.edmarquee { position: absolute; z-index: 8; pointer-events: none; background: var(--ed-accent-soft); box-shadow: inset 0 0 0 1px var(--ed-accent-line); }
.edrange { position: absolute; top: 0; bottom: 0; z-index: 1; background: var(--ed-accent-soft); box-shadow: inset 1px 0 0 var(--ed-accent-line), inset -1px 0 0 var(--ed-accent-line);
           pointer-events: none; }
/* the playhead: a 1px line with a small triangle in the ruler (drag it to move the playhead). Its foot, under the
   lanes, chooses a range by dragging: a quiet grip that shows when the pointer is over the timeline. */
.edhead { position: absolute; top: 0; bottom: -14px; z-index: 6; width: 1px; margin-left: 0; background: var(--ed-playhead); pointer-events: none; }
.edheadtop { position: absolute; top: 0; left: -6px; width: 13px; height: 10px; pointer-events: auto; background: var(--ed-playhead);
             clip-path: polygon(0 0, 100% 0, 50% 100%); cursor: grab; }
.edheadtop:active { cursor: grabbing; }
.edheadfoot { position: absolute; bottom: 0; left: -5px; width: 11px; height: 10px; pointer-events: auto; cursor: col-resize;
              background: var(--ed-playhead); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: 0; transition: opacity var(--ed-ease); }
.edtimeline:hover .edheadfoot, .edheadfoot:active { opacity: .7; }
.edstage.gap .edvids, .edstage.gap .edframe { visibility: hidden; }
.edrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 7px 0; }
.edlabel { min-width: 6.5rem; color: var(--dim); font-size: var(--fs-s); }

/* the notation card */
#notecard summary { cursor: pointer; font-weight: 600; }
.ednotation h4 { margin: 12px 0 4px; }
.edli { display: flex; gap: 10px; margin: 2px 0; font-size: var(--fs-s); }
.edli.sel button:first-child { color: var(--warn); }
.eddel { font-size: var(--fs-s); color: var(--dim); }

/* versions and downloads */
.edverform { display: flex; gap: 6px; }
.edverform input { flex: 1; min-width: 0; }
.edver { display: flex; align-items: center; gap: 6px; font-size: var(--fs-s); }
.edvername { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edver.default .edvername { font-weight: 600; }
#delivcard { margin-top: 14px; }
/* Deliverables: one compact list, a row per version -- format, name, when, then its actions (the owner: no empty boxes,
   no buttons scattered about) */
.delivhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.delivhead h2 { margin: 0 8px 0 0; }
#delivcard .edverform { flex: 0 1 380px; }
#delivcard #edsite { margin: 2px 0 8px; }
.verlist { border-top: 1px solid var(--line); }
.verlist .edver { display: grid; grid-template-columns: 4.5rem minmax(6rem, 12rem) 7rem 1fr; align-items: center; gap: 4px 12px;
                  padding: 7px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-s); }
.verfmt { justify-self: start; padding: 1px 6px; border: 1px solid var(--line); border-radius: var(--r-s); color: var(--dim); }
.verlist .edver.default .verfmt { color: var(--text); border-color: var(--ink); }
.vermeta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edveractions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-s); }
.verlist .edveractions { justify-content: flex-start; }        /* Load lines up down the list */
@media (max-width: 760px) {
  .verlist .edver { grid-template-columns: auto 1fr auto; }
  .verlist .edveractions { grid-column: 1 / -1; justify-content: flex-start; }
}
#edverempty { margin: 6px 0 0; }
#edverempty:empty { display: none; }
.edveractions a { color: var(--text); }

/* the sound library dialog */
.libdialog { max-width: 40rem; }
.libhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.libhead h3 { margin: 0; }
.liblist { display: flex; flex-direction: column; gap: 4px; max-height: 18rem; margin: 8px 0 12px; overflow-y: auto; }
.librow { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: var(--r); }
.librow.on, .librow:hover { background: var(--surface-2); }
.libplay { width: calc(var(--h) - 6px); padding: 0; }
.libname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.libnamebox { flex: 1 1 auto; }
.libadd { padding-top: 10px; border-top: 1px solid var(--line); }
.libadd summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.libform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 8px 0; }
.libform label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-s); color: var(--dim); }
.libform label:first-child { flex: 1 1 14rem; }
.libform input[type=number] { width: 5rem; }
.libsec { flex-direction: row !important; align-items: center; gap: 6px !important; }
.libjobs { display: flex; flex-direction: column; gap: 4px; }
.libcookies { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.libcookiebtn { cursor: pointer; }
.libjob { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-s); }
.libjoburl { overflow-wrap: anywhere; }

/* ================= the judging tool (/review): video on the left, every control in the panel ================= */
#app { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: 100vh; }
#app #stage { background: #000; min-width: 0; min-height: 0; }
#player { position: relative; width: 100%; height: 100%; background: #000; }
#player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
#panel { display: flex; flex-direction: column; gap: 10px; height: 100vh; min-height: 0; padding: 14px; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line); }
#top { display: flex; gap: 8px; }
#top select { flex: 1; }
#top select#filterSel { flex: 0 0 105px; }
#question { font-weight: 600; }
#progress { color: var(--dim); margin-top: -6px; }
.chk, #meta, #speed { color: var(--dim); font-size: var(--fs-s); }
#meta { word-break: break-all; }
#speed { display: flex; align-items: center; gap: 4px; }
#verdicts { display: flex; gap: 6px; }
.v { flex: 1; font-weight: 600; }
.v.clear { flex: 0 0 46px; font-weight: 400; color: var(--dim); }
#stars { display: flex; align-items: center; gap: 2px; }
#stars .lbl { color: var(--dim); font-size: var(--fs-s); margin-right: 6px; }
#fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#fields input { width: 100%; }
#copyPrev { grid-column: 1 / -1; border-style: dashed; color: var(--dim); font-size: var(--fs-s); }
#tags { display: flex; flex-wrap: wrap; gap: 6px; }
#newTagRow input { width: 100%; }
#nav { display: flex; align-items: center; gap: 10px; }
#pos { color: var(--dim); }
#list { flex: 1 1 auto; min-height: 150px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: var(--fs-s); }
.row:hover { background: var(--surface-2); } .row.cur { background: var(--row-cur); }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.dot.yes { background: var(--yes); } .dot.no { background: var(--no); } .dot.unsure { background: var(--warn); }
.row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nt { color: var(--dim); font-size: var(--fs-s); }
#who button, #adminbar button { min-height: calc(var(--h) - 6px); padding: 0 10px; font-size: var(--fs-s); color: var(--dim); }
/* small verdict buttons over the video, lower left, still there in full screen: dark glass on any picture */
#ov { position: absolute; left: 10px; bottom: 58px; z-index: 5; display: flex; align-items: center; gap: 6px; }
.ovb { font-weight: 600; background: rgba(15, 17, 21, .72); border-color: rgba(255, 255, 255, .5); color: #fff; backdrop-filter: blur(3px); }
.ovb:hover:not(:disabled) { background: rgba(15, 17, 21, .85); }
.ovb.yes { color: #8be6ac; border-color: #3fb872; } .ovb.no { color: #ff9dab; border-color: #e0566a; }
.ovb.unsure, .ovb.fs { color: #ddd; }
.ovb.yes.on { background: #1f8f4e; color: #fff; } .ovb.no.on { background: #c43349; color: #fff; } .ovb.unsure.on { background: #6b7280; color: #fff; }
#ovPos { padding: 3px 7px; font-size: var(--fs-s); color: #ddd; background: rgba(15, 17, 21, .6); border-radius: var(--r-s); }
#player:fullscreen #ov { bottom: 72px; }
@media (max-width: 900px) {
  body:not(.sitepage):not(.adminpage):not(.plain) { overflow: auto; }
  #app { grid-template-columns: 1fr; height: auto; }
  #app #stage { height: 55vh; } #panel { height: auto; overflow: visible; }
}

/* ================= phones ================= */
@media (pointer: coarse) {
  #touch { display: block; }
  .act kbd, .tag kbd, .stars kbd, .keys { display: none; }        /* a phone has no keyboard */
  .judgenav .act kbd { display: inline-block; }                    /* but Prev ← / Next → keep their arrows: they say which way */
  .star { min-width: 32px; min-height: var(--h); }
}

/* ---------- our own video controls, every device (vcontrols.js): big Play and Unmute, on a light fade, quick to get out of the way ---------- */
.vc { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.vwrap:fullscreen { display: flex; align-items: center; justify-content: center; background: #000; }
.vwrap:fullscreen video { width: 100%; height: 100%; max-height: none; border-radius: 0; object-fit: contain; }
.vc-bar, .vc-top { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 6px; padding: 0 8px;
                   pointer-events: auto; opacity: 0; transition: opacity .18s; }
.vc.on .vc-bar, .vc.on .vc-top { opacity: 1; }
.vc-bar { bottom: 0; height: 60px; background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); }
.vc-top { top: 0; height: 44px; display: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0)); }
.vc-btn, .vc-btn:hover:not(:disabled) { flex: 0 0 auto; width: 52px; min-height: 52px; padding: 0; background: none; border: 0; color: #fff; }
.vc-btn[hidden] { display: none; }
.vc-btn:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: var(--r); }
.vc-btn.muted, .vc-btn.muted:hover:not(:disabled) { color: #ff4b4b; }   /* muted: a red speaker struck through; sound on: white */
.vc-icon { width: 32px; height: 32px; fill: currentColor; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.vc-time { flex: 0 0 auto; color: #fff; font-size: var(--fs-s); font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.vc-track { position: relative; flex: 1 1 auto; height: 52px; display: flex; align-items: center; touch-action: none; cursor: pointer; }
.vc-rail { position: relative; width: 100%; height: 3px; background: rgba(255, 255, 255, .35); border-radius: 2px; transition: height .1s; }
.vc-fill { height: 100%; width: 0; background: #fff; border-radius: 2px; }
.vc-knob { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.vc.dragging .vc-rail { height: 5px; }
.vc.dragging .vc-knob { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.vc-back { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #fff; text-decoration: none; font-size: var(--fs-l); }
.vc-title { flex: 1 1 auto; min-width: 0; color: #fff; font-size: var(--fs-s); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.vc-pill, .vc-pill:hover:not(:disabled) { flex: 0 0 auto; min-height: 30px; padding: 0 10px; font-size: var(--fs-s); color: #fff; background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .45); }
.vc-menu { position: absolute; top: 44px; right: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 7rem; padding: 4px; pointer-events: auto;
           background: rgba(20, 24, 31, .92); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.vc-item, .vc-item:hover:not(:disabled) { justify-content: flex-start; min-height: 36px; font-size: var(--fs-s); color: #fff; background: transparent; border: 0; }
.vc-item.on, .vc-item.on:hover:not(:disabled) { background: rgba(255, 255, 255, .18); color: #fff; }
.vcon #touch { bottom: 60px; }                                     /* the bar is ours now: the gestures stop above it */
.vc-big { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; pointer-events: none; }
/* paused, on every device (the owner, 2026-10-10: "big play button on desktop viewer as well"): a light grey play symbol
   in the middle, very faint, three times the corner one, its own target (the whole picture still plays and pauses) */
.vc.paused .vc-big { display: flex; }
.vc-big .vc-icon { width: 96px; height: 96px; fill: rgba(235, 235, 235, .38); filter: none; transition: fill .12s; }
.vc-bigbtn, .vc-bigbtn:hover:not(:disabled) { pointer-events: auto; padding: 12px; min-height: 0; border: 0; border-radius: 50%;
                                               background: transparent; touch-action: manipulation; cursor: pointer; }
@media (hover: hover) { .vc-bigbtn:hover .vc-icon { fill: rgba(245, 245, 245, .7); } }

/* a phone on its side: a viewing mode. The picture fills the screen's height, centred; the strip of space on its left
   IS the Previous button and the strip on its right IS Next (whole-strip targets: easy to hit without looking, and the
   camera housing cannot cover them). The camera angles sit along the top of the picture with the play controls.
   Nothing else: judging, sharing, people and comments are on the upright page. */
@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
  /* iPhones with a Dynamic Island report a ~59px safe margin on each side when held sideways (the island sits in one of
     them, at mid-height): the strips are never narrower than that, so the picture never goes under the island */
  :root { --vh: 100vh; --strip-min: max(64px, env(safe-area-inset-left), env(safe-area-inset-right));
          --video-w: min(calc(var(--vh) * 16 / 9), calc(100vw - 2 * var(--strip-min)));
          --strip: calc((100vw - var(--video-w)) / 2); }
  @supports (height: 100dvh) { :root { --vh: 100dvh; } }
  body.player { overflow: hidden; }
  body.player #bar, body.player #foot { display: none; }
  body.player #main { max-width: none; margin: 0; padding: 0; }
  body.player #g { display: flex; align-items: center; justify-content: center; gap: 0; height: var(--vh); overflow: hidden; padding: 0; }
  body.player #stage { display: block; flex: 0 0 auto; width: var(--video-w); margin: 0 !important; }
  body.player #stage .vwrap { position: relative; top: auto; }
  #stage .vwrap video { border-radius: 0; max-height: none; }

  /* only the two arrows are left of the panel, and they become the strips */
  body.player #side { display: block; width: 0; height: 0; margin: 0 !important; padding: 0; overflow: visible; }
  body.player #side > :not(#stagecontrols), body.player #related, body.player #comments { display: none !important; }
  #side #stagecontrols, #side #stagecontrols .navrow { display: contents; }
  #side .bars, #side .share, #side .trimbar { display: none; }
  /* the whole strip is the button. What shows is a lightly shaded shape in the bottom corner of the screen -- its top
     edge slanting up to the screen's edge, its outer corner following the phone's rounded corner -- with the arrow in it:
     clear of the island at mid-height, and where a thumb rests */
  #gprev, #gnext { position: fixed; top: 0; bottom: 0; z-index: 5; width: var(--strip); min-height: 0; height: auto;
                   align-items: flex-end; justify-content: center; padding: 0 0 calc(30px + env(safe-area-inset-bottom)) 0;
                   border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: var(--fs-l); }
  #gprev { left: 0; } #gnext { right: 0; }
  #gprev::before, #gnext::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: min(128px, 34%); z-index: -1;
                                   background: var(--shade); transition: background .12s; }
  #gprev::before { border-bottom-left-radius: 44px; clip-path: polygon(0 0, 100% 34%, 100% 100%, 0 100%); }
  #gnext::before { border-bottom-right-radius: 44px; clip-path: polygon(0 34%, 100% 0, 100% 100%, 0 100%); }
  #gprev:hover:not(:disabled), #gnext:hover:not(:disabled) { background: transparent; }
  #gprev:active:not(:disabled)::before, #gnext:active:not(:disabled)::before { background: var(--shade-press); }
  #gprev:disabled, #gnext:disabled { opacity: .25; }

  /* on the picture: the angles, one button each, and nothing else up top */
  .vcon .vc-top { display: flex; justify-content: center; }
  .vc-bar { height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }   /* above the home bar */

  .vc-back, .vc-title, .vc-top > .vc-pill { display: none; }
  .vcon .vc-angles { display: flex; gap: 6px; }
  .vc-angles .vc-pill.on, .vc-angles .vc-pill.on:hover:not(:disabled) { background: rgba(255, 255, 255, .9); border-color: #fff; color: #111; }
}
.vc-angles { display: none; }
/* the training feed (/admin/training): one clip, one question, four keys */
.training { display: grid; justify-items: center; gap: 10px; max-width: 960px; width: 100%; margin: 0 auto; }
.task { font-size: var(--fs-l); font-weight: 600; min-height: 1.4em; }
.twrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); overflow: hidden; touch-action: none; }
.tstage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tflash { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .18s; }
.tflash.on { opacity: .35; }
.tflash.yes { background: var(--yes); } .tflash.no { background: var(--no); } .tflash.unclear, .tflash.undo { background: var(--dim); }
.tstart { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tkeys { display: flex; gap: 24px; font-size: var(--fs-s); }
.tcount { font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.terr { color: var(--no); }

/* ---------- the Tangent panel (tangent.js): the "Panel" button and its window ----------
   The light: grey with no bridge, amber with the bridge but no panel, green when the panel is live. In the window a
   tile lights blue while its button is held on the panel, is filled dark when chosen, and names what it does. */
.tgchip { gap: 6px; }
p.keys + .tgchip { margin-top: 4px; }
.tglight { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.tgchip[data-state="unplugged"] .tglight { background: var(--warn); }
.tgchip[data-state="ready"] .tglight { background: var(--yes); }
.tgdialog { max-width: 44rem; }
.tgdialog h4 { margin: 14px 0 6px; }
.tgstatus { margin: 0; }
/* the panel itself, drawn after a photo: dark whatever the site's theme */
.tgpanel { position: relative; aspect-ratio: 1050 / 830; margin-top: 12px; background: #1c1d20; border-radius: 10px; color: #c9ccd1; }
.tgpanel.off { opacity: .6; }
.tgscreen { position: absolute; left: 4%; right: 4%; top: 1.5%; height: 5%; display: flex; align-items: center; justify-content: center;
            background: #000; border-radius: 3px; color: #8ab4e8; font: 11px ui-monospace, Menlo, monospace; }
.tgtile { position: absolute; width: 7.6%; aspect-ratio: 1; min-height: 0; padding: 0; transform: translate(-50%, -50%); overflow: visible;
          border-radius: 50%; background: #34363b; border: 1px solid #4a4d53; color: #d7dade; font-size: 13px; box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
.tgtile:hover:not(:disabled) { background: #404349; border-color: #6a6e75; }
.tgtile.on, .tgtile.on:hover:not(:disabled) { background: #34363b; border-color: #fff; color: #d7dade; box-shadow: 0 0 0 2px #fff; }
.tgtile.down, .tgtile.down:hover:not(:disabled) { background: var(--link); border-color: var(--link); color: #fff; }
.tglabel { position: absolute; top: calc(100% + 3px); left: 50%; width: 9em; transform: translateX(-50%); pointer-events: none;
           font-size: 11px; line-height: 1.15; text-align: center; white-space: normal; color: #7d8189; }
.tgtile.set .tglabel { color: #f1f2f4; font-weight: 600; }
.tgtile.above .tglabel { top: auto; bottom: calc(100% + 3px); }
.tgtile:nth-of-type(n+13):nth-of-type(-n+19) .tglabel { width: 5.6em; font-size: 10px; }     /* the bottom line sits close */
.tgring { position: absolute; left: 72.9%; top: 49.4%; width: 39%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
          background: #55585d; display: flex; align-items: center; justify-content: center; }
.tgball { width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #e0303a, #8e0d16 70%);
          border: 6px solid #111; display: flex; align-items: center; justify-content: center; text-align: center;
          font-size: 10px; line-height: 1.1; color: #fbd4d6; padding: 6px; }
.tgringname { position: absolute; bottom: 7%; font-size: 12px; color: #f1f2f4; }
.tgpick, .tgknob { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.tgpick select, .tgknob select { flex: 1; }
.tgwhich { min-width: 8.5rem; }

.tgmeter { min-width: 4rem; font-size: var(--fs-s); font-variant-numeric: tabular-nums; color: var(--dim); }
.tgfoot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

/* the editor's "picture only" (editor.js togglePicture): the picture as large as the window allows, centred on black */
body.edpicture::before { content: ""; position: fixed; inset: 0; z-index: 999; background: #000; }
body.edpicture .edstage { position: fixed; inset: 0; z-index: 1000; margin: auto; border-radius: 0;
                          width: min(100vw, calc(100vh * 16 / 9)); height: min(100vh, calc(100vw * 9 / 16)); }
body.edpicture .edstage.preview.square { width: min(100vw, 100vh); height: min(100vw, 100vh); }
body.edpicture .edstage.preview.vertical { width: min(100vw, calc(100vh * 9 / 16)); height: min(100vh, calc(100vw * 16 / 9)); }
.warnline { margin: 6px 0 10px; padding: 8px 10px; border-left: 3px solid var(--no); background: var(--no-bg); border-radius: var(--r-s); }

/* Submit & next before choosing: a line of its own under the buttons, and the three answers ringed */
.jask { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid var(--no); background: var(--no-bg); color: var(--no);
        font-weight: 600; border-radius: var(--r-s); }
.verdicts.asking .act { box-shadow: 0 0 0 2px var(--no); animation: askpulse 0.9s ease-in-out 2; }
@keyframes askpulse { 50% { box-shadow: 0 0 0 4px var(--no-bg), 0 0 0 2px var(--no); } }
@media (prefers-reduced-motion: reduce) { .verdicts.asking .act { animation: none; } }

/* the player page (person.js): who claims them and what they've helped with; their tabs */
.pcontrib .cardhead { margin: 0 0 8px; font-size: var(--fs-l); }
.pstats { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pstat { display: flex; flex-direction: column; min-width: 6rem; }
.pstat strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
#ptabs { margin: 14px 0 8px; }
.ugroup { margin: 14px 0 18px; }
.umatch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 8px; }
.umatch h3 { margin: 0; font-size: var(--fs-m, 1rem); }
.maybelist { list-style: none; padding: 0; margin: 8px 0; }
.maybelist li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.maybelist li > a { font-weight: 650; }

/* ================= 4-up: the four cameras at once (the editor's Q, the goal page's 4-up button) ================= */
.edstage.quad .edvids { transform: none !important; width: 100% !important; height: 100% !important; }
.edstage.quad .edvids video { width: 50%; height: 50%; right: auto; bottom: auto; opacity: 1 !important; }
.edstage.quad .edvids video:nth-child(1) { left: 0; top: 0; }       .edstage.quad .edvids video:nth-child(2) { left: 50%; top: 0; }
.edstage.quad .edvids video:nth-child(3) { left: 0; top: 50%; }     .edstage.quad .edvids video:nth-child(4) { left: 50%; top: 50%; }
.edstage.quad .edframe, .edstage.quad .edfade { display: none; }
.edstage.quad.gap .edvids { visibility: visible; }
.edquad, .quadgrid { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.edquad[hidden], .quadgrid[hidden] { display: none; }
.edquadcell, .quadcell { position: relative; margin: 0; padding: 0; border: 2px solid transparent; background: transparent; cursor: pointer; border-radius: 0; }
.edquadcell span, .quadcell span { position: absolute; left: 6px; top: 6px; padding: 2px 6px; font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .55); border-radius: 4px; }
.edquadcell:hover, .quadcell:hover { border-color: rgba(255, 255, 255, .5); }
.edquadcell.on { border-color: #fcd34d; }
.edquadcell.on span { background: #fcd34d; color: #111; }
.edshell .edquadbtn.on { color: var(--ed-key); }
/* the goal page's 4-up: the player's own video shrinks to the top-left quarter (a transform, so nothing below moves);
   the other cameras fill the other three; the controls stay on top */
.vwrap.quad > video { transform: scale(.5); transform-origin: 0 0; }
.vwrap .quadgrid { bottom: 0; }
.quadcell video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
.vwrap.quad #touch { display: none; }

/* ================= the quick editor: the goal's admin page on a phone =================
   The full editor's look (its dark tokens, editor-tokens.css, with #quickedit), sized for a finger: nothing of the
   site around it (no header, footer, views or YouTube cards), Back small in the top right, the picture edge to edge. */
body.quickedit { background: #0e0e10; color-scheme: dark; }
body.quickedit #bar, body.quickedit #foot, body.quickedit #viewscard, body.quickedit #ytcard, body.quickedit #igcard { display: none !important; }
body.quickedit #main, body.quickedit #goaladmin { padding: 0; margin: 0; max-width: none; }
#quickedit { --ed-ctl-h: 40px; --ed-ctl-px: 12px; --ed-fs: 14px; --ed-fs-label: 13px; --ed-r: 6px;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--ed-bg-0); }
.qe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; justify-items: stretch; }   /* minmax: a long line never widens it past the screen */
.qe[hidden] { display: none; }
.qe > :not(.qestage):not(dialog) { margin-inline: 12px; }
.qe .act, .qe .tab { min-height: var(--ed-ctl-h); height: auto; padding: 0 var(--ed-ctl-px); font-size: var(--ed-fs-label); color: var(--ed-text);
  background: var(--ed-bg-2); border: 1px solid var(--ed-border-strong); border-radius: var(--ed-r); box-shadow: none; }
.qe .act:hover:not(:disabled), .qe .tab:hover:not(:disabled) { background: var(--ed-bg-3); }
.qe .act.yes { color: #fff; background: var(--ed-accent); border-color: var(--ed-accent); }
.qe .act:disabled { color: var(--ed-text-3); }
/* a segmented group, like the editor's: one outline, the chosen one lit in the accent */
.qeseg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ed-border-strong); border-radius: var(--ed-r); overflow: hidden; background: var(--ed-bg-2); }
.qe .qeseg > .act, .qe .qeseg > .tab { border: 0; border-radius: 0; background: transparent; }
.qe .qeseg > :not(:first-child) { border-left: 1px solid var(--ed-border); }
.qe .qeseg > .on { background: var(--ed-accent-soft); color: var(--ed-accent); }
.qetop { display: flex; align-items: center; gap: 8px; min-width: 0; padding-top: 8px; }
.qesaved { flex: 1; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qe .qeback { flex: none; text-decoration: none; display: inline-flex; align-items: center; }
.qestage { position: relative; justify-self: center; overflow: hidden; background: #000; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; aspect-ratio: 9 / 16; }
.qestage.square { aspect-ratio: 1; }
.qestage video { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.qestage.held { outline: 2px solid var(--ed-key); outline-offset: -2px; }
.qehint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 3px 9px; font-size: 12px; color: #fff;
  background: rgba(0, 0, 0, .55); border-radius: 999px; pointer-events: none; white-space: nowrap; }
.qetime { min-width: 0; font: 13px/1 var(--ed-mono); font-variant-numeric: tabular-nums; color: var(--ed-text-2); }
/* the timeline under the picture: only shows (the whole footage, the part kept, the playhead, the keyframes) */
.qeline { position: relative; height: 6px; margin-inline: 0 !important; background: var(--ed-bg-2); margin-top: -4px; }
.qefill { position: absolute; top: 0; bottom: 0; background: var(--ed-accent-line); }
.qehead { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ed-playhead); }
.qedots { position: absolute; inset: 0; }
.qedots i { position: absolute; top: 1px; width: 4px; height: 4px; margin-left: -2px; background: var(--ed-key); transform: rotate(45deg); }
/* the scrub pad: half the width, centred; drag a thumb across it */
.qescrubrow { display: flex; justify-content: center; margin-inline: 0 !important; }   /* half of the page, not of the padded column */
.qescrub { display: flex; align-items: center; justify-content: space-between; width: 65%; min-width: 200px; height: 48px; padding: 0 14px;
  box-sizing: border-box; color: var(--ed-text-2); background: var(--ed-bg-2); border: 1px solid var(--ed-border-strong); border-radius: var(--ed-r);
  touch-action: none; -webkit-user-select: none; user-select: none; cursor: ew-resize; font-size: 16px; }
.qescrub.held { color: var(--ed-accent); border-color: var(--ed-accent-line); background: var(--ed-bg-3); }
.qescrubtext { font-size: 13px; color: var(--ed-text-2); }
/* Play / Pause, big, between to the start and to the end */
.qeplayrow { display: flex; align-items: center; justify-content: center; gap: 12px; }
.qe .qeplay { width: 72px; height: 56px; border-radius: 28px; justify-content: center; }
.qeicon { width: 22px; height: 22px; }
.qe .qeplay .qeicon { width: 28px; height: 28px; }
.qe button, .qe a, .qestage, .qescrub { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.qestage, .qescrub { touch-action: none; }
.qehead.outside { opacity: .4; }
.qe .qeplay.on { color: var(--ed-accent); }
.qe .qeskip { width: 48px; font-size: 16px; justify-content: center; }
.qe .qeskip:disabled { opacity: .35; }
.qetime { text-align: center; font: 12px/1 var(--ed-mono); font-variant-numeric: tabular-nums; color: var(--ed-text-2); }
.qerow { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.qecams { justify-self: center; }
/* the panels over the page: Save version (a name) and Versions */
.qesheet { width: min(100vw - 24px, 440px); max-height: 80dvh; overflow: auto; padding: 16px; color: var(--ed-text); background: var(--ed-bg-1);
  border: 1px solid var(--ed-border-strong); border-radius: 10px; }
.qesheet::backdrop { background: rgba(0, 0, 0, .6); }
.qesheet h3 { margin: 0 0 10px; font-size: 15px; }
.qesave { display: grid; gap: 12px; }
.qesave input { min-width: 0; min-height: 44px; font-size: 16px; color: var(--ed-text); background: var(--ed-bg-0);
  border: 1px solid var(--ed-border-strong); border-radius: var(--ed-r); padding: 0 10px; }   /* 16px: smaller, an iPhone zooms the page in on a tap */
.qever { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--ed-border); }
.qeveracts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* one screen: nothing scrolls (the picture is sized to fit, quickedit.js) */
html:has(body.quickedit), body.quickedit { overflow: hidden; overscroll-behavior: none; }
/* the 4-up cells fill their quarter (the editor gives every button one control's height, the site a minimum) */
.edshell .edquad .edquadcell, .vwrap .quadgrid .quadcell { width: auto; height: auto; min-height: 0; padding: 0; align-self: stretch; justify-self: stretch; box-shadow: none; }
.edshell .edquad .edquadcell, .edshell .edquad .edquadcell:hover:not(:disabled), .vwrap .quadgrid .quadcell, .vwrap .quadgrid .quadcell:hover:not(:disabled) {
  background: transparent; border: 3px solid transparent; border-radius: 0; }
.edshell .edquad .edquadcell:hover:not(:disabled), .vwrap .quadgrid .quadcell:hover:not(:disabled) { border-color: rgba(255, 255, 255, .5); }
.edshell .edquad .edquadcell.on, .edshell .edquad .edquadcell.on:hover:not(:disabled) { border-color: #fcd34d; }
/* 5-up (the editor's T): the edit large on top -- the camera on air's own video -- and every camera in a row below it, a
   quarter as wide (canvases drawn from the videos). A 16:9 picture over a row of four 16:9 quarters: the stage is 64:45,
   the large one its top four fifths. */
.edstage.five { aspect-ratio: 64 / 45; width: min(100%, max(560px, calc((100vh - var(--edchrome)) * 64 / 45))); }
.edstage.five .edvids { transform: none !important; width: 100% !important; height: 80% !important; }
.edstage.five .edvids video { opacity: 0 !important; }
.edstage.five .edvids video.big { opacity: 1 !important; }
.edstage.five .edframe, .edstage.five .edfade { display: none; }
.edstage.five.gap .edvids { visibility: visible; }
.edfive { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-rows: 4fr 1fr; pointer-events: none; }
.edfive[hidden] { display: none; }
.edfivebig { position: relative; }
.edfivelabel { position: absolute; left: 6px; top: 6px; padding: 2px 6px; font-size: 12px; font-weight: 600; color: #111; background: #fcd34d; border-radius: 4px; }
.edfiverow { display: grid; grid-template-columns: repeat(4, 1fr); pointer-events: auto; background: #000; }
.edshell .edfive .edfivecell, .edshell .edfive .edfivecell:hover:not(:disabled) { position: relative; width: auto; height: auto; min-height: 0; padding: 0;
  background: #000; border: 3px solid transparent; border-radius: 0; cursor: pointer; overflow: hidden; }
.edshell .edfive .edfivecell:hover:not(:disabled) { border-color: rgba(255, 255, 255, .5); }
.edshell .edfive .edfivecell.on, .edshell .edfive .edfivecell.on:hover:not(:disabled) { border-color: #fcd34d; }
.edfivecv { position: absolute; inset: 0; width: 100%; height: 100%; }
.edfivecell span { position: absolute; left: 4px; top: 4px; padding: 1px 5px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .6); border-radius: 3px; }
.edfivecell.on span { background: #fcd34d; color: #111; }

/* Switching (editor.js setSwitching; the owner, 2026-10-10): 5-up on the whole screen for a camera-switching edit. The
   side panel, the timeline's tools, its sound lanes and everything below the editor step aside; the picture (cameras)
   takes the height that frees. */
body.edswitch #main { padding: 0; max-width: none; }
body.edswitch #goaladmin > :not(#editcard), body.edswitch #editcard > :not(.edtop):not(.edtlcard) { display: none !important; }
body.edswitch #editcard { border-radius: 0; }
body.edswitch, body.edswitch #main, body.edswitch #goaladmin { margin: 0; padding: 0; }
body.edswitch .edtop { grid-template-columns: minmax(0, 1fr) !important; }
body.edswitch .edside, body.edswitch .edtools { display: none; }
body.edswitch .edstage.five { width: min(100%, calc((100vh - 205px) * 64 / 45)); }
body.edswitch .edtlcard { margin-top: 6px !important; padding: 0 10px !important; }
body.edswitch .edtimeline, body.edswitch .edlanelabels, body.edswitch .edtrack { --ed-audio-h: 0px; }
body.edswitch .edtrack > .edlane:not(.edvideo), body.edswitch .edlanelabels span:not(:first-child) { visibility: hidden; overflow: hidden; }
body.edswitch .edtrack { margin-bottom: 4px; }
/* the preview's home page: a link to the punch list (never on the live site) */
.punchlink { margin: 0 0 14px; padding: 10px 14px; border: 1.5px solid #e5252a; border-radius: var(--r); background: var(--surface); font-size: var(--fs-s); }
.punchlink b { margin-right: 8px; color: #e5252a; letter-spacing: .08em; }
.punchlink a { font-weight: 600; }
#edsrc:empty { display: none; }
/* the playlist a goal was opened from (goal.js): "Featured · 3 of 40", and its end */
.gplaylist { margin: 2px 0 6px; font-size: var(--fs-s); }
.gplaylist a { font-weight: 600; }
.plend { margin: 6px 0; padding: 8px 10px; font-size: var(--fs-s); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); }
.badge.promoted { background: #fcd34d; color: #111; }
/* Needs names by tournament, as a path: Newest Goals → Needs names → <tournament ▾> (the last step is the picker) */
.nnfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 12px; font-size: var(--fs-s); color: var(--dim); }
.nnsep { color: var(--dim); opacity: .7; }
.nnpickwrap { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.nnfilter select { min-width: 0; max-width: 100%; height: auto; padding: 2px 22px 2px 6px; font: inherit; font-weight: 600; color: var(--text);
  background-color: transparent; border: 1px solid transparent; border-radius: var(--r-s); cursor: pointer; }
.nnfilter select:hover { border-color: var(--line); }
.nnfilter select.on { color: var(--text); background-color: var(--surface); border-color: var(--line-2, var(--line)); }
.nnclear { min-height: 0; height: auto; padding: 2px 6px; font-size: 12px; color: var(--dim); background: transparent; border: 0; cursor: pointer; }
.nnclear:hover { color: var(--text); }
/* the Tags card's Submit (judge.js): the points earned, shown when it is pressed; and what points buy */
.jpoints { margin: 8px 0 0; min-height: 1.4em; font-size: var(--fs-s); color: var(--dim); }
.jpoints strong { color: var(--yes, #1f8f4e); font-size: 1.25em; }
.jpoints.on strong { display: inline-block; animation: jpop .5s ease-out; }
@keyframes jpop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .jpoints.on strong { animation: none; } }
.jspend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--fs-s); }
.jspend .jbal { font-weight: 600; }
.jspend .jnote { flex: 1 0 100%; min-width: 0; }
.judgenav .submitbtn { font-weight: 700; }
.setform { display: grid; gap: 10px; max-width: 34rem; } .setrow { display: grid; grid-template-columns: 16rem 7rem auto; align-items: center; gap: 10px; }
.ptsum { font-size: var(--fs-m); } .ptrow { margin: 6px 0; }
.samelinked { margin: 6px 0 8px; font-size: var(--fs-s); }

/* the Tags card, tighter (the owner, 2026-10-10): tag buttons a quarter smaller, less space between parts; Prev / Next /
   Submit right under the tags */
@media (hover: hover) and (pointer: fine) {          /* a computer: a phone keeps tags big enough to tap (30 px and up) */
  .tagcard #judge .tagbtn { font-size: calc(var(--fs-s) * .9); padding: 3px 8px; min-height: 0; height: auto; gap: 4px; }
  .tagcard #judge .tagbtn kbd { font-size: 10px; padding: 0 3px; }
}
.tagcard .tagset .tagrowc { margin: 4px 0; gap: 4px; }
.tagcard .verdicts { margin: 4px 0; gap: 4px; }
.tagcard .cardhead { margin: 0 0 2px; }
.tagcard .jflash { margin: 0; height: 1em; }
.tagcard .jpoints { margin: 2px 0 0; min-height: 0; }
.tagcard .jpoints:empty { display: none; }
.tagcard .judgenav { margin: 6px 0 0; }
.tagcard #peopleSummary { margin-top: 10px; padding-top: 8px; }
.tagcard .fact { margin: 4px 0; }
/* the Autoplay switch (the owner): black words; no fill when off, white when on */
.autoplaybtn, .autoplaybtn:hover:not(:disabled) { color: var(--text); background: transparent; border-color: var(--line); }
.autoplaybtn.on, .autoplaybtn.on:hover:not(:disabled) { color: #111; background: #fff; border-color: var(--line-2, #bbb); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
/* sliding a cut (editor.js rollJoin): the two frames that meet at it, side by side over the stage */
.edroll { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #000; pointer-events: none; }
.edroll[hidden] { display: none; }
.edrollcell { position: relative; display: flex; align-items: center; justify-content: center; background: #000; }
.edrollcell video { width: 100%; height: 100%; object-fit: contain; }
.edrollcell span { position: absolute; left: 6px; top: 6px; padding: 2px 6px; font: 600 12px var(--ed-mono, monospace); color: #111; background: #fcd34d; border-radius: 4px; }
.edjoin { cursor: ew-resize; }
/* marking a club's goals (clubmark.js, the preview only) */
.cmgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .cmgrid { grid-template-columns: 1fr; } }
#cmplayer { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); }
.cmrow .act kbd { margin-left: 4px; }
.cmpick select { margin-left: 6px; }
.cmlist { margin: 0 0 12px; padding-left: 1.6em; max-height: 60vh; overflow: auto; }
.cmlist li { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-variant-numeric: tabular-nums; }
.cmlog { max-height: 220px; overflow: auto; font-size: 11px; white-space: pre-wrap; background: var(--surface-2); padding: 8px; border-radius: var(--r-s); }
.cmnotadmin { padding: 12px 14px; border: 1.5px solid var(--warn, #b4531b); border-radius: var(--r); background: var(--surface); }
.cmkinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin-top: 8px; }
.cmkinds .cmk { justify-content: center; }
.cmkinds .cmk.hit { animation: cmhit .35s ease-out; }
@keyframes cmhit { 0% { transform: scale(.94); } 100% { transform: scale(1); } }
.cmkind { flex: 1; min-width: 4.5em; font-size: var(--fs-s); font-weight: 600; }
.cmlist li.k-goal .cmkind { color: var(--yes, #1f8f4e); }
.cmhist { margin-top: 12px; font-size: var(--fs-s); } .cmhist ol { padding-left: 1.4em; } .cmhist li { margin: 4px 0; }
/* the stringout (stringout.js): the stretches as a bar under the player, the playhead on it */
#soplayer { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); }
.sobar { position: relative; height: 30px; margin-top: 8px; cursor: pointer; }
.sostretches { display: flex; gap: 2px; height: 100%; }
.sostretches span { background: var(--surface-2); border-radius: 2px; }
.sohead { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--yes, #1f8f4e); pointer-events: none; }
.sorates { display: inline-flex; gap: 4px; }
.sorates .act.on { outline: 2px solid var(--yes, #1f8f4e); }
#sogoal.hit { animation: cmhit .35s ease-out; }
.sochips { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; margin: 8px 0; }
.sochip { padding: 6px 0; border-radius: var(--r-s); border: 1px solid var(--line, #444); background: var(--surface); color: inherit;
  font-variant-numeric: tabular-nums; cursor: pointer; }
.sochip.hit { background: var(--yes, #1f8f4e); color: #fff; border-color: transparent; }
.sochip.on { outline: 2px solid var(--fg, #fff); outline-offset: 1px; font-weight: 700; }

/* The player page (the owner, 2026-10-18): who they are in a card at the upper right, their goals, assists and penalties
   beside it. On a phone the card comes first, above the tabs. A team's page uses the same layout. */
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); grid-template-areas: "main info"; gap: 0 24px; align-items: start; }
.pgrid .pinfo { grid-area: info; position: sticky; top: 72px; margin: 0; }
.pgrid .pmain { grid-area: main; min-width: 0; }
.pinfo h1 { margin: 0 0 4px; font-size: var(--fs-xl, 1.6rem); line-height: 1.15; }
.pinfo #paka, .pinfo #pstats { margin: 0 0 6px; }
.pinfo .samebox { margin: 8px 0; }
.pinfo .pcontrib { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.pinfo .pcontrib .cardhead { font-size: var(--fs-m); }
.pinfo .linkbtn { padding: 0; border: 0; background: none; color: var(--dim); font-size: var(--fs-s); text-align: left; text-decoration: underline; cursor: pointer; }
.pinfo .samebox .sugwrap { flex: 1 1 12rem; }
.ptile .pwrong { font-size: var(--fs-s); }
@media (max-width: 860px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "main"; }
  .pgrid .pinfo { position: static; margin-bottom: 14px; }
}
