/* The team pages: Footage (the list, one shoot, the clip player), the owner's board, his best videos, Messages and
   Activity. Built from the shared parts and the desk page's card; only what these pages add lives here. */

/* ---- the menu: the unread number, and "More" on a wide screen ---- */
.unread {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px;
  background: var(--brass-ink); color: #fff; font: 700 .6875rem/1 var(--sans);
}
.tabbar .dot { display: grid; }
.tabbar .dot .unread { margin: 0; }
.navmore { position: relative; }
.navmore summary {
  display: flex; align-items: center; gap: 4px; min-height: var(--tap); border-bottom: 2px solid transparent; list-style: none;
  cursor: pointer; user-select: none; transition: color .15s;
}
.navmore summary::-webkit-details-marker { display: none; }
.navmore summary:hover, .navmore[open] summary, .navmore summary.on { color: var(--ink); }
.navmore summary.on { border-bottom-color: var(--brass); }
.navmore summary .i { width: 16px; height: 16px; transition: transform .15s; }
.navmore[open] summary .i { transform: rotate(180deg); }
.navpop {
  position: absolute; top: calc(100% + 6px); left: -14px; z-index: 40; display: grid; min-width: 210px; padding: 6px;
  border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--paper); box-shadow: var(--shadow);
}
.navpop a { gap: 10px; padding: 0 12px; border-bottom: 0; border-radius: var(--r-sm); color: var(--ink); white-space: nowrap; }
.navpop a:hover { background: rgba(29, 26, 19, .05); }
.navpop a.on { background: var(--brass-soft); }
.navpop a .i { width: 18px; height: 18px; color: var(--brass-ink); }

/* ---- shared by these pages ---- */
.linktabs a {
  display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: var(--t-small);
}
.linktabs a[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.linktabs a b { font-weight: 700; opacity: .75; }
@media (pointer: coarse) { .linktabs a { min-height: var(--tap); } }
.footpage .asleep, .shootpage .asleep, .boardpage .asleep, .vidspage .asleep, .msgpage .asleep, .actpage .asleep {
  margin-bottom: var(--s4);
}
.footpage.stale .shootcard, .shootpage.stale .clipcard, .shootpage.stale .cv-stage, .boardpage.stale .vcard,
.boardpage.stale .batch, .vidspage.stale .bcard, .actpage.stale .feed {
  opacity: .55; filter: grayscale(1);
}
.footpage.stale .shootcard, .shootpage.stale .clipcard, .boardpage.stale .vcard { pointer-events: none; }
.iconbtn[disabled] { opacity: .4; pointer-events: none; }

/* ---- footage: the list of shoots ---- */
.footpage .pagehead, .shootpage .pagehead, .boardpage .pagehead, .vidspage .pagehead, .actpage .pagehead { margin-bottom: var(--s4); }
.footdesks { display: grid; gap: var(--s6); }
.shootgrid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
a.card.shootcard { position: relative; display: grid; gap: var(--s3); align-content: start; padding: var(--s3); }
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; border-radius: var(--r-md); overflow: hidden; background: #14110B;
}
.st { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: #14110B; }
.st img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st.none { grid-column: 1 / -1; aspect-ratio: 64 / 9; color: #6E6654; }
.sc-text { min-width: 0; padding: 0 var(--s1) var(--s1); }
.sc-text h3 { margin: 2px 0; font-size: 1.125rem; line-height: 1.25; overflow-wrap: anywhere; }
.sc-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: 4px; }
@media (min-width: 700px) { .shootgrid { gap: var(--s4); } }

/* ---- one shoot: the clips ---- */
.sp-line { margin: calc(-1 * var(--s2)) 0 var(--s4); color: var(--muted); }
.sp-line.bad { color: var(--bad); font-weight: 500; }
.sp-more { margin: var(--s6) 0 var(--s3); font-size: var(--t-h3); }
.clipgrid { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
a.card.clipcard { display: grid; gap: var(--s2); align-content: start; padding: var(--s2) var(--s2) var(--s3); }
.cc-cover {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden;
  background: #14110B;
}
.cc-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cc-len {
  position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 4px; background: rgba(20, 17, 11, .82); color: #fff;
  font-size: .75rem; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums;
}
.cc-text { display: grid; gap: 1px; min-width: 0; padding: 0 var(--s1); }
.cc-text b { font: 600 1rem/1.3 var(--serif); overflow-wrap: anywhere; }
.clipcard.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 699px) {
  .shootpage .pagehead .btn { width: 100%; }
}
@media (min-width: 700px) { .clipgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s4); } }

