/* ── SHARE ─────────────────────────────────────────────
   Two surfaces: the owner's share dialog (.sh-*) and the recipient's
   read-only page at /v/<token> (.sv-*). Tokens only — accent is reserved
   for the selected state, links and the brand mark, per branddesign.md. */

/* ── Share dialog ───────────────────────────────────── */
/* Which video this is. Shown before anything else, and before the settings
   have even loaded — a public link is not something to grant against an
   unlabelled dialog. */
.sh-vid {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--b1);
}
.sh-vid-thumb {
  flex: 0 0 auto; width: 72px; height: 41px; object-fit: cover;
  border-radius: var(--r-2); border: 1px solid var(--b1); background: var(--bg3);
}
.sh-vid-noimg { background: var(--bg3); }
.sh-vid-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sh-vid-t {
  font-size: 13.5px; font-weight: 550; color: var(--tx); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sh-vid-d { font-size: 11.5px; color: var(--t4); }

.sh-opts { display: flex; flex-direction: column; gap: 2px; }

.sh-opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 12px; border: 1px solid transparent; border-radius: var(--r-3);
  background: none; text-align: left; cursor: pointer; width: 100%;
  transition: background .12s ease, border-color .12s ease;
}
.sh-opt:hover { background: var(--bg3); }
.sh-opt.on    { background: var(--bg3); border-color: var(--b2); }

.sh-opt-mark {
  flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px;
  border: 1.5px solid var(--b3); border-radius: 50%;
  position: relative; transition: border-color .12s ease;
}
.sh-opt.on .sh-opt-mark { border-color: var(--accent); }
.sh-opt.on .sh-opt-mark::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--accent);
}

.sh-opt-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sh-opt-t   { font-size: 13.5px; font-weight: 550; color: var(--tx); }
.sh-opt-d   { font-size: 12px; color: var(--t3); line-height: 1.5; }

.sh-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--b1); }
.sh-lbl { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--t4); }
.sh-hint { font-size: 12px; color: var(--t3); line-height: 1.55; margin: 0; }

.sh-perm { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-pill {
  padding: 7px 13px; border: 1px solid var(--b2); border-radius: var(--r-pill);
  background: none; color: var(--t2); font-size: 12.5px; cursor: pointer;
  transition: all .12s ease;
}
.sh-pill:hover { border-color: var(--b3); color: var(--tx); }
.sh-pill.on    { background: var(--fill, var(--tx)); border-color: var(--fill, var(--tx)); color: var(--fill-ink); font-weight: 550; }

.sh-link { display: flex; gap: 6px; }
.sh-link input {
  flex: 1; min-width: 0; padding: 9px 11px;
  border: 1px solid var(--b2); border-radius: var(--r-3);
  background: var(--bg1); color: var(--t2);
  font-family: var(--ff-code, monospace); font-size: 12px;
}
.sh-link input:focus { outline: none; border-color: var(--accent-line); }
.sh-copy {
  flex: 0 0 auto; padding: 9px 16px; border: none; border-radius: var(--r-3);
  background: var(--fill, var(--tx)); color: var(--fill-ink); font-size: 12.5px; font-weight: 550; cursor: pointer;
}
.sh-copy:hover { opacity: .88; }

/* ── Shared video page ──────────────────────────────── */
/* The app pins html/body to overflow:hidden and scrolls inside its own panes,
   so this page has to be its own scroll container — otherwise anything below
   the fold is simply unreachable. */
#sharedScreen { display: none; height: 100vh; overflow-y: auto; background: var(--bg); color: var(--tx); }

.sv-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  /* Full-bleed rule, but the brand and the action line up with the text column
     below rather than floating out at the window edges on a wide screen. */
  padding: 14px max(24px, calc((100% - 712px) / 2));
  border-bottom: 1px solid var(--b1);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.sv-brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--tx); text-decoration: none; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em;
}
/* Three leaning slabs — the same mark as the splash loader, held still. */
.sv-mark { display: inline-flex; gap: 2.5px; align-items: flex-end; }
.sv-mark i {
  width: 3.5px; height: 13px; background: var(--accent);
  border-radius: 1px; transform: skewX(-14deg); display: block;
}
.sv-mark i:nth-child(2) { opacity: .6; }
.sv-mark i:nth-child(3) { opacity: .3; }

