/* Sumarrry: Notion-inspired UI */

@view-transition { navigation: auto; }

:root {
  --bg: #ffffff;
  --sidebar: #f8f8f7;
  --card: #ffffff;
  --text: #37352f;
  --text-2: #787774;
  --text-3: #a5a29c;
  --border: rgba(55, 53, 47, .09);
  --border-strong: rgba(55, 53, 47, .16);
  --hover: rgba(55, 53, 47, .06);
  --hover-2: rgba(55, 53, 47, .1);
  --input: rgba(242, 241, 238, .6);
  --blue: #2383e2;
  --blue-hover: #0077d4;
  --blue-soft: rgba(35, 131, 226, .1);
  --red: #e03e3e;
  --red-soft: rgba(224, 62, 62, .08);
  --rec: #eb5757;
  --green: #0f7b6c;
  --tooltip: #0f0f0f;
  --card-shadow: rgba(15, 15, 15, .06) 0 0 0 1px, rgba(15, 15, 15, .04) 0 2px 4px;
  --card-shadow-hover: rgba(15, 15, 15, .06) 0 0 0 1px, rgba(15, 15, 15, .08) 0 6px 14px, rgba(15, 15, 15, .08) 0 18px 40px;
  --pop-shadow: rgba(15, 15, 15, .05) 0 0 0 1px, rgba(15, 15, 15, .1) 0 3px 6px, rgba(15, 15, 15, .2) 0 9px 24px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  --sb-w: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919;
    --sidebar: #202020;
    --card: #202020;
    --text: rgba(255, 255, 255, .86);
    --text-2: rgba(255, 255, 255, .5);
    --text-3: rgba(255, 255, 255, .32);
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .14);
    --hover: rgba(255, 255, 255, .055);
    --hover-2: rgba(255, 255, 255, .09);
    --input: rgba(255, 255, 255, .055);
    --blue-soft: rgba(35, 131, 226, .18);
    --red: #ff7369;
    --red-soft: rgba(255, 115, 105, .12);
    --green: #4dab9a;
    --card-shadow: rgba(255, 255, 255, .07) 0 0 0 1px;
    --card-shadow-hover: rgba(255, 255, 255, .1) 0 0 0 1px, rgba(0, 0, 0, .4) 0 10px 30px;
    --pop-shadow: rgba(255, 255, 255, .08) 0 0 0 1px, rgba(0, 0, 0, .3) 0 3px 6px, rgba(0, 0, 0, .45) 0 9px 24px;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(35, 131, 226, .28); }

.ico { width: 16px; height: 16px; flex: none; }

