/* Coaches Co-Pilot — global styles
 * Design tokens are mirrored here as CSS variables so non-React surfaces
 * (and design audits) can reference the same values. JS source of truth
 * lives in src/design/tokens.js — keep these in sync.
 */

:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --border: hsl(30 8% 90%);

  --text: hsl(30 8% 14%);
  --text-muted: hsl(30 8% 40%);
  --text-dim: hsl(30 8% 56%);

  --primary: #635BFF;
  --primary-hover: #5249FF;
  --primary-subtle: hsl(245 100% 65% / 0.08);

  --status-member: #0369A1;
  --status-on-track: #0E7C66;
  --status-overdue: #B45309;
  --status-due: #D97706;
  --status-lost: #9F1239;

  --grey-1: hsl(30 8% 96%);
  --grey-2: hsl(30 8% 92%);
  --grey-3: hsl(30 8% 86%);
  --grey-4: hsl(30 8% 72%);
  --grey-5: hsl(30 8% 56%);
  --grey-6: hsl(30 8% 40%);
  --grey-7: hsl(30 8% 24%);
  --grey-8: hsl(30 8% 14%);
  --grey-9: hsl(30 8% 8%);

  --shadow-card: 0 1px 2px hsl(30 8% 8% / 0.04), 0 4px 12px hsl(30 8% 8% / 0.04);
  --shadow-card-hover: 0 2px 4px hsl(30 8% 8% / 0.06), 0 12px 24px hsl(30 8% 8% / 0.08);
  --shadow-drawer: 0 -4px 24px hsl(30 8% 8% / 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-ios-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --dur-micro: 100ms;
  --dur-fast: 150ms;
  --dur-standard: 200ms;
  --dur-moderate: 300ms;
  --dur-drawer: 360ms;
  --dur-slow: 500ms;

  --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  touch-action: manipulation;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

button, [role="button"], .tappable, nav a, .tab, .card-button {
  -webkit-user-select: none;
  user-select: none;
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@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;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Components — Phase 1
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Button --------------------------------------------------- */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.005em;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
}
.cc-btn:active:not(:disabled) { transform: scale(0.98); }
.cc-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.cc-btn--full { width: 100%; }
.cc-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.cc-btn--md { height: 40px; padding: 0 16px; }
.cc-btn--lg { height: 48px; padding: 0 20px; font-size: 15px; }
.cc-btn--xl { height: 64px; padding: 0 24px; font-size: 16px; border-radius: var(--radius-lg); }
.cc-btn__icon { display: inline-flex; }
.cc-btn__label { display: inline-flex; }

.cc-btn--primary { background: var(--primary); color: #fff; }
@media (hover: hover) {
  .cc-btn--primary:hover:not(:disabled) { background: var(--primary-hover); }
}
.cc-btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
@media (hover: hover) {
  .cc-btn--secondary:hover:not(:disabled) { background: var(--grey-1); }
}
.cc-btn--ghost { background: transparent; color: var(--text); }
@media (hover: hover) {
  .cc-btn--ghost:hover:not(:disabled) { background: var(--grey-1); }
}
.cc-btn--danger { background: var(--status-lost); color: #fff; }

/* Card ----------------------------------------------------- */
.cc-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  text-align: left;
  width: 100%;
  display: block;
  color: var(--text);
}
.cc-card--elevated { box-shadow: var(--shadow-card); }
.cc-card--flat {}
.cc-card--interactive {
  transition: box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  border: 0;
  font: inherit;
}
@media (hover: hover) {
  .cc-card--interactive:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
  }
}
.cc-card--interactive:active { transform: scale(0.99); }

/* Pill ----------------------------------------------------- */
.cc-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: color-mix(in oklab, var(--pill-tone) 12%, transparent);
  color: var(--pill-tone);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  user-select: none;
  -webkit-user-select: none;
}
.cc-pill--sm { font-size: 11px; padding: 1px 6px; }
.cc-pill--lg { font-size: 13px; padding: 4px 10px; }

/* Avatar --------------------------------------------------- */
.cc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: -0.01em;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

/* Input / TextArea ----------------------------------------- */
.cc-input { display: flex; flex-direction: column; gap: 6px; }
.cc-input__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}
.cc-input__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.cc-input__field:focus-within { border-color: var(--primary); }
.cc-input__icon { color: var(--text-dim); display: inline-flex; }
.cc-input input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 0;
  width: 100%;
  font-size: 15px;
  color: var(--text);
}
.cc-input input::placeholder { color: var(--text-dim); }
.cc-input input:disabled { color: var(--text-dim); cursor: not-allowed; }
.cc-input--multiline textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.5;
  width: 100%;
  background: var(--surface);
  color: var(--text);
  resize: none;
  transition: border-color var(--dur-fast) var(--ease-out);
  font-family: inherit;
}
.cc-input--multiline textarea:focus { outline: none; border-color: var(--primary); }
.cc-input--multiline textarea::placeholder { color: var(--text-dim); }

