/* Tellscreen. Circles are people, rectangles are screens, red means recording. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(/fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --paper: #eceef2;
  --surface: #ffffff;
  --sunken: #e1e4ea;
  --ink: #1a1d23;
  --ink-2: #4a515e;
  --ink-3: #747b89;
  --line: #d5d9e0;
  --line-2: #c3c8d1;
  --tally: #e0262b;
  --tally-ink: #ffffff;
  --tally-soft: #fbe3e3;
  --ok: #157a3a;
  --wait: #8a5a00;
  --focus: #2b59ff;
  --shadow: 0 1px 2px rgba(20, 24, 33, 0.06), 0 8px 24px rgba(20, 24, 33, 0.08);
  --scrim: rgba(12, 14, 18, 0.62);
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wide: 122%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1114;
    --surface: #181b20;
    --sunken: #22262d;
    --ink: #eceef2;
    --ink-2: #b3b9c4;
    --ink-3: #858c99;
    --line: #2a2f37;
    --line-2: #3a404a;
    --tally: #ff4a45;
    --tally-ink: #ffffff;
    --tally-soft: #3b1518;
    --ok: #4cc27a;
    --wait: #e0a842;
    --focus: #7c9bff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
}
img,
video,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--r-s);
}
.skip:focus {
  left: 8px;
}
.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.num {
  font-variant-numeric: tabular-nums;
}
.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- top bar ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 32px);
  max-width: 1360px;
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 760;
  font-stretch: 125%;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand svg {
  width: 30px;
  height: 24px;
}
.bar nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.navlink {
  text-decoration: none;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: var(--r-s);
  font-weight: 550;
}
.navlink:hover {
  color: var(--ink);
  background: var(--sunken);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--r-m);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-weight: 560;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover {
  border-color: var(--ink-3);
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.btn.primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}
.btn.ghost:hover {
  background: var(--sunken);
  color: var(--ink);
}
.btn.danger {
  color: var(--tally);
}
.btn.danger.armed {
  background: var(--tally);
  border-color: var(--tally);
  color: var(--tally-ink);
}
.btn.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 14px;
  border-radius: 8px;
}
.btn .ico {
  width: 18px;
  height: 18px;
}
.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
}
.iconbtn:hover {
  background: var(--sunken);
  color: var(--ink);
}

input[type='text'],
input[type='password'],
input[type='search'],
input[type='url'],
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--r-m);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 15px;
}
textarea {
  resize: vertical;
  line-height: 1.45;
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-3);
}

/* ---------- toast ---------- */
.toasts {
  position: fixed;
  inset: auto auto 24px 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
  width: min(92vw, 420px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.toasts[popover]:not(:popover-open) {
  display: none;
}
.toast {
  background: var(--ink);
  color: var(--surface);
  padding: 11px 16px;
  border-radius: var(--r-m);
  font-weight: 560;
  font-size: 15px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: toast-in 0.18s ease-out;
}
.toast.err {
  background: var(--tally);
  color: var(--tally-ink);
}
@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* ---------- dialog ---------- */
dialog.sheet {
  border: 0;
  padding: 0;
  border-radius: var(--r-l);
  background: var(--surface);
  color: var(--ink);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  box-shadow: var(--shadow);
}
dialog.sheet::backdrop {
  background: var(--scrim);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 6px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 720;
  font-stretch: var(--wide);
}
.sheet-body {
  padding: 8px 20px 20px;
  display: grid;
  gap: 18px;
}
.field {
  display: grid;
  gap: 8px;
}
.field > .label {
  font-weight: 620;
  font-size: 15px;
}
.field .help {
  color: var(--ink-3);
  font-size: 14px;
  margin: 0;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}
.switch input {
  appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--line-2);
  position: relative;
  flex: none;
  cursor: pointer;
  transition: background 0.15s;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.switch input:checked {
  background: var(--ink);
}
.switch input:checked::after {
  transform: translateX(18px);
}
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 12px;
  background: var(--sunken);
}
.seg button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 9px;
  font-weight: 560;
  font-size: 14px;
  color: var(--ink-2);
}
.seg button[aria-checked='true'],
.seg button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.seg button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- recorder (home) ---------- */
.stage-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 16px 64px;
}
.stage {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: clamp(12px, 5vh, 56px) 0 24px;
}
.bubble {
  --level: 0;
  --ring: var(--line-2);
  position: relative;
  width: clamp(200px, 30vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sunken);
  display: grid;
  place-items: center;
  overflow: visible;
  isolation: isolate;
}
.bubble::before {
  content: '';
  position: absolute;
  inset: calc(-6px - var(--level) * 14px);
  border-radius: 50%;
  border: calc(4px + var(--level) * 6px) solid var(--ring);
  transition: inset 0.08s linear, border-width 0.08s linear, border-color 0.2s;
  z-index: -1;
}
.bubble video,
.bubble .bubble-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.bubble video {
  transform: scaleX(-1);
}
.bubble-off {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 15px;
  padding: 24px;
}
.bubble-off .ico {
  width: 40px;
  height: 40px;
  stroke-width: 1.4;
}
.bubble-off .btn {
  margin-top: 4px;
}
.count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 14, 18, 0.45);
  color: #fff;
  font-size: clamp(72px, 12vw, 120px);
  font-weight: 760;
  font-stretch: 125%;
  font-variant-numeric: tabular-nums;
}
.stage[data-state='recording'] .bubble {
  --ring: var(--tally);
}
.stage[data-state='paused'] .bubble {
  --ring: var(--wait);
}
.stage[data-state='countdown'] .bubble {
  --ring: var(--tally);
}