/* ---------- keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.92); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes ring { from { transform: scale(1); opacity: .6; } to { transform: scale(2.6); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bump { 40% { transform: scale(1.22); } }
@keyframes live-glow { 50% { box-shadow: 0 0 0 2px var(--rec), 0 0 34px 2px rgba(235, 87, 87, .35); } }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

::view-transition-old(root) { animation: vt-out .16s ease-in both; }
::view-transition-new(root) { animation: vt-in .38s var(--ease-out) both; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.3, .9, .2, 1); }
::view-transition-old(sidebar), ::view-transition-new(sidebar) { animation: none; }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sb-w); flex: none; height: 100vh; position: sticky; top: 0;
  background: var(--sidebar); display: flex; flex-direction: column;
  padding: 8px 0 10px; overflow: hidden;
  box-shadow: inset -1px 0 0 var(--border);
  view-transition-name: sidebar;
  transition: margin-left .38s var(--ease-out), opacity .3s;
  z-index: 40;
}
.sb-collapsed .sidebar { margin-left: calc(-1 * var(--sb-w)); opacity: 0; }
.viewer .sidebar { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sb-ws {
  display: flex; align-items: center; gap: 8px; margin: 0 8px 8px; padding: 0 8px; height: 36px;
  border-radius: 6px; font-weight: 600; font-size: 14px; transition: background .15s;
}
.sb-ws:hover { background: var(--hover); }
.sb-ws-icon {
  width: 22px; height: 22px; border-radius: 5px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #2f2f2f, #5c5c5c); color: #fff; font-size: 12px; font-weight: 700;
}
@media (prefers-color-scheme: dark) { .sb-ws-icon { background: linear-gradient(135deg, #e8e8e6, #b9b8b4); color: #191919; } }
.sb-ws span:nth-child(2) { flex: 1; }
.sb-collapse { opacity: 0; transition: opacity .15s; }
.sidebar:hover .sb-collapse { opacity: 1; }

.sb-item {
  display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; margin: 1px 8px;
  border-radius: 6px; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer;
  border: 0; background: transparent; width: calc(100% - 16px); text-align: left;
  transition: background .15s, color .15s;
}
.sb-item:hover { background: var(--hover); color: var(--text); }
.sb-item:active { background: var(--hover-2); }
.sb-item.active { background: var(--hover-2); color: var(--text); }
.sb-item .ico { width: 17px; height: 17px; }
.sb-item .label-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item .emoji { width: 18px; text-align: center; font-size: 14px; flex: none; }
.sb-section { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 18px 18px 4px; }
.sb-recent { overflow-y: auto; flex: 1; min-height: 0; }
.sb-recent .sb-item { animation: rise .4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 30ms); }
.sb-foot { padding: 8px 18px 0; font-size: 12px; color: var(--text-3); }
.sb-scrim { display: none; }

/* ---------- top bar ---------- */
.topbar {
  height: 46px; display: flex; align-items: center; gap: 4px; padding: 0 12px;
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 14px; }
.crumb {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; height: 26px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; transition: background .15s;
}
a.crumb:hover { background: var(--hover); }
.crumb-sep { color: var(--text-3); }
.topbar .sb-open { display: none; }
.sb-collapsed .topbar .sb-open { display: inline-flex; }
.spacer { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.brand-mark {
  width: 20px; height: 20px; border-radius: 5px; display: inline-grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #2f2f2f, #5c5c5c);
}
.brand-mark::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: 6px; border: 0;
  background: transparent; color: var(--text-2); cursor: pointer;
  font-size: 14px; font-weight: 500; white-space: nowrap; user-select: none;
  transition: background .15s, color .15s, box-shadow .15s, transform .15s var(--ease-out), opacity .15s;
}
.btn:hover { background: var(--hover); color: var(--text); }
.btn:active { transform: scale(.96); background: var(--hover-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-outline { box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text); }
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 15, 15, .1), 0 1px 2px rgba(15, 15, 15, .1);
}
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-primary:active { background: var(--blue-hover); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-rec { background: var(--rec); color: #fff; box-shadow: inset 0 0 0 1px rgba(15, 15, 15, .1), 0 1px 2px rgba(15, 15, 15, .1); }
.btn-rec:hover, .btn-rec:active { background: #d94848; color: #fff; }
.btn-ghost { background: transparent; }
.btn-icon { width: 32px; padding: 0; }
.btn-sm { height: 28px; padding: 0 8px; font-size: 13px; border-radius: 5px; }
.btn-sm.btn-icon { width: 28px; padding: 0; }
.btn-lg { height: 40px; padding: 0 16px; font-size: 15px; border-radius: 8px; }
.btn.copied { color: var(--green); }
.btn.copied .ico path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .35s var(--ease-out) forwards; }
.btn-primary.copied { background: var(--green); color: #fff; }
.toggle-on { background: var(--blue-soft); color: var(--blue); }
.toggle-on:hover { background: var(--blue-soft); color: var(--blue); }

.input, .select, .textarea {
  width: 100%; height: 32px; padding: 0 10px; border-radius: 6px; border: 0; outline: none;
  background: var(--input); box-shadow: inset 0 0 0 1px var(--border-strong);
  transition: box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 3px var(--blue-soft);
  background: var(--bg);
}
.select { appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px;
}
.select option { background: var(--bg); color: var(--text); }
.label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: 12.5px; color: var(--text-2); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 15px; height: 15px; accent-color: var(--blue); margin: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; background: var(--hover); color: #eb5757; padding: 6px 8px; border-radius: 5px; word-break: break-all; }

/* segmented control with sliding thumb */
.seg { position: relative; display: flex; background: var(--hover); border-radius: 7px; padding: 2px; gap: 2px; }
.seg::before {
  content: ""; position: absolute; top: 2px; bottom: 2px; left: var(--x, 2px); width: var(--w, 0);
  background: var(--bg); border-radius: 5px; box-shadow: 0 1px 2px rgba(15, 15, 15, .12), 0 0 0 1px var(--border);
  transition: left .35s var(--spring), width .35s var(--spring);
}
.seg button {
  position: relative; flex: 1; height: 26px; border: 0; border-radius: 5px; background: transparent;
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); transition: color .2s;
}
.seg button.on { color: var(--text); }

.card { background: var(--card); border-radius: 10px; box-shadow: var(--card-shadow); }

/* ---------- page header (Notion style) ---------- */
.page { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 clamp(16px, 6vw, 96px) 96px; }
.page.wide { max-width: 1320px; }
.page-icon {
  font-size: 72px; line-height: 1; margin-top: clamp(32px, 8vh, 84px); width: fit-content;
  user-select: none; cursor: default; display: inline-block;
  transition: transform .5s var(--spring);
  animation: pop-in .6s var(--spring) both;
}
.page-icon:hover { transform: rotate(-8deg) scale(1.08); }
.page-title {
  font-size: 40px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; margin: 14px 0 4px;
  word-break: break-word; animation: rise .5s var(--ease-out) .05s both;
}
.page-sub { color: var(--text-2); font-size: 15px; animation: rise .5s var(--ease-out) .1s both; }
[contenteditable="true"].page-title { outline: none; border-radius: 4px; cursor: text; }
[contenteditable="true"].page-title:empty::before { content: "Untitled"; color: var(--text-3); }

/* views bar */
.views {
  display: flex; align-items: center; gap: 2px; margin: 28px 0 14px; position: relative;
  box-shadow: inset 0 -1px 0 var(--border); padding-bottom: 6px;
  animation: rise .5s var(--ease-out) .15s both;
}
.vtab {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.vtab:hover { background: var(--hover); color: var(--text); }
.vtab.on { color: var(--text); }
.views-ind {
  position: absolute; bottom: -1px; height: 2px; border-radius: 2px; background: var(--text);
  left: var(--x, 0); width: var(--w, 0); transition: left .4s var(--spring), width .4s var(--spring);
}
.search { position: relative; display: flex; align-items: center; }
.search .input {
  width: 0; padding: 0; opacity: 0; transition: width .35s var(--ease-out), opacity .2s, padding .35s var(--ease-out);
}
.search.open .input { width: 200px; padding: 0 10px; opacity: 1; }
.stats { font-size: 13px; color: var(--text-3); margin-left: 6px; }

/* ---------- gallery ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.vcard {
  position: relative; overflow: hidden; background: var(--card); border-radius: 10px; box-shadow: var(--card-shadow);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background .2s;
  animation: rise .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms);
}
.vcard:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.vcard:active { transform: translateY(-1px) scale(.99); transition-duration: .15s; }
.vthumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease-out), filter .4s; }
.vcard:hover .vthumb img { transform: scale(1.05); filter: brightness(.86); }
.vthumb .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #777; font-size: 34px; }
.play-hint {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #111; display: grid; place-items: center;
  opacity: 0; transform: scale(.6); transition: opacity .25s, transform .45s var(--spring);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.play-hint .ico { width: 20px; height: 20px; margin-left: 3px; fill: currentColor; }
.vcard:hover .play-hint { opacity: 1; transform: scale(1); }
.badge {
  position: absolute; right: 8px; bottom: 8px; background: rgba(15, 15, 15, .72); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
}
.badge-left { left: 8px; right: auto; }
.badge-rec { background: var(--rec); }
.badge-rec::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #fff; margin-right: 5px; vertical-align: 1px; animation: pulse 1.2s infinite; }
.vbody { display: block; padding: 10px 12px 12px; }
.vtitle { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; font-size: 14px; }
.vmeta { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); align-items: center; }
.vmeta span { display: inline-flex; align-items: center; gap: 4px; }
.vmeta .ico { width: 13px; height: 13px; }
.vactions {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; padding: 2px; border-radius: 7px;
  background: var(--bg); box-shadow: var(--pop-shadow);
  opacity: 0; transform: translateY(-4px) scale(.96); transition: opacity .2s, transform .3s var(--ease-out);
}
.vcard:hover .vactions, .vcard:focus-within .vactions { opacity: 1; transform: none; }

/* ---------- list (table) ---------- */
.table { font-size: 14px; box-shadow: inset 0 1px 0 var(--border); }
.trow {
  display: grid; grid-template-columns: minmax(0, 1fr) 130px 80px 70px 80px 64px; align-items: center;
  min-height: 42px; box-shadow: inset 0 -1px 0 var(--border); transition: background .15s;
  animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 25ms);
}
.trow > * { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow:not(.thead):hover { background: var(--hover); }
.thead { min-height: 34px; color: var(--text-2); font-size: 13px; animation: none; }
.thead > span { display: inline-flex; align-items: center; gap: 6px; }
.tname { display: flex !important; align-items: center; gap: 10px; font-weight: 500; }
.tname img, .tname .tnoimg { width: 52px; height: 29px; border-radius: 4px; object-fit: cover; background: #222; flex: none; box-shadow: 0 0 0 1px var(--border); }
.tname .tnoimg { display: grid; place-items: center; font-size: 13px; }
.trow .muted { color: var(--text-2); font-size: 13px; }
.trow .tact { display: flex; justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.trow:hover .tact { opacity: 1; }
@media (max-width: 760px) {
  .trow { grid-template-columns: minmax(0, 1fr) 70px 56px; }
  .trow > :nth-child(2), .trow > :nth-child(5), .trow > :nth-child(6) { display: none; }
}

/* skeleton */
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--hover) 25%, var(--hover-2) 37%, var(--hover) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skel-card { aspect-ratio: 16 / 12.4; }

.empty { text-align: center; padding: 72px 20px; color: var(--text-2); animation: rise .5s var(--ease-out) both; }
.empty h2 { color: var(--text); margin: 14px 0 4px; font-size: 18px; font-weight: 600; }
.empty .big-ico { font-size: 54px; display: inline-block; animation: pop-in .6s var(--spring) both, float 4s ease-in-out .6s infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }

/* ---------- dialog / toast / popovers ---------- */
dialog {
  border: 0; border-radius: 12px; padding: 0; background: var(--bg); color: var(--text);
  box-shadow: var(--pop-shadow); width: min(480px, calc(100vw - 32px));
  opacity: 0; transform: translateY(10px) scale(.96);
  transition: opacity .2s ease, transform .4s var(--spring), overlay .3s allow-discrete, display .3s allow-discrete;
}
dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(10px) scale(.96); } }
dialog::backdrop { background: rgba(15, 15, 15, 0); transition: background .25s, overlay .3s allow-discrete, display .3s allow-discrete; }
dialog[open]::backdrop { background: rgba(15, 15, 15, .4); }
@starting-style { dialog[open]::backdrop { background: rgba(15, 15, 15, 0); } }
.dlg-body { padding: 22px 22px 6px; }
.dlg-body h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.dlg-body p { margin: 0 0 12px; color: var(--text-2); }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; }

.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px;
  background: var(--tooltip); color: rgba(255, 255, 255, .92); padding: 9px 14px; border-radius: 8px; font-size: 14px;
  box-shadow: rgba(15, 15, 15, .1) 0 0 0 1px, rgba(15, 15, 15, .25) 0 8px 24px;
  animation: toast-in .55s var(--spring) both;
}
.toast.out { animation: toast-out .25s ease-in forwards; }
.toast.error { background: #b8322f; }
.toast .ico { color: #4dab9a; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }

.progress { height: 6px; background: var(--hover-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; width: 0; border-radius: 99px; background: var(--blue); transition: width .35s var(--ease-out); position: relative; overflow: hidden; }
.progress > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shimmer 1.2s linear infinite; background-size: 200% 100%; }

/* ---------- recorder ---------- */
.rec-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 1000px) { .rec-layout { grid-template-columns: 1fr; } }
.stage-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; animation: rise .55s var(--ease-out) .12s both; }
.stage {
  position: relative; background: #0b0b0c; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9;
  display: grid; place-items: center; box-shadow: var(--card-shadow-hover); transition: box-shadow .4s;
}
.stage.live { animation: live-glow 2.4s ease-in-out infinite; box-shadow: 0 0 0 2px var(--rec); }
.stage canvas { width: 100%; height: 100%; object-fit: contain; display: block; touch-action: none; }
.rec-pill {
  position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 8px;
  background: rgba(15, 15, 15, .66); color: #fff; padding: 5px 11px; border-radius: 99px; font-weight: 600; font-size: 13px;
  font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); animation: pop-in .45s var(--spring) both;
}
.dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--rec); flex: none; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--rec); animation: ring 1.6s var(--ease-out) infinite; }
.paused .dot { background: #f5a524; }
.paused .dot::after { display: none; }
.stage-hint { font-size: 12.5px; color: var(--text-2); text-align: center; margin: 0; }

.panel { padding: 18px; position: sticky; top: 58px; animation: rise .55s var(--ease-out) .18s both; }
.panel-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 10px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mode {
  border: 0; background: transparent; border-radius: 8px; padding: 10px 4px 8px; box-shadow: inset 0 0 0 1px var(--border-strong);
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--text-2);
  transition: background .2s, box-shadow .2s, color .2s, transform .3s var(--spring);
}
.mode .emoji { font-size: 20px; transition: transform .45s var(--spring); }
.mode:hover { background: var(--hover); }
.mode:hover .emoji { transform: scale(1.15) rotate(-6deg); }
.mode:active { transform: scale(.95); }
.mode.on { box-shadow: inset 0 0 0 2px var(--blue); color: var(--text); background: var(--blue-soft); }
.meter { height: 4px; border-radius: 99px; background: var(--hover-2); overflow: hidden; margin-top: 8px; }
.meter > div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #4dab9a, #dfab01 75%, #eb5757); transition: width .08s linear; }
.panel .divider { height: 1px; background: var(--border); margin: 16px -18px; }

