:root {
  --bg: #ffffff;
  --bg-grouped: #f2f2f7;
  --ink: #111111;
  --muted: #6b6b6f;
  --brand: #0a7a4b;
  --brand-soft: #e8f6ef;
  --accent: #c45c26;
  --card: #ffffff;
  --line: rgba(60, 60, 67, 0.12);
  --danger: #d70015;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: none;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
h1, h2, h3 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}
.muted { color: var(--muted); }
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.error {
  color: var(--danger);
  background: #ffeef0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin: 0;
}

/* —— Shell: desktop sidebar + mobile bottom tabs —— */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100dvh;
  background: var(--bg);
}

.topbar { display: none; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0.75rem calc(1rem + var(--safe-bottom));
  background: #111111;
  border-right: 0;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  padding: 0.65rem 0.85rem 1rem;
}
.sidebar .brand {
  color: #fff;
  padding: 0.55rem 0.75rem 1.1rem;
}
.brand-logo {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}
.sidebar .brand-logo {
  background: #fff;
  padding: 2px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.sidebar nav a.nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.78);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9375rem;
}
.sidebar nav a.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.sidebar nav a.nav-link.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.nav-ico {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  fill: currentColor;
}

.sidebar-foot {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 0.75rem;
}

.user-chip {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  padding: 0 0.35rem;
}

.sidebar .btn-ghost,
.sidebar .btn-sidebar-exit {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.sidebar .btn-ghost:hover,
.sidebar .btn-sidebar-exit:hover {
  background: rgba(255, 255, 255, 0.08);
}

.content {
  background: var(--bg-grouped);
  padding: 1.25rem clamp(1rem, 2.5vw, 2rem) calc(1.25rem + var(--safe-bottom));
  min-width: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

/* —— Controls —— */
.btn, button.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: inherit;
  line-height: 1.2;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.btn:active { opacity: 0.85; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.8125rem; border-radius: 8px; }

.stack { display: grid; gap: 0.9rem; }
label {
  display: grid;
  gap: 0.35rem;
  font-weight: 560;
  font-size: 0.8125rem;
  color: var(--muted);
}
input, select, textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 122, 75, 0.15);
}
textarea { min-height: 110px; resize: vertical; }

/* —— Auth —— */
.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: var(--bg);
}
.auth-card {
  width: min(400px, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
}
.auth-card h1 {
  font-size: 1.75rem;
  margin: 0.15rem 0 0.4rem;
}
.auth-card .btn-primary { width: 100%; padding: 0.85rem; margin-top: 0.25rem; }
.auth-logo {
  display: block;
  width: auto;
  max-width: 120px;
  max-height: 72px;
  object-fit: contain;
  margin: 0 0 0.65rem;
}

/* —— Surfaces —— */
.hero-home .lede {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}
.module-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1rem;
  display: grid;
  gap: 0.2rem;
  color: inherit;
}
.module-tile:active { background: var(--bg-grouped); }
.module-tile strong { font-size: 1.05rem; letter-spacing: -0.02em; }
.module-tile span { color: var(--muted); font-size: 0.875rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.toolbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  align-items: center;
}
.toolbar .grow { flex: 1; min-width: 160px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}
tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 650;
}
.badge-warn { background: #fff1e8; color: var(--accent); }
.badge-ok { background: var(--brand-soft); color: var(--brand); }

.form-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.form-grid .full { grid-column: 1 / -1; }

.sortable-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sortable-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  cursor: grab;
}
.sortable-item .handle { color: var(--muted); font-weight: 700; letter-spacing: 0.08em; }
.flash {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 0.85rem;
  font-weight: 500;
}

/* Mobile: bottom tab bar — native feel */
@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 0.65rem 1rem;
    padding-top: max(0.65rem, env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
  }

  .topbar .brand {
    padding: 0;
    font-size: 1.125rem;
  }
  .topbar .brand-logo {
    width: 1.45rem;
    height: 1.45rem;
  }

  .desktop-only { display: none !important; }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0;
    padding-bottom: var(--safe-bottom);
    height: calc(var(--nav-h) + var(--safe-bottom));
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #111111;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .sidebar nav {
    flex-direction: row;
    flex: 1;
    gap: 0;
  }

  .sidebar nav a.nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    text-align: center;
    padding: 0.35rem 0.2rem;
    border-radius: 0;
    font-size: 0.625rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.1;
  }

  .sidebar nav a.nav-link:hover {
    background: transparent;
    color: #fff;
  }

  .sidebar nav a.nav-link.active {
    background: transparent;
    color: #7ddea8;
    font-weight: 650;
  }

  .sidebar .nav-ico {
    width: 1.2rem;
    height: 1.2rem;
  }

  .content {
    padding: 1rem 1rem 1.25rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }
}

