/* Drive Player – dark review-tool look: black frame, rounded slate panels, Barlow, one accent colour.
   Values follow Frame.io V4's measured palette; the accent comes from config.js. */
:root {
  --app: #000;
  --panel: #12141e;
  --raised: #1f2332;
  --raised-2: #2b2f41;
  --hover: rgba(57, 61, 79, .35);
  --hover-strong: rgba(57, 61, 79, .6);
  --line: rgba(57, 61, 79, .45);
  --line-2: rgba(84, 89, 112, .55);
  --media: #08090d;
  --text: rgba(243, 243, 247, .92);
  --muted: rgba(212, 214, 230, .75);
  --faint: rgba(189, 192, 212, .6);
  --accent: #5b53ff;
  --warn: #f5b84c;
  --ok: #3ccf91;
  --danger: #ff5c6c;
  --r-panel: 8px;
  --r-btn: 6px;
  --rail: 60px;
  --ease: cubic-bezier(.2, .4, .1, 1);
  --font: Barlow, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--app); color: var(--text);
  font: 13px/1.45 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.ic { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: var(--r-btn);
  background: var(--raised-2); border: 0; color: var(--text);
  font-weight: 500; font-size: 13px; white-space: nowrap; cursor: pointer;
  transition: background .15s var(--ease), filter .15s, opacity .15s;
}
.btn:hover { background: #363b51; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); background: var(--accent); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.big { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  background: none; border: 0; border-radius: var(--r-btn); color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.linkish { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 6px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--text); }
kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  font: 600 11px var(--font); color: var(--muted); background: var(--raised); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
}