.rec-controls { display: flex; flex-direction: column; gap: 10px; animation: rise .45s var(--ease-out) both; }
.timer { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; display: flex; align-items: center; gap: 14px; line-height: 1.1; }
.timer .dot { width: 13px; height: 13px; }
.ctrl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ctrl-row .btn { box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text); }
.ctrl-row .btn-danger { color: var(--red); }

.overlay {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; text-align: center;
  background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(14px) saturate(1.2);
  animation: fade .3s ease both;
}
.cd-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto 18px; display: grid; place-items: center; }
.cd-wrap svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.cd-track { stroke: var(--hover-2); }
.cd-ring { stroke: var(--rec); stroke-dasharray: 628; stroke-dashoffset: 0; stroke-linecap: round; animation: cd-ring 3s linear forwards; }
@keyframes cd-ring { to { stroke-dashoffset: 628; } }
.countdown { font-size: 108px; font-weight: 700; line-height: 1; color: var(--text); animation: cd-pop .9s var(--spring) both; font-variant-numeric: tabular-nums; }
@keyframes cd-pop { from { transform: scale(1.6); opacity: 0; filter: blur(8px); } 40% { opacity: 1; filter: none; } }
.overlay .box { background: var(--bg); color: var(--text); border-radius: 12px; padding: 24px; width: min(420px, calc(100vw - 32px)); text-align: left; box-shadow: var(--pop-shadow); animation: pop-in .45s var(--spring) both; }
.overlay .box h3 { margin: 0 0 6px; font-size: 16px; }
.finish-ico { font-size: 34px; display: inline-block; margin-bottom: 6px; animation: spin-soft 1.6s var(--ease-in-out) infinite; }
@keyframes spin-soft { 50% { transform: translateY(-4px) rotate(8deg); } }

