@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
:root {
  color-scheme: light dark;
  --page: light-dark(#f2f4f8, #13161f);
  --surface: light-dark(#fff, #1d212d);
  --subtle: light-dark(#f3f5f9, #272c3a);
  --text: light-dark(#161c2d, #eef1fb);
  --muted: light-dark(#515a6d, #b7c0d4);
  --line: light-dark(#dce1ec, #3a4357);
  --brand: light-dark(#4059a5, #bac9ff);
  --brand-text: light-dark(#fff, #222e55);
  --selection: light-dark(#e7edff, #2f3b62);
  --amber: light-dark(#fff1e3, #3f3028);
  --amber-text: light-dark(#804421, #ffc59a);
  --red: light-dark(#982c41, #ffb4bf);
  --red-fill: light-dark(#fcecf0, #47303a);
  --elevation: light-dark(#293a6411, #07091045);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--page);
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-width: 0;
}
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 730;
  letter-spacing: -0.045em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}
h2 {
  font-size: clamp(1.43rem, 4vw, 1.9rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
h3 {
  font-size: 1.12rem;
  line-height: 1.25;
}
p,
li,
dd {
  line-height: 1.43;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select,
input:not([type="radio"], [type="checkbox"]),
textarea {
  min-height: 46px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.62;
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
button,
input,
textarea {
  -webkit-tap-highlight-color: #4059a532;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand);
}

.shell {
  width: min(100%, 710px);
  margin-inline: auto;
}
.app-header {
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 51px;
  padding: 5px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
  font-weight: 740;
  letter-spacing: -0.025em;
}
.logo {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--brand);
  background: var(--selection);
  font-size: 1.05rem;
  font-weight: 780;
}
.connection {
  color: var(--muted);
  font-size: 0.73rem;
  max-width: 46%;
  text-align: right;
}
main {
  padding: 12px 13px 168px;
}
.introline {
  min-height: 67px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 0 3px 10px;
}
.kicker {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 680;
}
.introline h1 {
  margin-top: 3px;
}
.preview-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--brand);
  flex-shrink: 0;
}
.preview-action svg,
.nav-icon svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.text-action,
.outline,
.primary,
.chip {
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 11px;
  line-height: 1.22;
}
.text-action {
  background: transparent;
  color: var(--brand);
}
.outline {
  border-color: var(--line);
  background: var(--surface);
}
.primary {
  background: var(--brand);
  color: var(--brand-text);
  border-radius: 999px;
}
.chip {
  background: var(--subtle);
  border-color: var(--line);
  color: var(--brand);
}
.chip[aria-expanded="true"],
.outline[aria-pressed="true"] {
  background: var(--selection);
  border-color: var(--brand);
}
.card {
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--surface);
  padding: 14px;
}
.schedule {
  padding: 5px 8px 8px;
  box-shadow: 0 4px 15px var(--elevation);
}
.schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-inline: 5px;
}
.schedule-head h2 {
  font-size: 1.12rem;
}
.live-state {
  padding: 2px 7px 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  justify-content: space-between;
  font-size: 0.77rem;
  font-weight: 720;
  color: var(--muted);
}
.live-state > span:first-child {
  color: var(--brand);
}

.phase-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.phase-list li + li {
  border-top: 1px solid var(--line);
}
.phase-list button {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(50px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 4px 8px;
  border: 0;
  border-radius: 11px;
  background: var(--surface);
  text-align: left;
  overflow-wrap: anywhere;
}
.phase-list button[aria-current="step"] {
  background: var(--selection);
  box-shadow: inset 3px 0 var(--brand);
}
.phase-list strong,
.phase-list small {
  display: block;
}
.phase-list strong {
  font-size: 0.94rem;
  line-height: 1.18;
}
.phase-list small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
}
.time-range {
  justify-self: start;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 690;
  font-variant-numeric: tabular-nums;
}
.phase-list button[aria-current="step"] .time-range {
  color: var(--brand);
  font-weight: 780;
}
.row-end {
  color: var(--muted);
  font-size: 1.23rem;
  line-height: 1;
  padding-inline: 4px;
}
.next-badge {
  color: var(--amber-text);
  background: var(--amber);
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 720;
}
.series-entry {
  width: 100%;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  margin-top: 5px;
  text-align: left;
}
.series-entry strong,
.series-entry small {
  display: block;
  overflow-wrap: anywhere;
}
.series-entry small {
  color: var(--muted);
}
.phase-image {
  display: block;
  max-width: 100%;
  max-height: 280px;
  margin: 0 auto 9px;
  border-radius: 8px;
  object-fit: contain;
}
.phase-card {
  background: var(--subtle);
}
.phase-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  color: var(--brand);
  font-weight: 750;
  font-size: 0.77rem;
  margin-bottom: 6px;
}
.phase-card h2 {
  margin-bottom: 8px;
}
.kickoff {
  font-size: 0.96rem;
}
.commands {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.commands > div {
  background: var(--surface);
  border-radius: 10px;
  padding: 5px 8px;
}
.commands dt {
  color: var(--text);
  font-size: 0.83rem;
  line-height: 1.2;
  font-weight: 750;
}
.commands dd {
  font-size: 0.82rem;
}
.safety {
  margin-top: 9px;
  padding: 6px 8px;
  background: var(--amber);
  color: var(--amber-text);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 650;
}
.details {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.details button {
  flex: 1 0 auto;
}
.detail-copy {
  padding: 10px 1px 2px;
  font-size: 0.92rem;
}
.detail-copy ol {
  margin: 2px 0;
  padding-left: 20px;
}
.detail-copy li + li {
  margin-top: 6px;
}
.court {
  margin: 0 0 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 85px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  background: var(--surface);
}
.court span {
  display: grid;
  place-items: center;
  padding: 5px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--brand);
}
.up-next {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px 7px 14px;
}
.up-next small {
  display: block;
  color: var(--muted);
  font-weight: 650;
}
.quickline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.quickline .text-action {
  text-align: left;
}
.dock {
  background: var(--surface);
  position: fixed;
  inset: auto 0 0;
  border-top: 1px solid var(--line);
  padding: 6px 12px max(7px, env(safe-area-inset-bottom));
  z-index: 2;
  box-shadow: 0 -5px 17px var(--elevation);
}
.dock-action {
  display: flex;
  gap: 8px;
  padding-bottom: 5px;
}
.dock-action .primary {
  flex: 1;
}
.dock-action .outline {
  flex: 0 1 auto;
}
.main-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.main-nav button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1px;
  min-height: 49px;
  font-weight: 680;
  font-size: 0.77rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 2px 4px;
}
.nav-icon {
  width: 55px;
  max-width: 100%;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
}
.main-nav button[aria-current="page"] {
  color: var(--brand);
}
.main-nav button[aria-current="page"] .nav-icon {
  background: var(--selection);
}
.stack {
  display: grid;
  gap: 10px;
}
.field {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 650;
  min-width: 0;
}
input:not([type="checkbox"], [type="radio"]),
textarea,
select {
  width: 100%;
  padding: 6px 9px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 1rem;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-block: 9px 5px;
}
.muted {
  color: var(--muted);
  font-size: 0.85rem;
}
.person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-block: 4px;
}
.person:last-child {
  border: 0;
}
.person-name {
  text-align: left;
  padding: 5px 3px;
  background: none;
  border: 0;
}
.person-name strong,
.person-name small {
  display: block;
}
.person-name small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 0.78rem;
}
.person-name .restriction {
  color: var(--amber-text);
}
.person .outline {
  color: var(--red);
}
.person .outline[aria-pressed="true"] {
  background: var(--red-fill);
  border-color: var(--red);
}
.week-summary {
  border-left: 3px solid var(--brand);
}
.week-summary h2 {
  margin: 3px 0 4px;
}
.week-summary + .card {
  margin-top: 9px;
}
.week-list {
  padding-left: 19px;
  margin: 6px 0 0;
}
.week-list li + li {
  margin-top: 7px;
}
.wrap {
  overflow-wrap: anywhere;
}

dialog {
  width: min(100%, 560px);
  max-width: 100%;
  max-height: min(90dvh, 790px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 27px 27px 0 0;
  margin: auto auto 0;
  background: var(--surface);
  color: var(--text);
}
dialog::backdrop {
  background-color: #12172299;
}
.panel-frame {
  padding: 12px 15px max(16px, env(safe-area-inset-bottom));
}
.panel-header {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.panel-header .text-action {
  flex-shrink: 0;
}
.panel-frame fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.panel-frame legend {
  font-weight: 730;
  font-size: 0.88rem;
  margin-bottom: 4px;
}
.options {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 7px;
  min-height: 46px;
  font-weight: 630;
  font-size: 0.87rem;
}
.radio-option:has(:checked) {
  background: var(--selection);
  border-color: var(--brand);
}
.radio-option:has([name="presence"][value="absent"]:checked) {
  color: var(--red);
  background: var(--red-fill);
  border-color: var(--red);
}
.radio-option:has([name="mode"][value="passive"]:checked) {
  color: var(--amber-text);
  background: var(--amber);
  border-color: var(--amber-text);
}
.panel-save {
  width: 100%;
}
.panel-error {
  color: var(--red);
  font-size: 0.9rem;
}
.role-details summary {
  min-height: 44px;
  padding-block: 8px;
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.role-details .field {
  padding: 0 4px 5px;
}
.toast {
  position: fixed;
  bottom: 130px;
  inset-inline: 12px;
  margin-inline: auto;
  max-width: 420px;
  width: fit-content;
  background: var(--brand);
  color: var(--brand-text);
  padding: 8px 13px;
  border-radius: 10px;
  z-index: 3;
  font-size: 0.9rem;
}

@media (max-width: 350px) {
  main {
    padding-inline: 10px;
  }
  .card {
    padding: 11px;
  }
  .schedule {
    padding: 5px 7px 7px;
  }
  .chip {
    padding-inline: 7px;
  }
}
@media (min-width: 610px) {
  main {
    padding-top: 25px;
  }
  .card {
    padding: 20px;
  }
  .schedule {
    padding: 8px 13px 13px;
  }
  .up-next {
    padding: 8px 12px 8px 20px;
  }
  dialog {
    margin: auto;
    border-radius: 22px;
  }
}

/* Sport pilot extensions reuse the supplied design tokens and bottom sheet. */
.pilot-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pilot-launcher {
  margin: 12px 0;
}
.pilot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pilot-content {
  padding-bottom: 24px;
  min-width: 0;
}
.pilot-content input,
.pilot-content textarea,
.pilot-content select {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
.pilot-content input[type="checkbox"] {
  width: auto;
  min-width: 24px;
  height: 24px;
}
.pilot-content pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pilot-content .card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.editor-grid,
.measurement-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.observation-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.pilot-error {
  color: var(--danger, #a13636);
  white-space: pre-wrap;
}
.measurement-clock {
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-height: 3em;
}
@media (min-width: 1000px) {
  .editor-grid,
  .measurement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #panel:has(.editor-grid),
  #panel:has(.measurement-grid) {
    width: min(1100px, 95vw);
    max-width: 95vw;
  }
}
.person:has(.recognition-info) {
  grid-template-columns: minmax(0, 1fr) 46px auto;
}
.person:has(.recognition-info) > [data-absent] {
  grid-column: 3;
  grid-row: 1;
}
.person .recognition-info {
  grid-column: 2;
  grid-row: 1;
  padding: 4px;
  min-width: 44px;
  min-height: 44px;
}
@media (min-width: 1000px) {
  #panel[data-pilot-view="planning"] {
    width: min(1100px, 95vw);
    max-width: 95vw;
  }
  #panel[data-pilot-view="planning"] .pilot-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  #panel[data-pilot-view="planning"] .pilot-content > h3,
  #panel[data-pilot-view="planning"] .pilot-content > p,
  #panel[data-pilot-view="planning"] .pilot-content > .pilot-toolbar,
  #panel[data-pilot-view="planning"] .pilot-content > .pilot-row {
    grid-column: 1/-1;
  }
}
.pilot-content summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.pilot-content .pilot-row {
  overflow-wrap: anywhere;
}

/* UX 0.5: shared context, short actions and stable live measurement rows. */
.context-switch {
  background: transparent;
  border: 0;
  padding: 3px 0;
  text-align: left;
  min-width: 0;
  flex: 1;
}
.context-switch strong,
.context-switch small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.context-switch strong {
  font-size: 1rem;
  color: var(--text);
}
.context-switch small {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.header-inner {
  min-height: 56px;
}
.connection {
  max-width: 125px;
  text-align: right;
}
.context-caption {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}
.confirm-person {
  font-size: 1.15rem;
  margin: 12px 0;
}
.hall-shortcuts {
  display: flex;
  gap: 8px;
  margin: 0 0 5px;
}
.hall-shortcuts > button {
  flex: 1;
  min-height: 48px;
  color: var(--brand);
}
.hall-reminder {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  margin: 0 0 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--amber);
  color: var(--amber-text);
  text-align: left;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quickline {
  min-height: 42px;
}
.panel-header {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 5;
  padding-block: 3px;
}
.panel-header h2 {
  min-width: 0;
  font-size: 1.3rem;
  flex: 1;
}
.panel-header > button {
  flex-shrink: 0;
  padding-inline: 8px;
  min-height: 48px;
}
#panel[data-pilot-view="run"] {
  max-height: calc(100dvh - 16px);
}
#panel[data-pilot-view="run"] .pilot-content {
  gap: 8px;
  padding-bottom: 0;
}
.run-live-head {
  position: sticky;
  top: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--selection);
  border-radius: 16px;
  z-index: 3;
}
.run-live-head .measurement-clock {
  min-height: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}
.run-live-head button {
  min-height: 48px;
  min-width: 86px;
}
.run-meta {
  font-size: 0.8rem;
  color: var(--muted);
}
.compact-runs {
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
}
.compact-run-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px 82px;
  gap: 6px;
  align-items: center;
  min-height: 72px;
  padding: 7px 8px;
  background: var(--surface);
}
.compact-run-row + .compact-run-row {
  border-top: 1px solid var(--line);
}
.compact-run-row .runner-name {
  border: 0;
  text-align: left;
  padding: 2px;
  background: transparent;
  font-size: 0.9rem;
}
.runner-name strong,
.runner-name small {
  display: block;
  overflow-wrap: anywhere;
}
.runner-name small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}
.compact-run-row > .primary {
  min-height: 50px;
  border-radius: 12px;
  padding: 6px;
}
.compact-run-row > .outline {
  padding: 5px;
  min-height: 46px;
}
.run-feedback,
.observation-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}
.run-feedback:empty {
  display: none;
}
.run-feedback > span,
.observation-feedback > span {
  flex: 1;
  min-width: 120px;
}
.observation-feedback > button {
  min-height: 44px;
}
.quick-ratings button {
  min-height: 48px;
  background: var(--selection);
  border-color: var(--line);
  color: var(--brand);
  font-size: 0.9rem;
  overflow-wrap: normal;
}
.quick-status {
  font-size: 0.85rem;
  color: var(--muted);
}
.quick-more {
  border-top: 1px solid var(--line);
  padding-top: 5px;
}
.quick-more > button {
  margin: 4px 0;
}
.quick-more summary {
  color: var(--brand);
  font-weight: 700;
}
.person .recognition-info {
  color: var(--muted);
}
.person-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.person-cell {
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 0;
  min-height: 56px;
  background: var(--surface);
  padding: 5px 3px;
  color: var(--text);
}
.person-cell strong,
.person-cell small {
  display: block;
  overflow-wrap: anywhere;
}
.person-cell strong {
  font-size: 0.76rem;
}
.person-cell small {
  color: var(--muted);
  font-size: 0.68rem;
}
.quick-person-list {
  display: grid;
  gap: 6px;
}
.quick-person-list .person-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 8px 12px;
}
.quick-person-list .person-cell strong {
  font-size: 1rem;
}
.people-search-row,
.people-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(85px, 0.5fr);
  gap: 8px;
  align-items: end;
}
.people-search-row .field,
.people-controls .field {
  min-width: 0;
}
.people-controls {
  margin: 8px 0;
}
.people-controls select {
  width: 100%;
}
.segmented {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.segmented button {
  min-height: 48px;
  padding-inline: 8px;
  flex: 1;
}
.people-secondary {
  margin-top: 12px;
  font-size: 0.87rem;
}
.people-secondary .pilot-toolbar {
  padding-top: 8px;
}
.journal-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.journal-list {
  display: grid;
  gap: 0;
}
.journal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.journal-row > button {
  text-align: left;
  padding: 7px;
}
.journal-row > span,
.journal-row > small {
  font-size: 0.8rem;
  color: var(--muted);
}
.journal-row > small {
  grid-column: 1/-1;
}
.layout-toolbar {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
  margin: 10px 0;
}
.layout-viewport {
  overflow: auto;
  max-height: 60dvh;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  background: var(--subtle);
}
.layout-board {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(48px, 1fr));
  gap: 5px;
  width: calc(100% * var(--zoom));
}
.layout-board .person-cell {
  min-height: 48px;
}
.layout-board .dimmed {
  opacity: 0.45;
}
.layout-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.toast {
  font-size: 0.8rem;
  padding: 6px 10px;
  max-width: min(380px, calc(100vw - 24px));
  pointer-events: none;
  bottom: 86px;
}
@media (max-width: 350px) {
  .person-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .people-controls {
    grid-template-columns: 1fr;
  }
  .run-live-head {
    padding: 8px;
  }
  .compact-run-row {
    grid-template-columns: minmax(0, 1fr) 44px 74px;
  }
}
@media (min-width: 1000px) {
  #panel[data-pilot-view="journal"] {
    width: min(1000px, 95vw);
    max-width: 95vw;
  }
}
main:has(.schedule) .introline > div {
  flex: 1;
  min-width: 0;
}
main:has(.schedule) .introline h1 {
  font-size: 1.8rem;
}
.hall-quickline {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 4px;
  margin-block: 4px;
}
.hall-quickline > button {
  min-height: 48px;
  padding: 5px 8px;
  font-size: 0.78rem;
  white-space: nowrap;
}
.draft-status {
  font-size: 0.85rem;
  color: var(--brand);
  padding: 8px 10px;
  background: var(--selection);
  border-radius: 10px;
}
.editor-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.editor-outline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.editor-outline h3 {
  font-size: 0.9rem;
  width: 100%;
}
.editor-outline button {
  flex: 1;
  min-height: 48px;
}
.editor-workspace .editor-grid {
  display: block;
}
@media (min-width: 1000px) {
  #panel[data-pilot-view="editor"] {
    width: min(1120px, 95vw);
    max-width: 95vw;
  }
  .editor-workspace {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
  }
  .editor-outline {
    display: grid;
    position: sticky;
    top: 70px;
  }
}
.people-controls {
  display: block;
}
.people-controls .segmented {
  flex-wrap: nowrap;
}
.people-controls .segmented button {
  min-width: 0;
}
#panel[data-pilot-view="planning"] .pilot-content {
  display: block;
}
.planning-workspace {
  display: grid;
  gap: 18px;
}
.planning-sidebar,
.planning-calendar {
  min-width: 0;
}
.planning-sidebar {
  display: grid;
  gap: 14px;
  align-content: start;
}
.planning-sidebar details > .stack {
  margin-top: 8px;
}
.planning-sidebar article {
  margin-top: 10px;
}
.planning-sidebar .pilot-toolbar {
  gap: 6px;
}
.planning-sidebar .pilot-toolbar button {
  font-size: 0.8rem;
}
.calendar-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.calendar-list {
  display: grid;
  gap: 10px;
}
.calendar-entry strong {
  display: block;
  margin-bottom: 6px;
}
.calendar-entry .muted {
  font-size: 0.82rem;
  margin-bottom: 9px;
}
.course-card {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1000px) {
  .planning-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
  }
  .planning-sidebar {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 70px;
    max-height: 70dvh;
    overflow: auto;
  }
  .planning-calendar {
    grid-column: 2;
    grid-row: 1;
  }
}
/* Large type wraps whole controls instead of widening the mobile layout viewport. */
.people-controls .segmented {
  flex-wrap: wrap;
}
.people-controls .segmented button {
  min-width: fit-content;
  max-width: 100%;
}
.people-search-row input,
.people-search-row select {
  min-width: 0;
  width: 100%;
}
.compact-run-row {
  grid-template-columns: minmax(0, 1fr) 46px clamp(82px, 5.8rem, 40%);
}
.compact-run-row .runner-name {
  min-width: 0;
  width: 100%;
}
.run-live-head > .measurement-clock {
  min-width: 0;
  overflow-wrap: anywhere;
}
.run-live-head > button {
  max-width: 55%;
  overflow-wrap: normal;
}
@media (max-width: 350px) {
  .compact-run-row {
    grid-template-columns: minmax(0, 1fr) 44px clamp(74px, 5.8rem, 40%);
  }
}
.hall-quickline {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 4rem), 1fr));
}
.hall-quickline > button {
  min-width: 0;
  white-space: normal;
}
/* Keep the whole class in view; full identity remains in the accessible name/popup. */
.person-cell strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.person-cell small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.layout-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  align-items: center;
}
.layout-toolbar .field {
  min-width: 0;
}
.layout-toolbar .field > label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.layout-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
}
.layout-toolbar > button {
  min-height: 48px;
}

/* Compact native attempt history: keep the two rare actions together. */
.pilot-content .field-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.field-history-row > small {
  grid-column: 1 / -1;
}