/* ---------------------------------------------------------------- sign-in */
.signin {
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; padding: 32px 16px 0;
  background: radial-gradient(60% 50% at 50% 35%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--app);
}
.signin-card {
  width: 100%; max-width: 400px; padding: 36px 32px 28px; border-radius: 14px; text-align: center;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.signin-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.signin-logo { width: 56px; height: 56px; border-radius: 14px; }
.signin-brand .brand-lockup { height: 36px; margin: 2px 0 10px; }
.signin-card h1 { font-size: 22px; margin-top: 4px; }
.signin-card p { margin: 0; color: var(--muted); }
.signin-google { margin-top: 12px; width: 100%; background: #fff; color: #1f1f1f; }
.signin-google:hover { background: #f1f1f4; }
.signin-google .g { width: 20px; height: 20px; }
.signin-google.busy { opacity: .7; }
.signin-note { color: var(--warn) !important; font-size: 12.5px; }
.signin-fine { font-size: 12px; color: var(--faint) !important; margin-top: 6px !important; }

/* ---------------------------------------------------------------- owner frame: rail + panels */
body.owner { height: 100vh; height: 100dvh; overflow: hidden; }
.frame { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); height: 100vh; height: 100dvh; padding: 6px 6px 6px 0; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; min-height: 0; }
.rail-logo { width: 36px; height: 36px; padding: 4px; margin-bottom: 14px; border: 0; border-radius: 9px; background: none; cursor: pointer; }
.rail-logo img { width: 100%; height: 100%; border-radius: 9px; display: block; object-fit: contain; }
.rail a, .rail-btn {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px;
  color: var(--faint); background: none; border: 0; cursor: pointer; transition: background .15s, color .15s;
}
.rail a .ic, .rail-btn .ic { width: 20px; height: 20px; }
.rail a:hover, .rail-btn:hover { color: var(--text); background: var(--hover); }
.rail a[aria-current] { color: var(--text); background: var(--raised); }
.rail a[aria-current]::before { content: ""; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.rail .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rail-spacer { flex: 1; }
.user { position: relative; }
.avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; display: block; }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  background: var(--raised-2); font-weight: 600; font-size: 11.5px; color: var(--muted);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu {
  position: absolute; left: 44px; bottom: 0; z-index: 30; width: 250px; padding: 6px;
  background: var(--raised); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.user-id { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-name { font-weight: 600; }
.user-email { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: none; border: 0; border-radius: 6px; cursor: pointer; text-align: left; }
.user-menu button:hover { background: var(--hover); }
.user-menu .ic { width: 16px; height: 16px; color: var(--faint); }

.workspace { display: grid; grid-template-rows: 48px minmax(0, 1fr) auto; gap: 6px; min-width: 0; min-height: 0; }
.top {
  display: flex; align-items: center; gap: 16px; padding: 0 8px 0 18px;
  background: var(--panel); border-radius: var(--r-panel); min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; min-width: 0; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; flex: none; }
/* A brand lockup (symbol + name as one logo) is shown at its own proportions, never boxed or cropped. */
.brand-lockup { display: block; width: auto; max-width: 100%; }
.brand img.brand-lockup { width: auto; height: 20px; border-radius: 0; }
.search { position: relative; display: flex; align-items: center; margin-left: auto; width: min(380px, 45%); }
.search .ic { position: absolute; left: 12px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; height: 32px; padding: 0 36px 0 36px; border-radius: 48px; outline: none;
  background: rgba(44, 48, 65, .3); border: 1.5px solid rgba(57, 61, 79, .35); font-size: 13px;
  transition: border-color .15s, background .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); background: rgba(44, 48, 65, .55); }
.search-key { position: absolute; right: 8px; height: 18px; min-width: 18px; font-size: 10.5px; pointer-events: none; }
.search input:focus ~ .search-key { opacity: 0; }

.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 6px; min-height: 0; }
.shell:has(> .tree-panel[hidden]) { grid-template-columns: minmax(0, 1fr); }
.content { background: var(--panel); border-radius: var(--r-panel); overflow: auto; padding: 0 22px 48px; min-height: 0; min-width: 0; scrollbar-color: var(--raised-2) transparent; }

/* ---------------------------------------------------------------- folder tree panel */
.tree-panel { background: var(--panel); border-radius: var(--r-panel); overflow: auto; padding: 12px 10px 20px; min-height: 0; scrollbar-color: var(--raised-2) transparent; }
.tp-head { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tp-tile {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; flex: none;
  color: var(--muted); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2);
}
.tp-tile .ic { width: 18px; height: 18px; }
.tp-name { font-weight: 600; font-size: 14px; }
.tp-sub { color: var(--faint); font-size: 12px; }
.tp-sec + .tp-sec { margin-top: 18px; }
.tp-label { padding: 0 8px 6px; color: var(--faint); font-size: 12px; font-weight: 500; }
.tp-row { display: flex; align-items: center; height: 30px; padding-left: calc(var(--depth) * 14px); border-radius: 6px; }
.tp-row:hover { background: var(--hover); }
.tp-row.is-active { background: var(--raised); }
.tp-chev { display: grid; place-items: center; width: 22px; height: 22px; flex: none; padding: 0; border: 0; background: none; color: var(--faint); border-radius: 4px; cursor: pointer; }
.tp-chev .ic { width: 13px; height: 13px; transition: transform .18s var(--ease); }
.tp-chev.is-open .ic { transform: rotate(90deg); }
.tp-chev:hover { color: var(--text); }
.tp-link { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; height: 100%; padding-right: 8px; color: var(--muted); }
.tp-link .ic { width: 16px; height: 16px; color: var(--faint); }
.tp-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-row:hover .tp-link, .tp-row.is-active .tp-link { color: var(--text); }
.tp-link[data-share="off"] .ic { color: var(--danger); }
.tp-link[data-share="edit"] .ic { color: var(--warn); }
.tp-share {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer; text-align: left;
}
.tp-share:hover { background: var(--hover); color: var(--text); }
.tp-share .ic { width: 14px; height: 14px; color: var(--faint); opacity: 0; transition: opacity .15s; }
.tp-share:hover .ic { opacity: 1; }
.tp-share-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--raised-2); flex: none; }
.tp-dot[data-share="on"] { background: var(--ok); }
.tp-dot[data-share="off"] { background: var(--danger); }
.tp-dot[data-share="edit"] { background: var(--warn); }
.tp-empty { margin: 0; padding: 4px 8px; color: var(--faint); font-size: 12px; }
.tp-group-name { padding: 8px 8px 2px; font-size: 10.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.tp-share .tp-kind { width: 14px; height: 14px; opacity: 1; color: var(--faint); margin-left: -2px; }
.tp-share.is-here { color: var(--text); }
.tp-here { flex: none; font-size: 10.5px; font-weight: 600; color: var(--faint); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 6px; }
.tp-share:hover .tp-here { display: none; }

/* ---------------------------------------------------------------- list head + tools */
.list-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  min-height: 56px; margin: 0 -22px 18px; padding: 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.list-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex-wrap: wrap; }
.crumb { font-size: 15px; font-weight: 600; padding: 3px 6px; border-radius: 6px; }
a.crumb { color: var(--faint); font-weight: 500; }
a.crumb:hover { background: var(--hover); color: var(--text); }
.crumb.current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.crumb-sep { width: 14px; height: 14px; color: var(--faint); opacity: .7; }
.list-notice {
  display: flex; align-items: flex-start; gap: 12px; margin: -4px 0 20px; padding: 12px 14px; border-radius: 8px;
  background: color-mix(in srgb, var(--warn) 9%, var(--raised)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); font-size: 13px;
}
.list-notice .ic { color: var(--warn); margin-top: 1px; }
.list-notice b { font-weight: 600; }
.list-notice a { color: var(--accent); font-weight: 500; white-space: nowrap; filter: brightness(1.3); }

