:root {
  --ground: #f7ecee;
  --surface: #ffffff;
  --raised: #fdf8f9;
  --active: #e7c9cf;
  --border: #e6e3dd;
  --rule: #f7ecee;
  --control: #cfcbc3;
  --text: #28251d;
  --muted: #6b675f;
  --faint: #6b675f;
  --accent: #9e5364;
  --positive: #1a6b45;
  --negative: #9a3040;
  --chart: #9e5364;
  --radius-sheet: 16px;
  --radius-card: 8px;
  --gap: 24px;
  --pad: 24px;
  --sidebar: 228px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.door {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--ground);
}
.door-copy { padding: 48px 40px; }
.door h1 { margin: 12px 0; font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.door p { max-width: 46ch; color: var(--muted); }
.mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: transparent;
}
.door-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.other-dates { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 100%; margin: 12px 0; }
.primary, .ghost {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.primary { background: var(--accent); color: var(--raised); }
.ghost { background: var(--surface); border: 1px solid var(--control); }
#prev-month, #next-month, .other-dates .ghost { min-height: 28px; padding: 0 8px; font-size: 12px; }
.door form, .sheet-form { display: grid; gap: 10px; max-width: 420px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; min-width: 0; max-width: 100%; }
.date-slot {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: #fff;
}
.date-slot::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236B675F' stroke-width='1.4'%3E%3Crect x='2' y='3' width='12' height='11' rx='1.5'/%3E%3Cpath d='M2 6.5h12M5 2v2.5M11 2v2.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.date-slot input[type="date"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 8px 36px 8px 10px;
  -webkit-appearance: none;
  appearance: none;
}
.date-slot input[type="date"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
.date-slot input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
input, select, textarea {
  min-height: 40px;
  border: 1px solid var(--control);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
}
textarea { min-height: 96px; }
.sample-list { margin: 16px 0 0; padding: 0; list-style: none; color: var(--muted); }
.sample-list button { background: none; border: 0; padding: 6px 0; text-align: left; text-decoration: underline; }

.shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  background: var(--ground);
  min-width: 0;
  max-width: 100%;
}
.side {
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-y: auto;
}
.brand-lock {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 8px 16px;
  text-decoration: none;
}
.brand-lock img { width: 36px; height: 36px; object-fit: contain; background: transparent; }
.brand-lock strong { display: block; font-size: 14px; font-weight: 500; }
.brand-lock span { color: var(--muted); font-size: 12px; }
.nav { display: grid; gap: 2px; }
.nav a, .nav button {
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 10px;
  color: var(--muted);
}
.nav a[aria-current="page"] { background: var(--active); color: var(--text); }
.side-foot { margin-top: auto; padding: 12px 8px 0; color: var(--muted); font-size: 12px; }
.side-foot button { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--text); }

