/* Контент-пайплайн · Glassbook (Liquid Glass × iOS)
   Токены — из ~/.dsh/skills/glassbook/references/tokens.css.
   Стекло только на навигации и оверлеях; контент — плотные белые поверхности. */

:root {
  --ground: #f5f5f7;
  --surface: #ffffff;
  --hover: #fbfbfd;
  --track: #e8e8ed;
  --text: #1d1d1f;
  --text-body: #424245;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --text-placeholder: #aeaeb2;
  --faint: #d2d2d7;
  --hairline: rgba(0, 0, 0, 0.07);

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --indigo: #5e5ce6;
  --live: #30d158;
  --heat: #ff6b00;
  --danger: #ff3b30;
  --live-ink: #1d7a3a;
  --heat-ink: #a84b00;
  --danger-ink: #c81e16;

  --glass: rgba(245, 245, 247, 0.72);
  --glass-border: rgba(0, 0, 0, 0.07);
  --glass-on-color: rgba(255, 255, 255, 0.16);
  --glass-on-border: rgba(255, 255, 255, 0.24);

  --r-chip: 6px;
  --r-thumb: 12px;
  --r-sheet: 16px;
  --r-card: 18px;
  --r-panel: 22px;
  --r-hero: 26px;
  --r-pill: 999px;

  --sh-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --sh-panel: 0 1px 3px rgba(0, 0, 0, 0.05), 0 14px 40px rgba(0, 0, 0, 0.05);
  --sh-lift: 0 12px 32px rgba(0, 0, 0, 0.1);
  --sh-cta: 0 20px 54px rgba(0, 113, 227, 0.24);
  --sh-overlay: 0 2px 8px rgba(0, 0, 0, 0.1), 0 30px 80px rgba(0, 0, 0, 0.24);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;

  --max: 1180px;
  --pad: 22px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #000000;
    --surface: #1c1c1e;
    --hover: #232325;
    --track: #3a3a3c;
    --text: #f5f5f7;
    --text-body: #d1d1d6;
    --text-secondary: #a1a1a6;
    --text-tertiary: #8e8e93;
    --text-placeholder: #8e8e93;
    --faint: #48484a;
    --hairline: rgba(255, 255, 255, 0.12);
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-text: #409cff;
    --live-ink: #63d98a;
    --heat-ink: #ffb066;
    --danger-ink: #ff8a80;
    --glass: rgba(28, 28, 30, 0.72);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-on-color: rgba(255, 255, 255, 0.12);
    --sh-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --sh-panel: 0 1px 3px rgba(0, 0, 0, 0.35), 0 14px 40px rgba(0, 0, 0, 0.3);
    --sh-lift: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: var(--accent) !important;
}

/* ── ambient light под стеклом ───────────────────────────────── */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  display: block;
  border-radius: var(--r-pill);
  filter: blur(90px);
  opacity: 0.5;
}
.orb--blue {
  width: 480px;
  height: 480px;
  top: -180px;
  left: 6%;
  background: #0a84ff;
}
.orb--indigo {
  width: 420px;
  height: 420px;
  top: -140px;
  right: 4%;
  background: #5e5ce6;
  opacity: 0.34;
}
.orb--mint {
  width: 360px;
  height: 360px;
  top: 520px;
  right: -180px;
  background: #30d158;
  opacity: 0.12;
}
@media (prefers-color-scheme: dark) {
  .orb { opacity: 0.24; filter: blur(110px); }
  .orb--indigo { opacity: 0.2; }
  .orb--mint { opacity: 0.08; }
}

/* ── typography ──────────────────────────────────────────────── */

.kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.kicker--on-color { color: rgba(255, 255, 255, 0.7); }