.lede {
  margin: 34px 0 0;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.08;
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}
.lede-sub {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  max-width: 40ch;
}
.btn-record {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 30px 0 22px;
  border-radius: 999px;
  border: 0;
  background: var(--tally);
  color: var(--tally-ink);
  font-size: 19px;
  font-weight: 700;
  font-stretch: 112%;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--tally) 35%, transparent);
  transition: transform 0.1s, box-shadow 0.15s;
}
.btn-record::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
}
.btn-record:hover {
  transform: translateY(-1px);
}
.btn-record:active {
  transform: translateY(1px);
}
.btn-record:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.choices {
  margin-top: 26px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.devices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.dev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-radius: var(--r-m);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  max-width: 300px;
}
.dev select {
  border: 0;
  background: transparent;
  min-height: 38px;
  padding: 6px 28px 6px 2px;
  font-size: 14px;
  color: var(--ink);
  max-width: 250px;
  text-overflow: ellipsis;
}
.dev.off {
  opacity: 0.5;
}
.hint {
  color: var(--ink-3);
  font-size: 14px;
  margin: 14px 0 0;
  max-width: 48ch;
  min-height: 1.5em;
}
.hint.err {
  color: var(--tally);
  font-weight: 560;
}

.live {
  margin-top: 30px;
  display: grid;
  justify-items: center;
  gap: 16px;
}
.clock {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 700;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.tally {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--tally);
  animation: blink 1.2s ease-in-out infinite;
}
.stage[data-state='paused'] .tally {
  background: var(--wait);
  animation: none;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.live-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.upload-state {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
}
.upload-state.warn {
  color: var(--wait);
}

.recent {
  max-width: 1100px;
  margin: 40px auto 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  font-stretch: var(--wide);
}

/* ---------- video cards ---------- */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px 18px;
}
.card {
  position: relative;
  display: grid;
  gap: 8px;
}
.card .thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--sunken);
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card .thumb .dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(12, 14, 18, 0.72);
  color: #fff;
  font-size: 12.5px;
  font-weight: 620;
  padding: 2px 7px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
