[hidden] { display: none !important; }
.wrap { max-width: 900px; }
.intro { padding: 4px 0 24px; max-width: 680px; }
.intro .lead { margin-bottom: 8px; }
.crew-heading { display: flex; align-items: center; gap: 12px; }
.crew-heading > div { flex: 1; min-inline-size: 0; }
.crew-heading h1 { overflow-wrap: anywhere; }
.crew-header-art { display: block; inline-size: 88px; block-size: 88px; flex: 0 0 88px; object-fit: contain; border-radius: var(--radius); }
@media (min-width: 600px) { .crew-header-art { inline-size: 112px; block-size: 112px; flex-basis: 112px; } }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.related { margin-top: 20px; font-size: 14px; gap: 12px; }
.related a { text-underline-offset: 3px; }
.related a, .related strong { display: inline-flex; align-items: center; gap: 7px; }
.related span { min-inline-size: 0; overflow-wrap: anywhere; }
.workflow-icon { inline-size: 22px; block-size: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card { margin: 18px 0; }
.card h2, .section-head h2 { margin: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.form > * { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.wide { grid-column: 1 / -1; }
.form p { margin: 0; }
input[type="date"], input[type="time"] { min-width: 0; max-width: 100%; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: 20px; height: 20px; }
.status { min-height: 1.5em; font-size: 14px; margin: 10px 0; overflow-wrap: anywhere; }
.notice { background: var(--surface); border: 1px solid var(--warn); border-inline-start: 4px solid var(--warn); border-radius: 8px; padding: 14px; overflow-wrap: anywhere; }
.notice h3 { margin: 0 0 8px; font-size: 16px; }
.notice p { margin-bottom: 0; }
.notice ul { padding-inline-start: 22px; margin: 8px 0; }
.incoming { border: 2px solid var(--accent); }
.incoming h2 { margin: 8px 0; }
.incoming-title { font-weight: 700; color: var(--ink) !important; overflow-wrap: anywhere; }
.after-row { margin-top: 12px !important; }
.event-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; max-height: 270px; overflow-y: auto; }
.event-list li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.event-list button { text-align: start; flex: 1; overflow-wrap: anywhere; min-width: 0; }
.event-list button[aria-pressed="true"] { background: var(--chip); border-color: var(--accent); font-weight: 600; }
.event-list span { white-space: nowrap; }
summary { cursor: pointer; font-weight: 600; min-height: 40px; padding: 8px 0; }
summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.plan-summary { margin: 30px 0 24px; }
.plan-summary h2 { font-size: clamp(24px, 4vw, 32px); margin: 4px 0; overflow-wrap: anywhere; }
#plan-details { overflow-wrap: anywhere; margin: 8px 0 20px; }
.coverage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.coverage div { border-top: 3px solid var(--accent); padding: 12px; background: var(--chip); border-radius: 0 0 8px 8px; }
.coverage dt { font-size: 13px; line-height: 1.3; min-height: 34px; color: var(--muted); }
.coverage dd { font-size: 34px; font-weight: 700; margin: 4px 0 0; }
#coverage-chart { display: block; inline-size: 100%; block-size: 32px; margin: 0 0 12px; }
.coverage-track { fill: var(--surface); }
#coverage-assigned { fill: var(--accent); }
#coverage-open { fill: url(#crew-open-hatch); }
#crew-open-hatch path { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.coverage-outline { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.coverage-zero .coverage-outline { stroke-dasharray: 5 4; }
.plan-summary .coverage { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plan-summary .coverage div { border: 0; padding: 8px; border-radius: 8px; }
.plan-summary .coverage dt { font-size: 12px; min-height: 0; }
.plan-summary .coverage dd { font-size: 28px; }
.coverage-named dt::before, .coverage-vacant dt::before { content: ""; display: inline-block; inline-size: 10px; block-size: 10px; border: 1px solid var(--muted); border-radius: 2px; margin-inline-end: 5px; }
.coverage-named dt::before { background: var(--accent); border-color: var(--accent); }
.coverage-vacant dt::before { background: repeating-linear-gradient(135deg, transparent 0 2px, var(--muted) 2px 3px, transparent 3px 5px); }
.shift-list { padding: 0; margin: 16px 0 24px; list-style: none; }
.shift-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; break-inside: avoid; overflow-wrap: anywhere; }
.shift-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.shift-meta { margin: 8px 0; font-size: 15px; }
.shift-notes { white-space: pre-wrap; font-size: 14px; color: var(--muted); }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; color: var(--muted); }
.recovery { margin: 20px 0; }
.recovery summary { font-size: 14px; }
.btn { display: inline-flex; align-items: center; }
button, .btn, .related a { overflow-wrap: anywhere; max-inline-size: 100%; }
.coverage dt { overflow-wrap: anywhere; }
input[type="date"], input[type="time"] { direction: ltr; }
#import-file:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 400px) { .event-list li { flex-wrap: wrap; gap: 2px; } .event-list button { flex-basis: 100%; } .event-list span { margin: 0 8px 6px; } .coverage { gap: 7px; } .coverage div { padding: 10px 8px; } }
@media (max-width: 420px) { .form { grid-template-columns: minmax(0, 1fr); } }
@media print {
  :root { --bg: white; --surface: white; --ink: black; --muted: #444; --line: #aaa; --accent: #222; --accent-ink: white; --chip: white; --warn: #444; }
  .no-print { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .plan-summary { margin-top: 0; }
  .coverage dd { font-size: 25px; }
  .shift-card { border-radius: 0; margin-bottom: 8px; padding: 10px; }
  .pill { border: 1px solid #888; }
  .pill.live { background: white; color: black; }
}

/* MARKED LAYER mobile-first-20261025: standalone controls stay usable at 320px. */
@media screen {
  body button, body select, body textarea, body summary, body .btn,
  body .event-list button, body .list .acts button, body .list .acts select,
  body .flow-nav a, body .flow-actions a, body .related a, body .jump a,
  body header.top a, body .check, body .tick,
  body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]) {
    min-block-size: 44px; min-inline-size: 44px; max-inline-size: 100%;
  }
  body button, body .btn, body summary, body .flow-nav a, body .flow-actions a,
  body .related a, body .jump a, body header.top a { white-space: normal; overflow-wrap: anywhere; }
  body .btn, body .flow-nav a, body .flow-actions a, body .related a,
  body .jump a, body header.top a { display: inline-flex; align-items: center; }
  body .list .acts button, body .list .acts select { padding-block: 8px; }
  body summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .row > *, .flow-nav > *, .flow-actions > *, .related > *, header.top > * { max-inline-size: 100%; }
}
@media screen and (max-width: 600px) {
  body input, body textarea, body select, body .list .acts select,
  body .language-control select { font-size: 16px; }
  .card, .field, .form, .event-fields, .tab-panel { min-inline-size: 0; }
  .coverage dt, .coverage dd, .totals dt { overflow-wrap: anywhere; }
}
@media screen and (max-width: 360px) {
  .card { padding: 12px; }
  .form, .event-fields { grid-template-columns: minmax(0, 1fr); }
  .coverage, .totals { grid-template-columns: minmax(0, 1fr); }
}
