:root {
  color-scheme: light;
  --page: #f5f4ef;
  --paper: #fffefa;
  --ink: #20302a;
  --muted: #586760;
  --subtle: #68776e;
  --rule: #dcded4;
  --soft-rule: #e8e9e1;
  --rail: #142b23;
  --rail-hover: #223b31;
  --rail-muted: #aab9ae;
  --accent: #dbe8a1;
  --accent-ink: #27371d;
  --forest: #27563f;
  --green-bg: #e8efe2;
  --amber: #704919;
  --amber-bg: #f8edd6;
  --danger: #8a3934;
  --danger-bg: #f9eeea;
  --radius: 12px;
  --shadow: 0 16px 70px #1629202b, 0 3px 14px #16292010;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }

html { min-width: 280px; min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1, h2, h3, p { margin: 0; }

button, input, select, textarea { font: inherit; }

button, select { cursor: pointer; }

button:disabled, select:disabled { cursor: default; opacity: .56; }

button { color: inherit; }

a { color: var(--forest); }

svg { width: 1em; height: 1em; flex: none; vertical-align: middle; }

:focus-visible { outline: 2px solid #377652; outline-offset: 3px; }

::selection { color: var(--ink); background: var(--accent); }

.status, .badge, .eyebrow, input[type="date"], input[type="time"], time, .numeric { font-variant-numeric: tabular-nums; }

table {
  width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  text-align: left;
  font-size: .9375rem;
}

caption {
  padding: .85rem 1rem;
  color: var(--muted);
  text-align: left;
}

th {
  background: #f0f2e9;
  color: #4b5c53;
  font-size: .875rem;
  font-weight: 650;
}

th, td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--soft-rule);
  vertical-align: middle;
}

tbody tr:last-child > * { border-bottom: 0; }

tbody tr:focus-within, tbody tr:hover { background: #f9faf3; }

button {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: .5rem .85rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.3;
  transition: background-color .17s ease, border-color .17s ease, color .17s ease;
}

button:not(:disabled):hover { background: #edf0e4; border-color: #b7c1af; }

input:not([type="checkbox"], [type="radio"]), select, textarea {
  min-width: 0;
  min-height: 2.625rem;
  max-width: 100%;
  padding: .53rem .75rem;
  border: 1px solid #c9cfc5;
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
}

input::placeholder, textarea::placeholder { opacity: 1; color: var(--subtle); }

input[type="checkbox"], input[type="radio"] { accent-color: var(--forest); }

select:not([multiple]) {
  appearance: none;
  padding-right: 2.25rem;
  background-image: linear-gradient(45deg, transparent 50%, #4f6257 50%), linear-gradient(135deg, #4f6257 50%, transparent 50%);
  background-size: 4px 4px, 4px 4px;
  background-position: right 14px center, right 10px center;
  background-repeat: no-repeat;
}

textarea { min-height: 5.75rem; resize: vertical; }

label { font-weight: 625; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

legend { padding: 0; font-weight: 650; }

dialog {
  width: min(94vw, 36rem);
  max-height: min(92dvh, 52rem);
  overflow: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

dialog::backdrop { background: #142b2373; }

dialog h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 500; line-height: 1.2; }

dialog form { display: grid; gap: .95rem; }

dialog label { display: grid; gap: .35rem; }

dialog label:has(input[type="checkbox"], input[type="radio"]) { display: flex; align-items: baseline; gap: .5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.icon { width: 1.15rem; height: 1.15rem; }

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 3;
  display: flex;
  width: 15.375rem;
  flex-direction: column;
  padding: 1.65rem 1rem 1.1rem;
  overflow: auto;
  color: #f2f4e8;
  background: var(--rail);
}

.rail :focus-visible { outline-color: var(--accent); }

.brand {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin: 0 .4rem;
  padding: .2rem .15rem 1.65rem;
  border-bottom: 1px solid #ffffff24;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  place-items: center;
  border: 1px solid #dbe8a182;
  border-radius: 8px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .82rem;
  letter-spacing: -.025em;
}

.brand-mark .icon { width: 1.375rem; height: 1.375rem; }

.brand strong, .brand span:not(.brand-mark) { display: block; }
.brand strong { font-size: .9375rem; font-weight: 650; line-height: 1.3; }
.brand strong + span { margin-top: .2rem; color: var(--rail-muted); font-size: .75rem; }

.rail-group-label {
  margin: 1.65rem .6rem .65rem;
  color: var(--rail-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.stage-nav { display: grid; gap: .28rem; }

.stage-button, .rail-settings {
  display: flex;
  min-width: 0;
  min-height: 2.8rem;
  width: 100%;
  align-items: center;
  gap: .65rem;
  padding: .66rem .75rem;
  border-color: transparent;
  color: #ebf0e8;
  background: transparent;
  text-align: left;
  font-size: .9375rem;
  font-weight: 500;
}

.stage-button:not(:disabled):hover, .rail-settings:not(:disabled):hover {
  border-color: transparent;
  color: white;
  background: var(--rail-hover);
}

.stage-button[aria-current="true"], .stage-button[aria-current="true"]:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 700;
}

.stage-icon { display: grid; width: 1.35rem; height: 1.35rem; flex: none; place-items: center; color: inherit; }
.rail-bottom { display: grid; gap: .7rem; margin-top: auto; padding-top: 2rem; }
.rail-settings { color: #cfdbd0; }

.account {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .65rem;
  padding: .95rem .6rem 0;
  border-top: 1px solid #ffffff24;
}

.avatar {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  place-items: center;
  border-radius: 100%;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: .875rem;
  font-weight: 700;
}

.account-text { display: grid; min-width: 0; gap: .05rem; }
.account-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text strong { font-size: .875rem; }
.account-text > :is(span, small) { color: var(--rail-muted); font-size: .8125rem; }

.workspace { min-width: 0; min-height: 100vh; margin-left: 15.375rem; }

.topline {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem clamp(1.35rem, 3.2vw, 3.2rem);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.breadcrumbs, .top-right { display: flex; min-width: 0; align-items: center; gap: .55rem; font-size: .875rem; }
.breadcrumbs { color: var(--muted); }
.breadcrumbs strong { color: var(--ink); font-weight: 650; }

.today-chip {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .3rem .66rem;
  background: var(--paper);
  color: var(--muted);
  font-size: .8125rem;
  white-space: nowrap;
}

.today-chip .icon { width: .9rem; height: .9rem; }

.page { max-width: 98rem; margin: 0 auto; padding: 2.75rem clamp(1.35rem, 3.2vw, 3.2rem) 3rem; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; }
.heading-copy { display: grid; min-width: 0; gap: .35rem; }

.eyebrow {
  color: var(--forest);
  font-size: .8125rem;
  font-weight: 720;
  letter-spacing: .11em;
  text-transform: uppercase;
}

h1 {
  margin: .06em 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 4vw, 4.15rem);
  font-weight: 500;
  letter-spacing: -.047em;
  line-height: 1.05;
}

.heading-note { max-width: 55ch; color: var(--muted); }
.heading-actions, .day-controls { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.heading-actions { justify-content: flex-end; }

/* Primary and secondary button styles repeat across page heads and forms. */
.button { display: inline-flex; min-height: 2.6875rem; align-items: center; justify-content: center; gap: .48rem; }
.button .icon, .text-button .icon { width: 1rem; height: 1rem; }
.button.primary { border-color: var(--forest); color: #fffefa; background: var(--forest); }
.button.primary:not(:disabled):hover { border-color: #1c4933; background: #1c4933; }
.button.secondary { border-color: #cdd1c5; }
.button.danger { border-color: #dfbbb5; color: var(--danger); background: var(--danger-bg); }
.button.danger:not(:disabled):hover { border-color: var(--danger); background: #f5ded7; }

.workspace-tabs {
  display: flex;
  gap: 1.25rem;
  margin: 1.55rem 0 1.75rem;
  padding: 0 .15rem;
  border-bottom: 1px solid #cfd5c9;
  overflow: auto;
}

.workspace-tab {
  display: inline-flex;
  min-height: 2.8125rem;
  flex: none;
  align-items: center;
  gap: .45rem;
  padding: .5rem .3rem .68rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 5px 5px 0 0;
  color: var(--muted);
  background: transparent;
  font-size: .9375rem;
  white-space: nowrap;
}

.workspace-tab:focus-visible { outline-offset: -3px; }
.workspace-tab .icon { width: 1rem; height: 1rem; }
.workspace-tab:not(:disabled):hover { color: var(--forest); background: #e9ede3; border-color: transparent; }

.workspace-tab[aria-current="page"], .workspace-tab[aria-current="page"]:not(:disabled):hover {
  border-color: var(--forest);
  color: var(--forest);
  font-weight: 740;
}

.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, .57fr); align-items: start; gap: 1.3rem; }
.main-stack, .side-stack, .view { display: grid; min-width: 0; gap: 1rem; }

.panel {
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 1px 2px #1e3c2a08;
}

.panel-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.12rem 1.24rem;
}

.panel-head h2, .view-toolbar h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -.018em;
  line-height: 1.25;
}

.panel-head h2 + p { margin-top: .16rem; }
.panel-head p, .view-toolbar p { color: var(--muted); font-size: .875rem; }

.text-button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .25rem .4rem;
  border-color: transparent;
  color: var(--forest);
  background: transparent;
  text-decoration: none;
}

.text-button:not(:disabled):hover { border-color: transparent; color: var(--forest); background: var(--green-bg); }

.day-controls { justify-content: flex-start; }
.icon-button { display: inline-grid; width: 2.5rem; flex: none; place-items: center; padding: 0; }
.icon-button .icon { width: 1rem; height: 1rem; }
.date-field { position: relative; display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); font-size: .875rem; font-weight: 650; white-space: nowrap; }
.date-field > .icon { display: none; }
.date-field input[type="date"] { min-height: 2.5rem; padding: .42rem .5rem; font-size: .875rem; }
.today-button { background: transparent; }

.strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 1.24rem 1.1rem;
  border: 1px solid #dee4d6;
  border-radius: 8px;
  background: #f0f3e8;
}

.metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: .62rem;
  padding: .85rem .82rem;
}

.metric + .metric { border-left: 1px solid #dee4d6; }
.metric-icon { display: grid; width: 2rem; height: 2rem; grid-row: span 2; place-items: center; border-radius: 7px; color: var(--forest); background: #e1e9d8; }
.metric-icon .icon { width: 1rem; height: 1rem; }
.metric strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.metric > span:not(.metric-icon), .metric > div > span { display: block; color: var(--muted); font-size: .875rem; }
.metric > div > strong { display: block; }

.table-wrap { min-width: 0; overflow-x: auto; }
.panel .table-wrap:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.data-table th { white-space: nowrap; }
.data-table td { min-width: 6rem; }
.data-table :is(th, td):first-child { padding-left: 1.24rem; }
.data-table :is(th, td):last-child { padding-right: 1.24rem; }
.data-table td:last-child:has(button) { width: 1%; }
.data-table td :is(small, .muted) { color: var(--muted); }
.data-table td > small { display: block; }
.data-table .time-cell { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .row-action { white-space: nowrap; text-align: right; }
.row-action button + button { margin-left: .35rem; }
.assignment-line { min-width: 11rem; }
.assignment-line + .assignment-line { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--soft-rule); }
.assignment-line .status-pill { margin-top: .2rem; }
.assignment-line small { display: block; overflow-wrap: anywhere; }
.cell-note { margin-top: .25rem; overflow-wrap: anywhere; }

.person-cell { display: flex; min-width: 9.5rem; align-items: center; gap: .6rem; }
.person-cell > :last-child { min-width: 0; }
.person-cell strong, .person-cell small { display: block; }
.person-cell .avatar { width: 2.15rem; height: 2.15rem; background: var(--green-bg); }

.empty-state {
  display: grid;
  min-height: 13.25rem;
  justify-items: center;
  align-content: center;
  gap: .55rem;
  padding: 1.5rem 1.2rem;
  border-top: 1px solid var(--soft-rule);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  margin-bottom: .12rem;
  border: 1px solid #dce5d2;
  border-radius: 10px;
  color: var(--forest);
  background: var(--green-bg);
}

.empty-icon .icon { width: 1.3rem; height: 1.3rem; }
.empty-state h3 { font-weight: 680; font-size: 1rem; }
.empty-state p { max-width: 36ch; color: var(--muted); font-size: .875rem; }
.empty-state > :last-child:is(button, div:not(.empty-icon)) { margin-top: .2rem; }
.side-stack .empty-state { min-height: 7.25rem; gap: .4rem; padding: .8rem 1.2rem .9rem; }
.side-stack .empty-icon { width: 2.5rem; height: 2.5rem; }
.side-stack .empty-state .text-button { min-height: 2.1rem; }

.task-list { display: grid; gap: 0; margin: 0; padding: 0 1.2rem; list-style: none; }
.task-item { display: flex; min-width: 0; align-items: flex-start; gap: .7rem; padding: .85rem 0; border-top: 1px solid var(--soft-rule); }
.task-item > :last-child { margin-left: auto; }
.task-check { display: grid; width: 1.6rem; height: 1.6rem; min-width: 1.6rem; min-height: 1.6rem; flex: none; place-items: center; padding: 0; background: var(--green-bg); color: var(--forest); }
.task-check .icon { width: .95rem; height: .95rem; }
.task-body { min-width: 0; margin-right: auto; overflow-wrap: anywhere; }
.task-body strong { font-size: .9375rem; font-weight: 670; }
.task-body p { color: var(--muted); font-size: .875rem; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .22rem .5rem; margin-top: .2rem; color: var(--muted); font-size: .8125rem; }

.repertoire-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 1.2rem 1.14rem; gap: .6rem; }
.mini-stat { display: grid; gap: .2rem; padding: .72rem .8rem; border: 1px solid var(--soft-rule); border-radius: 8px; background: #f7f8f1; }
.mini-stat strong { font-size: 1.35rem; line-height: 1.14; }
.mini-stat span { color: var(--muted); font-size: .8125rem; }

.note-banner {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .85rem 1rem;
  border: 1px solid #dde4d4;
  border-radius: 8px;
  color: var(--forest);
  background: #ebf0e2;
  font-size: .875rem;
}

.note-banner .icon { margin-top: .14rem; }
.note-banner > div { min-width: 0; }
.note-banner > button { flex: none; margin-left: auto; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .23rem .55rem;
  border-radius: 999px;
  color: #46564d;
  background: #edefe8;
  font-size: .875rem;
  font-weight: 660;
  line-height: 1.35;
  white-space: nowrap;
}

.status-pill[data-tone="good"] { color: #3a583c; background: var(--green-bg); }
.status-pill[data-tone="warn"] { color: var(--amber); background: var(--amber-bg); }
.status-pill[data-tone="bad"] { color: var(--danger); background: var(--danger-bg); }

.view-toolbar { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.view-toolbar select, .filter { min-height: 2.5rem; font-size: .875rem; }
.search-box { position: relative; display: flex; max-width: 24rem; flex: 1 1 15rem; align-items: center; }
.search-box .icon { position: absolute; top: 50%; left: .68rem; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.search-box input { width: 100%; padding-left: 2.2rem; font-weight: 400; }

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.modal-head p { margin-top: .35rem; color: var(--muted); font-size: .9375rem; }
.modal-fields { display: grid; min-width: 0; gap: .82rem; }
.modal-actions { display: flex; min-width: 0; justify-content: flex-end; gap: .55rem; flex-wrap: wrap; padding-top: .75rem; border-top: 1px solid var(--soft-rule); }
.field { display: grid; min-width: 0; gap: .33rem; }
.field p, .field small { color: var(--muted); font-size: .8125rem; }
.form-error {
  padding: .65rem .8rem;
  border: 1px solid #e1b9b3;
  border-radius: 7px;
  color: var(--danger);
  background: var(--danger-bg);
  font-size: .875rem;
}

.roster-checks {
  max-height: 12rem;
  padding: .5rem .75rem .65rem;
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #f8f9f3;
}

.roster-checks legend { padding: 0 .25rem; }
dialog .checkbox-field { font-size: .9375rem; }
dialog .checkbox-field input { width: 1rem; height: 1rem; flex: none; }
.access-list { margin: .25rem 0 0; padding: 0; list-style: none; }
.access-list li { padding: .6rem 0; border-top: 1px solid var(--soft-rule); overflow-wrap: anywhere; }
.access-list small { display: block; color: var(--muted); }
summary { cursor: pointer; }

input[type="file"]::file-selector-button {
  margin-right: .55rem;
  padding: .25rem .45rem;
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--forest);
  background: var(--green-bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.notice, .toast {
  padding: .8rem 1rem;
  border: 1px solid #d5dfce;
  border-radius: 8px;
  color: var(--forest);
  background: var(--green-bg);
  font-size: .9375rem;
}

.notice:not([hidden]) { margin: 0 0 1rem; }
#notice { display: flex; align-items: center; justify-content: space-between; gap: .45rem .8rem; flex-wrap: wrap; }
:is(.notice, .toast):is(.error, [data-tone="bad"], [data-error="true"]) { border-color: #e1b9b3; color: var(--danger); background: var(--danger-bg); }
.toast { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 10; max-width: min(30rem, calc(100vw - 2.8rem)); box-shadow: 0 3px 15px #153a2522; }

@media (max-width: 78rem) {
  .overview-grid { grid-template-columns: minmax(0, 1fr) minmax(15rem, .56fr); gap: 1rem; }
  .metric { padding-inline: .62rem; }
  .metric-icon { width: 1.65rem; height: 1.65rem; }
}

@media (max-width: 68rem) {
  .rail { width: 13rem; }
  .workspace { margin-left: 13rem; }
  .page { padding-top: 2.1rem; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-stack > .note-banner { grid-column: 1 / -1; }
}

@media (max-width: 50rem) {
  .rail { position: static; width: auto; overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .72rem .45rem; padding: .9rem 1rem .75rem; }
  .brand { margin: 0; padding: 0; border: 0; }
  .brand-mark { width: 2.15rem; height: 2.15rem; }
  .rail-group-label { display: none; }
  .stage-nav { grid-row: 2; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .33rem; }
  .stage-button { min-height: 2.55rem; justify-content: center; padding: .4rem .45rem; text-align: center; font-size: .875rem; }
  .stage-icon { width: 1.05rem; height: 1.05rem; }
  .stage-icon .icon { width: 1rem; height: 1rem; }
  .rail-bottom { display: flex; grid-row: 1; grid-column: 2; align-items: center; justify-content: end; gap: .35rem; margin: 0; padding: 0; }
  .account { padding: 0; border: 0; }
  .account-text { display: none; }
  .rail-settings { width: auto; gap: .25rem; padding: .32rem; font-size: .875rem; }
  .workspace { margin: 0; }
  .topline { min-height: 3rem; padding: .42rem 1rem; }
  .page { padding: 1.7rem 1rem 2rem; }
  .workspace-tabs { margin: 1.2rem 0; gap: .9rem; }
}

@media (max-width: 37.5rem) {
  .topline { gap: .5rem; }
  .breadcrumbs > span { display: none; }
  .today-chip { max-width: 100%; padding: .23rem .5rem; overflow: hidden; font-size: .75rem; }
  .today-chip span { overflow: hidden; text-overflow: ellipsis; }
  .stage-icon { display: none; }
  .stage-button { background: #ffffff0b; }
  .workspace-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .15rem .3rem;
    overflow: visible;
  }
  .workspace-tab { justify-content: center; gap: .28rem; padding-inline: .04rem; font-size: .875rem; }
  .workspace-tab .icon { width: .88rem; height: .88rem; }
  .heading-note { font-size: .9375rem; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: .85rem; }
  .heading-actions { justify-content: flex-start; }
  .heading-actions [data-action="install"] { gap: 0; padding-inline: .75rem; font-size: 0; }
  .panel-head { padding: .95rem; flex-wrap: wrap; }
  .day-controls { gap: .36rem; }
  .date-field input[type="date"] { width: 8rem; }
  .today-button { padding-inline: .55rem; }
  .data-table :is(th, td) { padding: .66rem .7rem; }
  .data-table :is(th, td):first-child { padding-left: .95rem; }
  .data-table :is(th, td):last-child { padding-right: .95rem; }
  .strip { margin-inline: .95rem; }
  .metric { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .64rem .5rem; }
  .metric > span:not(.metric-icon), .metric > div > span { font-size: .8125rem; }
  .side-stack { grid-template-columns: 1fr; }
  .task-list { padding-inline: .95rem; }
  .repertoire-summary { margin-inline: .95rem; }
  .note-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .note-banner > button { grid-column: 2; justify-self: start; margin: 0; }
  .rail-settings span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 24rem) {
  .stage-button { gap: .25rem; padding-inline: .4rem; font-size: .8125rem; }
  .workspace-tab { font-size: .8125rem; }
  .workspace-tab .icon { display: none; }
  .today-chip { white-space: normal; }
  .today-chip .icon { display: none; }
}

.schedule-list {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0 1.24rem;
  list-style: none;
}

.panel > .event-row { margin-inline: 1.24rem; }

.event-row {
  display: grid;
  grid-template-columns: minmax(5.5rem, max-content) minmax(0, 1fr) auto;
  align-items: start;
  gap: .75rem 1rem;
  padding: .92rem 0;
  border-top: 1px solid var(--soft-rule);
}

.event-date {
  display: grid;
  align-content: center;
  align-self: stretch;
  gap: .15rem;
  padding: .45rem .7rem;
  border: 1px solid #dfe5d6;
  border-radius: 7px;
  color: var(--forest);
  background: #f0f3e8;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.event-date :is(time, span, small) { color: var(--muted); font-weight: 500; }
.event-row :is(.event-body, .event-meta) { min-width: 0; overflow-wrap: anywhere; }
.event-row .event-meta, .event-row p, .event-row p + small { color: var(--muted); font-size: .875rem; }
.event-row .event-meta { display: flex; flex-wrap: wrap; gap: .15rem .5rem; }
.event-row .status-pill { white-space: normal; }
.event-row h3 { font-size: 1rem; }
.event-row p + p { margin-top: .2rem; }

.modal.modal-wide { width: min(94vw, 55rem); }

.review-table {
  display: grid;
  gap: .85rem;
  min-width: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.review-table :is(article, fieldset, .review-card) {
  min-width: 0;
  padding: .85rem;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: #f8f9f3;
}

.review-table > :is(article, fieldset, .review-card) { display: grid; gap: .6rem; }
.review-table th { color: var(--ink); }
.review-table :is(th, td) { min-width: 7rem; }
.review-table td:has(input, select) { min-width: 9rem; }
.review-table :is(th, td):last-child { min-width: auto; }

.inline-fields { display: flex; min-width: 0; align-items: flex-start; gap: .65rem; flex-wrap: wrap; }
.inline-fields > .field { min-width: min(100%, 8rem); flex: 1 1 8rem; }
.inline-fields label { align-self: start; }
.field-help { color: var(--muted); font-size: .875rem; }
.field-help:is(.error, [data-tone="bad"]) { color: var(--danger); }

@media (max-width: 37.5rem) {
  .schedule-list { padding-inline: .95rem; }
  .event-row { gap: .52rem .7rem; grid-template-columns: minmax(4.5rem, max-content) minmax(0, 1fr); }
  .event-row > button, .event-row > .event-actions { grid-column: 2; justify-self: start; }
  .modal.modal-wide { max-height: 92dvh; }
}

.source-link {
  align-self: flex-start;
  color: var(--ink);
  text-underline-offset: .22em;
}

.schedule-original {
  min-width: 0;
  padding-inline: .75rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #f7f8f2;
}

.schedule-original[open] { padding-bottom: .75rem; }
.schedule-original > summary { padding-block: .65rem; color: var(--forest); font-weight: 650; }

.schedule-original-preview {
  min-width: 0;
  max-width: 100%;
  max-height: 23rem;
  max-height: min(45dvh, 23rem);
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
}

.schedule-original-preview:focus-visible { outline-offset: -3px; }
.schedule-original-preview img { display: block; min-width: 100%; max-width: none; height: auto; }
.schedule-original-preview + .field-help { margin-top: .5rem; }

.modal:has(.profile-modal-head) { width: min(94vw, 40rem); }

.profile-modal-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: .9rem;
}

.profile-modal-head h2, .profile-modal-head p { overflow-wrap: anywhere; }
.profile-modal-head > div { align-self: center; }

.profile-avatar {
  position: relative;
  display: grid;
  width: 4.65rem;
  height: 4.65rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d5dfce;
  border-radius: 50%;
  color: var(--forest);
  background: var(--green-bg);
  font-size: 1.65rem;
  font-weight: 650;
}

.profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.roster-avatar { position: relative; overflow: hidden; }
.roster-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-meta, .profile-photo-actions { display: flex; align-items: center; gap: .45rem .7rem; flex-wrap: wrap; }
.profile-meta { min-height: 1rem; }
.profile-photo-actions { margin-left: auto; }
.profile-photo-actions .button { min-height: 2.45rem; }
.profile-remove { color: var(--danger); }
.profile-remove:not(:disabled):hover { color: var(--danger); background: var(--danger-bg); }
.profile-photo-hint { margin-top: -.5rem; }
.profile-photo-message { color: var(--muted); font-size: .875rem; }
.profile-photo-message[data-tone="bad"] { color: var(--danger); }
.person-cell .text-button[data-action="profile"] {
  display: inline-flex;
  min-height: 1.9rem;
  justify-content: flex-start;
  margin: -.25rem -.38rem;
  text-align: left;
  font-size: .9375rem;
}

.profile-activity { display: grid; min-width: 0; gap: .75rem; padding-top: .9rem; border-top: 1px solid var(--soft-rule); }
.profile-period { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; }
.profile-period h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 500; }
.profile-month-nav { display: flex; align-items: center; gap: .5rem; }
.profile-month-nav time { min-width: 9.5rem; text-align: center; font-size: .9375rem; font-weight: 650; }
.profile-results { min-height: 7rem; }
.profile-loading { padding: .8rem 0; color: var(--muted); }
.profile-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0; }

.profile-metric {
  min-width: 0;
  padding: .7rem .75rem;
  border: 1px solid #dce5d2;
  border-radius: 8px;
  background: #f0f3e8;
}

.profile-metric dt {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--forest);
  font-size: .875rem;
  font-weight: 650;
}

.profile-metric dt .icon { width: .9rem; height: .9rem; }
.profile-metric dd { margin: .25rem 0 0; }
.profile-metric dd strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.profile-metric-past { margin-left: .25rem; color: var(--muted); font-size: .8125rem; }
.profile-metric dd small { display: block; margin-top: .18rem; color: var(--muted); font-size: .8125rem; }
.profile-metrics-note { margin-top: .65rem; }

@media (max-width: 34rem) {
  .profile-modal-head { gap: .6rem; }
  .profile-avatar { width: 3.3rem; height: 3.3rem; font-size: 1.25rem; }
  .profile-meta { gap: .45rem; }
  .profile-photo-actions { margin-left: 0; }
  .profile-month-nav { gap: .3rem; }
  .profile-month-nav time { min-width: 8rem; }
  .profile-metrics { gap: .35rem; }
  .profile-metric { padding: .62rem .45rem; }
  .profile-metric dt .icon { display: none; }
}

@media (max-width: 23rem) {
  .profile-modal-head { grid-template-columns: minmax(0, 1fr) auto; }
  .profile-modal-head > .profile-avatar { grid-column: 1; grid-row: 1; }
  .profile-modal-head > .icon-button { grid-column: 2; grid-row: 1; }
  .profile-modal-head > div { grid-column: 1 / -1; grid-row: 2; }
  .profile-photo-actions .button, .profile-photo-actions .text-button { padding-inline: .5rem; font-size: .8125rem; }
  .profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-metric:first-child { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .profile-metric:first-child dd { margin: 0; }
}

.view-toolbar:has(> [data-action="schedule-layout"]) { justify-content: flex-start; }
.view-toolbar > [data-action="schedule-layout"] { margin-left: auto; }

.table-wrap[aria-label="Таблица расписания"] { scrollbar-width: thin; }

.table-wrap[aria-label="Таблица расписания"] :is(th, td):not(:last-child) {
  border-right: 1px solid var(--soft-rule);
}

.table-wrap[aria-label="Таблица расписания"] td:nth-child(3) { min-width: 11.5rem; width: 19%; }
.table-wrap[aria-label="Таблица расписания"] td:nth-child(5) { min-width: 12rem; }
.table-wrap[aria-label="Таблица расписания"] td:nth-child(n + 3):nth-child(-n + 7) { overflow-wrap: anywhere; }

@media (max-width: 37.5rem) {
  .view-toolbar:has(> [data-action="schedule-layout"]) {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    gap: .55rem;
  }
  .view-toolbar:has(> [data-action="schedule-layout"]) .search-box { grid-column: 1 / -1; max-width: none; }
  .view-toolbar:has(> [data-action="schedule-layout"]) .filter, .view-toolbar > [data-action="schedule-layout"] { width: 100%; min-height: 2.6875rem; }
  .view-toolbar:has(> [data-action="schedule-layout"]) .filter {
    padding-inline: .55rem 1.5rem;
    background-position: right 11px center, right 7px center;
  }
  .view-toolbar > [data-action="schedule-layout"] { padding-inline: .4rem; }
  .table-wrap[aria-label="Таблица расписания"] :is(th, td):nth-child(-n + 2) { min-width: 4.15rem; }
  .table-wrap[aria-label="Таблица расписания"] th:nth-child(2) { white-space: normal; }
}

@media (max-width: 25rem) {
  .view-toolbar > [data-action="schedule-layout"] { font-size: .8125rem; }
  .view-toolbar > [data-action="schedule-layout"] .icon { display: none; }
  .table-wrap[aria-label="Таблица расписания"] td:nth-child(3) { min-width: 7.5rem; width: auto; }
  .table-wrap[aria-label="Таблица расписания"] td:nth-child(3) strong { display: block; max-width: 6.25rem; }
}

.page.pilot-signed-out {
  max-width: 36rem;
  padding-top: clamp(2.5rem, 9vh, 6rem);
}

.pilot-login {
  margin-top: 1.65rem;
  padding: clamp(1.05rem, 3vw, 1.8rem);
}

.pilot-login h2 {
  margin-bottom: .95rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.28rem, 3vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -.018em;
}

.pilot-login-note { color: var(--muted); }
.pilot-login .form-error { margin-top: .8rem; }
.pilot-oauth-actions { display: grid; gap: .55rem; margin-top: 1rem; }
.pilot-oauth-actions button { min-height: 2.85rem; }
.pilot-login > [data-action="staff-dismiss-invite"] { margin-top: .5rem; }

.invite-permissions {
  display: grid;
  gap: .3rem;
  padding: .6rem .8rem .75rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.invite-permissions legend { padding: 0 .25rem; }
.invite-permissions .checkbox-field { align-items: flex-start; }
.invite-permissions input { margin-top: .2rem; }

@media (max-width: 37.5rem) {
  .page.pilot-signed-out { padding-top: 1.8rem; }
  .pilot-login { margin-top: 1.25rem; }
}

/* Personal account page */
.account-trigger {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  place-items: center;
  padding: 0;
  border-color: #d7dfd1;
  border-radius: 50%;
  background: var(--paper);
}

.account-trigger[aria-current="page"] { border-color: var(--forest); }
.account-trigger .personal-avatar { width: 2.2rem; height: 2.2rem; }
.personal-avatar { position: relative; overflow: hidden; color: var(--forest); background: var(--green-bg); }
.personal-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.me-layout { display: grid; grid-template-columns: minmax(16rem, .68fr) minmax(0, 1fr); align-items: start; gap: 1.15rem; }
.me-sidebar { display: grid; gap: 1.15rem; min-width: 0; }
.me-card { padding: clamp(1.05rem, 2.35vw, 1.65rem); }
.me-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 500;
  line-height: 1.22;
  overflow-wrap: anywhere;
}
.me-identity-row { display: flex; align-items: center; gap: .85rem; }
.me-identity-row > div { min-width: 0; }
.me-identity-row p { margin-top: .2rem; color: var(--muted); overflow-wrap: anywhere; }
.avatar.me-avatar-large { width: 5rem; height: 5rem; flex-shrink: 0; font-size: 1.7rem; }
.me-role { margin-top: .45rem; }
.me-status { margin-top: .85rem; padding: .65rem .8rem; border-radius: 8px; color: var(--forest); background: #f0f3e8; overflow-wrap: anywhere; }
.me-photo-controls { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }
.me-photo-controls + .field-help, .me-card [data-me-photo-state], .me-card [data-me-photo-error] { margin-top: .55rem; }
.me-remove { color: var(--danger); }
.me-remove:not(:disabled):hover { color: var(--danger); background: var(--danger-bg); }
.me-session { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--soft-rule); }
.me-details form { display: grid; gap: .95rem; margin-top: .95rem; }
.me-details .field input, .me-details .field textarea { width: 100%; }
.me-save-row { display: flex; align-items: center; gap: .5rem; margin-top: .2rem; }
.me-roster ul { display: grid; gap: .6rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.me-roster li { display: flex; align-items: center; justify-content: space-between; gap: .3rem .6rem; flex-wrap: wrap; padding-top: .58rem; border-top: 1px solid var(--soft-rule); }
.me-roster li > div { min-width: 0; overflow-wrap: anywhere; }
.me-roster li p { color: var(--muted); font-size: .875rem; }
.me-roster button { margin-right: -.4rem; }

a[data-me-action="signout"] {
  min-width: 2.5rem;
  padding: .5rem .85rem;
  border: 1px solid #dfbbb5;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
}
a[data-me-action="signout"]:hover { border-color: var(--danger); background: #f5ded7; }

@media (max-width: 57rem) {
  .me-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 37.5rem) {
  .avatar.me-avatar-large { width: 3.75rem; height: 3.75rem; font-size: 1.35rem; }
}

@media (max-width: 23rem) {
  .top-right:has(.account-trigger:not([hidden])) .today-chip { display: none; }
}

.push-intro, .push-status { color: var(--muted); }
.push-intro { max-width: 62ch; margin-top: .55rem; }
.push-preference { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; margin-top: .9rem; }
.push-preference :is(.form-error, .push-eligibility) { flex-basis: 100%; }