/* SegmentedControl ----------------------------------------- */
.cc-segmented {
  position: relative;
  display: inline-flex;
  background: var(--grey-1);
  padding: 3px;
  border-radius: 999px;
  user-select: none;
  -webkit-user-select: none;
}
.cc-segmented__thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  transition: left var(--dur-standard) var(--ease-out),
              width var(--dur-standard) var(--ease-out);
  pointer-events: none;
}
.cc-segmented__btn {
  position: relative;
  z-index: 1;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--dur-fast) var(--ease-out);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.cc-segmented__btn.is-active { color: var(--text); font-weight: 600; }
.cc-segmented--sm .cc-segmented__btn { padding: 4px 10px; font-size: 12px; }
.cc-segmented--lg .cc-segmented__btn { padding: 8px 18px; font-size: 14px; }

/* Drawer --------------------------------------------------- */
.cc-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.cc-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: hsl(30 8% 8% / 0.4);
  animation: ccFadeIn var(--dur-standard) var(--ease-out);
}
.cc-drawer__sheet {
  position: relative;
  background: var(--surface);
  width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  animation: ccDrawerUp var(--dur-drawer) var(--ease-ios-drawer);
}
@media (min-width: 768px) {
  .cc-drawer-root { align-items: center; padding: 24px; }
  .cc-drawer__sheet {
    width: 560px;
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-xl);
    animation: ccModalIn var(--dur-standard) var(--ease-out);
  }
}
.cc-drawer__header {
  padding: 20px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cc-drawer__title { margin: 0; font-size: 20px; font-weight: 600; }
.cc-drawer__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease-out);
}
@media (hover: hover) {
  .cc-drawer__close:hover { background: var(--grey-1); }
}
.cc-drawer__body { padding: 0 20px 20px; overflow-y: auto; flex: 1; }
.cc-drawer__footer { padding: 16px 20px; border-top: 1px solid var(--border); }

/* Toast ---------------------------------------------------- */
.cc-toast-host {
  position: fixed;
  z-index: 200;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(560px, calc(100vw - 32px));
}
@media (min-width: 768px) {
  .cc-toast-host { left: auto; right: 16px; transform: none; width: auto; }
}
.cc-toast {
  pointer-events: auto;
  background: var(--grey-9);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card-hover);
  animation: ccToastIn var(--dur-standard) var(--ease-out);
  font-size: 14px;
  min-width: 240px;
}
.cc-toast__msg { flex: 1; }
.cc-toast__action {
  color: #C7C2FF;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
@media (hover: hover) {
  .cc-toast__action:hover { background: hsl(0 0% 100% / 0.08); }
}
.cc-toast__close {
  color: hsl(0 0% 100% / 0.6);
  display: inline-flex;
  width: 24px; height: 24px;
  align-items: center; justify-content: center;
  border-radius: 50%;
}

/* Empty state --------------------------------------------- */
.cc-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.cc-empty__icon { color: var(--text-dim); margin-bottom: 12px; display: inline-flex; }
.cc-empty__title { font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--text); }
.cc-empty__sub { font-size: 14px; margin: 0; color: var(--text-muted); }
.cc-empty__action { margin-top: 16px; }

/* Spinner -------------------------------------------------- */
.cc-spinner {
  display: inline-block;
  border: 2px solid color-mix(in oklab, currentColor 15%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: ccSpin 1s linear infinite;
  color: var(--primary);
}
.cc-spinner--inline { color: currentColor; vertical-align: -3px; }

/* Banner --------------------------------------------------- */
.cc-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  border: 1px solid transparent;
}
.cc-banner__msg { flex: 1; }
.cc-banner__actions { display: flex; align-items: center; gap: 4px; }
.cc-banner__action {
  font-weight: 600;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: inherit;
}
@media (hover: hover) {
  .cc-banner__action:hover { background: hsl(30 8% 8% / 0.06); }
}
.cc-banner__close {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: inherit;
  opacity: 0.6;
}
.cc-banner--info {
  background: var(--primary-subtle);
  color: var(--text);
  border-color: hsl(245 100% 65% / 0.2);
}
.cc-banner--warning {
  background: hsl(36 90% 55% / 0.1);
  color: var(--status-overdue);
  border-color: hsl(36 90% 55% / 0.25);
}
.cc-banner--error {
  background: hsl(346 75% 36% / 0.08);
  color: var(--status-lost);
  border-color: hsl(346 75% 36% / 0.2);
}
.cc-banner--success {
  background: hsl(165 80% 28% / 0.08);
  color: var(--status-on-track);
  border-color: hsl(165 80% 28% / 0.2);
}