/* —— Services planner (polished) —— */
.week-nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.week-nav-btn {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 600;
}
.week-nav-btn:hover { background: var(--bg-grouped); }
.week-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  text-align: center;
}
.week-nav-center strong { font-size: 1rem; letter-spacing: -0.02em; }
.week-today-link { font-size: 0.8rem; font-weight: 600; }

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}
.day-col {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.day-col.is-today {
  border-color: rgba(10, 122, 75, 0.4);
  box-shadow: 0 0 0 3px rgba(10, 122, 75, 0.08);
}
.day-col.is-empty { background: rgba(255,255,255,0.55); }
.day-col-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.65rem 0.55rem 0.4rem 0.7rem;
}
.day-col-label { display: grid; gap: 0.1rem; }
.day-name {
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.day-num {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.day-num.is-today-num {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
}
.day-add {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}
.day-add:hover { background: var(--brand-soft); color: var(--brand); }
.day-cards { list-style: none; margin: 0; padding: 0 0.45rem 0.55rem; display: grid; gap: 0.4rem; flex: 1; }
.day-idle {
  margin: 0;
  padding: 0.5rem 0.7rem 0.85rem;
  color: #c4c4c8;
  font-size: 0.9rem;
}

.svc-card {
  position: relative;
  border-radius: 10px;
  background: var(--bg-grouped);
  border-left: 3px solid #c7c7cc;
}
.svc-card.status-published { border-left-color: var(--brand); background: var(--brand-soft); }
.svc-card.status-draft { border-left-color: var(--accent); }
.svc-card-link {
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 1.7rem 0.55rem 0.55rem;
  color: inherit;
}
.svc-card-time {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}
.svc-card-title {
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.svc-card-team { font-size: 0.72rem; color: var(--muted); }
.svc-card-status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.svc-card-menu { position: absolute; top: 0; right: 0; }
.svc-card-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  color: var(--muted);
  font-weight: 700;
}
.svc-card-menu summary::-webkit-details-marker { display: none; }
.svc-card-menu-panel {
  position: absolute;
  right: 0.25rem;
  top: 100%;
  z-index: 8;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 150px;
  padding: 0.3rem;
  display: grid;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.svc-card-menu-panel a,
.svc-card-menu-panel button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.svc-card-menu-panel a:hover,
.svc-card-menu-panel button:hover { background: var(--bg-grouped); }
.svc-card-menu-panel .danger { color: var(--danger); }

/* Workspace */
.ws-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.ws-more { position: relative; }
.ws-more summary { list-style: none; cursor: pointer; }
.ws-more summary::-webkit-details-marker { display: none; }
.ws-more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 10;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 180px;
  padding: 0.3rem;
  display: grid;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.ws-more-panel a,
.ws-more-panel button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.ws-more-panel a:hover,
.ws-more-panel button:hover { background: var(--bg-grouped); }

.ws-hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem 1.05rem;
  margin-bottom: 0.75rem;
}
.ws-hero-title {
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  margin: 0.45rem 0 0.35rem;
  letter-spacing: -0.03em;
}
.ws-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
}
.ws-hero-meta span {
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--bg-grouped);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 560;
}
.ws-hero-notes { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.92rem; }
.status-pill {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill.status-draft { background: #fff1e8; color: var(--accent); }
.status-pill.status-published { background: var(--brand-soft); color: var(--brand); }

.ws-details-panel { margin-bottom: 0.75rem; }
.ws-details-panel summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}
.ws-dup, .ws-del {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.ws-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 0.75rem;
  align-items: start;
}
.ws-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}
.ws-section-head h2 { font-size: 1.05rem; letter-spacing: -0.02em; }
.ws-count { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

.rundown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.rundown-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.55rem;
  align-items: start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.65rem;
  transition: border-color 0.15s ease;
}
.rundown-item:hover { border-color: rgba(10, 122, 75, 0.25); }
.rundown-ghost { opacity: 0.45; }
.rundown-item .handle {
  width: 14px;
  height: 22px;
  margin-top: 0.15rem;
  cursor: grab;
  background:
    radial-gradient(circle, #c7c7cc 1.2px, transparent 1.3px) 0 0 / 6px 6px,
    radial-gradient(circle, #c7c7cc 1.2px, transparent 1.3px) 6px 0 / 6px 6px;
  background-repeat: repeat-y;
  opacity: 0.9;
}
.rundown-idx {
  width: 1.45rem;
  height: 1.45rem;
  margin-top: 0.1rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--bg-grouped);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.rundown-body { display: grid; gap: 0.15rem; min-width: 0; }
.rundown-top { display: flex; gap: 0.4rem; align-items: center; }
.rundown-title { font-size: 0.98rem; letter-spacing: -0.02em; }
.rundown-mins { font-size: 0.75rem; color: var(--muted); font-weight: 650; }
.rundown-done {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  width: 1.2rem;
  height: 1.2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}
.rundown-details { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--muted); }
.rundown-empty, .team-empty {
  padding: 1rem 0.75rem;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.kind-chip {
  display: inline-flex;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.kind-chip.kind-song { background: #e8f1ff; color: #2658a5; }
.kind-chip.kind-moment { background: var(--brand-soft); color: var(--brand); }
.kind-chip.kind-announcement { background: #fff1e8; color: var(--accent); }
.kind-chip.kind-other { background: #eeeef2; color: #555; }

.ws-add {
  margin-top: 0.9rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--bg-grouped);
  display: grid;
  gap: 0.7rem;
}
.ws-add-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ws-add-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ws-add-grid .full { grid-column: 1 / -1; }

.team-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.team-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.team-row.is-open { border-style: dashed; background: #fffdf8; }
.team-role {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.team-person { font-weight: 600; }
.team-edit { display: flex; gap: 0.35rem; min-width: 0; }
.team-edit input { flex: 1; min-width: 0; }
.team-row > form:last-child { justify-self: end; }
.team-add {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.lib-hero { margin-bottom: 0.85rem; }
.lib-hero-card {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8f6ef, #fff 55%);
  border: 1px solid var(--line);
  color: inherit;
}
.lib-hero-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
}
.lib-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}
.lib-panel .ws-section-head { margin-bottom: 0.65rem; }
.lib-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.lib-row {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  color: inherit;
  background: var(--bg-grouped);
}
.lib-row:hover { background: #e9e9ee; }
.lib-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.lib-chips li {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-grouped);
  font-size: 0.85rem;
  font-weight: 560;
}
.lib-mini-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.lib-mini-form input { flex: 1; min-width: 100px; }
.lib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.lib-list li { display: grid; gap: 0.15rem; }

.form-panel .form-lead { margin: 0 0 1rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-weight: 600;
  color: var(--ink);
}
.choice:has(input:checked) {
  border-color: rgba(10, 122, 75, 0.45);
  background: var(--brand-soft);
}
.choice input { width: auto; }

.code-block {
  background: #111;
  color: #f3f3f3;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .week-grid { grid-template-columns: 1fr; }
  .day-col { min-height: 0; }
  .ws-layout { grid-template-columns: 1fr; }
  .ws-add-grid { grid-template-columns: 1fr; }
  .team-row { grid-template-columns: 1fr auto; }
  .team-role { grid-column: 1 / -1; }
  .team-edit { grid-column: 1 / -1; }
}

@media print {
  .topbar, .sidebar, .page-header, .no-print, .ws-details-panel, .ws-add, .ws-actions, .btn { display: none !important; }
  .app-shell { display: block; }
  .content { background: #fff; padding: 0; }
  .ws-layout { display: block; }
}

/* —— Settings —— */
.settings-panel { margin-bottom: 0.85rem; }
.settings-lead { margin: 0 0 1rem; }
.logo-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.logo-preview {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-grouped);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.65rem;
}
.logo-preview.is-empty { color: var(--muted); font-size: 0.85rem; }
.logo-actions { display: grid; gap: 0.55rem; align-content: start; }
.logo-filename { margin: 0; font-size: 0.85rem; word-break: break-all; }
.file-pick { display: inline-grid; gap: 0; cursor: pointer; color: inherit; font-weight: inherit; }
.file-pick input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.logo-upload-form { display: inline-flex; }