h1.display {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}
h2.section-title {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.meta {
  font-size: 12.5px;
  color: var(--text-secondary);
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

/* ── topbar / glass ──────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.topbar.is-scrolled {
  border-bottom-color: var(--glass-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.topbar__inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 64px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; border-radius: 12px; }
.brand__mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(10, 132, 255, 0.22);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__text b { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.brand__text small {
  font-size: 9.5px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-top: 2px;
  white-space: nowrap;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  margin: 0 auto;
}
.seg {
  height: 36px;
  padding: 0 15px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-secondary);
  transition: color 180ms var(--ease-out), background 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  position: relative;
}
.seg:hover { color: var(--text); }
.seg::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}
.seg.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.05);
}
.seg.is-active::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}

.topbar__actions { display: flex; align-items: center; gap: 8px; }

/* ── buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 120ms var(--ease-out), color 180ms var(--ease-out);
  border: 1px solid transparent;
}
.btn svg { width: 16px; height: 16px; flex: 0 0 16px; }
.btn:active { transform: scale(0.975); }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--sh-cta);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--hairline);
  box-shadow: var(--sh-card);
}
.btn--secondary:hover { background: var(--hover); }
.btn--ghost { color: var(--accent-text); background: transparent; }
.btn--ghost:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn--white {
  background: #fff;
  color: #0b57c2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 28px rgba(0, 0, 0, 0.16);
}
.btn--white:hover { background: #f7f7fa; }
.btn--glass {
  background: var(--glass-on-color);
  color: #fff;
  border-color: var(--glass-on-border);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--glass:hover { background: rgba(255, 255, 255, 0.24); }
.btn--danger { color: var(--danger-ink); background: transparent; border-color: transparent; }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 12px; position: relative; }
.btn--sm::after { content: ""; position: absolute; inset: -5px 0; }
.btn--lg { min-height: 50px; padding: 0 22px; font-size: 14.5px; }
.btn:disabled { opacity: 0.45; pointer-events: none; box-shadow: none; }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  display: inline-grid;
  place-items: center;
  color: var(--text-body);
  transition: background 180ms var(--ease-out), color 180ms var(--ease-out);
  flex: 0 0 44px;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn--glass {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--glass-on-border);
  color: var(--text-body);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.icon-btn--glass:hover { background: var(--hover); }
.icon-btn--danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger-ink); }

/* ── page / helpers ──────────────────────────────────────────── */

.page {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px var(--pad) 110px;
}
.page.is-detail { padding-top: 20px; }

.section { margin-top: clamp(28px, 4vw, 44px); }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section__head .meta { padding-bottom: 3px; }

.grid { display: grid; gap: 14px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  overflow: hidden;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}
.panel__title {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel__title .count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.panel__link {
  font-size: 12px;
  font-weight: 550;
  color: var(--accent-text);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.panel__foot {
  border-top: 1px solid var(--hairline);
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.tile {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: var(--r-thumb);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}
.tile svg { width: 18px; height: 18px; }
.tile--lg {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border-radius: var(--r-sheet);
}
.tile--lg svg { width: 25px; height: 25px; }

.chev { color: var(--faint); flex: 0 0 auto; display: inline-grid; place-items: center; }
.chev svg { width: 15px; height: 15px; }

.status {
  --tone: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--tone) 11%, transparent);
  white-space: nowrap;
}
.status i { width: 5px; height: 5px; border-radius: var(--r-pill); background: var(--tone); flex: 0 0 5px; }
.status--good { --tone: var(--live); }
.status--warn { --tone: var(--heat); }
.status--bad { --tone: var(--danger); }
.status--neutral { --tone: var(--text-tertiary); }

.dot-sep { width: 3px; height: 3px; border-radius: var(--r-pill); background: var(--faint); flex: 0 0 3px; }

/* ── hero ────────────────────────────────────────────────────── */

.hero {
  position: relative;
  border-radius: var(--r-hero);
  padding: 30px 32px 28px;
  color: #fff;
  background: linear-gradient(135deg, #0a84ff 0%, #4f63ff 48%, #5e5ce6 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 24px 70px rgba(53, 96, 222, 0.26);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 26px;
  align-items: end;
}
.hero::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -120px;
  top: -230px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.18);
  filter: blur(40px);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  left: 38%;
  bottom: -240px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  filter: blur(30px);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; min-width: 0; }
.hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 10px 0 10px;
  text-wrap: balance;
}
.hero h1 .hero__date { display: inline-block; white-space: nowrap; }
.hero__lede {
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 48ch;
}
.hero__lede b { color: #fff; font-weight: 600; }
.hero__actions { display: flex; align-items: center; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.hero__side { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.hero-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--r-sheet);
  background: var(--glass-on-color);
  border: 1px solid var(--glass-on-border);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hero-stat b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 11.5px; color: #fff; }
.hero-stat small { font-size: 10px; color: rgba(255, 255, 255, 0.82); }

/* ── pipeline cards ──────────────────────────────────────────── */

.pipeline-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  min-height: 264px;
  padding: 17px 17px 15px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-card);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background 180ms var(--ease-out);
}
.pipeline-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lift); }
.pipeline-card:active { transform: translateY(-1px) scale(0.995); }