/* Animations ---------------------------------------------- */
@keyframes ccFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccDrawerUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes ccModalIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes ccToastIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes ccSpin { to { transform: rotate(1turn); } }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Design System showcase (/#/design-system)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-ds {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
.cc-ds__nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}
.cc-ds__title { font-size: 30px; font-weight: 700; margin: 0; line-height: 1.15; }
.cc-ds__back {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.cc-ds__section { margin-top: 48px; }
.cc-ds__h2 {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.cc-ds__h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}
.cc-ds__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.cc-ds__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cc-ds__swatch {
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex; flex-direction: column; gap: 4px;
  height: 88px;
  border: 1px solid var(--border);
  justify-content: flex-end;
}
.cc-ds__swatch__name { font-weight: 600; color: var(--text); }
.cc-ds__swatch__value { color: var(--text-muted); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Phase 2 — Capture surface
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Coach gate ---------------------------------------------- */
.cc-gate {
  position: fixed; inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 24px;
  z-index: 300;
}
.cc-gate__card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.cc-gate__brand {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  margin-bottom: 16px;
}
.cc-gate__title {
  font-size: 24px; font-weight: 700; margin: 0 0 8px;
  letter-spacing: -0.01em; line-height: 1.2;
}
.cc-gate__sub {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 14px;
}
.cc-gate__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cc-gate__tile {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
@media (hover: hover) {
  .cc-gate__tile:hover {
    border-color: var(--tile-colour);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
  }
}
.cc-gate__tile:active { transform: scale(0.98); }
.cc-gate__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--tile-colour);
  color: #fff;
  display: grid; place-items: center;
  font-size: 24px;
  font-weight: 700;
}
.cc-gate__name { font-size: 16px; font-weight: 600; color: var(--text); }

/* Capture home -------------------------------------------- */
.cc-capture {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 96px;
  min-height: 100dvh;
}
.cc-capture__top {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.cc-capture__me {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}
.cc-capture__bell {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  position: relative;
}
@media (hover: hover) {
  .cc-capture__bell:hover { background: var(--grey-1); }
}

.cc-capture__buttons {
  display: grid;
  gap: 16px;
  margin-bottom: 48px;
}
@media (min-width: 720px) {
  .cc-capture__buttons {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Capture button — large hero card ------------------------- */
.cc-capture-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: pointer;
  min-height: 96px;
  transition: box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.cc-capture-btn:active { transform: scale(0.99); }
@media (hover: hover) {
  .cc-capture-btn:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
  }
}
.cc-capture-btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
  color: #fff;
}
.cc-capture-btn--primary .cc-capture-btn__hint { color: hsl(0 0% 100% / 0.7); }
.cc-capture-btn--primary .cc-capture-btn__chev { color: hsl(0 0% 100% / 0.6); }
.cc-capture-btn--primary .cc-capture-btn__icon {
  background: hsl(0 0% 100% / 0.16);
  color: #fff;
}

.cc-capture-btn__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--grey-1);
  color: var(--text);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cc-capture-btn__text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.cc-capture-btn__label { font-size: 16px; font-weight: 600; line-height: 1.25; }
.cc-capture-btn__hint { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.cc-capture-btn__chev { color: var(--text-dim); flex-shrink: 0; }
@media (min-width: 720px) {
  .cc-capture-btn { flex-direction: column; align-items: flex-start; min-height: 160px; }
  .cc-capture-btn__chev { display: none; }
}

/* Recent peek --------------------------------------------- */
.cc-recent-peek {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.cc-recent-peek__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cc-recent-peek__more {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}
.cc-recent-peek__list { list-style: none; margin: 0; padding: 0; }
.cc-recent-peek__list li {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--grey-1);
}
.cc-recent-peek__list li:last-child { border-bottom: 0; }
.cc-recent-peek__type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.cc-recent-peek__body {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-recent-peek__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}
.cc-recent-peek--empty {
  border-top: 1px dashed var(--border);
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* Capture input area (record + textarea side by side) ----- */
.cc-capture-input {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.cc-capture-input__field {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}
.cc-capture-input__timer {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--status-lost);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.cc-capture-input__pending {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: hsl(0 0% 100% / 0.7);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-muted);
}

/* Record button ------------------------------------------- */
.cc-record {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out),
              transform var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  align-self: flex-end;
  box-shadow: 0 6px 20px hsl(245 100% 65% / 0.32);
}
.cc-record:active:not(:disabled) { transform: scale(0.96); }
.cc-record--recording {
  background: var(--status-lost);
  animation: ccPulse 1.5s ease-in-out infinite;
  box-shadow: 0 6px 20px hsl(346 75% 36% / 0.32);
}
.cc-record--processing {
  background: var(--grey-2);
  color: var(--primary);
  box-shadow: none;
}
.cc-record.is-disabled { cursor: not-allowed; }
@keyframes ccPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .cc-record--recording { animation: none; }
}

/* Waveform ------------------------------------------------- */
.cc-waveform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  height: 76px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  background: var(--grey-1);
}
.cc-waveform__bar {
  display: block;
  flex: 1;
  background: var(--primary);
  border-radius: 2px;
  height: 12px;
  animation: ccWave 1.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes ccWave {
  0%,100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cc-waveform__bar { animation: none; }
}

/* Toggle row (Needs follow-up) --------------------------- */
.cc-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--grey-1);
  border-radius: var(--radius-md);
  font-size: 14px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.cc-toggle-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.cc-toggle-row__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