/* ---------- watch ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
@media (max-width: 1100px) { .watch { grid-template-columns: 1fr; } }
.player {
  position: relative; background: #000; border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow-hover);
  margin-top: clamp(16px, 4vh, 40px); animation: fade .4s ease both;
}
.player video { width: 100%; display: block; max-height: 74vh; background: #000; }
.props { margin: 14px 0 8px; animation: rise .5s var(--ease-out) .12s both; }
.prop { display: flex; align-items: center; min-height: 34px; font-size: 14px; }
.prop-k { width: 150px; flex: none; display: flex; gap: 8px; align-items: center; color: var(--text-2); height: 30px; padding: 0 6px; border-radius: 5px; }
.prop-k .ico { width: 15px; height: 15px; }
.prop-v { flex: 1; min-width: 0; padding: 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; font-size: 12.5px; background: var(--hover-2); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.orange { background: rgba(217, 115, 13, .14); color: #d9730d; }
.toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 12px; align-items: center; padding: 10px 0; box-shadow: inset 0 1px 0 var(--border), inset 0 -1px 0 var(--border); animation: rise .5s var(--ease-out) .16s both; }
.toolbar .select { width: auto; height: 30px; }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; animation: rise .5s var(--ease-out) .2s both; }
.react {
  height: 30px; padding: 0 9px; border-radius: 99px; border: 0; background: var(--hover); box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 15px;
  transition: background .15s, transform .4s var(--spring), box-shadow .2s;
}
.react:hover { background: var(--hover-2); transform: translateY(-2px) scale(1.06); }
.react:active { transform: scale(.9); }
.react.bump { animation: bump .45s var(--spring); }
.react.mine { background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.react small { font-size: 12px; color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.float-emoji {
  position: absolute; bottom: 56px; font-size: 38px; pointer-events: none; z-index: 5;
  animation: floatup 1.8s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes floatup {
  0% { transform: translate(0, 20px) scale(.4); opacity: 0; }
  15% { transform: translate(calc(var(--dx) * .2), 0) scale(1.2); opacity: 1; }
  100% { transform: translate(var(--dx), -240px) scale(.9) rotate(var(--rot)); opacity: 0; }
}

.doc { margin-top: 18px; animation: rise .5s var(--ease-out) .24s both; }
.desc { white-space: pre-wrap; font-size: 15px; line-height: 1.65; padding: 3px 2px; border-radius: 4px; transition: background .15s; min-height: 28px; }
.desc.editable { cursor: text; }
.desc.editable:hover { background: var(--hover); }
.desc.empty-desc { color: var(--text-3); }


.comments { padding: 4px 0; display: flex; flex-direction: column; max-height: calc(100vh - 90px); position: sticky; top: 62px; margin-top: clamp(16px, 4vh, 40px); animation: rise .55s var(--ease-out) .2s both; }
.comments-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 0 2px 10px; box-shadow: inset 0 -1px 0 var(--border); }
.comments-head .count { color: var(--text-3); font-weight: 500; }
.clist { overflow-y: auto; flex: 1; padding: 6px 0; }
.comment { display: flex; gap: 10px; padding: 10px 8px; border-radius: 8px; transition: background .15s; }
.comment:hover { background: var(--hover); }
.comment.new { animation: rise .45s var(--spring) both; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 11.5px; flex: none; margin-top: 1px; }
.cbody { min-width: 0; flex: 1; }
.chead { display: flex; align-items: center; gap: 6px; font-size: 13.5px; min-height: 24px; }
.chead b { font-weight: 600; }
.chead .when { color: var(--text-3); font-size: 12px; }
.chead .del { margin-left: auto; opacity: 0; transition: opacity .15s; }
.comment:hover .del { opacity: 1; }
.ctext { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.5; }
.tchip { display: inline-flex; align-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 600; font-size: 12px; padding: 0 6px; height: 19px; border-radius: 4px; cursor: pointer; margin-right: 6px; font-variant-numeric: tabular-nums; border: 0; transition: transform .3s var(--spring); }
.tchip:hover { transform: scale(1.08); }
.cform { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; box-shadow: var(--card-shadow); background: var(--card); transition: box-shadow .2s; }
.cform:focus-within { box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--blue-soft); }
.cform .input, .cform .textarea { background: transparent; box-shadow: none; padding-left: 2px; }
.cform .input { height: 26px; font-weight: 600; font-size: 13px; }
.cform .textarea { min-height: 44px; padding-top: 2px; }
.owner-tag { font-size: 10.5px; background: var(--hover-2); color: var(--text-2); padding: 0 5px; border-radius: 4px; font-weight: 600; }
.made-with { font-size: 13px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.made-with:hover { color: var(--text); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); padding: 30px; text-align: center; animation: pop-in .55s var(--spring) both; }
.login-card .page-icon { margin: 0 auto; font-size: 56px; }
.login-card h1 { font-size: 22px; margin: 12px 0 6px; }
.login-card p { color: var(--text-2); margin: 0 0 18px; }

/* Source videos must stay "rendered" so browsers keep decoding frames for the canvas. */
.offscreen { position: fixed; left: -10000px; top: 0; width: 320px; height: 180px; pointer-events: none; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; margin-left: 0; transform: translateX(-100%); opacity: 1; box-shadow: var(--pop-shadow); transition: transform .4s var(--ease-out); }
  .sb-mobile-open .sidebar { transform: none; }
  .sb-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15, 15, 15, .35); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sb-mobile-open .sb-scrim { opacity: 1; pointer-events: auto; }
  .topbar .sb-open { display: inline-flex; }
  .sb-collapsed .sidebar { margin-left: 0; }
  .page-title { font-size: 30px; }
  .page-icon { font-size: 56px; }
  .hide-sm { display: none; }
  .search.open .input { width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- visibility by role ---------- */
.viewer .owner-only { display: none !important; }
body:not(.viewer) .viewer-only { display: none !important; }

/* ---------- share dialog ---------- */
.share-pane { animation: rise .35s var(--ease-out) both; }
.code-area { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; min-height: 92px; resize: none; }
.hint.warn { background: rgba(223, 171, 1, .12); color: var(--text); padding: 8px 10px; border-radius: 6px; line-height: 1.45; }
.email-preview {
  border-radius: 10px; padding: 16px 18px; background: var(--card); box-shadow: var(--card-shadow);
  font-family: Arial, Helvetica, sans-serif; font-size: 14px;
}
.email-line { margin-bottom: 10px; }
.email-line .skel { display: block; height: 9px; border-radius: 4px; }
.email-title { display: block; color: #1a73e8; text-decoration: underline; margin-bottom: 8px; font-weight: 600; }
.email-gif { display: block; position: relative; width: 300px; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--hover); }
.email-gif img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fade .5s ease both; }
.gif-gen { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; font-family: var(--font); font-size: 12.5px; color: var(--text-2); }
.gif-gen-label { animation: pulse 1.6s ease-in-out infinite; }
.viewer .topbar .sb-open { display: none !important; }

/* ---------- wider watch page ---------- */
.page.watch-page { max-width: 1760px; padding: 0 clamp(16px, 3vw, 48px) 96px; }
.watch-page .watch { grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; }
@media (max-width: 1100px) { .watch-page .watch { grid-template-columns: 1fr; } }
.player .plyr video { max-height: 82vh; }
.player .plyr:fullscreen video, .player .plyr--fullscreen-fallback video { max-height: none; }