.card .thumb .badge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.card .thumb .badge .ico {
  width: 14px;
  height: 14px;
}
.card .thumb .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 14px;
}
.card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 640;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.card h3 a {
  text-decoration: none;
}
.card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.card .menu {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
}
.card .menu .iconbtn {
  background: rgba(12, 14, 18, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 0.12s;
}
.card:hover .menu .iconbtn,
.card .menu .iconbtn:focus-visible,
.card .menu[data-open] .iconbtn {
  opacity: 1;
}
@media (hover: none) {
  .card .menu .iconbtn {
    opacity: 1;
  }
}
.popover {
  position: absolute;
  right: 0;
  top: 40px;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow);
  padding: 6px;
  display: grid;
  z-index: 20;
}
.popover button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 14.5px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.popover button:hover {
  background: var(--sunken);
}
.popover button.danger {
  color: var(--tally);
}
.popover button.danger.armed {
  background: var(--tally);
  color: var(--tally-ink);
}
.empty {
  text-align: center;
  padding: 56px 16px;
  color: var(--ink-2);
  display: grid;
  justify-items: center;
  gap: 12px;
}
.empty h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-stretch: var(--wide);
}

/* ---------- player ---------- */
.tp {
  position: relative;
  background: #0b0c0f;
  border-radius: var(--r-l);
  overflow: hidden;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.tp:fullscreen {
  border-radius: 0;
}
.tp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 16 / 9);
  max-height: calc(100vh - 140px);
  margin: 0 auto;
}
.tp:fullscreen .tp-stage {
  max-height: none;
  height: 100%;
  aspect-ratio: auto;
}
.tp-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0c0f;
}
.tp-main::cue {
  font-family: var(--font);
  font-size: clamp(14px, 2.4vw, 26px);
  background: rgba(0, 0, 0, 0.72);
}
.tp-cam {
  position: absolute;
  border-radius: 50%;
  object-fit: cover;
  background: #22262d;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 2;
  transition: transform 0.2s ease;
}
/* While the controls are showing, a bottom bubble moves up so the timeline never covers a face. */
.tp:not(.idle) .tp-cam.low {
  transform: translateY(calc(-1 * var(--lift, 0px)));
}
.tp-big {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  border: 0;
  background: rgba(16, 18, 22, 0.62);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 3;
  backdrop-filter: blur(6px);
  transition: transform 0.12s, background 0.12s;
}
.tp-big:hover {
  transform: scale(1.06);
  background: rgba(16, 18, 22, 0.78);
}
.tp-big .ico {
  width: 40px;
  height: 40px;
  margin-left: 4px;
}
.tp-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}
.tp-spin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  z-index: 3;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.tp-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  z-index: 4;
  background: rgba(11, 12, 15, 0.82);
  font-size: 16px;
}
.tp-end {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  z-index: 4;
  background: rgba(11, 12, 15, 0.7);
  backdrop-filter: blur(3px);
}
.tp-end .btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.tp-end .btn.cta {
  background: #fff;
  color: #111;
  border-color: #fff;
  min-height: 48px;
  padding: 0 22px;
  font-size: 17px;
}
.tp-floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.tp-floaters span {
  position: absolute;
  bottom: 64px;
  font-size: 34px;
  animation: float-up 1.9s ease-out forwards;
}
@keyframes float-up {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-20px) scale(1.1);
  }
  100% {
    transform: translateY(-180px) scale(1);
    opacity: 0;
  }
}
.tp-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 26px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  transition: opacity 0.2s;
}
.tp.idle.playing .tp-bar {
  opacity: 0;
}
.tp.idle.playing {
  cursor: none;
}
.tp-bar .tb {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-weight: 640;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.tp-bar .tb:hover {
  background: rgba(255, 255, 255, 0.14);
}
.tp-bar .tb[aria-pressed='false'] {
  opacity: 0.55;
}
.tp-bar .ico {
  width: 22px;
  height: 22px;
}
.tp-time {
  font-size: 14px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  padding: 0 6px;
  white-space: nowrap;
}
.tp-track {
  position: relative;
  flex: 1;
  height: 38px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  margin: 0 6px;
}
.tp-rail {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  transition: height 0.1s;
}
.tp-track:hover .tp-rail,
.tp-track.drag .tp-rail {
  height: 8px;
}
.tp-buf,
.tp-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}
.tp-buf {
  background: rgba(255, 255, 255, 0.32);
}
.tp-fill {
  background: #fff;
}
.tp-chaps i {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 3px;
  margin-left: -1.5px;
  background: rgba(11, 12, 15, 0.9);
}
.tp-knob {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transform: scale(0);
  transition: transform 0.1s;
}
.tp-track:hover .tp-knob,
.tp-track.drag .tp-knob,
.tp-track:focus-visible .tp-knob {
  transform: scale(1);
}
.tp-marks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 0;
}
.tp-marks b {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.tp-marks b.c {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd75e;
  border: 1.5px solid rgba(0, 0, 0, 0.5);
}
.tp-trimsel {
  position: absolute;
  top: -3px;
  bottom: -3px;
  border: 2px solid #ffd75e;
  border-radius: 4px;
  pointer-events: none;
}
.tp-tip {
  position: absolute;
  bottom: 30px;
  transform: translateX(-50%);
  background: rgba(16, 18, 22, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 560;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  display: grid;
  justify-items: center;
}
.tp-tip .c {
  color: #c9ced8;
  font-weight: 500;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tp-menu {
  position: absolute;
  bottom: 52px;
  right: 10px;
  background: rgba(16, 18, 22, 0.96);
  border-radius: 10px;
  padding: 6px;
  display: grid;
  z-index: 8;
  min-width: 120px;
}
.tp-menu button {
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.tp-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}
.tp-menu button[aria-checked='true'] {
  font-weight: 700;
}
.tp-menu button[aria-checked='true']::after {
  content: '  ✓';
}
.tp-vol {
  width: 0;
  opacity: 0;
  transition: width 0.15s, opacity 0.15s;
  accent-color: #fff;
}
.tp-volwrap:hover .tp-vol,
.tp-vol:focus-visible {
  width: 72px;
  opacity: 1;
}
.tp-volwrap {
  display: flex;
  align-items: center;
}
@media (max-width: 640px) {
  .tp-bar {
    padding: 22px 4px 4px;
    gap: 0;
  }
  .tp-bar .tb {
    min-width: 34px;
  }
  .tp-volwrap .tp-vol {
    display: none;
  }
  .tp-time .tp-dur-wrap {
    display: none;
  }
  .tp-big {
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
  }
}

/* ---------- watch page ---------- */
.watch {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 1020px) {
  .watch {
    grid-template-columns: minmax(0, 1fr);
  }
}
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.notice p {
  margin: 0;
  font-weight: 560;
}
.notice .muted {
  color: var(--ink-3);
  font-weight: 400;
}
.vhead {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}
.vtitle {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.15;
  font-weight: 720;
  font-stretch: 118%;
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
}
.vtitle[contenteditable='true'] {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 4px;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  color: var(--ink-3);
  font-size: 14.5px;
}
.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--ink-2);
  flex: none;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.reacts button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
  font-size: 18px;
  line-height: 1.2;
  transition: transform 0.1s;
}
.reacts button span {
  font-size: 13px;
  font-weight: 620;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.reacts button:hover {
  border-color: var(--ink-3);
}
.reacts button:active {
  transform: scale(0.94);
}
.summary {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--r-l);
  background: var(--surface);
  border: 1px solid var(--line);
}
.summary h2,
.panel h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  font-stretch: var(--wide);
}
.summary p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 72ch;
}
.points,
.chapters {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.points li,
.chapters li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.stamp {
  flex: none;
  border: 0;
  background: var(--sunken);
  color: var(--ink);
  font-size: 13px;
  font-weight: 640;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
}
.stamp:hover {
  background: var(--line-2);
}
.chapters li button.ch {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-weight: 560;
  color: var(--ink);
  cursor: pointer;
}
.chapters li.now button.ch {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.subhead {
  margin: 18px 0 0;
  font-size: 15px;
  font-weight: 680;
}
.pending {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 15px;
}
.pending::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--ink-2);
  animation: spin 0.9s linear infinite;
  flex: none;
}