/* Tag chips (Capture: Anything else) ---------------------- */
.cc-tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) {
  .cc-tag:hover { background: var(--grey-1); }
}
.cc-tag.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cc-add-link {
  align-self: start;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  padding: 6px 0;
  cursor: pointer;
}

/* Member picker ------------------------------------------- */
.cc-mp { position: relative; display: flex; flex-direction: column; gap: 6px; }
.cc-mp__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.cc-mp__chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cc-mp__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}
.cc-mp__chip button {
  display: inline-flex;
  width: 18px; height: 18px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  color: var(--primary);
}
@media (hover: hover) {
  .cc-mp__chip button:hover { background: hsl(245 100% 65% / 0.2); }
}
.cc-mp__chips .cc-input { flex: 1; min-width: 120px; }
.cc-mp__results {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  max-height: 240px;
  overflow-y: auto;
}
.cc-mp__results li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
}
.cc-mp__results li.is-active,
.cc-mp__results li:hover {
  background: var(--grey-1);
}
.cc-mp__results-name { color: var(--text); font-weight: 500; }
.cc-mp__results-coach {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.cc-mp__empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 12px;
  font-style: italic;
}

/* Smart-link confirmation chip ---------------------------- */
.cc-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Phase 3 — Navigation shell + Knowledge Hub
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Shell ---------------------------------------------------- */
.cc-shell {
  display: flex;
  min-height: 100dvh;
  background: var(--bg);
}
.cc-shell__side { display: none; }
.cc-shell__main {
  flex: 1;
  min-width: 0;
  padding-bottom: 84px;
}
.cc-shell__bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 50;
}
.cc-shell__bottom-link {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 11px;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: color var(--dur-fast) var(--ease-out);
}
.cc-shell__bottom-link.is-active { color: var(--primary); }
.cc-shell__bottom-link:active { transform: scale(0.96); }
.cc-shell__bottom-label { font-family: var(--font-ui); font-weight: 500; }

@media (min-width: 768px) {
  .cc-shell__bottom { display: none; }
  .cc-shell__main { padding-bottom: 32px; }
  .cc-shell__side {
    display: flex; flex-direction: column;
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    gap: 24px;
    background: var(--bg);
    position: sticky;
    top: 0;
    height: 100dvh;
  }
  .cc-shell__brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
  }
  .cc-shell__brand-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
  }
  .cc-shell__brand-name { font-weight: 600; }
  .cc-shell__me {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    background: var(--grey-1);
  }
  .cc-shell__me-name { font-size: 14px; font-weight: 500; }
  .cc-shell__nav { display: flex; flex-direction: column; gap: 2px; }
  .cc-shell__nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
    -webkit-user-select: none;
    user-select: none;
  }
  .cc-shell__nav-link:hover { background: var(--grey-1); color: var(--text); }
  .cc-shell__nav-link.is-active { background: var(--primary-subtle); color: var(--primary); }
  .cc-shell__nav-icon { display: inline-flex; }
  .cc-shell__side-foot { margin-top: auto; }
  .cc-shell__settings {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
  }
  .cc-shell__settings:hover { color: var(--text); }
}

/* Knowledge Hub container --------------------------------- */
.cc-hub {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 20px 32px;
}
.cc-hub__head {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.cc-hub__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cc-hub__body { display: flex; flex-direction: column; gap: 16px; }

.cc-section-h2 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cc-section-h2__count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0;
}

/* Filter chips -------------------------------------------- */
.cc-members__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
  align-items: center;
}
.cc-filter-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.cc-filter-chip:hover { background: var(--grey-1); }
.cc-filter-chip.is-on {
  background: var(--chip-colour);
  color: #fff;
  border-color: var(--chip-colour);
}
.cc-members__sort {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
}
.cc-members__sort:hover { color: var(--text); }