/* ---------- Plyr theme ---------- */
.plyr {
  --plyr-color-main: #2383e2;
  --plyr-font-family: var(--font);
  --plyr-control-radius: 7px;
  --plyr-video-control-background-hover: rgba(255, 255, 255, .16);
  --plyr-range-track-height: 5px;
  --plyr-range-thumb-height: 14px;
  --plyr-range-thumb-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  --plyr-menu-background: rgba(25, 25, 25, .96);
  --plyr-menu-color: #fff;
  --plyr-menu-radius: 10px;
  --plyr-menu-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08);
  --plyr-menu-arrow-size: 0;
  --plyr-menu-item-arrow-color: rgba(255, 255, 255, .5);
  --plyr-menu-back-border-color: rgba(255, 255, 255, .1);
  --plyr-tooltip-background: rgba(15, 15, 15, .92);
  --plyr-tooltip-color: #fff;
  --plyr-tooltip-radius: 6px;
  --plyr-font-weight-bold: 600;
  border-radius: inherit;
}
.plyr__control--overlaid {
  background: #5e6ad2 !important; color: #fff !important; padding: 22px !important; /* brand blue from the start */
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .45s var(--spring), opacity .25s !important;
}
.plyr__control--overlaid svg { width: 26px; height: 26px; left: 2px; }
.plyr__control--overlaid:hover { transform: translate(-50%, -50%) scale(1.08) !important; }
.plyr__menu__container { animation: pop-in .3s var(--spring) both; transform-origin: bottom right; }
.plyr__menu__container .plyr__control { border-radius: 6px; }
.plyr__menu__container .plyr__control[role="menuitemradio"][aria-checked="true"]::before { background: var(--plyr-color-main); }
.plyr__controls .plyr__control { transition: background .15s, transform .25s var(--spring); }
.plyr__controls .plyr__control:active { transform: scale(.88); }
.plyr__time { font-variant-numeric: tabular-nums; font-weight: 500; }
.plyr--video .plyr__controls { padding-top: 36px; background: linear-gradient(transparent, rgba(0, 0, 0, .35) 40%, rgba(0, 0, 0, .72)); }
.plyr--video.plyr--hide-controls .plyr__controls { transform: translateY(10px); }

/* timeline markers (comment timestamps) and trimmed-away regions */
.svo-markers { position: absolute; left: 0; right: 0; top: 50%; height: 0; pointer-events: none; z-index: 3; }
.svo-marker {
  position: absolute; top: -5px; width: 10px; height: 10px; margin-left: -5px; padding: 0; border: 0; border-radius: 50%;
  background: #ffcc33; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5); cursor: pointer; pointer-events: auto;
  transition: transform .25s var(--spring); animation: pop-in .4s var(--spring) both;
}
.svo-marker:hover { transform: scale(1.5); }
.svo-marker::after {
  content: attr(data-label); position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(4px) scale(.67);
  background: rgba(15, 15, 15, .92); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis; padding: 4px 8px; border-radius: 6px; opacity: 0; pointer-events: none;
  transition: opacity .15s, transform .25s var(--spring);
}
.svo-marker:hover::after { opacity: 1; transform: translateX(-50%) scale(.67); }
.svo-cut {
  position: absolute; top: -3px; height: 6px; border-radius: 3px; pointer-events: none;
  background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .55) 0 3px, rgba(255, 255, 255, .18) 3px 6px);
}
@media (max-width: 1400px) {
  .watch-page .watch { grid-template-columns: 1fr; }
  .watch-page .comments { position: static; max-height: none; margin-top: 8px; }
}
/* Let Plyr's speed menu extend past the video instead of being clipped. */
.player { overflow: visible; }
.player .plyr { overflow: visible; border-radius: 12px; }
.player .plyr__video-wrapper, .player .plyr__poster { border-radius: 12px; overflow: hidden; }
.player .plyr__controls { border-radius: 0 0 12px 12px; }
.plyr__menu__container > div { max-height: 70vh; overflow-y: auto; }

/* ---------- side panel: Transcript | Comments ---------- */
.side-tabs { display: flex; gap: 2px; position: relative; box-shadow: inset 0 -1px 0 var(--border); padding-bottom: 6px; margin-bottom: 4px; }
.side-tabs .count { color: var(--text-3); font-weight: 500; }
.side-tabs .views-ind { bottom: 0; }
.side-pane { display: flex; flex-direction: column; min-height: 0; flex: 1; position: relative; animation: fade .3s ease both; }
.watch-page .comments { min-height: 420px; }

.t-tools { display: flex; gap: 2px; align-items: center; padding: 6px 0 4px; transition: opacity .2s; }
.t-tools.disabled { opacity: .45; pointer-events: none; }
.t-search { position: relative; flex: 1; }
.t-search .ico { position: absolute; left: 9px; top: 8px; width: 14px; height: 14px; color: var(--text-3); pointer-events: none; }
.t-search .input { padding-left: 30px; height: 30px; font-size: 13.5px; }
.t-more { position: relative; }
.t-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; padding: 4px; border-radius: 10px;
  background: var(--bg); box-shadow: var(--pop-shadow); transform-origin: top right;
  opacity: 0; transform: translateY(-4px) scale(.96); pointer-events: none; transition: opacity .15s, transform .3s var(--spring);
}
.t-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.t-menu-item {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent;
  font-size: 14px; color: var(--text); cursor: pointer; transition: background .12s;
}
.t-menu-item:hover { background: var(--hover); }

.t-list { position: relative; overflow-y: auto; flex: 1; min-height: 120px; padding: 2px 0 14px; overscroll-behavior: contain; }
.t-seg {
  display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 8px;
  cursor: pointer; font: inherit; color: var(--text-2); line-height: 1.5; transition: background .15s, color .25s;
}
.t-seg:hover { background: var(--hover); color: var(--text); }
.t-seg.on { background: var(--blue-soft); color: var(--text); }
.t-seg.on .t-time { color: var(--blue); }
.t-seg.new { animation: rise .45s var(--ease-out) both; }
.t-time { flex: none; width: 42px; padding-top: 1px; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; transition: color .25s; }
.t-text { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.t-text mark { background: rgba(255, 212, 0, .38); color: inherit; border-radius: 3px; padding: 0 1px; }

.t-status { padding: 4px 0; }
.t-empty { text-align: center; padding: 26px 12px; color: var(--text-2); font-size: 13.5px; animation: rise .4s var(--ease-out) both; }
.t-empty b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.t-empty p { margin: 0 0 14px; line-height: 1.5; }
.t-empty-ico { font-size: 32px; margin-bottom: 6px; display: inline-block; animation: float 4s ease-in-out infinite; }
.t-error b { color: var(--red); }
.t-error p { word-break: break-word; }
.t-working { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-radius: 8px; background: var(--hover); animation: rise .4s var(--ease-out) both; }
.t-working b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.progress.indeterminate > div { width: 35% !important; animation: indet 1.3s var(--ease-in-out) infinite; }
@keyframes indet { from { transform: translateX(-110%); } to { transform: translateX(320%); } }
.t-follow {
  position: absolute; left: 50%; bottom: 12px; z-index: 3; transform: translateX(-50%);
  height: 30px; padding: 0 14px; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 600; box-shadow: var(--pop-shadow);
  animation: follow-in .4s var(--spring) both;
}
@keyframes follow-in { from { opacity: 0; transform: translate(-50%, 10px) scale(.9); } }
@media (max-width: 1400px) {
  .watch-page .comments { min-height: 0; }
  .watch-page .t-list { max-height: 60vh; }
}

/* settings: whisper */
dialog { max-height: calc(100vh - 32px); overflow-y: auto; }
.whisper-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); padding: 8px 10px; border-radius: 8px; background: var(--hover); word-break: break-word; }
.w-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); }
.w-dot.ok { background: #4dab9a; box-shadow: 0 0 0 3px rgba(77, 171, 154, .2); }
.w-dot.busy { background: #dfab01; animation: pulse 1.2s infinite; }
.w-dot.err { background: var(--red); }
.w-adv summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); user-select: none; }
.w-adv summary:hover { color: var(--text); }
@media (prefers-color-scheme: dark) { :root { --dd-bg: #252525; } }
.kbd { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; background: rgba(127, 127, 127, .18); color: inherit; opacity: .85; }

/* ---------- storage guard ---------- */
dialog.storage-dlg { width: min(620px, calc(100vw - 32px)); }
.st-meter { height: 8px; border-radius: 99px; background: var(--hover-2); overflow: hidden; margin: 6px 0; }
.st-meter > div { height: 100%; border-radius: 99px; background: var(--blue); transition: width .5s var(--ease-out); }
.st-meter.warn > div { background: #f2994a; }
.st-meter.full > div { background: var(--red); }
.st-meter-label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--text-2); margin-bottom: 14px; flex-wrap: wrap; }
.st-meter-label b { color: var(--text); font-weight: 600; }
.st-tabs { margin-bottom: 12px; }
.st-list { max-height: 46vh; overflow: auto; margin: 0 -6px 8px; padding: 0 6px; }
.st-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.st-row:first-child { border-top: 0; }
.st-thumb { width: 64px; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: var(--hover-2); flex: none; }
.st-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-meta { flex: 1; min-width: 0; }
.st-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sub { font-size: 12px; color: var(--text-3); }
.st-save { color: var(--text-3); font-variant-numeric: tabular-nums; margin-left: 2px; }
.st-cap { align-items: center; gap: 8px; margin-bottom: 12px; }
.st-cap .input { width: 110px; }
.st-cost { color: var(--text-2); font-size: 13px; }
.st-agree { font-size: 13px; color: var(--text-2); }
.lib-banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; background: var(--surface-1); border: 1px solid var(--border); font-size: 13px; }
.lib-banner.full { border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-soft); }
.lib-banner .st-meter { flex: 0 0 120px; margin: 0; }
.lib-banner .spacer { flex: 1; }
@media (max-width: 600px) { .st-row { flex-wrap: wrap; } .st-row .btn { flex: 1; } }