.sv-top-actions { display: flex; align-items: center; gap: 10px; }
.sv-btn {
  display: inline-block; padding: 9px 16px; border: none; border-radius: var(--r-3);
  background: var(--fill, var(--tx)); color: var(--fill-ink); font-size: 13px; font-weight: 550;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.sv-btn:hover:not(:disabled) { opacity: .88; }
.sv-btn:disabled { opacity: .5; cursor: default; }
.sv-ro { font-size: 12.5px; color: var(--t4); }

.sv-wrap { max-width: 760px; margin: 0 auto; padding: 48px 24px 96px; }
.sv-doc  { display: flex; flex-direction: column; }

.sv-attr  { font-size: 12.5px; color: var(--t3); margin-bottom: 10px; }
.sv-title { font-size: 34px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin: 0 0 14px; }

.sv-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  font-size: 12.5px; color: var(--t3);
  padding-bottom: 26px; border-bottom: 1px solid var(--b1);
}
.sv-stage {
  padding: 3px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--b2); font-size: 11.5px; color: var(--t2);
}
.sv-stage-Complete { border-color: var(--accent-line); color: var(--accent); }

.sv-sec { padding-top: 34px; }
.sv-h2 {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--t4); margin: 0 0 16px;
}
.sv-field { margin-bottom: 22px; }
.sv-lbl   { font-size: 12.5px; color: var(--t3); margin-bottom: 6px; }
.sv-lbl:empty { display: none; }
.sv-val   { font-size: 15px; line-height: 1.75; color: var(--tx); white-space: pre-wrap; overflow-wrap: anywhere; }
/* Long text expands in place rather than scrolling in a box — a nested
   scroller inside a scrolling page traps the wheel and hides how much is
   there — but it starts clamped, so a 3,000-character transcript doesn't
   bury everything below it. */
.sv-val.mono {
  font-size: 14.5px; line-height: 1.85; color: var(--t2);
  padding: 16px 18px; background: var(--bg2); border: 1px solid var(--b1);
  border-radius: var(--r-3);
}
.sv-val.clamp { max-height: 216px; overflow: hidden; position: relative; }
.sv-val.clamp::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 88px;
  background: linear-gradient(to bottom, rgba(0,0,0,0), var(--bg2));
  pointer-events: none;
}
.sv-more {
  margin-top: 8px; padding: 7px 13px;
  border: 1px solid var(--b2); border-radius: var(--r-pill);
  background: none; color: var(--t2); font-size: 12.5px; cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.sv-more:hover { border-color: var(--b3); color: var(--tx); }
.sv-img  { display: block; width: 100%; max-width: 480px; border-radius: var(--r-3); border: 1px solid var(--b1); }
.sv-link { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.sv-link:hover { text-decoration: underline; }

.sv-foot {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--b1);
  display: flex; flex-direction: column; gap: 10px;
  font-size: 12.5px; color: var(--t3); line-height: 1.65;
}
.sv-foot p { margin: 0; }

.sv-empty { text-align: center; padding: 96px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sv-empty-mark { display: inline-flex; gap: 3px; align-items: flex-end; margin-bottom: 8px; }
.sv-empty-mark i { width: 4px; height: 16px; background: var(--accent); border-radius: 1px; transform: skewX(-14deg); }
.sv-empty-mark i:nth-child(2) { opacity: .55; }
.sv-empty-mark i:nth-child(3) { opacity: .25; }
.sv-empty h1 { font-size: 21px; font-weight: 600; margin: 0; }
.sv-empty p  { font-size: 13.5px; color: var(--t3); margin: 0 0 8px; max-width: 42ch; line-height: 1.65; }

@media (max-width: 640px) {
  .sv-wrap  { padding: 32px 18px 72px; }
  .sv-title { font-size: 26px; }
  .sv-top   { padding: 12px 16px; }
}