/* Members list -------------------------------------------- */
.cc-members__list { list-style: none; margin: 0; padding: 0; }
.cc-members__list li { border-bottom: 1px solid var(--grey-1); }
.cc-members__list li:last-child { border-bottom: 0; }
.cc-member-row {
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 4px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}
.cc-member-row:hover { background: var(--grey-1); }
.cc-member-row__name { font-weight: 600; font-size: 16px; }
.cc-member-row__coach {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 4px;
}
.cc-member-row__last {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-member-row__chev { color: var(--text-dim); }

@media (max-width: 600px) {
  .cc-member-row {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
  }
  .cc-member-row__name { grid-column: 1; }
  .cc-member-row .cc-pill { grid-column: 2; grid-row: 1; }
  .cc-member-row__coach { grid-column: 2; grid-row: 2; }
  .cc-member-row__last { grid-column: 1; grid-row: 2; }
  .cc-member-row__chev { display: none; }
}

.cc-members__show-lost {
  display: block;
  margin: 24px auto 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px;
}
.cc-members__show-lost:hover { color: var(--text); }

/* Member detail ------------------------------------------- */
.cc-member-detail__head { padding: 8px 0 16px; }
.cc-member-detail__back {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 8px;
}
.cc-member-detail__name {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.cc-member-detail__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.cc-member-detail__profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 16px;
  margin: 16px 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.cc-profile-field { display: flex; flex-direction: column; gap: 4px; }
.cc-profile-field__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 500;
}
.cc-profile-field__value {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text);
}
.cc-member-detail__entries { margin-top: 24px; }
.cc-member-detail__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 8px;
}
.cc-member-detail__fab {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom));
  right: 20px;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 6px 24px hsl(245 100% 65% / 0.4);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  z-index: 40;
}
@media (min-width: 768px) {
  .cc-member-detail__fab { bottom: 24px; }
}
.cc-member-detail__fab:active { transform: scale(0.96); }

/* EntryRow ------------------------------------------------ */
.cc-entry { display: flex; flex-direction: column; }
.cc-entry__head {
  display: grid;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 10px 8px;
  gap: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-user-select: none;
  user-select: none;
  transition: background var(--dur-fast) var(--ease-out);
}
.cc-entry__head:hover { background: var(--grey-1); }

.cc-entry--row .cc-entry__head {
  grid-template-columns: auto auto 1fr auto;
}
.cc-entry--card .cc-entry__head {
  grid-template-columns: auto auto auto auto auto 1fr auto;
}
.cc-entry--stack .cc-entry__head {
  grid-template-columns: auto auto 1fr auto;
}
.cc-entry__body {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.cc-entry__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}
.cc-entry__icon-meta { color: var(--text-dim); display: inline-flex; }
.cc-entry__members {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.cc-entry.is-open .cc-entry__head { background: var(--grey-1); }

.cc-entry__detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
  background: var(--grey-1);
  border-radius: var(--radius-md);
  margin: 4px 0;
}
.cc-entry__detail-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cc-entry__detail-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 500;
  padding-top: 2px;
}
.cc-entry__detail-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cc-entry__chip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
}
.cc-entry__chip:hover { background: var(--primary-subtle); border-color: var(--primary); color: var(--primary); }
.cc-entry__transcript-toggle {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 0;
}
.cc-entry__transcript {
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  white-space: pre-wrap;
  line-height: 1.5;
  border: 1px solid var(--border);
  width: 100%;
}
.cc-entry__audio { display: flex; align-items: center; gap: 12px; }
.cc-entry__audio audio { flex: 1; max-width: 360px; }
.cc-entry__audio-duration {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.cc-entry__audio-loading,
.cc-entry__audio-missing {
  font-size: 13px;
  color: var(--text-dim);
}
.cc-entry__actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cc-entry__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.cc-entry__action:hover { background: var(--surface); color: var(--text); }
.cc-entry__action.is-on { color: var(--primary); }
.cc-entry__action--danger { color: var(--status-lost); }
.cc-entry__action--danger:hover { background: hsl(346 75% 36% / 0.08); color: var(--status-lost); }

/* Recent ------------------------------------------------- */
.cc-recent__group { margin-bottom: 16px; }
.cc-recent__day {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 500;
  padding: 8px 4px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}

/* Attention ----------------------------------------------- */
.cc-attention { display: flex; flex-direction: column; gap: 24px; }
.cc-attention__list { display: flex; flex-direction: column; gap: 12px; }
.cc-attention__mark {
  margin-top: 12px;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 0;
  font-weight: 500;
}

/* Search -------------------------------------------------- */
.cc-search { display: flex; flex-direction: column; gap: 16px; }
.cc-search .cc-input { max-width: 480px; margin: 0 auto; width: 100%; }

/* Edit drawer extras ------------------------------------- */
.cc-edit-readonly summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}
.cc-edit-readonly pre {
  font-family: inherit;
  font-size: 14px;
  white-space: pre-wrap;
  background: var(--grey-1);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Phase 4 — Settings + sheet setup
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.cc-settings {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 96px;
}
.cc-settings__section { margin-top: 32px; display: flex; flex-direction: column; gap: 8px; }
.cc-settings__section .cc-card { display: block; }
.cc-settings__pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cc-settings__pending-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.cc-settings__pending-status {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cc-settings__status--ok { color: var(--status-on-track); }
.cc-settings__status--err { color: var(--status-lost); }
.cc-settings__status--idle { color: var(--text-dim); }
.cc-settings__textarea {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--grey-1);
  color: var(--text);
  resize: vertical;
  min-height: 200px;
}
.cc-settings__details summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  color: var(--text);
}
.cc-settings__details[open] summary { color: var(--primary); }