.pc__head { display: flex; align-items: center; gap: 10px; }
.pc__name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pc__name b { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc__name small { font-size: 10.5px; color: var(--text-secondary); margin-top: 2px; }
.pc__head .status { margin-left: auto; }

.pc__coverage { margin-top: 16px; display: flex; flex-direction: column; gap: 1px; }
.pc__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.pc__date {
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}
.pc__date.is-empty { color: var(--text-secondary); font-size: 24px; }
.pc__days { font-size: 11px; color: var(--text-secondary); }

.pc__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
  font-size: 11px;
  color: var(--text-secondary);
}
.pc__meta .warn { color: var(--heat-ink); font-weight: 600; }
.pc__meta .bad { color: var(--danger-ink); font-weight: 600; }

.month-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: auto; padding-top: 15px; }
.month-cell { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
.month-cell span { font-size: 9.5px; color: var(--text-tertiary); text-align: center; letter-spacing: 0.02em; }
.month-cell i { display: block; height: 5px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.month-cell i em { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); transition: width 220ms var(--ease-out); }
.month-cell b { font-size: 9px; color: var(--text-tertiary); text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.month-cell.is-good i em { background: var(--live); }
.month-cell.is-warn i em { background: var(--heat); }
.month-cell.is-bad i em { background: var(--danger); }
.month-cell.is-neutral i em { background: var(--faint); }

.pc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--hairline);
  font-size: 10.5px;
  color: var(--text-secondary);
  min-height: 34px;
}
.pc__foot b { color: var(--text); font-weight: 600; }
.pc__foot .chev svg { width: 13px; height: 13px; }

/* ── lists ───────────────────────────────────────────────────── */