.panel {
  position: sticky;
  top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  min-height: 420px;
}
@media (max-width: 1020px) {
  .panel {
    position: static;
    max-height: none;
    min-height: 0;
  }
}
.tabs {
  display: flex;
  gap: 2px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 10px 12px 11px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.tabs button[aria-selected='true'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.tabs .count-badge {
  font-size: 12px;
  font-weight: 650;
  background: var(--sunken);
  border-radius: 999px;
  padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}
.tabpane {
  overflow: auto;
  padding: 12px 14px 16px;
  flex: 1;
  min-height: 0;
}
@media (max-width: 1020px) {
  .tabpane {
    max-height: 70vh;
  }
}
.tline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.5;
}
.tline:hover {
  background: var(--sunken);
}
.tline .stamp {
  margin-top: 1px;
  align-self: start;
}
.tline.now {
  background: color-mix(in srgb, var(--focus) 10%, transparent);
}
.tline .w.said {
  color: var(--ink);
}
.tline.now .w {
  color: var(--ink-3);
}
.tline.now .w.said {
  color: var(--ink);
}
.tline mark {
  background: #ffe28a;
  color: #111;
  border-radius: 3px;
  padding: 0 1px;
}
.tline.out {
  opacity: 0.45;
}
.ttools {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 8px;
  position: sticky;
  top: -12px;
  background: var(--surface);
  z-index: 1;
  padding-top: 0;
}
.ttools input {
  min-height: 36px;
  font-size: 14px;
}
.composer {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.composer .row {
  justify-content: space-between;
}
.composer label.at {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-2);
}
.comment {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 10px 2px;
}
.comment + .comment {
  border-top: 1px solid var(--line);
}
.comment .head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}
.comment .head strong {
  font-weight: 650;
}
.comment .head .when {
  color: var(--ink-3);
  font-size: 13px;
}
.comment p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.comment .tools {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.comment .tools button {
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 5px;
}
.comment .tools button:hover {
  color: var(--ink);
  background: var(--sunken);
}
.comment .replies {
  grid-column: 2;
  border-left: 2px solid var(--line);
  padding-left: 10px;
  margin-top: 6px;
}
.comment .replies .comment {
  padding: 6px 0;
}
.owner-tag {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-2);
  background: var(--sunken);
  border-radius: 4px;
  padding: 1px 6px;
}
.viewer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 2px;
}
.viewer + .viewer {
  border-top: 1px solid var(--line);
}
.viewer .bar2 {
  height: 5px;
  border-radius: 3px;
  background: var(--sunken);
  overflow: hidden;
  margin-top: 5px;
}
.viewer .bar2 i {
  display: block;
  height: 100%;
  background: var(--ink-2);
}
.stats3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stats3 div {
  background: var(--sunken);
  border-radius: var(--r-m);
  padding: 10px 12px;
}
.stats3 b {
  display: block;
  font-size: 22px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}