.workspace { padding: 0 8px 8px 0; min-width: 0; max-width: 100%; }
.sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  min-height: calc(100svh - 8px);
  padding: 20px 24px 32px;
  min-width: 0;
  max-width: 100%;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: -20px -24px 16px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  position: sticky;
  top: 0;
  z-index: 6;
}
.menu-toggle { display: none; background: #fff; border: 1px solid var(--control); min-height: 44px; min-width: 44px; border-radius: 8px; padding: 0 12px; }
.menu-close { display: none; }
.title-row { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.title-row h1 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.finding { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.banner {
  margin: 14px 0;
  padding: 10px 12px;
  background: var(--ground);
  color: var(--text);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; min-width: 0; max-width: 100%; }
.seg, .tabs { display: flex; flex-wrap: wrap; gap: 0; max-width: 100%; }
.seg button, .tabs button {
  min-height: 32px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}
.seg button[aria-pressed="true"], .tabs button[aria-pressed="true"] {
  color: var(--text);
  border-bottom-color: var(--text);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 8px 0 24px;
}
.kpis div { padding: 14px 12px; }
.kpis div + div { border-left: 1px solid var(--rule); }
.kpis span { display: block; color: var(--muted); font-size: 13px; }
.kpis strong { display: block; margin-top: 4px; font-size: 26px; font-weight: 400; }
.kpis em { font-style: normal; color: var(--muted); font-size: 12px; }
.good { color: var(--positive); }
.bad { color: var(--negative); }

.layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; min-width: 0; max-width: 100%; }
.panel { padding: 0; min-width: 0; max-width: 100%; }
.panel h2 { margin: 0 0 8px; font-size: 16px; font-weight: 500; }
.chart { width: 100%; max-width: 100%; height: auto; display: block; overflow: hidden; }
.chart text { font-family: var(--font); font-size: 12px; fill: var(--muted); }
.rail { min-width: 0; }
.rail article { padding: 10px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.rail article span { display: block; margin-top: 6px; }
.rail a { text-decoration: none; }
.rail a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; max-width: 100%; min-width: 0; }
.table { width: 100%; border-collapse: collapse; min-width: 0; }
.table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; padding: 8px 0; }
.table td { padding: 12px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.table .num, .table th.num { text-align: right; }
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--ground);
  color: var(--accent);
  font-size: 12px;
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.cal p { margin: 0; color: var(--muted); font-size: 12px; text-align: center; min-width: 0; }
.day {
  min-height: 72px;
  min-width: 0;
  width: 100%;
  text-align: left;
  background: var(--raised);
  border: 0;
  border-radius: 8px;
  padding: 8px;
}
.day.has { background: var(--active); }
.day[aria-pressed="true"] { outline: 2px solid var(--accent); }
.day.is-today { box-shadow: inset 0 0 0 2px #28251d; }
.day small { display: block; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.swatch { display: block; width: 18px; height: 10px; border-radius: 2px; }
.day.multi .swatch { width: 10px; height: 8px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.cal-legend li, .brand-chip, .pop-brand { display: inline-block; padding: 4px 8px; font-size: 13px; font-weight: 600; }
.day-pop { position: fixed; inset: 0; z-index: 30; }
.day-pop-back { position: absolute; inset: 0; background: rgba(40, 37, 29, 0.55); }
.day-pop-panel {
  position: relative;
  z-index: 1;
  margin: 8vh auto;
  width: min(560px, calc(100% - 24px));
  max-height: 80vh;
  background: #fff;
  border: 1px solid #e7c9cf;
  border-top: 4px solid #9e5364;
  padding: 48px 16px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.day-pop-scroll { overflow: auto; max-height: calc(80vh - 96px); min-width: 0; }
.day-pop-scroll h3 { margin: 16px 0 6px; font-size: 15px; }
.task-order { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; font-weight: 600; max-width: 100%; }
.task-order select { min-height: 40px; min-width: 0; background: #fff; color: #28251d; border: 1px solid #cfcbc3; }
.day-group { margin: 12px 0; min-width: 0; }
.day-group h3 { margin: 0 0 4px; font-size: 15px; }
.task-row { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--rule); min-width: 0; }
.task-row time { color: var(--muted); font-size: 13px; }
.task-row.is-latest { outline: 2px solid #28251d; padding: 8px; }
.task-row .ghost { justify-self: start; }
.day-pop-panel .sheet-form { max-width: none; width: 100%; }
.pop-brand { margin: 12px 0 4px; }
.color-row {
  border: 1px solid #e7c9cf;
  margin: 0 0 12px;
  padding: 12px;
  min-width: 0;
  max-width: 100%;
}
.color-row label { margin-top: 8px; }
.day-panel { margin-top: 16px; background: var(--raised); border-radius: 8px; padding: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--rule); }
.check input { width: 18px; height: 18px; margin-top: 2px; }
.note { padding: 12px 0; border-top: 1px solid var(--rule); }
.quiz-q { margin: 16px 0; }
.quiz-q label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.hidden-note { color: var(--muted); }
.year-title { margin: 4px 0 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--accent); }
.status-line { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.note-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.note-actions .ghost, .note-actions .primary { min-height: 28px; padding: 0 8px; font-size: 12px; }
.note-status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.brand-name { display: block; margin: 0 0 4px; font-size: 17px; font-weight: 600; color: #7a3e4c; letter-spacing: -0.01em; text-decoration: none; }
.brand-filter { color: #7a3e4c; font-weight: 600; font-size: 15px; }
.brand-filter select { color: #7a3e4c; font-weight: 600; font-size: 16px; }
.status-drop, .pay-switch {
  display: grid;
  gap: 6px;
  max-width: 320px;
  margin: 8px 0 14px;
}
.status-drop select, .pay-switch select {
  width: 100%;
  min-height: 44px;
  background: #fff;
  color: #28251d;
  border: 1px solid #cfcbc3;
  border-radius: 0;
  padding: 0 10px;
}
.pay-line { margin: 8px 0; }
@media (max-width: 700px) {
  .status-drop, .pay-switch { max-width: none; }
}
.note.from-admin { box-shadow: inset 4px 0 0 #7a3e4c; }
.day.from-admin { background: #7a3e4c; color: #fdf8f9; }
.day.from-admin small, .day.from-admin .count { color: #f7ecee; }
.shot-row { display: flex; gap: 12px; overflow-x: auto; max-width: 100%; padding: 8px 4px 12px; scroll-snap-type: x mandatory; }
.attach-show .shot { scroll-snap-align: start; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.shot { flex: 0 0 128px; color: var(--text); text-decoration: none; }
.shot img, .note .shot img { width: 128px; height: 96px; object-fit: cover; border-radius: 6px; display: block; }
.note .shot { display: inline-block; margin: 8px 8px 0 0; }
.shot span { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: #7a3e4c; }
.note-status button {
  min-height: 26px;
  padding: 0 7px;
  font-size: 12px;
  border: 1px solid var(--control);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
.note.sticky {
  position: relative;
  margin: 14px 0;
  padding: 14px;
  background: #fff7f4;
  border: 1px solid #e7c9cf;
  border-radius: 2px;
  box-shadow: none;
  transform: none;
}
.note.sticky.from-admin { box-shadow: inset 4px 0 0 #7a3e4c; }
.note.status-approved { background: #c98b9a; color: #28251d; }
.note.status-approved .hidden-note { color: #3d322c; }
.note.status-waiting strong, .note.status-waiting p { font-weight: 700; }
.note.status-not-done { background: #fff; box-shadow: none; }
.note.status-in-progress { background: #fff7f4; }
.note-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.note-tools label { font-size: 12px; font-weight: 600; color: #7a3e4c; min-width: 120px; }
.note-tools select { min-height: 32px; font-size: 13px; }
.color-key { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0 16px; list-style: none; }
.color-key li { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; border: 1px solid #e7c9cf; background: #fff; }
.color-key .status-approved { background: #c98b9a; color: #28251d; }
.color-key .status-waiting { font-weight: 700; }
.dash-section {
  border: 1px solid #e7c9cf;
  border-top: 4px solid #9e5364;
  background: #fff;
  padding: 16px;
  margin: 0 0 16px;
  min-width: 0;
  max-width: 100%;
}
.dash-section h1,
.dash-section h2 { margin-top: 0; }
.layout > div { min-width: 0; }
.controls.dash-section { margin: 0 0 16px; }
#week-tasks { scroll-margin-top: 72px; }
.week-announce {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: #7a3e4c;
  color: #fdf8f9;
  text-align: left;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.week-announce span {
  font-weight: 500;
  text-decoration: underline;
}
.week-announce:focus-visible {
  outline: 2px solid #28251d;
  outline-offset: 3px;
}
.check.open-task {
  background: #f7ecee;
  margin: 8px 0;
  padding: 10px 8px;
  border-left: 4px solid #7a3e4c;
}
.section-rule { border-top: 4px solid #e7c9cf; margin-top: 18px; padding-top: 14px; }
.rule-rose { border-top-color: #e7c9cf; }
.rule-deep { border-top-color: #9e5364; }
.rule-paper { border-top-color: #c4a484; }
.rule-ink { border-top-color: #28251d; }
.rule-label { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #7a3e4c; }
.attach-show { background: #f3e2d0; border-radius: 8px; padding: 12px; }
.convo .note + .note, .task-row { border-top: 3px solid #9e5364; margin-top: 16px; padding-top: 14px; }
.task-row { background: #fff; }
.folder-card { border-left: 4px solid #7a3e4c; padding: 8px 10px; margin: 8px 0; background: #fff; }
.lightbox { position: fixed; inset: 0; z-index: 20; }
.lb-back { position: absolute; inset: 0; background: rgba(40, 37, 29, 0.72); }
.lb-panel { position: relative; z-index: 1; margin: 8vh auto; width: min(920px, calc(100% - 24px)); background: #fff; border-radius: 8px; padding: 48px 16px 16px; }
.lb-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: #28251d; font-weight: 700; box-shadow: 0 0 0 2px #7a3e4c; }
.lb-stage { overflow: auto; max-height: 68vh; touch-action: none; background: #1c1916; display: grid; place-items: center; }
.lb-stage img { max-width: 100%; transform-origin: center center; }
.lb-arrow { position: absolute; top: 50%; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: #7a3e4c; font-size: 28px; }
.lb-arrow.prev { left: 8px; }
.lb-arrow.next { right: 8px; }
.lb-zoom { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; font-weight: 600; }
.note-pop { max-width: 520px; }
@media (pointer: coarse) { .lb-arrow { display: none; } }
@media (orientation: landscape) and (max-height: 520px) {
  .sheet { padding-bottom: 16px; }
  .day { min-height: 32px; }
  .kpis strong { font-size: 18px; }
  .lb-panel { margin: 8px auto; max-height: calc(100vh - 16px); }
  .lb-stage { max-height: 48vh; }
}
.note-status button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.notes-block { margin-top: 28px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.file-card { background: var(--raised); border-radius: 8px; padding: 10px; }
.file-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; }
.worksheet .sheet-form { max-width: none; }
.worksheet details { margin: 8px 0 16px; background: var(--raised); border-radius: 8px; padding: 10px 14px; }
.worksheet summary { cursor: pointer; font-size: 18px; font-weight: 500; }
.worksheet h3 { margin: 22px 0 8px; font-size: 18px; font-weight: 500; }
.audit-row, .goal-row { display: grid; gap: 8px; margin: 10px 0; }
.audit-row { grid-template-columns: minmax(140px, 1.2fr) 140px minmax(120px, 1fr); align-items: center; }
.goal-row { grid-template-columns: 24px repeat(5, 1fr); }
@media (max-width: 800px) {
  .audit-row, .goal-row { grid-template-columns: 1fr; }
}
.notes-block .sheet-form { max-width: 520px; }

@media (max-width: 800px) {
  .door, .shell, .layout { display: block; }
  .side {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--ground);
    z-index: 5;
    min-height: 0;
    padding-top: 72px;
    overflow: auto;
    transform: translateX(-18px) scale(0.98);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 180ms ease, opacity 160ms ease;
  }
  .side.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav a.picked, .nav a:hover, .nav a:active { background: #f7ecee; color: #7a3e4c; }
  .menu-close {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0 8px 8px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--control);
    border-radius: 8px;
  }
  .workspace { padding: 0; }
  .sheet { border-radius: 0; border: 0; min-height: 100svh; padding: 0 16px 32px; overflow-x: clip; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .kpis { display: grid; grid-template-columns: 1fr 1fr; }
  .kpis div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .kpis strong { font-size: 22px; overflow-wrap: anywhere; }
  .topbar {
    margin: 0 -16px 12px;
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: #fff;
    border-radius: 0;
  }
  .day { min-height: 44px; padding: 4px 2px; font-size: 13px; }
  .day small { font-size: 10px; line-height: 1.1; }
  .count-label { display: none; }
  .cal { gap: 3px; }
  .cal p { font-size: 11px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 0; border-top: 1px solid var(--rule); }
  .table td { border: 0; padding: 3px 0; text-align: left; }
  .table .num, .table th.num { text-align: left; }
  .table td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 7.2em;
    margin-right: 8px;
    color: var(--muted);
    font-size: 12px;
  }
  .seg button, .tabs button { min-height: 44px; }
  .nav a, .nav button { min-height: 44px; }
  .text-toggle { min-height: 44px; }
  .dash-section,
  .day-panel,
  .notes-block,
  .toggle-panel,
  .sheet-form,
  .color-row,
  .layout,
  .layout > div {
    min-width: 0;
    max-width: 100%;
  }
  .sheet-form,
  .sheet-form label,
  .toggle-panel,
  .date-slot,
  .day-panel,
  .notes-block {
    min-width: 0;
    max-width: 100%;
  }
  .sheet-form input,
  .sheet-form select,
  .sheet-form textarea,
  .color-row input,
  .sheet-form .primary,
  .date-slot input[type="date"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .date-slot { overflow: hidden; }
  .day-panel { padding: 12px; }
  .day-pop-panel {
    margin: 12px auto;
    width: min(560px, calc(100% - 16px));
    max-height: calc(100svh - 24px);
  }
  .day-pop-scroll { max-height: calc(100svh - 120px); }
  .dash-section { padding: 14px 12px; }
  .week-announce { flex-wrap: wrap; align-items: flex-start; }
  .week-announce span { white-space: normal; }
}

.text-toggle {
  display: block;
  width: 100%;
  margin: 18px 0 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: #7a3e4c;
}
.text-toggle[aria-expanded="false"]::after { content: " +"; }
.text-toggle[aria-expanded="true"]::after { content: " –"; }
.toggle-panel { padding: 4px 0 8px; }
.status-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.status-filter {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #e7c9cf;
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}
.status-filter[aria-pressed="true"] { outline: 2px solid #7a3e4c; }
.status-filter.status-approved { background: #c98b9a; color: #28251d; }
.status-filter.status-waiting { font-weight: 700; }
.range-pick { display: grid; gap: 4px; font-weight: 600; color: #7a3e4c; }
.range-pick select, .custom-range input { min-height: 40px; background: #fff; border: 1px solid #cfcbc3; border-radius: 8px; padding: 0 8px; }
.custom-range { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; width: 100%; }
.custom-range label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.poll-row { position: relative; display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin: 8px 0; }
.poll-row i { position: absolute; left: 0; bottom: -3px; height: 3px; background: #9e5364; }
.quiz-read p { margin: 0 0 10px; }

/* Audit requests */
.req-badge { display: inline-block; min-width: 18px; padding: 1px 7px; border-radius: 999px; background: var(--accent, #9e5364); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.5; text-align: center; vertical-align: middle; }
.req-card { border: 1px solid rgba(158, 83, 100, .25); border-radius: 10px; margin: 0 0 12px; background: var(--raised, #fff); }
.req-card.is-new { border-color: #9e5364; box-shadow: inset 4px 0 0 #9e5364; }
.req-card summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; list-style: none; }
.req-card summary::-webkit-details-marker { display: none; }
.req-head { display: grid; gap: 2px; }
.req-head strong { font-size: 17px; }
.req-meta { text-align: right; font-size: 13px; white-space: nowrap; opacity: .8; }
.req-body { padding: 0 16px 16px; border-top: 1px solid rgba(158, 83, 100, .15); }
.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.req-field span { display: block; margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9e5364; }
.req-field p { margin: 4px 0 0; overflow-wrap: anywhere; }
.req-note { display: grid; gap: 4px; margin-top: 14px; font-weight: 500; }
.req-note textarea { min-height: 70px; }
.req-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 14px; }
.req-actions label { display: grid; gap: 4px; }
.req-actions a { text-decoration: none; }
@media (max-width: 600px) { .req-card summary { flex-direction: column; } .req-meta { text-align: left; } }
.req-head .req-badge { justify-self: start; }
.req-filter { max-width: 260px; }

/* Unread glow: soft rose pulse on items changed since this side last opened them. */
.is-unread { position: relative; }
.is-unread::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(201, 139, 154, 0.85), 0 0 12px 3px rgba(201, 139, 154, 0.55);
  animation: rqr-glow 2.4s ease-in-out infinite;
}
.task-row.is-unread, .upcoming-item.is-unread, .pop-note.is-unread { border-radius: 6px; }
.task-row.is-unread, .upcoming-item.is-unread { padding-left: 8px; padding-right: 8px; }
.pop-note.is-unread { padding: 8px; }
.day.is-unread::after { inset: 0; border-radius: 8px; }
.day-pop-scroll { padding: 4px 10px 10px; }
@keyframes rqr-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(201, 139, 154, 0.55), 0 0 6px 1px rgba(201, 139, 154, 0.35); }
  50% { box-shadow: 0 0 0 2px rgba(158, 83, 100, 0.9), 0 0 14px 4px rgba(201, 139, 154, 0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .is-unread::after { animation: none; }
}

/* Read receipts */
.receipt { display: block; margin-top: 6px; font-size: 12px; color: #6b5b57; }
.receipt::before { content: "○ "; }
.receipt.is-seen { color: #6e3442; }
.note.status-approved .receipt { color: #28251d; }
.receipt.is-seen::before { content: "✓ "; }
.upcoming-item .receipt { margin-top: 2px; }

/* Brand colors editor */
.color-editor .color-toggle { margin-top: 4px; }
.color-editor .color-toggle::after { content: none; }
.color-editor.is-closed h2 { margin-bottom: 0; }
.color-pick { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; max-width: 320px; }
.color-pick select { min-height: 40px; }
.color-panel .color-row { max-width: 420px; }
.color-panel > .primary { margin-top: 4px; }

.blog-editor { max-width: 720px; }
.blog-hint { margin: 0; color: var(--muted); font-size: 13px; }
.rte {
  border: 1px solid var(--control);
  border-radius: 8px;
  background: #fff;
}
.rte:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rte-bar {
  position: sticky;
  top: 37px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  padding: 6px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
}
.rte-group { display: inline-flex; gap: 2px; }
.rte-bar .rte-block { width: auto; max-width: 100%; }
.rte-block { min-height: 36px; padding: 0 8px; border: 1px solid var(--control); border-radius: 6px; background: #fff; font-size: 14px; }
.rte-btn {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
}
.rte-btn svg { width: 18px; height: 18px; fill: currentColor; }
.rte-btn b, .rte-btn i, .rte-btn u { font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.rte-btn:hover { background: var(--ground); }
.rte-btn[aria-pressed="true"] { background: var(--active); border-color: #c99aa5; color: #5e2d39; }
.rte-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }
.post-body {
  position: relative;
  min-height: 260px;
  padding: 16px 18px 20px;
  border-radius: 0 0 8px 8px;
  background: #fff;
}
.post-body:focus { outline: none; }
.post-body.is-empty::before {
  content: attr(data-placeholder);
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  color: var(--muted);
  pointer-events: none;
}
/* Same type rules as .post-copy in css/site.css, so the editor matches the public blog. */
.post-body {
  font-family: "Red Hat Text", "Segoe UI", sans-serif;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  color: #28251d;
  text-align: left;
  overflow-wrap: break-word;
}
.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body p { margin: 0 0 0.85em; }
.post-body h2 { margin: 1.5em 0 0.5em; font-family: "Red Hat Text", "Segoe UI", sans-serif; font-size: 1.45em; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; text-transform: none; }
.post-body h3 { margin: 1.3em 0 0.4em; font-family: "Red Hat Text", "Segoe UI", sans-serif; font-size: 1.18em; font-weight: 700; line-height: 1.3; text-transform: none; }
.post-body strong, .post-body b { font-weight: 700; }
.post-body em, .post-body i { font-style: italic; }
.post-body u { text-decoration: underline; text-underline-offset: 0.15em; }
.post-body a { color: #7a3e4c; text-decoration: underline; text-underline-offset: 0.15em; }
.post-body ul, .post-body ol { margin: 0 0 0.85em; padding-left: 1.6em; }
.post-body li { margin: 0.3em 0; padding-left: 0.15em; }
.post-body li > ul, .post-body li > ol { margin: 0.3em 0 0; }
.post-body li::marker { color: #9e5364; }
.post-body ul { list-style-type: disc; }
.post-body ul ul { list-style-type: circle; }
.post-body ul ul ul { list-style-type: square; }
.post-body ol { list-style-type: decimal; }
.post-body ol ol { list-style-type: lower-alpha; }
.post-body ol ol ol { list-style-type: lower-roman; }
.post-body ol ol ol ol { list-style-type: decimal; }
.post-body blockquote { margin: 1.1em 0; padding: 0.15em 0 0.15em 1em; border-left: 3px solid #9e5364; color: #4d4940; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body > * { max-width: 68ch; }
@media (max-width: 800px) {
  .rte-bar { top: 61px; }
}
@media (max-width: 760px) {
  .rte-bar { gap: 2px; padding: 4px; }
  .rte-group { display: contents; }
  .rte-btn { min-width: 40px; min-height: 40px; }
  .rte-block { min-height: 40px; }
  .post-body { padding: 12px 12px 16px; }
  .post-body.is-empty::before { top: 12px; left: 12px; }
}
.thumb-field { display: grid; gap: 6px; }
.thumb-preview {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--control);
  border-radius: 8px;
  overflow: hidden;
  background: #f7eef0;
  display: grid;
  place-items: center;
}
.thumb-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-preview.is-empty span { color: var(--muted); font-size: 13px; }
.post-admin-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.post-admin-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.post-admin-list button { background: none; border: 0; padding: 0; color: #7a3e4c; font-weight: 700; text-align: left; }
.is-hidden { display: none; }
.check-row { display: flex; gap: 8px; align-items: center; }
.sheet-form .check-row input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; flex: 0 0 auto; margin: 0; }
