/* Desi Dog Reels — app screen, style "true-black-flat" (taste-skill app sheet, seed 1846995640).
   The move: elevation by lightness alone (#000 ground, #111 card, #2a2a2a nested panel), no
   borders or shadows on cards, the primary control is a white 36px pill with black text.
   Face: one marigold data hue (#f0b03f) from the desi-dog world, only on data marks
   (posted slots in the posting clock, the pictures-left bar); never on buttons or nav.

   Grid (desktop): a centred 1120px column. Lead row = 1fr + 340px rail + 14px gap:
   766 + 14 + 340 = 1120. Inside the lead card: 22 + 288 (9:16 player, 512px tall) + 22 + 412 + 22 = 766. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/inter-latin-400-600.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ground: #000000;
  --surface: #111111;
  --raised: #2a2a2a;
  --border: #1a1a1a;
  --rule: #161616;
  --control: #444444;
  --text: #ffffff;
  --muted: #b4b4b4;
  --faint: #949494;
  --accent: #f0b03f;
  --positive: #3fc07a;
  --negative: #e5484d;
  --pill-positive-bg: #172a1d; --pill-positive-ink: #3fc07a;
  --pill-negative-bg: #2c1a20; --pill-negative-ink: #e5566f;
  --pill-warning-bg: #2b2414;  --pill-warning-ink: #e5a93b;
  --pill-neutral-bg: #222222;  --pill-neutral-ink: #ffffff;
  --radius-card: 20px;
  --radius-inner: 12px;
  --radius-control: 999px;
  --gap: 14px;
  --pad: 22px;
  --control-height: 36px;
  --fs-title: 20px;
  --fs-section: 16px;
  --fs-kpi: 24px;
  --fs-body: 14px;
  --fs-small: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --column: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 var(--fs-body)/20px var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.col { width: min(var(--column), calc(100% - 2 * var(--side, 32px))); margin-inline: auto; }

/* ───────── top bar: on the page ground; a 1px rule once content scrolls under it ───────── */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--ground);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar.scrolled { box-shadow: 0 1px 0 var(--border); } /* taste-skill-ignore: the sticky bar's 1px rule while content scrolls under it */
.bar-in { height: 48px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; }
.links { display: flex; gap: 22px; }
.links a { color: #bbbbbb; text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 0; }
.links a[aria-current="page"] { color: var(--text); }
.links a:hover { color: var(--text); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.profile { color: var(--muted); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.profile:hover { color: var(--text); }
.profile svg, .btn svg, .text-btn svg { width: 16px; height: 16px; flex: none; }
.menu-btn { display: none; }

/* ───────── controls ───────── */
.btn {
  height: var(--control-height); padding: 0 16px; border-radius: var(--radius-control);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text); border: 1px solid var(--control);
  font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s ease, transform .08s ease, border-color .12s ease;
}
.btn:hover { background: #1c1c1c; border-color: #5a5a5a; }
.btn:active { transform: scale(.97); }
.btn.primary { background: #ffffff; color: #000000; border-color: #ffffff; }
.btn.primary:hover { background: #e6e6e6; border-color: #e6e6e6; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.text-btn {
  background: none; border: 0; padding: 4px 0; color: var(--text); font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 14px;
}
.text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-btn.muted { color: var(--muted); }

.pill {
  flex: none; white-space: nowrap; display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--pill-neutral-bg); color: var(--pill-neutral-ink);
}
.pill.pos { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.neg { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }

/* ───────── canvas and title row ───────── */
main { padding-bottom: 64px; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 28px 0 20px; }
h1 { font-size: var(--fs-title); line-height: 28px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.finding { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 760px; }
.finding b { color: var(--text); font-weight: 500; }
.fresh { color: var(--faint); font-size: 12px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }

h2 { font-size: var(--fs-section); line-height: 22px; font-weight: 600; margin: 0; }
.card { background: var(--surface); border-radius: var(--radius-card); }

/* ───────── lead: the selected reel + the posting clock ───────── */
.lead { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: stretch; }
.reel-card { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: var(--pad); padding: var(--pad); align-items: start; }
.player { background: #000; border-radius: var(--radius-inner); overflow: hidden; aspect-ratio: 9 / 16; width: 100%; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.details { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.meta-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.reel-title { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.scene { margin: -8px 0 0; color: var(--muted); }
.caption-box { background: var(--raised); border-radius: var(--radius-inner); padding: 14px 16px; }
.caption-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.caption-head span { color: var(--muted); font-size: 12px; }
.caption-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 140px; overflow: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions .links-line { display: flex; gap: 18px; flex-wrap: wrap; width: 100%; }
.hint { margin: 0; color: var(--faint); font-size: 12px; line-height: 18px; }
.error-box { background: var(--pill-negative-bg); color: var(--pill-negative-ink); border-radius: var(--radius-inner); padding: 12px 14px; overflow-wrap: anywhere; }
.showing { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }

/* posting clock */
.clock { padding: var(--pad); display: flex; flex-direction: column; gap: 20px; }
.clock-head { display: flex; align-items: baseline; justify-content: space-between; }
.clock-head span { color: var(--faint); font-size: 12px; }
.slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.slot { display: grid; grid-template-columns: 52px 14px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 44px; }
.slot-time { font-weight: 600; }
.slot-mark { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--control); justify-self: center; }
.slot.done .slot-mark { background: var(--accent); border-color: var(--accent); }
.slot.failed .slot-mark { border-color: var(--negative); }
.slot-text { min-width: 0; }
.slot-text b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-text span { color: var(--muted); font-size: 12px; }
.slot-text a { text-decoration: none; }
.slot-text a:hover b { text-decoration: underline; text-underline-offset: 3px; }

.queue { background: var(--raised); border-radius: var(--radius-inner); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.queue-label { color: var(--muted); font-size: 12px; }
.queue-figure { font-size: var(--fs-kpi); line-height: 30px; font-weight: 500; }
.queue-figure small { font-size: 14px; color: var(--muted); font-weight: 400; }
.track { height: 8px; border-radius: 999px; background: #3a3a3a; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.track-ends { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; }
.notif-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.week { display: flex; flex-direction: column; }
.week-row { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.week-row + .week-row { border-top: 1px solid var(--rule); }
.week-row span:first-child { color: var(--muted); }
.week-row .bad { color: var(--pill-negative-ink); }
.notif-line span { color: var(--muted); }

/* ───────── earlier reels ───────── */
.earlier { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.section-head span { color: var(--faint); font-size: 12px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px 8px; margin: 0 -8px; border-radius: 14px; min-height: 104px; cursor: pointer;
  transition: background-color .12s ease;
}
.row + .row { border-top: 1px solid var(--rule); }
.row:hover { background: #0b0b0b; }
.row[aria-current="true"] { background: var(--surface); border-top-color: transparent; }
.row[aria-current="true"] + .row { border-top-color: transparent; }
.thumb { width: 64px; height: 80px; border-radius: 8px; object-fit: cover; background: var(--surface); }
.row-main { min-width: 0; }
.row-main b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-weight: 500; overflow: hidden; overflow-wrap: anywhere; }
.row-sub { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-actions { display: flex; align-items: center; gap: 18px; }
.more { margin-top: 16px; }

/* ───────── empty, loading, error ───────── */
.empty { border: 1px dashed var(--control); border-radius: var(--radius-inner); padding: 14px 16px; color: var(--muted); }
.skel { background: #1d1d1d; border-radius: 6px; }
.block-error { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 14px 0; }

/* ───────── sign in and setup ───────── */
.gate { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.gate-card { width: min(420px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.gate-card p { margin: 0; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 500; }
.input {
  height: 40px; border-radius: 10px; border: 1px solid var(--control); background: #0b0b0b; color: var(--text);
  padding: 0 12px; font: inherit; font-size: 16px;
}
.input:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.form-error { color: var(--pill-negative-ink); min-height: 20px; margin: 0; }
.setup-list { margin: 0; padding-left: 18px; color: var(--muted); }
.setup-list b { color: var(--text); font-weight: 500; }

/* ───────── notifications (settings in two columns) ───────── */
.settings { padding-top: 4px; }
.set-row { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 40px; padding: 32px 0; }
.set-row + .set-row { border-top: 1px solid var(--border); }
.set-label h2 { margin-top: 6px; }
.set-label p { margin: 6px 0 0; color: var(--muted); }
.panel { background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.switch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.switch-row b { font-weight: 500; margin-right: 8px; }
.switch-row p { margin: 4px 0 0; color: var(--muted); }
.switch {
  position: relative; width: 44px; height: 26px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: #3a3a3a; flex: none; transition: background-color .15s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #ffffff; transition: transform .15s ease;
}
.switch[aria-checked="true"] { background: var(--positive); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch[disabled] { opacity: .5; cursor: not-allowed; }
.notice { background: var(--pill-warning-bg); color: var(--pill-warning-ink); border-radius: var(--radius-inner); padding: 12px 14px; }
.notice ol { margin: 6px 0 0; padding-left: 18px; }
.preview { background: #1d1d1d; border-radius: 16px; padding: 12px 14px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.preview svg { width: 36px; height: 36px; }
.preview b { display: block; font-weight: 600; }
.preview span { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview time { color: var(--faint); font-size: 12px; align-self: start; }

/* ───────── toast ───────── */
#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: #ffffff; color: #000000; border-radius: 14px; padding: 12px 16px; max-width: min(560px, calc(100% - 32px));
  font-weight: 500; z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); /* taste-skill-ignore: the toast floats over the page */
}

/* ───────── tablet ───────── */
@media (max-width: 1100px) {
  .lead { grid-template-columns: minmax(0, 1fr); }
  .clock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--gap); }
  .clock-head { grid-column: 1 / -1; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* ───────── phone ───────── */
@media (max-width: 640px) {
  :root { --side: 16px; --pad: 16px; }
  .bar-in { gap: 12px; }
  .links, .bar-right .profile-text { display: none; }
  .menu-btn {
    display: inline-flex; margin-left: auto; height: 44px; padding: 0 4px; background: none; border: 0;
    align-items: center; gap: 8px; font-weight: 600; cursor: pointer;
  }
  .bar-right { margin-left: 0; }
  .sheet { position: fixed; inset: 48px 0 auto 0; background: var(--ground); padding: 8px 16px 16px; z-index: 19; box-shadow: 0 1px 0 var(--border); } /* taste-skill-ignore: the menu sheet floats */
  .sheet a { display: flex; align-items: center; min-height: 48px; font-size: 16px; font-weight: 600; color: #bbbbbb; text-decoration: none; }
  .sheet a[aria-current="page"] { color: var(--text); }
  .title-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 0 16px; }
  .reel-card { grid-template-columns: minmax(0, 1fr); }
  .player { aspect-ratio: auto; height: 48vh; height: 48svh; }
  .details .actions { order: -1; }   /* the main job sits right under the video, on the first screen */
  .actions .btn { flex: 1 1 100%; height: 44px; }
  .clock { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; min-height: 88px; margin: 0; padding: 12px 0; border-radius: 0; }
  .row[aria-current="true"] { background: transparent; }
  .row[aria-current="true"] .row-main b { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
  .thumb { width: 52px; height: 65px; }
  .row-actions { grid-column: 2; gap: 20px; }
  .row-actions .text-btn { min-height: 32px; }
  .gate-card { padding: 22px; }
}
@media (min-width: 641px) { .sheet { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