.cc-settings__shortcuts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 24px;
}
.cc-settings__shortcuts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.cc-settings__shortcut-keys {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}
.cc-settings__shortcut-keys kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--grey-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
  color: var(--text);
  box-shadow: 0 1px 0 hsl(30 8% 8% / 0.06);
}
.cc-settings__shortcut-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Phase 5 — Events
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.cc-events {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 96px;
}
.cc-events__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.cc-events__layout {
  display: grid;
  gap: 16px;
}
@media (min-width: 1024px) {
  .cc-events__layout {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }
}

/* Idea rail ----------------------------------------------- */
.cc-events__rail {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
  transition: background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.cc-events__rail.is-hot {
  background: var(--primary-subtle);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-card-hover);
}
.cc-cal__event[draggable="true"] { cursor: grab; }
.cc-cal__event:active { cursor: grabbing; }
.cc-events__rail-head { padding: 4px; }
.cc-events__rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 70vh;
  overflow-y: auto;
}
.cc-events__rail-fab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px hsl(245 100% 65% / 0.4);
  transition: transform var(--dur-micro) var(--ease-out);
}
.cc-events__rail-fab:active { transform: scale(0.96); }

/* Idea card ----------------------------------------------- */
.cc-idea-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: var(--grey-1);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 4px;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
  cursor: grab;
}
.cc-idea-card:hover { background: var(--surface); border-color: var(--border); }
.cc-idea-card:active { cursor: grabbing; }
.cc-idea-card--scheduled,
.cc-idea-card--done { cursor: default; opacity: 0.7; }
.cc-idea-card[draggable="true"]:hover { box-shadow: var(--shadow-card); }
.cc-idea-card__main {
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  min-width: 0;
}
.cc-idea-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-idea-card__desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-idea-card__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}
.cc-idea-card__schedule {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
}
.cc-idea-card__schedule:hover { background: var(--primary-subtle); color: var(--primary); }

/* Calendar ------------------------------------------------ */
.cc-cal {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.cc-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 12px;
}
.cc-cal__head button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}
.cc-cal__head button:hover { background: hsl(30 8% 8% / 0.06); }
.cc-cal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cc-cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 1px solid hsl(30 8% 8% / 0.05);
}
.cc-cal__weekdays span { padding: 4px; text-align: center; }

.cc-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 84px;
  gap: 1px;
  background: hsl(30 8% 8% / 0.05);
  margin-top: 1px;
}
.cc-cal__cell {
  background: var(--ivory);
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background var(--dur-fast) var(--ease-out);
  min-width: 0;
  overflow: hidden;
}
@media (min-width: 600px) {
  .cc-cal__grid { grid-auto-rows: 96px; }
}
.cc-cal__cell.is-other { background: hsl(36 33% 97%); color: var(--text-dim); }
.cc-cal__cell.is-today .cc-cal__day {
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 0 6px;
}
.cc-cal__cell.is-hot {
  background: var(--primary-subtle);
}
.cc-cal__day {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  align-self: flex-start;
}
.cc-cal__cell.is-other .cc-cal__day { color: var(--text-dim); }
.cc-cal__events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}
.cc-cal__event {
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: left;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background var(--dur-fast) var(--ease-out);
  min-width: 0;
}
@media (max-width: 600px) {
  .cc-cal__event { font-size: 0; padding: 3px; height: 6px; }
  .cc-cal__event-time { display: none; }
}
.cc-cal__event:hover { background: hsl(245 100% 65% / 0.16); }
.cc-cal__event--done {
  background: hsl(30 8% 86% / 0.6);
  color: var(--text-dim);
  text-decoration: line-through;
  text-decoration-color: hsl(30 8% 56% / 0.5);
}
.cc-cal__event-time {
  font-family: var(--font-mono);
  font-size: 10px;
  margin-right: 4px;
  opacity: 0.7;
}
.cc-cal__more {
  font-size: 10px;
  color: var(--text-dim);
  padding: 0 6px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Phase 7 — Team Meetings
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.cc-meet {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cc-meet__list { display: flex; flex-direction: column; gap: 12px; }
.cc-meet-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}
.cc-meet-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  line-height: 1;
}
.cc-meet-card__day {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}
.cc-meet-card__month {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.cc-meet-card__attendees {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.cc-meet-card__topic {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Recording view — full-bleed black ----------------------- */
.cc-rec {
  position: fixed;
  inset: 0;
  background: #0A0A0A;
  color: #FAFAF7;
  display: flex;
  flex-direction: column;
  z-index: 90;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  font-family: var(--font-ui);
}
.cc-rec__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}
.cc-rec__cancel {
  font-size: 13px;
  color: hsl(0 0% 100% / 0.5);
  cursor: pointer;
  padding: 6px 4px;
}
.cc-rec__cancel:hover { color: hsl(0 0% 100% / 0.8); }
.cc-rec__autosave {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: hsl(0 0% 100% / 0.5);
}
.cc-rec__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: hsl(0 0% 100% / 0.3);
}
.cc-rec__dot.is-saved {
  background: var(--status-on-track);
  animation: ccDotPulse 2s ease-in-out infinite;
}
@keyframes ccDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cc-rec__timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0;
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cc-rec__pulse {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--status-lost);
  animation: ccRecPulse 1s ease-in-out infinite;
  box-shadow: 0 0 18px hsl(346 75% 36% / 0.5);
}
@keyframes ccRecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}
@media (prefers-reduced-motion: reduce) {
  .cc-rec__pulse, .cc-rec__dot.is-saved { animation: none; }
}