/* ---- one clip: the player and what was said ---- */
.clipview { display: grid; gap: var(--s4); }
.clipmode .pagehead { flex-wrap: nowrap; align-items: center; gap: var(--s3); }
.clipmode .pagehead > div { min-width: 0; }
.clipmode .pagehead h1 { font-size: 1.375rem; overflow-wrap: anywhere; }
.clipmode .pagehead p[data-sub] { display: none; }
.shootpage.clipmode .pagehead .btn { flex: none; width: auto; min-height: var(--tap); padding: 0 16px; font-size: var(--t-small); }
.cv-stage { display: grid; gap: var(--s2); min-width: 0; }
.cv-player { position: relative; }
.cv-player video { width: 100%; max-height: 52dvh; aspect-ratio: 16 / 9; cursor: pointer; }
.cv-big {
  position: absolute; inset: 0; display: grid; place-items: center; width: 68px; height: 68px; margin: auto; border-radius: 50%;
  background: rgba(255, 253, 248, .94); color: var(--ink); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .6);
}
.cv-big .i { width: 26px; height: 26px; margin-left: 3px; }
.cv-big[disabled] { opacity: .5; }
.cv-wait { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 17, 11, .4); }
.cv-wait .spin { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.cv-bar { display: flex; align-items: center; gap: var(--s2); }
.cv-bar .iconbtn { flex: none; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); }
.cv-bar .iconbtn .i { width: 18px; height: 18px; }
.cv-seek { flex: 1; min-width: 0; height: var(--tap); margin: 0; accent-color: var(--brass-ink); }
.cv-time { flex: none; min-width: 5.6em; text-align: right; font-variant-numeric: tabular-nums; }
.cv-msg { color: var(--bad); font-weight: 500; }
.cv-head { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); }
.cv-head h2 { flex: 1; min-width: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.cv-head .vw-step a[aria-disabled="true"] { opacity: .3; pointer-events: none; }
.cv-words { min-width: 0; }
.cv-words h3 { margin-bottom: var(--s2); }
.words { position: relative; display: grid; gap: 2px; }
.word {
  display: flex; align-items: baseline; gap: var(--s3); width: 100%; min-height: var(--tap); padding: 10px 12px;
  border-radius: var(--r-md); text-align: left; line-height: 1.45;
}
button.word:hover { background: rgba(29, 26, 19, .05); }
.word.on, button.word.on:hover { background: var(--brass-soft); }
.word.plain { color: var(--muted); }
.w-at {
  flex: none; min-width: 2.6em; color: var(--brass-ink); font-size: var(--t-small); font-weight: 600; font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) {
  .clipview { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: var(--s5); align-items: start; }
  .cv-player video { max-height: calc(100dvh - 330px); }
  .words { max-height: calc(100dvh - 330px); overflow-y: auto; padding-right: 4px; }
}

/* ---- the owner's board ---- */
.boardpage .tabs, .vidspage .tabs, .actpage .tabs { margin-bottom: var(--s4); }
.boardbody { display: grid; gap: var(--s6); }
.boardbody h2 .count { margin-left: 4px; }
.batches { display: grid; gap: var(--s3); }
.batch { padding: var(--s4) var(--s4) var(--s2); }
.b-row { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s3) 0; }
.b-thumb { position: relative; flex: none; width: 36px; height: 56px; border-radius: 6px; overflow: hidden; background: #14110B; }
.b-thumb img { width: 100%; height: 100%; object-fit: cover; }
.b-main { flex: 1; min-width: 0; }
.b-main h3 { font-size: 1.0625rem; overflow-wrap: anywhere; }
.b-note { margin-top: 4px; color: var(--muted); font-size: var(--t-small); overflow-wrap: anywhere; }
.b-note b { color: var(--ink); font-weight: 600; }
.b-row .pill { flex: none; }
@media (max-width: 599px) {
  .b-row { flex-wrap: wrap; }
  .b-main { flex-basis: calc(100% - 36px - var(--s3)); }
  .b-row .pill { margin-left: calc(36px + var(--s3)); }
}

/* ---- the owner's best videos ---- */
.bsub { margin: calc(-1 * var(--s1)) 0 var(--s4); max-width: 62ch; }
.bgrid { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bcard { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s2) var(--s2) var(--s3); }
.bcard .cover { width: 100%; }
.bcard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #14110B; }
.bcard video[controls] { object-fit: contain; }
.bcard .cv-big { width: 56px; height: 56px; }
.bcard .cv-big .i { width: 22px; height: 22px; }
.bcard .vc-text { padding: 0 var(--s1); }
.bcard .vc-text h3 { font-size: 1.0625rem; }
.bcard .vc-line { -webkit-line-clamp: 4; line-clamp: 4; }
@media (min-width: 700px) { .bgrid { grid-template-columns: repeat(auto-fill, minmax(204px, 1fr)); gap: var(--s5) var(--s4); } }

/* ---- messages ---- */
main.msgmain { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
.msgpage {
  display: flex; flex-direction: column; max-width: 720px; margin: 0 auto;
  min-height: calc(100dvh - var(--top-h) - var(--bar-h) - var(--s5) - env(safe-area-inset-bottom));
}
.banner:not([hidden]) ~ main .msgpage { min-height: calc(100dvh - var(--top-h) - var(--bar-h) - var(--s5) - 56px); }
.msgpage .pagehead { margin-bottom: var(--s3); }
.msgs { display: flex; flex: 1; flex-direction: column; gap: 6px; padding-bottom: var(--s4); }
.msgpage .chat-none { flex: 1; }
.msgs li { display: flex; flex-direction: column; }
.msgs .turn { max-width: min(82%, 520px); }
.msgs .t-text { font-size: 1rem; }
.msgs .turn.them .t-text { background: var(--paper); border: 1px solid var(--line); }
.msgs .t-label { margin: 6px 0 0 4px; }
.msgs .t-time { margin: 0 4px 6px; }
.msg-day {
  align-self: center; margin: var(--s4) 0 var(--s2); font: 700 var(--t-micro)/1.2 var(--sans); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.msgs li:first-child .msg-day { margin-top: 0; }
.msg-foot {
  position: sticky; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); z-index: 5; display: grid; gap: 6px;
  margin: 0 calc(-1 * var(--s4)); padding: var(--s2) var(--s4) var(--s3); background: var(--bg); border-top: 1px solid var(--line);
}
.msg-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); align-items: end; }
.msg-box textarea { min-height: var(--tap); max-height: 168px; resize: none; }
.msg-box textarea[disabled] { background: var(--bg); }
.msg-jump { justify-self: center; position: absolute; top: -52px; box-shadow: var(--shadow); }
.msg-line { color: var(--muted); }
.msg-line.bad { color: var(--bad); font-weight: 500; }
.msgpage.stale .msgs { opacity: .7; }
@media (min-width: 900px) {
  main.msgmain { padding-bottom: 0; }
  .msgpage { min-height: calc(100dvh - var(--top-h) - var(--s6)); }
  .banner:not([hidden]) ~ main .msgpage { min-height: calc(100dvh - var(--top-h) - var(--s6) - 56px); }
  .msg-foot { bottom: 0; margin: 0; padding: var(--s3) 0 var(--s4); }
}

/* ---- activity ---- */
.actpage { max-width: 820px; margin: 0 auto; }
.days { display: grid; gap: var(--s5); }
.dayhead { font-size: var(--t-h3); }
.feed { padding: 0 var(--s4); }
.frow { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s3) 0; }
a.frow:hover .f-text { text-decoration: underline; text-underline-offset: 3px; }
.f-text { flex: 1; min-width: 0; font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; }
.f-meta { flex: none; max-width: 40%; text-align: right; }
.frow.new .y-ico { background: var(--brass-ink); color: #fff; }
.frow.new .f-text { font-weight: 600; }
@media (max-width: 599px) {
  .frow { flex-wrap: wrap; row-gap: 2px; }
  .f-text { flex-basis: calc(100% - 34px - var(--s3)); }
  .f-meta { max-width: none; margin-left: calc(34px + var(--s3)); text-align: left; }
}