/* sliding segmented control (grid / list) */
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 8px; background: rgba(57, 61, 79, .35); }
.seg-thumb {
  position: absolute; top: 3px; left: 3px; width: 30px; height: calc(100% - 6px); border-radius: 6px;
  background: var(--raised-2); box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  transition: transform .35s cubic-bezier(.2, 0, 0, 1);
}
.seg[data-value="list"] .seg-thumb { transform: translateX(30px); }
.seg button { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 24px; padding: 0; border: 0; background: none; color: var(--faint); cursor: pointer; border-radius: 6px; }
.seg button[aria-checked="true"] { color: var(--text); }
.seg .ic { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- folders + asset cards */
.sec { margin-bottom: 28px; }
.sec-title { font-size: 12px; font-weight: 500; color: var(--faint); margin: 0 0 10px 2px; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px 12px; }
.tag { font-size: 10.5px; color: var(--faint); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 6px; flex: none; }

/* glass folders — adapted from 21st.dev "Glassmorphism Folder Cards" (dark tone) */
.folder {
  --hinge: 0deg; --lift: 0%; --spread: 0%; --fan: 0deg; --stack: 0%; --px: 0; --py: 0;
  --gf-tint: var(--accent);
  --gf-spring: cubic-bezier(.34, 1.4, .64, 1);
  display: block; position: relative; min-width: 0; padding: 12px 10px 10px; border-radius: 12px;
  transition: background .2s var(--ease);
}
.folder:hover, .folder:focus-visible { --hinge: -14deg; --lift: -34%; --spread: 11%; --fan: 3.5deg; --stack: 7%; background: rgba(57, 61, 79, .22); }
.folder[data-share="off"] { --gf-tint: var(--danger); }
.folder[data-share="edit"] { --gf-tint: var(--warn); }
.gf {
  position: relative; display: block; aspect-ratio: 340 / 272;
  transform: perspective(1400px) rotateX(calc(var(--py) * -4deg)) rotateY(calc(var(--px) * 5deg));
  transition: transform .9s var(--ease);
}
.gf-shadow { position: absolute; left: 8%; right: 8%; bottom: -4%; height: 22%; border-radius: 40px; background: rgba(0, 0, 0, .65); filter: blur(14px); transform: translateX(calc(var(--px) * -6px)); transition: transform .9s var(--ease); }
.gf-back {
  position: absolute; inset: 0; clip-path: url(#gf-back);
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(255, 255, 255, .14), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 22%),
    linear-gradient(160deg, color-mix(in srgb, var(--gf-tint) 82%, #fff) 0%, color-mix(in srgb, var(--gf-tint) 42%, #1a1d2b) 55%, #121420 100%);
}
.gf-files { position: absolute; inset: 0; clip-path: inset(-200% -200% 6% -200%); }
.gf-sheet {
  position: absolute; left: 10%; top: 33%; width: 80%; height: 60%; overflow: hidden; border-radius: 6px;
  background: linear-gradient(180deg, #2c2f3c, #1b1d27);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 0 .5px rgba(255, 255, 255, .1), 0 10px 24px -8px rgba(0, 0, 0, .75);
  transform-origin: 50% 100%;
  transform: translate(calc(var(--slot) * var(--spread)), calc(var(--lift) - var(--depth) * var(--stack))) rotate(calc(var(--slot) * var(--fan)));
  transition: transform .7s var(--gf-spring) calc(var(--depth) * 40ms);
}
.gf-sheet img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gf-sheet .thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.gf-sheet i { display: block; height: 6%; margin: 9% 10% 0; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.gf-sheet i + i { width: 60%; margin-top: 6%; }
.gf-sheet i + i + i { width: 40%; }
.gf-front {
  position: absolute; left: 0; top: 27.2%; width: 100%; height: 72.8%;
  /* A mask, not clip-path: Chrome doesn't cut backdrop blur to an SVG clip-path inside a scrolling panel. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 198' preserveAspectRatio='none'%3E%3Cpath d='M0 22A22 22 0 0 1 22 0L118 0C144 0 146 32 172 32L318 32A22 22 0 0 1 340 54L340 176A22 22 0 0 1 318 198L22 198A22 22 0 0 1 0 176Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 198' preserveAspectRatio='none'%3E%3Cpath d='M0 22A22 22 0 0 1 22 0L118 0C144 0 146 32 172 32L318 32A22 22 0 0 1 340 54L340 176A22 22 0 0 1 318 198L22 198A22 22 0 0 1 0 176Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  background:
    radial-gradient(160px 120px at calc(50% + var(--px) * 46%) calc(30% + var(--py) * 40%), rgba(255, 255, 255, .1), transparent 70%),
    linear-gradient(180deg, rgba(34, 38, 56, .22) 0%, rgba(22, 25, 38, .62) 46%, rgba(14, 16, 26, .92) 100%);
  transform-origin: 50% 100%;
  transform: perspective(760px) rotateX(var(--hinge));
  transition: transform .75s var(--gf-spring);
}
.gf-rim { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; pointer-events: none; }
.gf-rim path { stroke: rgba(255, 255, 255, .28); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.folder-label { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 0 2px; min-width: 0; }
.folder-label .ic { width: 15px; height: 15px; margin-top: 1px; color: var(--faint); flex: none; }
.folder-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.folder[data-share="off"] .folder-label .ic { color: var(--danger); }
.folder[data-share="edit"] .folder-label .ic { color: var(--warn); }
.folder-name { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.folder-count { margin-top: 1px; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.folder-count:empty::before { content: "\00a0"; }

.list-cols { display: none; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { position: relative; min-width: 0; background: var(--raised); border-radius: 8px; transition: background .18s var(--ease); }
.card:hover { background: #262a3b; }
.card-main { display: block; padding: 6px; border-radius: 8px; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: var(--media); }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .4s var(--ease), filter .2s; }
.card-main:hover .thumb img { transform: scale(1.025); }
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.thumb-ph .ic { width: 28px; height: 28px; opacity: .6; }
.dur, .badge, .now { position: absolute; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dur { right: 6px; bottom: 6px; background: rgba(0, 0, 0, .72); color: #fff; }
.badge { left: 6px; bottom: 6px; background: var(--warn); color: #1c1503; letter-spacing: .03em; }
.now { left: 6px; top: 6px; background: var(--accent); color: #fff; }
.card-body { padding: 9px 6px 5px; min-width: 0; }
.card-title { font-weight: 500; font-size: 13px; line-height: 1.35; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; margin-top: 3px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; min-width: 0; white-space: nowrap; overflow: hidden; }
.card-meta .m-dur { display: none; }
.card-meta .m-date::before { content: "·"; margin: 0 6px; }
.card-link {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 30px; height: 30px;
  background: rgba(10, 11, 16, .72); border: 0; border-radius: 6px; color: #fff; cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s; backdrop-filter: blur(6px);
}
.card:hover .card-link, .card-link:focus-visible { opacity: 1; }
.card-link:hover { background: var(--accent); }
.card-link .ic { width: 15px; height: 15px; }
.skel { background: var(--raised); }
.skel .thumb { background: linear-gradient(100deg, var(--raised) 30%, var(--raised-2) 50%, var(--raised) 70%) 0 0 / 300% 100%; animation: shimmer 1.3s linear infinite; }
.skel i { display: block; height: 10px; border-radius: 4px; background: var(--raised-2); margin-top: 7px; width: 80%; }
.skel i + i { width: 45%; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* list view */
.view-list .folders { grid-template-columns: 1fr; gap: 0; }
.view-list .folder { display: flex; align-items: center; height: 42px; padding: 0 10px; border-radius: 6px; border-bottom: 1px solid var(--line); }
.view-list .folder:hover { background: var(--hover); }
.view-list .gf { display: none; }
.view-list .folder-label { flex: 1; margin: 0; gap: 10px; }
.view-list .folder-label { align-items: center; }
.view-list .folder-label .ic { width: 17px; height: 17px; margin: 0; }
.view-list .folder-text { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.view-list .list-cols {
  display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px 130px; gap: 14px;
  padding: 0 48px 8px 86px; font-size: 12px; font-weight: 500; color: var(--faint); border-bottom: 1px solid var(--line);
}
.view-list .videos { display: flex; flex-direction: column; gap: 0; }
.view-list .card { background: none; border-radius: 6px; border-bottom: 1px solid var(--line); }
.view-list .card:hover { background: var(--hover); }
.view-list .card-main { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; padding: 6px 48px 6px 8px; }
.view-list .thumb .dur, .view-list .thumb .badge { display: none; }
.view-list .card-body { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px 130px; gap: 14px; align-items: center; padding: 0; }
.view-list .card-meta { display: contents; color: var(--muted); }
.view-list .card-meta span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.view-list .card-meta .m-dur { display: block; }
.view-list .card-meta .m-date::before { content: none; }
.view-list .m-label { display: none; }
.view-list .card-link, .view-list .card-dl { top: 50%; right: 10px; margin-top: -15px; background: none; color: var(--muted); }
.view-list .card-link:hover, .view-list .card-dl:hover { color: #fff; }
.watch .w-folder:not(.view-list) .card-meta { display: none; }
/* Client lists: subfolders are rows at the top of the list (folder tile, "6 videos", an arrow to open them);
   the glass folder tiles are for the grid. */
.watch .w-folder.view-list .folders, .watch .w-folder:not(.view-list) .folder-rows { display: none; }
.thumb-folder { display: grid; place-items: center; color: var(--muted); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-2); }
.thumb-folder .ic { width: 18px; height: 18px; }
.card-folder .card-title { font-weight: 600; }
.card-up .card-title { font-weight: 500; color: var(--muted); }
.card-up:hover .card-title { color: var(--text); }
.card-go { position: absolute; top: 50%; right: 10px; width: 30px; height: 30px; margin-top: -15px; display: grid; place-items: center; color: var(--muted); }
.card-go .ic { width: 16px; height: 16px; }
.card-folder:hover .card-go, .card-folder:hover .thumb-folder { color: var(--text); }

.list-empty { padding: 72px 16px; text-align: center; color: var(--muted); }
.list-empty > .ic { width: 36px; height: 36px; color: var(--faint); }
.list-empty p { margin: 10px 0 0; }
.list-error { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.list-error .ic { width: 32px; height: 32px; color: var(--warn); }
.list-error h2 { font-size: 15px; color: var(--text); }
.list-error p { margin: 0 0 8px; max-width: 460px; }
.list-more { display: flex; justify-content: center; padding: 8px 0; min-height: 1px; }

/* ---------------------------------------------------------------- player page (owner) */
.viewer {
  position: fixed; z-index: 40; top: 6px; right: 6px; bottom: 6px; left: var(--rail);
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 6px; background: var(--app);
}
.viewer-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); border-radius: var(--r-panel); overflow: hidden; }
.viewer-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px 0 10px; border-bottom: 1px solid var(--line); flex: none; }
.viewer-heading { flex: 1; min-width: 0; }
.viewer-path { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-path:empty { display: none; }
.viewer-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--media); container-type: size; }
.viewer-stage .player-slot { width: min(100cqw, (100cqh - 82px) * 16 / 9); }
.viewer-side { background: var(--panel); border-radius: var(--r-panel); overflow: auto; padding: 0 18px 24px; min-height: 0; }
.vs-tab { display: flex; align-items: center; height: 56px; margin: 0 -18px 18px; padding: 0 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.vi-name { font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.vi-meta { margin: 14px 0 0; display: grid; gap: 8px; }
.vi-meta div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; font-size: 12.5px; }
.vi-meta dt { color: var(--faint); }
.vi-meta dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.vi-share {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 10px; margin-top: 20px; padding: 12px;
  border-radius: 8px; background: var(--raised); color: var(--muted); font-size: 12.5px; line-height: 1.45;
}
.vi-share .dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--faint); flex: none; }
.vi-share .dot + span { flex: 1 1 200px; min-width: 0; }
.vi-share[data-state="ok"] .dot { background: var(--ok); }
.vi-share[data-state="warn"] { background: color-mix(in srgb, var(--warn) 9%, var(--raised)); color: var(--text); }
.vi-share[data-state="warn"] .dot { background: var(--warn); }
.vi-share a { color: var(--accent); font-weight: 500; filter: brightness(1.3); }
.vi-keys { margin-top: 20px; color: var(--muted); }
.vi-keys summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 0; font-size: 12.5px; list-style: none; color: var(--faint); }
.vi-keys summary::-webkit-details-marker { display: none; }
.vi-keys summary .ic { width: 16px; height: 16px; }
.keys { display: grid; gap: 7px; margin: 10px 0 0; }
.keys div { display: flex; align-items: center; gap: 10px; }
.keys dt { display: flex; align-items: center; gap: 4px; min-width: 86px; }
.keys dt i { color: var(--faint); font-style: normal; }
.keys dd { margin: 0; font-size: 12.5px; }

/* ---------------------------------------------------------------- client pages */
body.watch { background: #0e1018; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.watch .top { height: 56px; padding: 0 28px; background: transparent; border-radius: 0; border-bottom: 1px solid var(--line); }
.watch .brand { font-size: 14px; }
.watch .brand img.brand-lockup { height: 24px; }
/* The player column is never wider than what lets the whole player (picture + controls) fit in the window.
   --chrome is everything above and below the 16:9 picture: header 56, padding 24, bar 32 + 12, controls 63,
   breathing room 13; plus the header (title + details 44, gap 20) when there is one. The columns sit centred. */
.w-main {
  --chrome: 200px; --fit: max(480px, calc((100dvh - var(--chrome)) * 16 / 9));
  width: 100%; max-width: 1480px; margin: 0 auto; padding: 24px 32px 48px;
}
.w-main:has(> .w-hero:not([hidden])) { --chrome: 264px; }
.w-loading { min-height: 50vh; display: grid; place-items: center; }
.w-loading::after {
  content: ""; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .12); border-top-color: rgba(255, 255, 255, .6); animation: dp-spin .8s linear infinite;
}
.w-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
/* While watching, the header lines up with the player (and the "More in" list beside it). */
.w-main:has(> .w-watch:not([hidden])) .w-hero { max-width: var(--fit); margin-inline: auto; }
.w-main:has(> .w-watch.has-more:not([hidden])) .w-hero { max-width: calc(var(--fit) + 24px + 340px); }
/* The video's name: one line, no wider than the video itself, cut short with … (the full name is in the tooltip). */
.w-main:has(> .w-watch:not([hidden])) .w-hero h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-main:has(> .w-watch.has-more:not([hidden])) .w-hero-text { max-width: calc(100% - 24px - 340px); }
.w-hero-text { min-width: 0; }
.w-hero h1 { font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.w-hero p { margin: 4px 0 0; color: var(--faint); font-size: 13px; }
.w-crumbs { margin: 0 0 14px -5px; }
/* Client breadcrumbs are small, quiet text. */
.watch .crumb, .watch .crumb.current { font-size: 12px; font-weight: 500; padding: 2px 5px; border-radius: 5px; color: var(--faint); }
.watch a.crumb:hover { color: var(--text); }
.watch .crumb-sep { width: 12px; height: 12px; flex: none; }
.w-watch {
  display: grid; grid-template-columns: minmax(0, var(--fit)); justify-content: center; gap: 24px; align-items: start;
}
.w-watch.has-more { grid-template-columns: minmax(0, var(--fit)) 340px; }
.w-primary { min-width: 0; }
.w-stage .dp { border-radius: 10px; }
.w-info { padding: 0 2px; }
.w-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin-bottom: 12px; }
.w-bar .crumbs { margin-left: -5px; flex-wrap: nowrap; overflow: hidden; }
.w-bar .crumb { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-actions, .w-hero-actions { display: flex; gap: 8px; flex: none; margin-left: auto; }
.w-hero-actions { margin-left: auto; align-self: center; }
.w-hero-actions:empty { display: none; }
.btn-sub { color: var(--faint); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }
[data-copy-link] { min-width: 112px; justify-content: center; }
.btn.is-copied .ic { color: var(--ok); }
.card-dl {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 30px; height: 30px;
  background: rgba(10, 11, 16, .72); border-radius: 6px; color: #fff; opacity: 0; transition: opacity .15s, background .15s; backdrop-filter: blur(6px);
}
.card:hover .card-dl, .card-dl:focus-visible { opacity: 1; }
.card-dl:hover { background: var(--accent); }
.card-dl .ic { width: 15px; height: 15px; }
.w-tip { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--raised); color: var(--muted); font-size: 12.5px; }
.w-more { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px 8px; }
.w-more-title { font-size: 12px; font-weight: 500; margin: 0 8px 10px; color: var(--faint); }
.w-more-title span { color: var(--text); font-weight: 600; }
.w-more-list { display: flex; flex-direction: column; gap: 2px; }
.more-item { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; align-items: start; padding: 6px; border-radius: 8px; transition: background .15s; }
.more-item:hover { background: var(--hover); }
.more-item.is-current { background: var(--raised); }
.more-item .thumb { border-radius: 5px; }
.more-item.is-current .thumb { box-shadow: 0 0 0 2px var(--accent); }
.more-item .dur { right: 4px; bottom: 4px; font-size: 10.5px; padding: 0 5px; }
.more-item .now { left: 4px; top: 4px; font-size: 10px; padding: 0 5px; }
.more-name { font-weight: 500; font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.more-meta { margin-top: 3px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.w-folder .folders { margin-bottom: 22px; }
.w-empty { color: var(--muted); padding: 24px 2px; margin: 0; }

/* ---------------------------------------------------------------- copyright footer (every page) */
.foot { padding: 14px 16px 18px; text-align: center; color: var(--faint); font-size: 11.5px; letter-spacing: .01em; }
.workspace > .foot { padding: 0 0 2px; font-size: 11px; }

/* ---------------------------------------------------------------- banner, toast, dialog */
.banner {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 7px 8px 7px 14px; border-radius: 999px; font-size: 12.5px;
  background: #2a2213; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); color: #ffe2ae;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.banner .ic { width: 16px; height: 16px; color: var(--warn); }
.banner[data-state="gesture"] { padding-right: 16px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px); padding: 9px 14px; border-radius: 8px;
  background: var(--raised-2); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal {
  width: min(460px, calc(100vw - 32px)); padding: 0; border-radius: 12px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
}
.modal::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
.modal-body { padding: 22px; }
.modal-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; margin-bottom: 14px; }
.modal-icon.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.modal-icon.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.modal h2 { font-size: 16px; margin-bottom: 8px; }
.modal p { margin: 0 0 10px; color: var(--muted); }
.modal p b { color: var(--text); }
.steps { margin: 0 0 14px; padding-left: 20px; color: var(--muted); }
.steps li { margin: 4px 0; }
.steps b { color: var(--text); font-weight: 600; }
.link-box { display: flex; gap: 8px; margin: 14px 0 4px; }
.link-box input { flex: 1; min-width: 0; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--media); border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---------------------------------------------------------------- player */
.player-slot { width: 100%; }
.dp {
  position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden;
  background: #000; color: #fff; border-radius: 8px; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; container-type: inline-size; outline: none;
}
.dp-media { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.dp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.dp-embed-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* "Loading Google Drive player…" over the poster until Drive's own player has loaded. */
.dp-embed-wait { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 14px; background: #000; color: rgba(255, 255, 255, .8); font-size: 14px; }
.dp-embed.is-loading .dp-embed-wait { display: grid; }
.dp-embed-wait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .35; }
.dp-embed-wait p, .dp-wait-spin { position: relative; margin: 0; }
.dp-wait-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .16); border-top-color: rgba(255, 255, 255, .75); animation: dp-spin .8s linear infinite; }
.dp-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
.dp-hit { position: absolute; inset: 0; cursor: pointer; }
.dp.is-idle .dp-hit { cursor: none; }
.dp-shade { display: none; }
.dp-controls { position: relative; background: #0d0f16; border-top: 1px solid rgba(255, 255, 255, .05); padding: 2px 10px 4px; transition: opacity .3s ease-out; }

/* full screen: controls float over the picture and fade while playing */
.dp.is-fs { width: 100vw; height: 100vh; border-radius: 0 !important; }
.dp.is-fs .dp-media { position: absolute; inset: 0; aspect-ratio: auto; }
.dp.is-fs .dp-controls { position: absolute; left: 0; right: 0; bottom: 0; background: none; border: 0; padding: 0 18px 10px; }
.dp.is-fs .dp-shade { display: block; position: absolute; inset: auto 0 0 0; height: 160px; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent); transition: opacity .3s ease-out; }
.dp.is-fs.is-idle .dp-controls, .dp.is-fs.is-idle .dp-shade { opacity: 0; pointer-events: none; }

.dp-scrub { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; outline: none; }
.dp-rail { position: relative; width: 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .16); transition: height .12s; }
.dp-scrub:hover .dp-rail, .dp.is-scrubbing .dp-rail, .dp-scrub:focus-visible .dp-rail { height: 5px; }
.dp-buf { position: absolute; inset: 0; }
.dp-buf span { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.dp-fill { position: absolute; inset: 0; border-radius: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.dp-knob {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: scale(0); transition: transform .12s; pointer-events: none;
}
.dp-scrub:hover .dp-knob, .dp.is-scrubbing .dp-knob, .dp-scrub:focus-visible .dp-knob { transform: scale(1); }
.dp-tip {
  position: absolute; bottom: 20px; left: 0; transform: translateX(-50%); padding: 3px 7px; border-radius: 5px;
  background: rgba(22, 24, 33, .95); border: 1px solid rgba(255, 255, 255, .08); font: 600 11.5px var(--font); font-variant-numeric: tabular-nums;
  opacity: 0; pointer-events: none; transition: opacity .12s; white-space: nowrap;
}
.dp-scrub:hover .dp-tip, .dp.is-scrubbing .dp-tip { opacity: 1; }

.dp-bar { display: flex; align-items: center; gap: 2px; height: 40px; }
.dp-btn {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  background: none; border: 0; border-radius: 6px; color: rgba(255, 255, 255, .86); cursor: pointer;
  transition: background .15s, color .15s;
}
.dp-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.dp-btn .ic { width: 19px; height: 19px; }
.dp-play .ic { width: 21px; height: 21px; }
.dp-step .ic { width: 17px; height: 17px; }
.dp-rate { width: auto; min-width: 40px; padding: 0 8px; font: 600 12px var(--font); font-variant-numeric: tabular-nums; }
.dp-vol { display: flex; align-items: center; }
.dp-vol-range {
  -webkit-appearance: none; appearance: none; width: 0; height: 22px; margin: 0; opacity: 0;
  background: transparent; cursor: pointer; transition: width .18s, opacity .18s, margin .18s;
}
.dp-vol:hover .dp-vol-range, .dp-vol:focus-within .dp-vol-range { width: 76px; opacity: 1; margin: 0 8px 0 2px; }
.dp-vol-range::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, #fff var(--val, 100%), rgba(255, 255, 255, .22) var(--val, 100%)); }
.dp-vol-range::-moz-range-track { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.dp-vol-range::-moz-range-progress { height: 3px; border-radius: 2px; background: #fff; }
.dp-vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: #fff; border: 0; }
.dp-vol-range::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 0; }
.dp-time {
  height: 28px; padding: 0 8px; margin-left: 2px; border: 0; border-radius: 6px; background: none; cursor: pointer;
  font: 500 12px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; color: rgba(255, 255, 255, .92);
}
.dp-time:hover { background: rgba(255, 255, 255, .08); }
.dp-dur, .dp-sep { color: rgba(255, 255, 255, .5); }
.dp.is-tc .dp-time { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; letter-spacing: .02em; }
.dp-spacer { flex: 1; min-width: 0; }
.dp-speed { position: relative; }
.dp-menu {
  position: absolute; right: 0; bottom: 44px; min-width: 150px; padding: 6px; z-index: 6;
  background: rgba(22, 24, 33, .98); border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
}
.dp-menu-title { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .5); }
.dp-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 7px 10px; background: none; border: 0; border-radius: 6px; cursor: pointer; font-size: 13px; text-align: left; }
.dp-menu button:hover { background: rgba(255, 255, 255, .08); }
.dp-menu button .ic { width: 15px; height: 15px; color: var(--accent); visibility: hidden; filter: brightness(1.4); }
.dp-menu button[aria-checked="true"] { font-weight: 600; }
.dp-menu button[aria-checked="true"] .ic { visibility: visible; }

.dp-big {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: #fff;
  background: rgba(14, 15, 22, .55); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: opacity .2s, transform .2s var(--ease), background .2s;
}
.dp-big .ic { width: 28px; height: 28px; margin-left: 3px; }
.dp-big:hover { background: var(--accent); transform: scale(1.06); }
.dp.is-playing .dp-big, .dp.is-scrubbing .dp-big, .dp.is-error .dp-big { opacity: 0; pointer-events: none; transform: scale(.9); }

.dp-spinner {
  position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: #fff;
  animation: dp-spin .8s linear infinite; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.dp.is-waiting.is-playing .dp-spinner, .dp.is-waiting.is-scrubbing .dp-spinner { opacity: 1; transition-delay: .25s; }
@keyframes dp-spin { to { transform: rotate(360deg); } }

.dp-osd {
  position: absolute; left: 50%; top: 14%; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, .66); font: 600 14px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.dp-osd.show { opacity: 1; transition: none; }
.dp-resume {
  position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 12px;
  padding: 5px 5px 5px 12px; border-radius: 8px; background: rgba(18, 20, 30, .92); border: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px;
}
.dp-resume button { background: rgba(255, 255, 255, .1); border: 0; border-radius: 6px; padding: 5px 10px; cursor: pointer; font-weight: 600; font-size: 12px; }
.dp-resume button:hover { background: var(--accent); }

.dp-msg { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgba(9, 10, 14, .94); text-align: center; }
.dp-msg-card { max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dp-msg-card .ic { width: 32px; height: 32px; color: var(--warn); margin-bottom: 4px; }
.dp-msg h2 { font-size: 17px; line-height: 1.3; }
.dp-msg p { margin: 0; color: rgba(255, 255, 255, .7); font-size: 13.5px; }
.dp-msg-action { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; height: 34px; padding: 0 16px; border-radius: 6px; border: 0; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.dp-msg-action .ic { width: 16px; height: 16px; margin: 0; color: inherit; }
.dp-static .dp-media:empty::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, .14); border-top-color: rgba(255, 255, 255, .7); animation: dp-spin .8s linear infinite;
}

@container (max-width: 600px) {
  .dp-step { display: none; }
  .dp-vol-range { display: none; }
}
@container (max-width: 440px) {
  .dp-controls { padding: 2px 6px 3px; }
  .dp-btn { width: 32px; height: 32px; }
  .dp-btn .ic { width: 18px; height: 18px; }
  .dp-time { padding: 0 4px; font-size: 11.5px; }
  .dp.is-tc .dp-time { font-size: 10.5px; }
  .dp-big { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .dp-big .ic { width: 24px; height: 24px; }
  .dp-msg h2 { font-size: 15px; }
  .dp-msg p { font-size: 12.5px; }
}
@container (max-width: 360px) {
  .dp-pip { display: none; }
}

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .viewer { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 1020px) {
  .w-watch.has-more { grid-template-columns: minmax(0, var(--fit)); }
  .w-main:has(> .w-watch.has-more:not([hidden])) .w-hero { max-width: var(--fit); }
  .w-main:has(> .w-watch.has-more:not([hidden])) .w-hero-text { max-width: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .tree-panel { display: none !important; }
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 760px) {
  body.owner { height: auto; overflow: auto; background: var(--panel); }
  .frame { display: flex; flex-direction: column; height: auto; min-height: 100dvh; padding: 0; }
  .rail {
    position: sticky; top: 0; z-index: 20; flex-direction: row; height: 54px; padding: 0 12px; gap: 6px;
    background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-logo { width: 30px; height: 30px; margin: 0 4px 0 0; flex: none; }
  .rail a { width: auto; height: 34px; padding: 0 12px; display: flex; align-items: center; gap: 7px; border-radius: 999px; background: var(--raised); flex: none; }
  .rail a .ic { width: 16px; height: 16px; }
  .rail a[aria-current] { background: var(--raised-2); }
  .rail a[aria-current]::before { display: none; }
  .rail .nav-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 13px; font-weight: 500; }
  .rail-btn { display: none; }
  .user-menu { left: auto; right: 0; top: 42px; bottom: auto; }
  .workspace { display: block; }
  .owner .top { position: sticky; top: 54px; z-index: 15; height: auto; padding: 10px 16px; border-radius: 0; }
  .owner .top .brand { display: none; }
  .search { width: 100%; margin: 0; }
  .search-key { display: none; }
  .shell { display: block; }
  .content { border-radius: 0; overflow: visible; padding: 0 16px 48px; }
  .list-head { position: static; margin: 0 -16px 14px; padding: 10px 16px; }
  .crumb { font-size: 14px; }
  .crumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .folders { grid-template-columns: 1fr 1fr; gap: 8px; }
  .folder { padding: 10px 8px 8px; }
  .videos { grid-template-columns: 1fr; gap: 10px; }
  .card-main { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; align-items: center; }
  .card-body { padding: 2px 36px 2px 0; }
  .card-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .card-link { opacity: 1; top: 50%; right: 6px; margin-top: -15px; background: none; color: var(--muted); }
  .view-list .card-body { grid-template-columns: minmax(0, 1fr) 64px; }
  .view-list .card-meta .m-size, .view-list .card-meta .m-date, .view-list .list-cols { display: none; }
  .viewer { inset: 0; display: block; overflow-y: auto; background: var(--panel); }
  .viewer-main { border-radius: 0; overflow: visible; }
  .viewer-top { position: sticky; top: 0; z-index: 3; background: var(--panel); flex-wrap: wrap; height: auto; padding: 8px 10px; }
  .vi-actions .btn span { display: none; }
  .viewer-stage { padding: 0; display: block; container-type: normal; }
  .viewer-stage .player-slot { width: 100%; }
  .viewer-stage .dp { border-radius: 0; }
  .viewer-side { border-radius: 0; overflow: visible; }
  .w-main { padding: 0 0 40px; --fit: 100vw; }
  .watch .top { padding: 0 16px; }
  .w-hero { padding: 20px 16px 0; margin-bottom: 18px; flex-wrap: wrap; }
  .w-hero-actions { margin-left: 0; width: 100%; }
  .w-bar { padding: 12px 16px 0; margin-bottom: 12px; }
  .w-bar [data-copy-link] { min-width: 0; }
  .w-bar [data-copy-link] span { display: none; } /* icon only beside Download on phones */
  .card-dl { opacity: 1; top: 50%; right: 6px; margin-top: -15px; background: none; color: var(--muted); }
  .card-go { right: 6px; }
  .w-hero h1 { font-size: 20px; }
  .w-crumbs { padding: 14px 16px 0; margin: 0 0 12px; }
  .w-stage .dp { border-radius: 0; }
  .w-info { padding: 0 16px; }
  .w-main:has(> .w-watch:not([hidden])) .w-hero h1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .w-folder { padding: 4px 16px 0; }
  .w-watch { gap: 18px; }
  .w-more { margin: 0 10px; }
  .more-item { grid-template-columns: 128px minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .card-main { grid-template-columns: 116px minmax(0, 1fr); }
}
@media (hover: none) {
  .card-link, .card-dl { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