.cc-rec__active {
  text-align: center;
  padding: 8px 24px 32px;
}
.cc-rec__active-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: hsl(0 0% 100% / 0.4);
  margin-bottom: 8px;
}
.cc-rec__active-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

.cc-rec__agenda {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.cc-rec__section {
  width: 100%;
  text-align: left;
  background: hsl(0 0% 100% / 0.04);
  border: 1px solid hsl(0 0% 100% / 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: hsl(0 0% 100% / 0.85);
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  position: relative;
}
.cc-rec__section:hover { background: hsl(0 0% 100% / 0.08); }
.cc-rec__section.is-active {
  background: hsl(245 100% 65% / 0.18);
  border-color: var(--primary);
  color: #fff;
}
.cc-rec__section.is-visited:not(.is-active) {
  opacity: 0.6;
}
.cc-rec__section-title {
  font-size: 16px;
  font-weight: 600;
  display: block;
}
.cc-rec__section-items {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: hsl(0 0% 100% / 0.65);
}
.cc-rec__section-items li {
  padding: 2px 0 2px 14px;
  position: relative;
}
.cc-rec__section-items li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: hsl(0 0% 100% / 0.35);
}
.cc-rec__check {
  position: absolute;
  top: 14px; right: 14px;
  color: var(--status-on-track);
}

.cc-rec__foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 20px;
  border-top: 1px solid hsl(0 0% 100% / 0.06);
}
.cc-rec__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: hsl(0 0% 100% / 0.5);
  flex: 1;
}
.cc-rec__end {
  background: var(--status-lost);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.cc-rec__end:disabled { opacity: 0.5; cursor: not-allowed; }
.cc-rec__end:not(:disabled):hover { background: #B91C42; }

/* Review view -------------------------------------------- */
.cc-meet-review__head { padding: 8px 0 16px; }
.cc-meet-review__section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.cc-meet-review__section summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.cc-meet-review__hint {
  font-size: 13px;
  color: var(--text-dim);
  margin: -4px 0 12px;
}
.cc-meet-review__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-meet-review__list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.cc-meet-review__rm,
.cc-meet-review__add {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
}
.cc-meet-review__rm:hover { background: var(--grey-1); color: var(--status-lost); }
.cc-meet-review__add { color: var(--primary); }
.cc-meet-review__add:hover { background: var(--primary-subtle); }
.cc-meet-review__add:disabled { opacity: 0.4; cursor: not-allowed; }

.cc-meet-review__actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cc-meet-review__actions > li:not(:last-child) {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.cc-meet-review__check input { width: 18px; height: 18px; accent-color: var(--primary); }
.cc-meet-review__owner {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-size: 13px;
  background: var(--surface);
}
.cc-meet-review__add-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.cc-meet-review__add-row:hover { background: var(--primary-subtle); }

.cc-meet-review__carry {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cc-meet-review__carry li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--grey-1);
}
.cc-meet-review__carry li:last-child { border-bottom: 0; }
.cc-meet-review__carry-text { font-size: 14px; color: var(--text); }

.cc-meet-review__transcript {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.cc-meet-review__transcript summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.cc-meet-review__transcript pre {
  font-family: inherit;
  font-size: 14px;
  white-space: pre-wrap;
  margin-top: 12px;
  background: var(--grey-1);
  padding: 12px;
  border-radius: var(--radius-md);
  line-height: 1.5;
}

.cc-meet-review__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Workouts (rebuilt) — native Co-Pilot
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.cc-workouts {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cc-workouts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.cc-workouts__lib-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.cc-workouts__lib-link:hover { color: var(--text); }

/* Generator card ----------------------------------------- */
.cc-workouts__gen {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cc-workouts__session {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cc-workouts__session-btn {
  padding: 16px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.cc-workouts__session-btn:hover { background: var(--grey-1); }
.cc-workouts__session-btn.is-on {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.cc-workouts__format {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cc-workouts__format-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
}
.cc-workouts__format-select {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.cc-workouts__format-select:focus { outline: none; border-color: var(--primary); }

/* Result --------------------------------------------------- */
.cc-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.cc-result__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--grey-1);
  padding-bottom: 16px;
  margin-bottom: 4px;
}
.cc-result__title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.cc-result__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.cc-result__head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cc-result__sections { display: flex; flex-direction: column; gap: 12px; }
.cc-result__section {
  border-left: 3px solid transparent;
}
.cc-result__section--onTrack { border-left-color: var(--status-on-track); }
.cc-result__section--member { border-left-color: var(--primary); }
.cc-result__section--overdue { border-left-color: var(--status-overdue); }
.cc-result__section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.cc-result__section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.cc-result__section-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}
.cc-result__section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.cc-result__exercises {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-result__exercises li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--grey-1);
  font-size: 15px;
}
.cc-result__exercises li:last-child { border-bottom: 0; }
.cc-result__ex-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}
.cc-result__ex-name { color: var(--text); font-weight: 500; }
.cc-result__ex-eq {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

@media (max-width: 600px) {
  .cc-result__exercises li {
    grid-template-columns: 24px 1fr;
  }
  .cc-result__ex-eq { grid-column: 2; font-size: 11px; }
}

/* Recent peek -------------------------------------------- */
.cc-workouts__recent {
  margin-top: 16px;
}
.cc-recent-col { margin-bottom: 16px; }
.cc-recent-col__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.cc-recent-col__list { list-style: none; margin: 0; padding: 0; }
.cc-recent-col__list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--grey-1);
  font-size: 14px;
}
.cc-recent-col__sess {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cc-recent-col__fmt { color: var(--text-muted); }
.cc-recent-col__when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* Library ------------------------------------------------ */
.cc-lib { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.cc-lib__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cc-lib-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
}
.cc-lib-row:hover { background: var(--grey-1); border-color: var(--text-dim); }
.cc-lib-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cc-lib-row__name-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.cc-lib-row__desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-lib-row__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}
.cc-lib-row__stars {
  display: inline-flex;
  font-size: 13px;
  color: var(--border);
}
.cc-lib-row__stars .is-on { color: var(--primary); }
.cc-lib-row__chev { color: var(--text-dim); }

@media (max-width: 600px) {
  .cc-lib-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "main chev"
      "meta stars";
    gap: 6px 12px;
  }
  .cc-lib-row__main { grid-area: main; }
  .cc-lib-row__chev { grid-area: chev; align-self: center; }
  .cc-lib-row__meta { grid-area: meta; }
  .cc-lib-row__stars { grid-area: stars; justify-self: end; }
}

.cc-eq__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}
.cc-eq__list li {
  display: grid;
  grid-template-columns: 1fr 60px auto;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  background: var(--grey-1);
  border-radius: var(--radius-sm);
}
.cc-eq__name { font-size: 13px; }
.cc-eq__count {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--surface);
  width: 60px;
  text-align: right;
}
.cc-eq__rm {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
}
.cc-eq__rm:hover { background: var(--surface); color: var(--status-lost); }

.cc-lib__add {
  display: flex;
  gap: 8px;
}
.cc-lib__add input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
}
.cc-lib__add input:focus { outline: none; border-color: var(--primary); }

.cc-stars {
  display: inline-flex;
  gap: 0;
  flex-shrink: 0;
}
.cc-stars button {
  font-size: 16px;
  line-height: 1;
  padding: 2px;
  color: var(--border);
  cursor: pointer;
  background: transparent;
  border: 0;
}
.cc-stars button.is-on { color: var(--primary); }
.cc-stars button:hover { color: var(--primary-hover); }

@media (max-width: 600px) {
  .cc-lib-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name rm"
      "meta meta"
      "stars stars";
    gap: 6px;
  }
  .cc-lib-row__name { grid-area: name; }
  .cc-lib-row__rm { grid-area: rm; }
  .cc-lib-row__meta { grid-area: meta; }
  .cc-stars { grid-area: stars; }
  .cc-lib-row__dur { grid-area: meta; width: auto; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Boot screen — fallback before tabs are mounted.
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.boot {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 48px;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.boot-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.boot-title {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

.boot-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.boot-meta {
  display: flex;
  gap: 8px;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.boot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  align-self: center;
}