.list { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 60px;
  padding: 10px 18px;
  text-align: left;
  border-top: 1px solid var(--hairline);
  transition: background 160ms var(--ease-out);
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--hover); }
.row__main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.row__main b { font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__main small { font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__side { font-size: 10.5px; color: var(--text-tertiary); white-space: nowrap; text-align: right; }
.row-ico {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
  flex: 0 0 30px;
}
.row-ico svg { width: 15px; height: 15px; }
.row-ico--warn { background: color-mix(in srgb, var(--heat) 12%, transparent); color: var(--heat-ink); }
.row-ico--bad { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger-ink); }
.row-ico--good { background: color-mix(in srgb, var(--live) 12%, transparent); color: var(--live-ink); }

.date-badge {
  width: 40px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 40px;
}
.date-badge b { font-size: 16px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.date-badge span { font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }

.empty-note { padding: 22px 18px; font-size: 12px; color: var(--text-secondary); text-align: center; }

/* ── posts ───────────────────────────────────────────────────── */

.posts-panel { padding-bottom: 8px; }
.post-row { padding: 9px 18px 12px; }
.post-row + .post-row { border-top: 1px solid var(--hairline); }
.post-row__head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.post-row__head b { font-size: 12.5px; font-weight: 600; }
.post-row__head .range { font-size: 10.5px; color: var(--text-tertiary); }
.post-row__head .post-count { margin-left: auto; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.post-row__head .post-count small { font-size: 10px; color: var(--text-tertiary); font-weight: 500; }
.counter { display: flex; align-items: center; gap: 4px; }
.counter button {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  color: var(--text-body);
  font-size: 19px;
  transition: background 160ms var(--ease-out);
}
.counter button:hover { background: var(--hover); }
.post-bar { height: 5px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; position: relative; }
.post-bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); }
.post-bar .tick { position: absolute; top: -2px; width: 1px; height: 9px; background: var(--text-tertiary); }
.post-note { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font-size: 10px; color: var(--text-tertiary); }

/* ── detail ──────────────────────────────────────────────────── */

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 550;
  color: var(--accent-text);
  margin-bottom: 8px;
}
.back svg { width: 15px; height: 15px; }

.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.detail-head__text { min-width: 0; flex: 1; }
.detail-head h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.detail-head p { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }
.detail-head__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.stat > span { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); }
.stat > b { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > small { font-size: 10.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr); gap: 14px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 14px; }

.panel__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 12px;
  flex-wrap: wrap;
}
.segmented--sm { margin: 0; padding: 2px; }
.segmented--sm .seg { height: 32px; padding: 0 11px; font-size: 11.5px; }
.segmented--sm .seg::after { inset: -6px 0; }

.inv-list { display: flex; flex-direction: column; }
.inv-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto 44px;
  gap: 11px;
  align-items: center;
  padding: 11px 16px;
  border-top: 1px solid var(--hairline);
  min-height: 76px;
  transition: background 150ms var(--ease-out);
}
.inv-row:hover { background: var(--hover); }
.inv-row.is-published { opacity: 0.55; }
.inv-date { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.inv-date label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.inv-date input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  padding: 0 8px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.inv-date input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.inv-row.needs-date .inv-date input {
  border-color: color-mix(in srgb, var(--heat) 50%, transparent);
  background: color-mix(in srgb, var(--heat) 7%, var(--surface));
}
.inv-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inv-main b { font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-main span { font-size: 10.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-row .status { justify-self: start; }
.inv-more { width: 44px; height: 44px; border-radius: var(--r-pill); display: grid; place-items: center; color: var(--text-tertiary); }
.inv-more:hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
.inv-more svg { width: 16px; height: 16px; }

/* coverage card */

.coverage-card { padding: 18px; }
.coverage-card .kicker { display: block; }
.coverage-date {
  display: block;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.coverage-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.coverage-meter { height: 7px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; margin: 15px 0 13px; }
.coverage-meter i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); transition: width 260ms var(--ease-out); }
.coverage-meter.is-bad i { background: var(--danger); }
.coverage-meter.is-warn i { background: var(--heat); }
.coverage-meter.is-good i { background: var(--live); }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hairline); font-size: 11.5px; color: var(--text-secondary); }
.kv b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.coverage-cta { margin-top: 12px; width: 100%; }

/* schedule */