.stats3 span {
  color: var(--ink-3);
  font-size: 13px;
}
.trimbox {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--r-l);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
}
.trimbar {
  position: relative;
  height: 44px;
  border-radius: 8px;
  background: var(--sunken);
  touch-action: none;
}
.trimbar .sel {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--focus) 22%, transparent);
  border-top: 2px solid var(--focus);
  border-bottom: 2px solid var(--focus);
}
.trimbar .h {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 16px;
  margin-left: -8px;
  border-radius: 6px;
  background: var(--focus);
  cursor: ew-resize;
  border: 0;
}
.trimbar .play {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  margin-left: -1px;
  background: var(--tally);
  pointer-events: none;
}
.corner-picks {
  display: grid;
  grid-template-columns: repeat(2, 44px);
  gap: 6px;
}
.corner-picks button {
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  position: relative;
}
.corner-picks button::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-3);
}
.corner-picks button[data-pos='tl']::after {
  left: 5px;
  top: 5px;
}
.corner-picks button[data-pos='tr']::after {
  right: 5px;
  top: 5px;
}
.corner-picks button[data-pos='bl']::after {
  left: 5px;
  bottom: 5px;
}
.corner-picks button[data-pos='br']::after {
  right: 5px;
  bottom: 5px;
}
.corner-picks button[aria-pressed='true'] {
  border-color: var(--ink);
}
.corner-picks button[aria-pressed='true']::after {
  background: var(--tally);
}
.center-card {
  max-width: 440px;
  margin: 8vh auto;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--r-l);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
  text-align: center;
}
.center-card h1 {
  margin: 0;
  font-size: 24px;
  font-stretch: var(--wide);
}
.center-card p {
  margin: 0;
  color: var(--ink-2);
}
.codebox {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  min-height: 96px;
}
.search {
  position: relative;
  max-width: 420px;
  flex: 1;
}
.search .ico {
  position: absolute;
  left: 11px;
  top: 50%;
  margin-top: -10px;
  color: var(--ink-3);
}
.search input {
  padding-left: 38px;
}
.hits {
  display: grid;
  gap: 18px;
}
.hit h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.hit h3 a {
  text-decoration: none;
}
.hit h3 a:hover {
  text-decoration: underline;
}
.hit a.line {
  display: flex;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-2);
  padding: 5px 0;
  align-items: baseline;
}
.hit a.line:hover {
  color: var(--ink);
}
.lib-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 22px;
}
.lib-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 720;
  font-stretch: 125%;
  letter-spacing: -0.015em;
}
.devices-note {
  margin-top: 48px;
  padding: 18px 20px;
  border-radius: var(--r-l);
  border: 1px dashed var(--line-2);
  display: grid;
  gap: 10px;
  max-width: 720px;
}
.devices-note h2 {
  margin: 0;
  font-size: 17px;
}
.devices-note p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}
.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px) 64px;
}

