/* Capture Media client page. Look: "Client Light" (white, black frame, one blue). Never green. */
:root {
  color-scheme: light only;
  --page: #FFFFFF; --behind: #F4F4F4;
  --black: #0A0A0A; --ink: #131313; --ink-2: #6E6E73; --ink-3: #8E8E93; --line: #E6E8EB; --line-strong: #C7C9CE;
  --blue: #066B9E; --blue-dark: #055782; --blue-tint: #EAF3F8; --blue-on-black: #6FB7DC;
  --amber: #B26A00; --amber-tint: #FFF4E0; --red: #C4281C; --red-tint: #FDECEA;
  --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --r-control: 8px; --r-media: 12px;
  --gutter: 20px;
  --media-h: clamp(150px, calc(100svh - 650px), 340px);
  caret-color: var(--blue); accent-color: var(--blue);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 17px/1.5 var(--font); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video, svg { display: block; max-width: 100%; }
::selection { background: var(--blue-tint); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the frame ---------- */
.sheet { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--page); }
.top { background: var(--black); color: #fff; min-height: 72px; padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { width: 130px; height: auto; }
.top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; min-width: 0; }
.who { font: 600 11px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; overflow-wrap: anywhere; }
.top-link { background: none; border: 0; color: #fff; padding: 8px 0; min-height: 44px; font: 500 14px/1.3 var(--font); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.top-link:focus-visible { outline-color: #fff; }
.top-right:has(.top-link:not([hidden])) { gap: 0; }
.top-right:has(.top-link:not([hidden])) .top-link { min-height: 36px; padding: 4px 0; }
.foot { position: sticky; bottom: 0; z-index: 5; }
.band { background: var(--black); height: calc(32px + env(safe-area-inset-bottom)); }
.bar { background: #fff; border-top: 1px solid var(--line); padding: 12px var(--gutter) 16px; }
.bar .note { text-align: center; margin-bottom: 12px; }
.view { flex: 1; outline: none; }
.notice { margin: 16px var(--gutter) 0; padding: 12px 16px; border-radius: var(--r-control); background: var(--blue-tint); border: 1px solid var(--blue); color: var(--ink); font-size: 14px; line-height: 1.5; }
.notice.warn { background: var(--amber-tint); border-color: var(--amber); }
.notice.bad { background: var(--red-tint); border-color: var(--red); }

/* ---------- type ---------- */
.title { font: 800 28px/1.15 var(--font); text-transform: uppercase; letter-spacing: -.005em; }
.title::before { content: ""; display: block; width: 40px; height: 3px; background: var(--blue); margin-bottom: 16px; }
.label { font: 600 11px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.h3 { font: 800 17px/1.3 var(--font); text-transform: uppercase; }
.note { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- page layout (phone first) ---------- */
.page { padding: 20px var(--gutter) 32px; display: flex; flex-direction: column; gap: 16px; }
.side { display: contents; }
.p-title { order: 1; }
.p-info { order: 2; }
.p-main { order: 3; min-width: 0; }
.p-act { order: 4; }
.p-info:empty, .p-act:empty { display: none; }
.p-info.desktop-only { display: flex; flex-direction: column; gap: 20px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: var(--r-control); font: 600 17px/1.2 var(--font); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); text-align: center; }
.btn:hover { background: var(--behind); }
.btn:active { background: #EAEAEA; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn.primary:active { background: #044A70; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.full { width: 100%; }
.btn-row { display: flex; gap: 12px; }
.btn-row .btn { flex: 1; padding: 0 10px; }
.btn-row .btn:not(.primary) { flex: 1.25; font-weight: 500; }
.btn svg { width: 20px; height: 20px; }
.quiet { background: none; border: 0; padding: 8px 0; min-height: 44px; font: 500 14px/1.3 var(--font); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.quiet:hover { color: var(--blue); }
.quiet:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 10px 0; min-height: 44px; font: 500 14px/1.3 var(--font); color: var(--ink-2); white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--blue); }
.tab:hover { color: var(--ink); }
.tab .count { font-variant-numeric: tabular-nums; margin-left: 4px; }
.views { display: flex; align-items: center; gap: 4px; margin: 12px 0 0; }
.views .vtab { background: none; border: 0; border-bottom: 1px solid transparent; padding: 0 2px; margin-right: 14px; min-height: 44px; font: 500 14px/1.3 var(--font); color: var(--ink-2); }
.views .vtab span { display: inline-block; padding: 2px 0; border-bottom: 1px solid transparent; }
.views .vtab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.views .vtab[aria-selected="true"] span { border-bottom-color: var(--ink); }
.views .grow { flex: 1; }
.views .meta { font: 600 11px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- status marks ---------- */
.mark { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -4px; }
.mark svg { width: 100%; height: 100%; }
.mark.pic { position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; background: #fff; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.status.change { color: var(--amber); font-weight: 600; }
.status.ok { color: var(--blue); font-weight: 600; }

/* ---------- thumbnails and media ---------- */
.thumb { display: block; position: relative; background: #2B2F4A; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .badge, .badge { position: absolute; right: 8px; top: 8px; background: var(--black); color: #fff; border-radius: 6px; padding: 2px 8px; font: 600 11px/1.5 var(--font); display: inline-flex; align-items: center; gap: 4px; }
.badge svg { width: 8px; height: 8px; }
.thumb .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.thumb .noimg svg { width: 36px; height: 36px; }

/* ---------- feed ---------- */
.feed { display: flex; flex-direction: column; gap: 24px; margin-top: 16px; }
.fi { display: block; width: 100%; min-width: 0; text-align: left; background: none; border: 0; padding: 0; }
.fi-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fi-head .who2 { flex: 1; min-width: 0; line-height: 1.3; }
.fi-head .who2 b { display: block; font-weight: 600; }
.fi-head .who2 span { font-size: 14px; color: var(--ink-2); }
.fi-head .st { font-size: 14px; font-weight: 500; text-align: right; }
.fi .thumb { border-radius: var(--r-media); aspect-ratio: 16 / 10; }
.fi-cap { display: block; margin-top: 8px; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--black); color: #fff; display: grid; place-items: center; font: 800 14px/1 var(--font); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.legend { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- list ---------- */
.rows { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; padding: 0; min-height: 64px; }
.row .thumb { width: 64px; height: 64px; border-radius: 8px; flex: none; }
.row .txt { min-width: 0; flex: 1; line-height: 1.4; }
.row .when { display: block; font-weight: 600; }
.row .line2 { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.row .line2 .status { color: var(--ink); }
.row .line2 .status.change { color: var(--amber); }
.row .line2 .status.ok { color: var(--blue); }
.row .cap { display: block; font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { width: 20px; height: 20px; color: var(--ink-2); flex: none; }
.tick { width: 44px; height: 44px; flex: none; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: #fff; display: grid; place-items: center; padding: 0; }
.tick svg { width: 20px; height: 20px; }
.tick:hover { background: var(--behind); }
.group-label { margin-top: 20px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }

/* ---------- month ---------- */
.mnav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 4px; }
.mnav .mlabel { font: 800 17px/1 var(--font); text-transform: uppercase; min-width: 110px; text-align: center; }
.mnav button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; border-radius: var(--r-control); }
.mnav button:hover { background: var(--behind); }
.mnav svg { width: 18px; height: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 0; margin-top: 4px; text-align: center; }
.cal .dow { font: 600 11px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 8px 0; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 56px; padding: 6px 0 4px; background: none; border: 1px solid transparent; border-radius: var(--r-control); font-size: 14px; color: var(--ink-2); }
.day .n { font-variant-numeric: tabular-nums; line-height: 20px; }
.day.has { color: var(--ink); font-weight: 600; }
.day.today .n { color: var(--blue); font-weight: 800; }
.day[aria-pressed="true"] { background: var(--blue-tint); border-color: var(--blue); }
.day .mark { width: 20px; height: 20px; vertical-align: 0; }
.day.blank { visibility: hidden; }
.dayhead { margin-top: 16px; }

/* ---------- results ---------- */
.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 24px; margin-top: 8px; }
.stat b { display: block; font: 800 28px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.p-act .note { margin-bottom: 12px; }
.best { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 14px; color: var(--ink-2); }
.best .thumb { width: 44px; height: 44px; border-radius: 8px; flex: none; }
.best b { color: var(--ink); font-weight: 600; }
.results-panel { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.results-panel .best { margin-top: 20px; align-items: flex-start; }
.best .thumb { margin-top: 2px; }

/* ---------- black block ---------- */
.block { background: var(--black); color: #fff; border-radius: var(--r-control); padding: 20px 24px; display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; }
.block .val { white-space: nowrap; }
.block .goesto { display: none; }
.block .label { color: var(--blue-on-black); display: block; margin-bottom: 4px; }
.block .val { font: 800 22px/1.2 var(--font); }
.block .val.sm { font-size: 17px; }
.block .wide { grid-column: 1 / -1; }
.block.big .val.num { font-size: 34px; }

/* ---------- post view ---------- */
.progress { display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.progress .track { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress .track i { display: block; height: 100%; background: var(--black); }
.pbox { border: 1px solid var(--line); border-radius: var(--r-control); overflow: hidden; background: #fff; }
.ptabs { display: flex; border-bottom: 1px solid var(--line); }
.ptab { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; min-height: 48px; padding: 0 8px; font: 500 14px/1.3 var(--font); color: var(--ink-2); }
.ptab[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--blue); }
.pv { background: #fff; }
.pv-head { display: flex; align-items: center; gap: 12px; padding: 12px; }
.pv-head .nm { flex: 1; min-width: 0; line-height: 1.3; font-size: 14px; }
.pv-head .nm b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-head .nm span { color: var(--ink-2); font-size: 11px; }
.pv-head .more { color: var(--ink-2); letter-spacing: 2px; font-weight: 800; }
.pv-media { position: relative; background: #000; height: var(--media-h); overflow: hidden; }
.pv-media > img, .pv-media > video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.pv-media > video { object-fit: cover; }
.pv-icons { display: flex; align-items: center; gap: 16px; padding: 10px 12px 4px; }
.pv-icons svg { width: 24px; height: 24px; }
.pv-icons .sp { flex: 1; }
.pv-cap { padding: 4px 12px 14px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.pv-cap b { font-weight: 600; margin-right: 4px; }
.pv-fb .pv-cap { padding: 0 12px 12px; font-size: 15px; }
.pv-react { display: flex; border-top: 1px solid var(--line); margin: 0 12px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.pv-react span { flex: 1; text-align: center; padding: 10px 0; }
.pv-li .avatar { border-radius: 2px; width: 40px; height: 40px; }
.pv-li .pv-cap { padding: 0 12px 12px; font-size: 14px; }
.carousel { position: relative; height: 100%; }
.track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.track > * { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.count-badge { position: absolute; right: 8px; top: 8px; background: var(--black); color: #fff; border-radius: 6px; padding: 2px 8px; font: 600 11px/1.5 var(--font); font-variant-numeric: tabular-nums; }
.cbtn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cbtn svg { width: 18px; height: 18px; }
.cbtn.prev { left: 8px; } .cbtn.next { right: 8px; }
.cbtn:disabled { opacity: 0; pointer-events: none; }
.dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.dots i.on { background: var(--blue); }
.convo { margin-top: 24px; }
.convo .h3 { margin-bottom: 8px; }
.msg { padding: 12px 0; border-top: 1px solid var(--line); }
.msg .by { font-size: 14px; font-weight: 600; }
.msg .at { font-size: 11px; color: var(--ink-2); margin-left: 8px; font-weight: 400; }
.msg p { font-size: 17px; overflow-wrap: anywhere; white-space: pre-line; }
.msg .sub { font-size: 14px; color: var(--ink-2); }
.cform { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cform .btn { min-height: 44px; font-size: 14px; }

.stbox { display: flex; flex-direction: column; gap: 8px; }
.stbox .line { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.stbox .line .mark { width: 24px; height: 24px; }
.stbox .line.change { color: var(--amber); } .stbox .line.ok { color: var(--blue); }
.stbox p { font-size: 14px; color: var(--ink-2); }
.stbox a { color: var(--blue); font-weight: 600; font-size: 17px; min-height: 44px; display: inline-flex; align-items: center; }
.links { display: flex; flex-direction: column; }

/* ---------- panels: states and done ---------- */
.panel { padding: 48px var(--gutter) 32px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; max-width: 560px; }
.panel .title { margin-bottom: 0; }
.panel p { color: var(--ink); }
.panel .btn { min-width: 200px; }
.donebig { font: 800 22px/1.3 var(--font); }
.skeleton { height: 14px; border-radius: 4px; background: var(--line); width: 60%; }

/* ---------- dialogs ---------- */
dialog { border: 0; padding: 0; width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 12px 12px 0 0; background: #fff; color: var(--ink); max-height: 92dvh; overflow: auto; }
dialog::backdrop { background: rgba(10, 10, 10, .55); }
.dlg { padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field .lab { font-weight: 600; font-size: 14px; }
input[type="text"], textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-control); padding: 12px 14px; font-size: 17px; line-height: 1.5; background: #fff; color: var(--ink); }
input[type="text"] { min-height: 48px; }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 44px; padding: 0 16px; border-radius: var(--r-control); border: 1px solid var(--line-strong); background: #fff; font: 500 14px/1.2 var(--font); }
.choice[aria-pressed="true"] { background: var(--blue-tint); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.err { color: var(--red); font-size: 14px; font-weight: 500; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  :root { --gutter: 48px; --media-h: 520px; }
  body { background: var(--behind); }
  .sheet { max-width: 1120px; margin: 32px auto; min-height: calc(100dvh - 64px); border-radius: var(--r-control); overflow: hidden; }
  .top { min-height: 96px; }
  .logo { width: 160px; }
  .band { height: 48px; }
  .foot { position: static; }
  .page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 48px; align-items: start; padding-top: 32px; padding-bottom: 48px; }
  .side { display: flex; flex-direction: column; gap: 20px; grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
  .p-main { grid-column: 1; grid-row: 1; }
  .tabs { margin: 0; padding: 0; gap: 32px; }
  .tab { font-size: 17px; }
  .views .vtab { font-size: 14px; }
  .btn { min-height: 48px; }
  .btn-row .btn { padding: 0 12px; }
  .block .goesto { display: block; }
  .block { grid-template-columns: 1fr 1fr; }
  .feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; margin-top: 24px; }
  .fi-head { display: none; }
  .fi .thumb { aspect-ratio: 1 / 1; }
  .fi-when { display: block; margin-top: 8px; font-weight: 600; }
  .fi .fi-cap { margin-top: 0; color: var(--ink-2); }
  .cal .dow { font-size: 11px; }
  .day { min-height: 64px; }
  dialog { width: 480px; max-width: calc(100vw - 32px); margin: auto; border-radius: var(--r-control); }
  .dlg { padding: 32px; }
  .pv-media { height: 560px; }
}
@media (max-width: 899px) { .fi-when { display: none; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

.best-link { color: var(--blue); font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.updated { margin-top: 12px; color: var(--ink-3); }