.schedule { display: flex; flex-direction: column; }
.slot {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 49px;
  padding: 7px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 11.5px;
}
.slot:first-child { border-top: 0; }
.slot__date { font-size: 10px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot__main { min-width: 0; }
.slot__main b { display: block; font-size: 11.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot__main span { display: block; font-size: 9.5px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.is-empty { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.slot.is-empty .slot__main b { color: var(--text-secondary); font-weight: 500; }
.slot-gap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: color-mix(in srgb, var(--danger) 7%, transparent);
  color: var(--danger-ink);
  font-size: 9.5px;
  font-weight: 600;
  border-top: 1px solid var(--hairline);
}
.slot-gap svg { width: 12px; height: 12px; }

/* production card */

.production { padding: 18px; }
.production__title { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.production__date { font-size: 25px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.production p { font-size: 11px; color: var(--text-secondary); margin-top: 2px; line-height: 1.45; }

/* ── calendar ────────────────────────────────────────────────── */

.cal-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr); gap: 14px; align-items: start; }
.cal-panel { overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
.cal-month { display: flex; align-items: baseline; gap: 8px; }
.cal-month b { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.cal-month span { font-size: 11px; color: var(--text-secondary); }
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-nav .icon-btn { width: 44px; height: 44px; flex-basis: 44px; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 9px 10px 5px; }
.cal-weekdays span { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-tertiary); text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0 10px 10px; }
.cal-day {
  min-height: 108px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 2%, transparent);
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cal-day.is-out { opacity: 0.4; }
.cal-day.is-today { background: color-mix(in srgb, var(--accent) 7%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-day__num { font-size: 10.5px; font-weight: 550; color: var(--text-secondary); font-variant-numeric: tabular-nums; padding-left: 2px; }
.cal-day.is-today .cal-day__num { color: var(--accent-text); font-weight: 700; }
.cal-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  min-height: 20px;
  padding: 2px 4px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline);
  font-size: 8px;
  font-weight: 550;
  color: var(--text);
  text-align: left;
  overflow: hidden;
}
.cal-chip i { width: 4px; height: 4px; border-radius: var(--r-pill); background: var(--accent); flex: 0 0 4px; }
.cal-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip--shoot { background: color-mix(in srgb, var(--indigo) 8%, var(--surface)); }
.cal-chip--shoot i { background: var(--indigo); }
.cal-chip--live { background: color-mix(in srgb, var(--live) 8%, var(--surface)); }
.cal-chip--live i { background: var(--live); }
.cal-chip:hover { background: var(--hover); }

.cal-side { display: flex; flex-direction: column; gap: 14px; }

/* mobile calendar list */
.cal-list { display: none; }

/* ── settings ────────────────────────────────────────────────── */

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.form-body { padding: 0 18px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 10px; letter-spacing: 0.04em; color: var(--text-secondary); font-weight: 550; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  border-radius: var(--r-thumb);
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.field textarea { padding: 11px 12px; min-height: 76px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.field .hint { font-size: 9.5px; color: var(--text-tertiary); line-height: 1.35; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 4px; }

.rules { list-style: none; margin: 0; padding: 0 18px 18px; display: flex; flex-direction: column; gap: 13px; }
.rule { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 9px; }
.rule__num {
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rule b { display: block; font-size: 12px; font-weight: 600; }
.rule p { font-size: 10.5px; color: var(--text-secondary); margin-top: 2px; line-height: 1.45; }

.data-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.data-note {
  border-radius: var(--r-thumb);
  background: color-mix(in srgb, var(--text) 3%, transparent);
  padding: 10px 12px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.data-note b { color: var(--text); }

/* ── dialogs / sheet ─────────────────────────────────────────── */

dialog.sheet {
  width: min(520px, calc(100vw - 24px));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-panel);
  padding: 0;
  background: rgba(245, 245, 247, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--sh-overlay);
  color: var(--text);
  margin: auto;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  dialog.sheet { background: rgba(28, 28, 30, 0.88); }
}
dialog.sheet::backdrop {
  background: rgba(0, 0, 0, 0.34);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
dialog.sheet[open] { animation: sheetIn 400ms var(--ease-spring); }
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.sheet__head h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.sheet__head p { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; }
.sheet__body { padding: 0 20px 4px; }
.sheet__body .form-body { padding: 0; grid-template-columns: 1fr 1fr; }
.sheet__body .form-body .field--full { grid-column: 1 / -1; }
.sheet__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--hairline);
  margin-top: 14px;
}
.sheet__actions .spacer { flex: 1; }
.sheet__actions .btn { min-height: 44px; }

/* ── toast ───────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 14px);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--sh-panel);
  color: var(--text);
  border-radius: var(--r-pill);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 550;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  z-index: 100;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ── mobile tabbar ───────────────────────────────────────────── */

.tabbar { display: none; }

/* ── responsive ──────────────────────────────────────────────── */

@media (max-width: 1020px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .coverage-card { grid-column: 1 / -1; }
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-side { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .topbar__inner { height: 58px; gap: 10px; }
  .topbar .segmented { display: none; }
  .topbar__actions .icon-btn { display: none; }
  .topbar__actions { margin-left: auto; }
  .topbar__actions .btn { min-height: 40px; padding: 0 14px; font-size: 12.5px; }
  .page { padding: 20px 18px 116px; }
  .hero { grid-template-columns: 1fr; padding: 24px 22px; gap: 18px; }
  .hero__side { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-stat { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 10px; }
  .hero-stat b { font-size: 21px; }
  .hero-stat span { font-size: 10px; }
  .hero-stat small { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .detail-head { flex-wrap: wrap; }
  .detail-head__actions { width: 100%; margin-left: 0; justify-content: flex-end; }
  .detail-head__actions .btn { flex: 0 0 auto; }
  .cal-grid { display: none; }
  .cal-weekdays { display: none; }
  .cal-list { display: flex; flex-direction: column; }
  .cal-day-list { padding: 10px 14px 14px; border-top: 1px solid var(--hairline); }
  .cal-day-list h4 { font-size: 11px; color: var(--text-secondary); font-weight: 600; margin: 0 0 6px; letter-spacing: 0.04em; text-transform: uppercase; }
  .cal-day-list .row { min-height: 52px; padding: 8px 0; border-top: 1px solid var(--hairline); }
  .cal-day-list .row:first-of-type { border-top: 0; }
  .tabbar {
    display: flex;
    align-items: center;
    gap: 4px;
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 50;
    padding: 5px;
    border-radius: var(--r-pill);
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--sh-panel);
  }
  .tab {
    width: 74px;
    height: 48px;
    border-radius: var(--r-pill);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 8.5px;
    font-weight: 550;
    color: var(--text-secondary);
  }
  .tab svg { width: 18px; height: 18px; }
  .tab.is-active { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
  .tabbar__add {
    width: 50px;
    height: 50px;
    border-radius: var(--r-pill);
    margin-left: 2px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #fff;
    box-shadow: var(--sh-cta);
  }
  .tabbar__add svg { width: 20px; height: 20px; }
}

@media (max-width: 620px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .hero__side { grid-template-columns: 1fr 1fr 1fr; }
  .pipeline-card { min-height: 248px; }
  .section__head { align-items: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .detail-side { grid-template-columns: 1fr; }
  .coverage-card { grid-column: auto; }
  .inv-row { grid-template-columns: minmax(0, 1fr) auto 44px; grid-template-areas: "date status more" "main main more"; }
  .inv-date { grid-area: date; width: 150px; }
  .inv-main { grid-area: main; }
  .inv-row .status { grid-area: status; display: inline-flex; justify-self: end; }
  .inv-more { grid-area: more; }
  .form-body { grid-template-columns: 1fr; }
  .sheet__body .form-body { grid-template-columns: 1fr; }
  .sheet__body .form-body .field--full { grid-column: auto; }
  .cal-side { grid-template-columns: 1fr; }
  .page { padding-left: 14px; padding-right: 14px; }
  .topbar__inner { padding: 0 14px; }
  .brand__text small { display: none; }
  .brand__text b { font-size: 13.5px; }
  .hero h1 { font-size: clamp(30px, 8vw, 38px); }
  .hero__actions .btn { flex: 1; }
  .post-row__head .post-count { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* state helpers / dialog lifecycle */
.status--info { --tone: var(--accent); }

dialog.sheet {
  max-height: min(760px, calc(100dvh - 24px));
  overflow: auto;
}
dialog.sheet.is-closing { animation: sheetOut 220ms var(--ease-out) forwards; }
@keyframes sheetOut {
  from { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  to { opacity: 0; transform: translateY(10px) scale(0.985); filter: blur(3px); }
}

.cal-chip { font-size: 10px; min-height: 22px; }

@media (max-width: 620px) {
  dialog.sheet {
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: var(--r-panel) var(--r-panel) 0 0;
    border-bottom: 0;
  }
  .sheet__head { padding: 18px 18px 10px; }
  .sheet__body { padding: 0 18px 4px; }
  .sheet__actions { padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); }
}

.pc__foot .bad { color: var(--danger-ink); font-weight: 600; }
.pc__foot .warn { color: var(--heat-ink); font-weight: 600; }

.detail-badge { margin-top: 7px; }

.inv-row--qa { grid-template-columns: 116px minmax(0, 1fr) auto 44px; }

@media (max-width: 620px) {
  .inv-row--qa { grid-template-columns: minmax(0, 1fr) auto 44px; grid-template-areas: "date status more" "main main more"; }
  .inv-row--qa .inv-date { grid-area: date; }
  .inv-row--qa .status { grid-area: status; }
  .inv-row--qa .inv-more { grid-area: more; }
  .inv-row--qa .inv-main { grid-area: main; }
}

.settings-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ── auth / sync / user ─────────────────────────────────────── */

body.auth-mode .topbar,
body.auth-mode .tabbar { display: none !important; }
body.auth-mode { background: var(--ground); }

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px 18px;
}
.auth { width: min(430px, 100%); }
.auth__card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-hero);
  box-shadow: var(--sh-panel);
  padding: 30px 28px 26px;
}
.auth__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth__brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.auth__brand b { font-size: 14px; font-weight: 650; }
.auth__brand small { font-size: 9.5px; color: var(--text-secondary); margin-top: 2px; }
.auth h1 { font-size: clamp(28px, 5vw, 36px); letter-spacing: -0.03em; margin: 7px 0 8px; line-height: 1.1; }
.auth__lede { font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); }
.auth__lede a, .auth__foot a { color: var(--accent-text); }
.auth__form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.auth__form .field { gap: 5px; }
.auth__form .btn { width: 100%; margin-top: 4px; }
.auth__error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--r-thumb);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger-ink);
  font-size: 11.5px;
  line-height: 1.45;
}
.auth__foot { margin-top: 16px; font-size: 10.5px; line-height: 1.5; color: var(--text-secondary); text-align: center; }

.sync {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  font-size: 9.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.sync::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text-tertiary); }
.sync--saved::before { background: var(--live); }
.sync--saving::before { background: var(--heat); }
.sync--error { color: var(--danger-ink); }
.sync--error::before { background: var(--danger); }
.sync--conflict { color: var(--heat-ink); }
.sync--conflict::before { background: var(--heat); }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 4px 0 10px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  max-width: 290px;
}
.user-chip__role { font-size: 8.5px; font-weight: 650; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.05em; }
.user-chip__name { font-size: 10.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.user-chip__out {
  height: 26px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 9.5px;
  color: var(--text-secondary);
}
.user-chip__out:hover { background: var(--hover); color: var(--text); }

body[data-role="viewer"] .inv-date input { opacity: 0.65; }
body[data-role="viewer"] .pipeline-card { cursor: pointer; }

@media (max-width: 1120px) {
  .sync { display: none; }
  .user-chip__name { display: none; }
}
@media (max-width: 820px) {
  .user-chip { height: 30px; padding-left: 8px; }
  .user-chip__role { display: none; }
  .user-chip__out { padding: 0 6px; }
  .auth-page { padding: 24px 14px; }
  .auth__card { padding: 24px 20px 22px; }
}

.auth__switch {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