/* ---------- accounts ---------- */
.acct-row, .ppl-row { display: flex; align-items: center; gap: 10px; }
.ppl-list { margin-top: 10px; }
.ppl-row { padding: 8px 0; border-top: 1px solid var(--border); }
.acct-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 600; font-size: 13px; background: var(--blue-soft); color: var(--blue); }
.acct-avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.acct-avatar.pending { background: var(--hover-2); color: var(--text-3); }
.acct-avatar.pending svg { width: 13px; height: 13px; }
.acct-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acct-meta b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-meta span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-grid { display: grid; gap: 6px; }
.inv-link { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.login-alt { margin: 14px 0 0 !important; font-size: 12.5px; line-height: 1.6; }
.login-alt a { color: var(--text-2); }
@media (max-width: 600px) { .ppl-row, .acct-row { flex-wrap: wrap; } }

/* ---------- insights (owner analytics on the watch page) ---------- */
.insights { margin: 18px 0 6px; padding: 16px; border-radius: 12px; background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); }
.ins-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ins-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.ins-private { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--text-3); }
.ins-private svg { width: 13px; height: 13px; }
.ins-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ins-tile { padding: 10px 12px; border-radius: 9px; background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px var(--border); cursor: help; }
.ins-tile span { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-tile b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ins-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; margin-top: 10px; }
.ins-card { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--border); min-width: 0; }
.ins-grid .ins-card { margin-top: 0; }
.ins-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ins-card-h b { font-size: 13px; font-weight: 600; }
.ins-card-h span { font-size: 12px; color: var(--text-3); }
.ins-chart { position: relative; }
.ins-chart svg { width: 100%; height: 180px; display: block; overflow: visible; touch-action: none; }
.ins-grid-l { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ins-ax { font-size: 10.5px; fill: var(--text-3); font-family: inherit; }
.ins-cross { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ins-dot { fill: #7a83f0; stroke: var(--bg); stroke-width: 2; }
.ins-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 7px 9px; border-radius: 8px; font-size: 12px; color: var(--text);
  background: var(--tooltip, #1f2023); box-shadow: 0 0 0 1px var(--border-strong), 0 8px 24px rgba(0, 0, 0, .45); }
.ins-tip b { font-weight: 600; margin-right: 3px; }
.ins-tip span { display: block; color: var(--text-3); font-size: 11.5px; margin-top: 2px; }
.ins-bars { height: 150px; display: flex; align-items: flex-end; gap: 2px; padding-top: 24px; }
.ins-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; border-radius: 4px; }
.ins-bar:hover { background: rgba(255, 255, 255, .03); }
.ins-bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: #7a83f0; transition: height .6s var(--ease-out); }
.ins-bars-x { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); margin-top: 6px; }
.ins-table { display: grid; font-size: 12.5px; }
.ins-tr { display: grid; grid-template-columns: 1.1fr .8fr .8fr .9fr 1.4fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); align-items: center; }
.ins-th { border-top: 0; color: var(--text-3); font-size: 11.5px; padding-top: 0; }
.ins-tr em { font-style: normal; color: var(--text-3); }
.ins-depth { display: inline-block; vertical-align: middle; width: 60px; height: 5px; border-radius: 99px; background: var(--hover-2); margin-right: 8px; overflow: hidden; }
.ins-depth i { display: block; height: 100%; border-radius: 99px; background: #7a83f0; }
.ins-empty { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
@media (max-width: 900px) { .ins-tiles { grid-template-columns: repeat(3, 1fr); } .ins-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ins-tiles { grid-template-columns: repeat(2, 1fr); } .ins-tr { grid-template-columns: 1fr 1fr 1.2fr; } .ins-tr > :nth-child(2), .ins-tr > :nth-child(3) { display: none; } }

/* ---------- watch page while the upload finishes ---------- */
.finishing { aspect-ratio: 16 / 9; display: grid; place-content: center; justify-items: center; gap: 8px; border-radius: 12px; text-align: center; padding: 24px;
  background: radial-gradient(400px 200px at 50% 30%, rgba(94, 106, 210, .16), transparent 70%), var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); }
.finishing b { font-size: 16px; font-weight: 600; }
.finishing span:not(.spin) { color: var(--text-2); font-size: 13.5px; }
.finishing .spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(139, 147, 255, .2); border-top-color: #8b93ff; animation: fin-spin .9s linear infinite; margin-bottom: 6px; }
@keyframes fin-spin { to { transform: rotate(360deg); } }

/* ---------- transcript under the video (folded by default) ---------- */
.tbox { margin: 16px 0 4px; border-radius: 12px; background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.tbox-head { width: 100%; display: flex; align-items: center; gap: 9px; padding: 12px 14px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.tbox-head:hover { background: var(--hover); }
.tbox-head svg { width: 16px; height: 16px; flex: none; }
.tbox-head b { font-weight: 600; }
.tbox-hint { color: var(--text-3); font-size: 12.5px; flex: 1; }
.tbox-chev { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--text-3); transition: transform .3s var(--spring); }
.tbox.open .tbox-chev { transform: rotate(180deg); }
.tbox-body { position: relative; padding: 0 14px 12px; border-top: 1px solid var(--border); animation: fade .25s ease both; }
.tbox-body .t-tools { padding-top: 10px; }
.tbox .t-list { max-height: 360px; overflow-y: auto; }

/* ---------- one column: transcript & comments under the video ---------- */
.watch-page .watch { grid-template-columns: minmax(0, 1fr) !important; max-width: 1180px; margin: 0 auto; gap: 0; }
.watch-page .comments { position: static; max-height: none; min-height: 0; margin-top: 20px; padding: 14px 16px 12px; border-radius: 12px; background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); }
.watch-page .comments .t-list { max-height: 420px; overflow-y: auto; }
.watch-page .comments .clist { max-height: 480px; overflow-y: auto; }

/* ---------- comments under the video: even padding, one clean composer ---------- */
.watch-page .comments { padding: 14px 18px 18px; }
.watch-page .comments .side-tabs { margin-bottom: 4px; }
.watch-page .comments .clist { padding: 6px 0 10px; }
.watch-page .comments .clist > p.hint { padding: 10px 0 !important; margin: 0; }
.watch-page .cform { margin-top: 4px; padding: 0; gap: 0; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px var(--border-strong); }
.watch-page .cform .input, .watch-page .cform .textarea { background: transparent !important; box-shadow: none !important; border: 0; border-radius: 0; padding: 10px 12px; font-size: 13.5px; }
.watch-page .cform .input { height: 40px; font-weight: 500; border-bottom: 1px solid var(--border); }
.watch-page .cform .textarea { min-height: 72px; resize: vertical; }
.watch-page .cform .row { padding: 8px 10px 10px 12px; border-top: 1px solid var(--border); }
.watch-page .cform .row .check { font-size: 12.5px; }

/* ---------- "Copied" bubble right at the button ---------- */
.copy-pop {
  position: fixed; z-index: 2000; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px;
  background: #18191b; color: #f7f8f8; font-size: 12.5px; font-weight: 500; white-space: nowrap; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(76, 183, 130, .45), 0 8px 24px rgba(0, 0, 0, .4);
  animation: copy-pop-in .35s cubic-bezier(.34, 1.56, .64, 1) both; transition: opacity .25s, transform .25s;
}
.copy-pop svg { width: 14px; height: 14px; color: #4cb782; }
.copy-pop.down { animation-name: copy-pop-in-down; }
.copy-pop.out { opacity: 0; transform: translateY(-4px); }
@keyframes copy-pop-in { from { opacity: 0; transform: translateY(6px) scale(.9); } }
@keyframes copy-pop-in-down { from { opacity: 0; transform: translateY(-6px) scale(.9); } }

.ins-country { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ins-country img { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }

/* ---------- title: spacing and a clear rename flow ---------- */
.watch-page .title-row { position: relative; display: flex; align-items: center; gap: 6px; margin: 22px 0 14px; min-width: 0; }
.watch-page .title-row h1.page-title { margin: 0 0 0 -8px; padding: 3px 8px; border-radius: 8px; min-width: 0; outline: none; transition: background .15s, box-shadow .2s; }
.watch-page .title-row.can-edit .page-title { cursor: text; }
.watch-page .title-row.can-edit:not(.editing) .page-title:hover { background: var(--hover); }
.watch-page .title-row.editing .page-title { background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 3px rgba(94, 106, 210, .22); }
.title-edit {
  flex: none; width: 28px; height: 28px; border: 0; border-radius: 7px; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--text-3); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .2s, background .15s, color .15s;
}
.title-edit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.title-edit:hover { background: var(--hover-2); color: var(--text); }
.title-row.can-edit:hover .title-edit, .title-edit:focus-visible { opacity: 1; transform: none; }
.title-row.editing .title-edit { display: none; }
.title-saved { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 500; color: #4cb782; background: rgba(76, 183, 130, .12); }
.title-saved svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.title-saved.show { animation: saved-pop .35s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes saved-pop { from { opacity: 0; transform: scale(.85); } }
.title-help { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; font-size: 12px; color: var(--text-3); animation: fade .2s ease both; }
.title-help[hidden] { display: none; }
.title-help kbd { font: inherit; font-size: 11px; padding: 1px 5px; border-radius: 4px; background: var(--hover); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-2); }
.title-help .spacer { flex: 1; }
.title-count { font-variant-numeric: tabular-nums; }
.title-count.over { color: var(--red); }
.watch-page .reactions { margin-top: 0; }

/* ---------- phones: the video runs edge to edge ---------- */
@media (max-width: 600px) {
  main.watch-page { padding-left: 16px; padding-right: 16px; }
  .watch-page .player { width: auto; margin-inline: -16px; border-radius: 0 !important; box-shadow: none !important; }
  .watch-page .player .plyr, .watch-page .player video, .watch-page .player .plyr__poster, .watch-page .player .plyr__video-wrapper { border-radius: 0 !important; }
}

/* ---------- transcript: the line being spoken ---------- */
.watch-page .t-seg { position: relative; padding: 7px 8px 7px 14px; transition: background .15s, color .35s ease; }
.watch-page .t-seg::before {
  content: ""; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--blue) calc(var(--p, 0) * 100%), rgba(255, 255, 255, .08) calc(var(--p, 0) * 100%));
  opacity: 0; transform: scaleY(.6); transition: opacity .25s ease, transform .35s var(--ease-out);
}
.watch-page .t-seg.past { color: var(--text-3); }
[data-theme] .watch-page .t-seg.on, .watch-page .t-seg.on { background: transparent; box-shadow: none; color: var(--text); }
.watch-page .t-seg.on::before { opacity: 1; transform: none; }
.watch-page .t-seg.on .t-time { color: var(--blue); }
[data-theme="linear"] .watch-page .t-seg.on .t-time { color: #a4abff; }
.watch-page .t-seg.on:hover, .watch-page .t-seg:hover { background: var(--hover); color: var(--text); }

/* phones: no gap between the top bar and the edge-to-edge video */
@media (max-width: 600px) { .watch-page .player { margin-top: 0 !important; } }

/* ---------- fragment editor (watch page) ---------- */
.vedit {
  margin: 14px 0 6px; padding: 12px 12px 10px; border-radius: 12px; background: var(--surface-1, var(--hover));
  box-shadow: inset 0 0 0 1px var(--border); animation: rise .35s var(--ease-out) both; user-select: none;
}
.vedit[hidden] { display: none; }
.vedit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ve-top, .ve-bar { display: flex; align-items: center; gap: 6px; }
.ve-top { margin-bottom: 10px; }
.ve-top .spacer, .ve-bar .spacer { flex: 1; }
.ve-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ve-title b { font-size: 14px; font-weight: 600; }
.ve-title span { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ve-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.ve-bar { margin-bottom: 8px; }
.ve-bar kbd {
  font: inherit; font-size: 10.5px; min-width: 18px; height: 17px; padding: 0 4px; margin-left: 2px; border-radius: 4px;
  display: inline-grid; place-items: center; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border);
}
.ve-play {
  width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--blue); color: #fff; transition: transform .2s var(--ease-out), filter .15s;
}
.ve-play:hover { filter: brightness(1.12); }
.ve-play:active { transform: scale(.92); }
.ve-play svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.ve-play .i-pause, .ve-play.on .i-play { display: none; }
.ve-play.on .i-pause { display: block; }
.ve-time { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; margin-left: 4px; }
.ve-time b { color: var(--text); font-weight: 600; }
.ve-zoom { display: flex; align-items: center; gap: 2px; }
.ve-zoom input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 96px; height: 4px; margin: 0 4px; border-radius: 4px; cursor: pointer; outline: none;
  background: linear-gradient(90deg, var(--blue) var(--value, 0%), rgba(255, 255, 255, .12) var(--value, 0%));
}
.ve-zoom input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #f7f8f8; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); transition: transform .15s;
}
.ve-zoom input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.2); }
.ve-zoom input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #f7f8f8; }
.ve-fit { padding: 0 8px; font-size: 12px; }
@media (max-width: 600px) { .ve-zoom input[type="range"] { width: 64px; } .ve-fit { display: none; } }
.btn.shake { animation: ve-shake .35s; }
@keyframes ve-shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }

.ve-scroll {
  position: relative; overflow-x: auto; overflow-y: hidden; border-radius: 9px; background: rgba(0, 0, 0, .22);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
/* a visible, grabbable scrollbar once zoomed in */
.ve-scroll::-webkit-scrollbar { height: 10px; }
.ve-scroll::-webkit-scrollbar-track { background: transparent; }
.ve-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.ve-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .32); background-clip: padding-box; border: 2px solid transparent; }
.ve-scroll.panning { cursor: grabbing; }
.ve-canvas { position: relative; min-width: 100%; height: 132px; }
.ve-ruler { position: absolute; left: 0; right: 0; top: 0; height: 22px; cursor: pointer; touch-action: none; }
.ve-ruler span { position: absolute; bottom: 4px; width: 1px; height: 4px; background: rgba(255, 255, 255, .14); }
.ve-ruler span.mj { height: 7px; background: rgba(255, 255, 255, .26); }
.ve-ruler b { position: absolute; left: 4px; bottom: 2px; font-size: 10.5px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ve-track { position: absolute; left: 0; right: 0; top: 26px; height: 94px; touch-action: pan-x; }

.ve-block {
  position: absolute; top: 0; height: 94px; padding: 0 1px; cursor: grab; touch-action: none;
  transition: left .3s var(--ease-out), width .3s var(--ease-out), transform .2s var(--ease-out), opacity .2s;
}
.ve-block > .ve-strip {
  position: absolute; inset: 2px 1px 42px; display: flex; overflow: hidden; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #2a2d4a, #20223a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.ve-strip i { flex: none; display: block; opacity: .9; }
/* audio under the frames */
.ve-wave {
  position: absolute; left: 1px; bottom: 2px; height: 40px; display: block; padding: 1px 0;
  border-radius: 0 0 6px 6px; background: #1c1e33; border-top: 1px solid rgba(0, 0, 0, .5);
}
.wave-loading .ve-wave {
  background: linear-gradient(90deg, #1c1e33 0%, #262947 50%, #1c1e33 100%) 0 0 / 200% 100%;
  animation: ve-shimmer 1.2s linear infinite;
}
@keyframes ve-shimmer { to { background-position: -200% 0; } }
.ve-block::after { /* selection ring, above the frames */
  content: ""; position: absolute; inset: 2px 1px; border-radius: 6px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: box-shadow .15s;
}
.ve-block:hover::after { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.ve-block.sel::after { box-shadow: inset 0 0 0 2px #f7f8f8, 0 0 0 3px rgba(94, 106, 210, .35); }
.ve-dur {
  position: absolute; left: 7px; bottom: 48px; z-index: 2; pointer-events: none;
  font-size: 10.5px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums;
  padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .62);
}
.ve-block.tiny .ve-dur { display: none; }
.ve-h {
  position: absolute; top: 2px; bottom: 2px; width: 12px; z-index: 3; cursor: ew-resize; touch-action: none;
  display: grid; place-items: center; opacity: 0; transition: opacity .15s;
}
.ve-h.l { left: 1px; border-radius: 6px 0 0 6px; }
.ve-h.r { right: 1px; border-radius: 0 6px 6px 0; }
.ve-h::before { content: ""; width: 4px; height: 22px; border-radius: 3px; background: #f7f8f8; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.ve-block:hover .ve-h, .ve-block.sel .ve-h { opacity: 1; }
.ve-block.sel .ve-h { background: rgba(247, 248, 248, .92); }
.ve-block.sel .ve-h::before { width: 2px; height: 16px; background: #1b1c1f; box-shadow: none; }
.ve-block.live { transition: none; }
.ve-block.lift { z-index: 5; cursor: grabbing; transform: translateY(-4px) scale(1.02); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); }
.ve-canvas.moving .ve-block:not(.lift) { opacity: .8; }
.ve-block.enter { animation: ve-in .3s var(--ease-out) both; }
.ve-block.leave { opacity: 0; transform: scale(.9); pointer-events: none; }
@keyframes ve-in { from { opacity: 0; transform: scaleY(.85); } }

.ve-playhead { position: absolute; top: 0; bottom: 6px; left: -1px; width: 2px; z-index: 6; background: #f7f8f8; border-radius: 2px; pointer-events: none; will-change: transform; box-shadow: 0 0 6px rgba(0, 0, 0, .6); }
.ve-playhead i { position: absolute; top: 0; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 3px 3px 6px 6px; background: #f7f8f8; pointer-events: auto; cursor: ew-resize; touch-action: none; }
.ve-hint { margin: 8px 2px 0; font-size: 12px; color: var(--text-3); }
.ve-hint kbd { font: inherit; font-size: 10.5px; padding: 0 4px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--border); color: var(--text-2); }
@media (max-width: 600px) {
  .ve-bar kbd, .ve-hint { display: none; }
  .ve-h { width: 16px; }
  .ve-top .ve-title span { display: none; }
}

/* ---------- processing on the PC (owner) ---------- */
.proc {
  margin: 4px 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--surface-1, var(--hover));
  box-shadow: inset 0 0 0 1px var(--border); font-size: 12.5px; animation: rise .3s var(--ease-out) both;
}
.proc[hidden] { display: none; }
.proc-head { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 500; }
.proc .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.proc .dot.ok { background: #4cb782; box-shadow: 0 0 0 3px rgba(76, 183, 130, .18); }
.proc .dot.warn { background: #f2994a; box-shadow: 0 0 0 3px rgba(242, 153, 74, .18); }
.proc.done .proc-rows, .proc.done .proc-note { display: none; }
.proc-note { margin: 6px 0 0 15px; color: var(--text-3); }
.proc-rows { display: grid; gap: 6px; margin-top: 10px; }
.proc-row { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; gap: 12px; color: var(--text-2); }
.proc-row b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-3); }
.proc-row.running b { color: var(--text); }
.proc-row .bar { position: relative; height: 4px; border-radius: 4px; background: var(--hover-2); overflow: hidden; }
.proc-row .bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--blue); transition: width .6s var(--ease-out); }
.proc-row .bar.busy > i { width: 30%; animation: proc-busy 1.2s ease-in-out infinite; }
@keyframes proc-busy { from { left: -30%; } to { left: 100%; } }
@media (max-width: 600px) { .proc-row { grid-template-columns: 1fr 70px 56px; } }