/* ---------- floating controls (Document Picture-in-Picture window) ---------- */
body.pip {
  margin: 0;
  background: var(--surface);
  overflow: hidden;
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}
.pip-face {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px 10px 0;
  min-height: 0;
}
.pip-face .bubble {
  width: min(100%, calc(100vh - 78px));
}
.pip-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px;
}
.pip-bar .clock {
  font-size: 18px;
  gap: 7px;
  margin-right: auto;
  padding-left: 4px;
}
.pip-bar .tally {
  width: 10px;
  height: 10px;
}
.pip-bar .iconbtn {
  width: 34px;
  height: 34px;
}
.pip-bar .iconbtn.armed {
  background: var(--tally);
  color: var(--tally-ink);
}
.pip-bar .stop {
  border: 0;
  border-radius: 999px;
  background: var(--tally);
  color: var(--tally-ink);
  font-weight: 700;
  font-size: 14px;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pip-bar .stop::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: currentColor;
}
body.pip.paused .tally {
  background: var(--wait);
  animation: none;
}
body.pip.noface {
  grid-template-rows: auto;
}
/* Sharing the whole screen: this window is in the recording, so it is simply the camera, edge to edge. */
body.pip.monitor {
  background: #000;
  display: block;
  position: relative;
}
body.pip.monitor .pip-face {
  position: absolute;
  inset: 0;
  padding: 0;
}
body.pip.monitor .pip-face .bubble {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}
body.pip.monitor .pip-face .bubble::before {
  display: none;
}
body.pip.monitor .pip-face .bubble video {
  border-radius: 0;
}
body.pip.monitor .pip-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  color: #fff;
  padding-top: 26px;
  opacity: 0;
  transition: opacity 0.2s;
}
body.pip.monitor:hover .pip-bar,
body.pip.monitor.paused .pip-bar {
  opacity: 1;
}
body.pip.monitor .pip-bar .iconbtn {
  color: #fff;
}
body.pip.monitor .pip-bar .iconbtn:hover {
  background: rgba(255, 255, 255, 0.16);
}
body.pip.noface .pip-face {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
