/*
 * Crew area — badge, page container, dashboard properties list.
 */
@layer areas {

.crew-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  margin-left: var(--space-2);
  background: var(--color-text-muted);
  color: var(--color-surface);
}

.crew-page .card {
  max-width: 67rem;
}

.crew-dashboard-current-property__label--inline {
  display: block;
  margin-bottom: var(--space-1);
}

.crew-dashboard-current-property__address {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  word-break: break-word;
}

.crew-dashboard-pickup {
  margin-bottom: var(--space-6);
  padding: var(--space-5) var(--space-5);
  background: linear-gradient(135deg, #ecfeff 0%, #f0fdfa 50%, var(--color-surface) 100%);
  border: 1px solid #99f6e4;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-text) 4%, transparent), 0 8px 24px rgba(13, 148, 136, 0.08);
}

.crew-dashboard-pickup__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.crew-dashboard-pickup__title {
  margin: 0 0 var(--space-1);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f766e;
}

.crew-dashboard-pickup__subtitle {
  margin: 0;
  font-size: var(--text-sm);
  color: #0d9488;
  max-width: 22rem;
  line-height: 1.4;
}

.crew-dashboard-pickup__count-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 2px solid #14b8a6;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.15);
}

.crew-dashboard-pickup__count {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
}

.crew-dashboard-pickup__count-label {
  margin-top: var(--space-1);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0d9488;
  text-align: center;
  max-width: 6rem;
  line-height: 1.2;
}

/* Crew dashboard: tap a checklist card → POST create → run (no intermediate pick page) */
.crew-dashboard-start-grid {
  margin-bottom: var(--space-6);
  padding: var(--space-6) var(--space-4) var(--space-5);
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(20, 184, 166, 0.09), transparent 50%),
    linear-gradient(180deg, #f1f5f9 0%, var(--color-surface) 45%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--color-text) 4%, transparent),
    0 12px 40px color-mix(in srgb, var(--color-text) 6%, transparent);
}

.crew-dashboard-start-grid__intro {
  text-align: center;
  margin-bottom: var(--space-5);
  padding: 0 var(--space-2);
}

.crew-dashboard-start-grid__heading {
  margin: 0;
  font-size: clamp(1.375rem, 4.5vw, 1.625rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.crew-dashboard-start-grid__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: var(--space-3);
  justify-content: center;
}

.crew-dashboard-start-grid__cell {
  margin: 0;
  min-height: 8rem;
}

.crew-dashboard-start-tile-form {
  margin: 0;
  height: 100%;
}

.crew-dashboard-start-tile {
  width: 100%;
  height: 100%;
  min-height: 8rem;
  padding: var(--space-4) var(--space-4) var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--space-3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 14px color-mix(in srgb, var(--color-text) 12%, transparent);
  transition: transform var(--duration-normal) var(--ease-default), box-shadow var(--duration-normal) var(--ease-default), filter var(--duration-normal) var(--ease-default), border-color var(--duration-normal) var(--ease-default);
  font: inherit;
}

.crew-dashboard-start-tile:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 16px 36px color-mix(in srgb, var(--color-text) 16%, transparent);
  filter: brightness(1.04);
  border-color: rgba(255, 255, 255, 0.35);
}

.crew-dashboard-start-tile:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

.crew-dashboard-start-tile__name {
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  text-shadow: 0 1px 2px color-mix(in srgb, black 12%, transparent);
  flex: 1 1 auto;
}

.crew-dashboard-start-tile__property {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.9;
  text-shadow: 0 1px 1px color-mix(in srgb, black 8%, transparent);
}

.crew-dashboard-start-tile__cta {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  align-self: flex-end;
  margin-top: auto;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.crew-dashboard-start-tile--tone-0 {
  background: linear-gradient(145deg, #0d9488 0%, #0f766e 100%);
  color: #ecfdf5;
}

.crew-dashboard-start-tile--tone-1 {
  background: linear-gradient(145deg, #7c3aed 0%, #5b21b6 100%);
  color: #f5f3ff;
}

.crew-dashboard-start-tile--tone-2 {
  background: linear-gradient(145deg, #ea580c 0%, #c2410c 100%);
  color: #fff7ed;
}

.crew-dashboard-start-tile--tone-3 {
  background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%);
  color: #eff6ff;
}

.crew-dashboard-start-tile--tone-4 {
  background: linear-gradient(145deg, #db2777 0%, #9d174d 100%);
  color: #fdf2f8;
}

.crew-dashboard-history {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.crew-dashboard-history__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

.crew-dashboard-history__link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.crew-dashboard-clear-location {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  margin-bottom: 0;
}

.crew-dashboard-clear-location__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.crew-dashboard-clear-location__link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.crew-dashboard-current-property__single {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-text);
}

/* Working at: current property — card-style block */
.crew-dashboard-current-property {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--color-bg-subtle) 0%, var(--color-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px color-mix(in srgb, black 4%, transparent);
}

.crew-dashboard-current-property.crew-dashboard-current-property--below-checklists {
  margin-top: var(--space-6);
}

.crew-dashboard-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.crew-dashboard-current-property__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crew-dashboard-current-property__select {
  min-width: 14rem;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-default), box-shadow var(--duration-fast) var(--ease-default);
}

.crew-dashboard-current-property__select:hover {
  border-color: var(--color-text-muted);
}

.crew-dashboard-current-property__select:focus {
  outline: none;
  border-color: var(--color-primary, #ea580c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

/* Crew property cards: no overlay click-through, so re-enable pointer-events on all interactive elements */
.crew-property-card .host-property-card__body .crew-dashboard-record-action a,
.crew-property-card .host-property-card__body .crew-dashboard-record-action .btn,
.crew-property-card .host-property-card__body .crew-property-card__wifi-btn {
  pointer-events: auto;
}

.crew-dashboard-quick-record {
  margin-top: var(--space-4);
}

.crew-dashboard-quick-record__btn {
  font-size: 1.125rem;
  padding: var(--space-3) var(--space-5);
}

.crew-property-suggest-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.crew-property-suggest-modal__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, black 50%, transparent);
}

.crew-property-suggest-modal__content {
  position: relative;
  background: var(--color-surface);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 28rem;
  max-height: min(90vh, 36rem);
  width: 100%;
  overflow-y: auto;
}

.crew-property-suggest-modal__title {
  margin: 0 0 var(--space-4);
  font-weight: 600;
}

/* When visible, location block must take space (not [hidden]) */
.crew-property-suggest-modal__location:not([hidden]) {
  display: block !important;
}

.crew-property-suggest-modal__location {
  margin-bottom: var(--space-4);
}

.crew-property-suggest-modal__location-text {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.crew-property-suggest-modal__map-label {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.crew-property-suggest-modal__map-wrap {
  position: relative;
  width: 100%;
  height: 12.5rem; /* fixed height so map is always visible (16/10 at 20rem width) */
  min-height: 12.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.crew-property-suggest-modal__map-wrap > .tooltip.crew-property-suggest-modal__map-tooltip {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.crew-property-suggest-modal__map-wrap > .tooltip .tooltip__anchor {
  display: block;
  width: 100%;
  height: 100%;
}

.crew-property-suggest-modal__map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 12.5rem;
  border: 0;
  display: block;
  z-index: 0;
}

.crew-property-suggest-modal__map.leaflet-container {
  font-family: inherit;
}

/* Leaflet pins: user (center) vs property */
.crew-property-suggest-map-pin {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  text-align: center;
}
.crew-property-suggest-map-pin--user {
  color: #ea580c;
  text-shadow: 0 0 2px #fff, 0 1px 3px color-mix(in srgb, black 30%, transparent);
}
.crew-property-suggest-map-pin--property {
  color: #2563eb;
  text-shadow: 0 0 2px #fff, 0 1px 2px color-mix(in srgb, black 20%, transparent);
}

.crew-property-suggest-modal__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Crew Wi‑Fi modal — shell in components/modal.css (.modal) */

.crew-wifi-view__hint {
  margin: 0 0 var(--space-3);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.crew-wifi-view__current {
  margin: 0;
}

.crew-wifi-view__line {
  margin: 0 0 var(--space-2);
}

.crew-wifi-view__line:last-child {
  margin-bottom: 0;
}

.crew-property-suggest-modal__option {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
}

.crew-property-suggest-modal__option:hover {
  background: var(--color-bg-subtle);
}

/* Crew dashboard: mobile — stack cards, reduce whitespace, prevent squished text */
@media (max-width: 640px) {
  .crew-page .page-header {
    margin-bottom: var(--space-5);
  }

  .crew-page .page-header__title {
    font-size: var(--text-xl);
  }

  .crew-page .card {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
  }

  .crew-page .card h2 {
    margin-bottom: var(--space-2);
    font-size: var(--text-base);
  }

  .crew-dashboard-properties__item {
    padding: var(--space-4) 0;
  }

  /* Stack image above body so text has full width; no horizontal squeeze */
  .crew-page .host-property-card {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .crew-page .host-property-card__img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: 12rem;
  }

  .crew-page .host-property-card__body {
    min-width: 0;
  }

  .crew-page .host-property-card__title {
    font-size: 1rem;
    margin-bottom: var(--space-1);
  }

  .crew-page .host-property-card__link,
  .crew-page .host-property-card__description {
    margin-bottom: var(--space-1);
  }

  .crew-dashboard-record-action {
    margin-top: var(--space-2);
    flex-direction: column;
    align-items: stretch;
  }

  .crew-dashboard-record-action .btn {
    margin-right: 0;
    margin-bottom: 0;
  }

  .crew-dashboard-record-action .btn--primary {
    width: 100%;
  }
}

.crew-dashboard-properties {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.crew-dashboard-properties__item {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

/* Subtle Wi‑Fi button on property cards — same SVG strategy as host */
.host-property-card__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.host-property-card__title-row .host-property-card__title {
  flex: 1 1 auto;
  min-width: 0;
}

.crew-property-card__wifi-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-default), background var(--duration-fast) var(--ease-default);
}

.crew-property-card__wifi-btn-text {
  white-space: nowrap;
}

.crew-property-card__wifi-btn:hover {
  color: var(--color-text);
  background: color-mix(in srgb, black 6%, transparent);
}

.crew-property-card__wifi-btn:focus-visible {
  outline: 2px solid var(--color-primary, #ea580c);
  outline-offset: 2px;
}

.crew-property-card__wifi-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: currentColor;
}

@media (max-width: 640px) {
  .crew-property-card__wifi-btn {
    width: 2rem;
    padding: 0;
  }

  .crew-property-card__wifi-btn-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

.crew-dashboard-record-action {
  margin: var(--space-3) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

@media (max-width: 640px) {
  .crew-page .page-header--with-action {
    flex-direction: column;
    gap: var(--space-2);
  }

  .crew-page .page-header--with-action .page-header__actions {
    width: 100%;
    flex-direction: column;
  }

  .crew-page .page-header--with-action .page-header__actions .btn {
    width: 100%;
  }
}

.crew-recordings-intro {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}

.crew-recordings-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crew-recording-item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.crew-recording-item:last-child {
  border-bottom: none;
}

.crew-recording-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.crew-recording-item__date {
  font-weight: 500;
}

.crew-recording-item__notes {
  margin: 0 0 var(--space-1);
  font-size: var(--text-sm);
}

.crew-recording-item__video-wrap {
  margin: var(--space-3) 0 0;
}

.crew-recording-item__video {
  margin: 0;
  font-size: var(--text-sm);
}

.crew-recording-item__video--none {
  color: var(--color-text-muted);
}

.crew-record-complete-section {
  margin-top: var(--space-6);
  padding: var(--space-5);
}

.crew-record-complete-section__heading {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
}

.crew-record-uploaded-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.crew-record-uploaded-list__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.crew-record-uploaded-list__body {
  flex: 1;
  min-width: 0;
}

.crew-record-uploaded-list__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.crew-record-uploaded-list__title {
  font-weight: 600;
}

.crew-record-uploaded-list__meta {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.crew-record-uploaded-list__remove-form {
  flex-shrink: 0;
  margin: 0;
}

.crew-record-uploaded-list__remove {
  white-space: nowrap;
}

.crew-record-uploaded-list__status--processing {
  color: var(--color-text-muted);
}

.crew-record-complete-section__hint {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.crew-record-complete-section__actions {
  margin-top: var(--space-4);
}

.crew-record-complete-btn {
  font-size: 1.125rem;
  padding: var(--space-3) var(--space-6);
}

.crew-record-page-links {
  margin-top: var(--space-4);
}

/* Upload fallback — de-emphasized; we want crew recording in-browser */
.crew-record-upload-fallback {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.crew-record-upload-fallback__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-2);
}

.crew-record-upload-fallback__link {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.crew-record-upload-fallback__link:hover {
  color: var(--color-text);
}

/* Direct file upload (recorded outside the app) — visible but secondary to in-app recording */
.crew-record-upload-file {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.crew-record-upload-file__summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.crew-record-upload-file__summary::-webkit-details-marker {
  display: none;
}

.crew-record-upload-file__summary::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: var(--space-2);
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(-45deg);
  vertical-align: 0.15em;
  transition: transform var(--duration-normal) var(--ease-default);
}

.crew-record-upload-file[open] .crew-record-upload-file__summary::before {
  transform: rotate(45deg);
}

.crew-record-upload-file--deemphasized {
  margin-top: var(--space-2);
  padding: var(--space-3);
  border-color: var(--color-border);
  background: var(--color-bg-subtle);
  box-shadow: none;
}

.crew-record-upload-file--deemphasized .crew-record-upload-file__summary {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.crew-record-upload-file__body {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.crew-record-upload-file__hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
  line-height: 1.5;
}

.crew-record-upload-file__form .form-group {
  margin-bottom: var(--space-4);
}

.crew-record-upload-file__form .form-group__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

/* Styled inputs in upload form (match app design tokens) */
.crew-upload-input {
  width: 100%;
  max-width: 20rem;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: inherit;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--duration-fast) var(--ease-default), box-shadow var(--duration-fast) var(--ease-default);
}

.crew-upload-input:hover {
  border-color: var(--color-text-muted);
}

.crew-upload-input:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.crew-upload-textarea {
  max-width: 100%;
  min-height: 4rem;
  resize: vertical;
}

/* Custom file input: native input hidden, styled button + filename */
.crew-upload-file-group__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.crew-upload-file-wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.crew-upload-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.crew-upload-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default);
}

.crew-upload-file-btn:hover {
  background: var(--color-bg);
  border-color: var(--color-text-muted);
}

.crew-upload-file-name {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Record property: dev-only tools (joseph.e.combs@gmail.com in development) */
.crew-record-dev-details {
  margin-bottom: var(--space-4);
}

.crew-record-dev-details__summary {
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  list-style-position: outside;
  padding: var(--space-1) 0;
}

.crew-record-dev-details__summary::-webkit-details-marker {
  color: var(--color-text-muted);
}

.crew-record-dev-panel {
  margin-top: var(--space-2);
  margin-bottom: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--color-border, #e5e7eb);
  border-radius: var(--radius);
  background: var(--color-bg-subtle, #f9fafb);
}

.crew-record-dev-panel__title {
  margin: var(--space-2) 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.crew-record-dev-panel > .crew-record-dev-toggle__label {
  display: flex;
  margin-bottom: var(--space-2);
}

.crew-record-dev-panel__actions {
  margin-top: var(--space-3);
}

.crew-record-dev-panel__hint {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.crew-record-dev-toggle {
  margin-bottom: var(--space-3);
}

.crew-record-dev-toggle__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}

.crew-record-dev-toggle__input {
  width: 1rem;
  height: 1rem;
}

.crew-record-dev-toggle__text {
  user-select: none;
}

/* Record property: slow-network and cellular warnings (before recording). Cellular banner reuses same block styles. */
.crew-record-slow-network {
  position: relative;
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  padding-right: 2.5rem;
  background: var(--color-warning-bg, #fef3c7);
  border: 1px solid var(--color-warning-border, #f59e0b);
  border-radius: var(--radius);
}

.crew-record-slow-network__dismiss {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-warning-text, #92400e);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0.8;
}

.crew-record-slow-network__dismiss:hover {
  opacity: 1;
  background: color-mix(in srgb, black 6%, transparent);
}

.crew-record-slow-network__message {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-warning-text, #92400e);
}

.crew-record-slow-network__wifi {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-start;
}

.crew-record-slow-network__wifi-creds {
  flex: 1;
  min-width: 12rem;
}

.crew-record-slow-network__wifi-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-warning-text, #92400e);
}

.crew-record-slow-network__wifi-line:last-child {
  margin-bottom: 0;
}

.crew-record-slow-network__wifi-line .crew-record-slow-network__password {
  user-select: all;
}

.crew-record-slow-network__wifi-line .crew-record-slow-network__copy-btn {
  flex-shrink: 0;
  margin-left: var(--space-1);
}

.crew-record-slow-network__copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: var(--color-warning-text, #92400e);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--color-warning-border, #f59e0b);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-default);
}

.crew-record-slow-network__copy-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
}

.crew-record-slow-network__copy-btn:disabled {
  cursor: default;
  opacity: 0.9;
}

.crew-record-slow-network__copy-icon {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
}

.crew-record-slow-network__copy-btn-feedback {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-warning-text, #92400e);
}

/* Record property page: card width — capture UI in components/recording_capture.css */
.crew-record-card {
  max-width: 42rem;
}

/* Checklist wizard — mobile-first */
.checklist-wizard-page__lead {
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.checklist-wizard-page__progress {
  font-weight: 600;
  margin-top: var(--space-1);
}

.checklist-wizard-choose-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist-wizard-choose-list__item {
  margin-bottom: var(--space-2);
}

.checklist-wizard-choose-list__btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  font-size: var(--text-base);
  font-family: inherit;
  transition: border-color var(--duration-fast) var(--ease-default), box-shadow var(--duration-fast) var(--ease-default);
}

.checklist-wizard-choose-list__btn:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.checklist-wizard-choose-list__name {
  display: block;
  font-weight: 600;
}

.checklist-wizard-choose-list__meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.checklist-wizard-choose-list__action {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-primary);
}

.checklist-wizard-tasks {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
}

.checklist-wizard-tasks__item {
  margin-bottom: var(--space-2);
}

.checklist-wizard-tasks__btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 2.75rem;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  font-size: var(--text-base);
  font-family: inherit;
  text-align: left;
  transition: border-color var(--duration-fast) var(--ease-default), background var(--duration-fast) var(--ease-default);
}

.checklist-wizard-tasks__btn:hover {
  border-color: var(--color-primary);
}

.checklist-wizard-tasks__btn--done {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.checklist-wizard-tasks__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checklist-wizard-tasks__icon img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.checklist-wizard-tasks__check {
  flex-shrink: 0;
  width: 1.5rem;
  font-size: 1.25rem;
  line-height: 1;
}

.checklist-wizard-tasks__label {
  flex: 1;
}

.checklist-wizard-tasks__time {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.checklist-wizard-complete {
  margin-bottom: var(--space-4);
}

.checklist-wizard-complete[hidden] {
  display: none;
}

.checklist-wizard-cancel {
  margin: 0;
}

/* Crew dashboard: in-progress checklist rows */
.crew-dashboard-in-progress {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.crew-dashboard-in-progress__item {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid rgba(13, 148, 136, 0.22);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-text) 4%, transparent);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-default), border-color var(--duration-normal) var(--ease-default);
}

.crew-dashboard-in-progress__item:hover {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.12);
}

.crew-dashboard-in-progress__index {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  font-size: var(--text-sm);
  font-weight: 800;
  color: #0f766e;
  background: rgba(204, 251, 241, 0.85);
  border-right: 1px solid rgba(13, 148, 136, 0.15);
  font-variant-numeric: tabular-nums;
}

.crew-dashboard-in-progress__continue {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas: "name chevron action";
  align-items: center;
  column-gap: var(--space-2);
  padding: var(--space-4) var(--space-3) var(--space-4) var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-base);
  transition: background var(--duration-fast) var(--ease-default), color var(--duration-fast) var(--ease-default);
}

.crew-dashboard-in-progress__continue:hover {
  background: rgba(204, 251, 241, 0.5);
  color: #0f766e;
}

.crew-dashboard-in-progress__name {
  grid-area: name;
  min-width: 0;
  word-break: break-word;
  line-height: 1.3;
}

.crew-dashboard-in-progress__chevron {
  grid-area: chevron;
  flex-shrink: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #14b8a6;
  line-height: 1;
}

.crew-dashboard-in-progress__continue:hover .crew-dashboard-in-progress__chevron {
  color: #0f766e;
}

.crew-dashboard-in-progress__action {
  grid-area: action;
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #0d9488;
}

.crew-dashboard-in-progress__continue:hover .crew-dashboard-in-progress__action {
  color: #0f766e;
}

@media (max-width: 32rem) {
  .crew-dashboard-pickup {
    padding: var(--space-4);
  }

  .crew-dashboard-pickup__head {
    flex-direction: column;
    align-items: stretch;
  }

  .crew-dashboard-pickup__count-wrap {
    flex-direction: row;
    align-self: flex-start;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
  }

  .crew-dashboard-pickup__count-label {
    margin-top: 0;
    text-align: left;
    max-width: none;
  }

  .crew-dashboard-in-progress__continue {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "action";
    row-gap: var(--space-1);
    padding: var(--space-3);
  }

  .crew-dashboard-in-progress__chevron {
    display: none;
  }

  .crew-dashboard-in-progress__action {
    justify-self: start;
    font-size: 0.8125rem;
  }

  .crew-dashboard-start-grid {
    padding: var(--space-4) var(--space-3);
  }

  .crew-dashboard-start-grid__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .crew-dashboard-start-grid__cell {
    min-height: 7.25rem;
  }

  .crew-dashboard-start-tile {
    min-height: 7.25rem;
    padding: var(--space-3);
  }
}

/* Crew select property / choose checklist */
.crew-select-property-list,
.crew-choose-checklist-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.crew-select-property-list__item,
.crew-choose-checklist-list__item {
  margin-bottom: var(--space-2);
}

.crew-select-property-list__link {
  display: block;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease-default), box-shadow var(--duration-fast) var(--ease-default);
}

.crew-select-property-list__link:hover {
  border-color: var(--color-primary, #ea580c);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.crew-choose-checklist-form .crew-choose-checklist-list__radio {
  margin-right: var(--space-2);
}

.crew-choose-checklist-list__label {
  cursor: pointer;
  font-weight: 500;
}

/* Checklist finished: prominent browser-only walkthrough CTA */
.crew-checklist-run-complete-cta {
  position: relative;
  margin-bottom: var(--space-4);
  padding: var(--space-6);
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid #fed7aa;
  background: linear-gradient(165deg, #fff7ed 0%, #ffffff 52%, #ffffff 100%);
  box-shadow: var(--shadow-md), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.crew-checklist-run-complete-cta::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: min(14rem, 55vw);
  height: min(14rem, 55vw);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--color-primary) 9%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

.crew-checklist-run-complete-cta__hero {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.crew-checklist-run-complete-cta__mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: var(--color-primary-text);
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--color-primary) 55%, transparent);
}

.crew-checklist-run-complete-cta__mark-icon {
  width: 1.85rem;
  height: 1.85rem;
}

.crew-checklist-run-complete-cta__text {
  flex: 1;
  min-width: 0;
}

.crew-checklist-run-complete-cta__badge {
  margin: 0 0 var(--space-2);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.crew-checklist-run-complete-cta__title {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.25rem, 3.5vw, 1.625rem);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  color: var(--color-text);
}

.crew-checklist-run-complete-cta__browser {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-radius: var(--radius);
  border-left-width: 3px;
  border-left-color: var(--color-primary);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-text) 4%, transparent);
}

.crew-checklist-run-complete-cta__videos-heading {
  position: relative;
  z-index: 1;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: var(--space-6) 0 var(--space-2);
}

.crew-checklist-run-complete-cta__videos {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0 0 var(--space-2);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.crew-checklist-run-complete-cta__action {
  position: relative;
  z-index: 1;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  text-align: center;
}

.crew-checklist-run-complete-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 22rem);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 16px -4px color-mix(in srgb, var(--color-primary) 45%, transparent);
}

.crew-checklist-run-complete-cta__btn:hover {
  box-shadow: 0 6px 20px -4px color-mix(in srgb, var(--color-primary) 50%, transparent);
}

.crew-checklist-run-complete-cta__btn--mark-complete {
  background: #047857;
  color: #fff;
  box-shadow: 0 2px 8px -2px rgba(4, 120, 87, 0.4);
}

.crew-checklist-run-complete-cta__btn--mark-complete:hover {
  background: #059669;
  box-shadow: 0 4px 12px -2px rgba(4, 120, 87, 0.5);
}

.crew-checklist-run-complete-cta__action-hint {
  margin: var(--space-3) auto 0;
  max-width: 26rem;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--color-text-muted);
}

.crew-checklist-run-complete-cta__action-hint--no-video {
  margin-top: var(--space-2);
}

.crew-checklist-run-complete-cta__primary-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
}

.crew-checklist-run-complete-cta__primary-row .crew-checklist-run-complete-cta__complete-form {
  margin: 0;
  display: flex;
  justify-content: center;
}

.crew-checklist-run-complete-cta__primary-row .crew-checklist-run-complete-cta__complete-form .btn {
  width: 100%;
  max-width: 22rem;
}

.crew-checklist-run-complete-cta__primary-row .crew-checklist-run-complete-cta__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
  font-weight: 600;
}

@media (min-width: 520px) {
  .crew-checklist-run-complete-cta__primary-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
  }

  .crew-checklist-run-complete-cta__primary-row .crew-checklist-run-complete-cta__complete-form {
    flex: 1 1 12rem;
    max-width: 22rem;
  }

  .crew-checklist-run-complete-cta__primary-row .crew-checklist-run-complete-cta__btn-secondary {
    flex: 1 1 12rem;
    margin: 0;
  }
}

.crew-checklist-run-complete-cta__no-video-finish {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px dashed rgba(148, 163, 184, 0.7);
}

.crew-checklist-run-complete-cta__no-video-finish .crew-checklist-run-complete-cta__complete-form {
  margin: 0;
  display: flex;
  justify-content: center;
}

.crew-checklist-run-complete-cta__btn-no-video {
  min-width: min(100%, 22rem);
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-base);
  font-weight: 600;
}

.crew-checklist-run-complete-cta__already-finished {
  text-align: center;
}

@media (max-width: 520px) {
  .crew-checklist-run-complete-cta {
    padding: var(--space-5) var(--space-4);
  }

  .crew-checklist-run-complete-cta__hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .crew-checklist-run-complete-cta__text {
    text-align: center;
  }

  .crew-checklist-run-complete-cta__browser {
    text-align: left;
  }
}

/* Recording modal — card inside shared .modal overlay (components/modal.css) */
.crew-checklist-run-record-modal__content {
  position: relative;
  width: 100%;
  max-width: min(90vw, 28rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  max-height: 50vh;
  padding: var(--space-4);
  padding-top: var(--space-6);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 25px 50px -12px color-mix(in srgb, var(--color-text) 25%, transparent);
}

.modal.crew-checklist-run-record-modal.crew-checklist-run-record-modal--uploading .crew-checklist-run-record-modal__content {
  max-width: min(96vw, 26rem);
  max-height: min(82vh, 38rem);
}

@media (max-width: 640px) {
  .modal--fullscreen.crew-checklist-run-record-modal .crew-checklist-run-record-modal__content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }

  .modal--fullscreen.crew-checklist-run-record-modal.crew-checklist-run-record-modal--uploading .crew-checklist-run-record-modal__content {
    max-height: 100dvh;
  }
}

.crew-checklist-run-record-modal__title {
  margin: 0 0 var(--space-4);
  font-size: var(--text-lg);
}

.crew-checklist-run-record-modal__close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--duration-normal) var(--ease-default), color var(--duration-normal) var(--ease-default);
}

.crew-checklist-run-record-modal__close:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-text) 6%, transparent);
}

/* Modal capture chrome: components/recording_capture.css (.recording-capture--compact) */

@media (max-width: 768px) {
  .crew-checklist-run-record-modal__content {
    max-width: min(95vw, 28rem);
    max-height: 50vh;
  }

  .modal.crew-checklist-run-record-modal.crew-checklist-run-record-modal--uploading .crew-checklist-run-record-modal__content {
    max-height: min(90vh, 40rem);
  }
}

.crew-checklist-run-view-toolbar {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(180deg, var(--color-bg-subtle) 0%, var(--color-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--color-text) 5%, transparent);
}

.crew-checklist-run-view-toolbar__label-row {
  margin-bottom: var(--space-3);
  padding: 0 0 var(--space-3);
  padding-left: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary, #ea580c);
}

.crew-checklist-run-view-toolbar__label-address {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* Tab row: shared/components/_tabs.html.erb + components/tabs.css */

/* Compact view: active groups + collapsible terminal (done / can't complete) */
.crew-checklist-run-compact {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.crew-checklist-run-compact-group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.crew-checklist-run-compact-group__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px var(--space-4);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: left;
  background: var(--color-bg-subtle);
  border: none;
  cursor: pointer;
}

.crew-checklist-run-compact-group__chevron {
  transition: transform var(--duration-normal) var(--ease-default);
}

.crew-checklist-run-compact-group--collapsed .crew-checklist-run-compact-group__chevron {
  transform: rotate(-90deg);
}

.crew-checklist-run-compact-group__list {
  list-style: none;
  margin: 0;
  padding: 0 var(--space-2) var(--space-2);
}

.crew-checklist-run-compact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-default);
}

.crew-checklist-run-compact-item:hover {
  background: var(--color-bg-subtle);
}

.crew-checklist-run-compact-item__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--color-bg-subtle);
  overflow: hidden;
}

.crew-checklist-run-compact-item__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crew-checklist-run-compact-item__icon--placeholder {
  background: var(--color-bg-subtle);
}

.crew-checklist-run-compact-item__text {
  flex: 1;
  min-width: 0;
  font-size: var(--text-sm);
}

.crew-checklist-run-compact-terminal {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.crew-checklist-run-compact-terminal__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 6px var(--space-4);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  background: var(--color-bg-subtle);
  list-style: none;
}

.crew-checklist-run-compact-terminal__summary::-webkit-details-marker {
  display: none;
}

.crew-checklist-run-compact-terminal__summary-text {
  flex: 1;
  min-width: 0;
}

.crew-checklist-run-compact-terminal__chevron {
  flex-shrink: 0;
  display: inline-block;
  transition: transform var(--duration-normal) var(--ease-default);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  transform: rotate(-90deg);
}

.crew-checklist-run-compact-terminal[open] .crew-checklist-run-compact-terminal__chevron {
  transform: rotate(0deg);
}

.crew-checklist-run-compact-terminal__list {
  list-style: none;
  margin: 0;
  padding: 0 var(--space-3) var(--space-3);
}

.crew-checklist-run-compact-terminal__item {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.crew-checklist-run-compact-terminal__item:last-child {
  border-bottom: none;
}

.crew-checklist-run-compact-terminal__task-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-checklist-run-compact-terminal__status {
  flex-shrink: 0;
  display: inline-block;
  width: 1.1em;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  user-select: none;
}

.crew-checklist-run-compact-terminal__status--complete {
  color: #047857;
}

.crew-checklist-run-compact-terminal__status--incompletable {
  color: #c2410c;
}

.crew-checklist-run-compact-terminal__restore {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default), background var(--duration-fast) var(--ease-default), transform var(--duration-fast) var(--ease-default);
}

.crew-checklist-run-compact-terminal__restore:hover {
  color: var(--color-primary, #ea580c);
  border-color: var(--color-primary, #ea580c);
  background: var(--color-bg-subtle);
}

.crew-checklist-run-compact-terminal__restore:focus-visible {
  outline: 2px solid var(--color-primary, #ea580c);
  outline-offset: 2px;
}

.crew-checklist-run-compact-terminal__restore-icon {
  display: block;
}

/* Square view: flush sections (map-like), grid of square cards — premium feel */
.crew-checklist-run-square {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.crew-checklist-run-square__main {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 0;
  box-shadow: 0 4px 24px color-mix(in srgb, black 8%, transparent);
}

/* Sections flush, no rounded edges, no gap between groups */
.crew-checklist-run-square-section.crew-checklist-run-compact-group {
  border: none;
  border-radius: 0;
}

.crew-checklist-run-square-section {
  --square-section-bg: var(--color-bg-subtle);
  --square-section-border: var(--color-border);
  border-radius: 0;
  padding: 0;
  background: var(--square-section-bg);
  border: none;
  overflow: hidden;
}

.crew-checklist-run-square-section--0 {
  --square-section-bg: #f0f9f4;
  --square-section-border: #b8ddce;
}

.crew-checklist-run-square-section--1 {
  --square-section-bg: #f5f0fa;
  --square-section-border: #d4c5e2;
}

.crew-checklist-run-square-section--2 {
  --square-section-bg: #fff8f0;
  --square-section-border: #f0dcc4;
}

.crew-checklist-run-square-section--3 {
  --square-section-bg: #f0f7fd;
  --square-section-border: #c4ddf0;
}

.crew-checklist-run-square-section--4 {
  --square-section-bg: #fafaf0;
  --square-section-border: #e2e2b8;
}

.crew-checklist-run-square-section--5 {
  --square-section-bg: #fdf0f5;
  --square-section-border: #f0c4d4;
}

/* Section header: same background as section, strong type */
.crew-checklist-run-square-section__title {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--color-text);
  border-left: 4px solid var(--square-section-border);
  border-bottom: 1px solid var(--square-section-border);
  background: var(--square-section-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  border-right: none;
  border-top: none;
  transition: opacity var(--duration-fast) var(--ease-default);
}

.crew-checklist-run-square-section__title:hover {
  opacity: 0.92;
}

.crew-checklist-run-square-section__title-text {
  flex: 1;
  min-width: 0;
}

.crew-checklist-run-square-section .crew-checklist-run-compact-group__chevron {
  flex-shrink: 0;
  margin-left: var(--space-2);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: transform var(--duration-normal) var(--ease-default);
}

.crew-checklist-run-square-section.crew-checklist-run-compact-group--collapsed .crew-checklist-run-compact-group__chevron {
  transform: rotate(-90deg);
}

.crew-checklist-run-square-section.crew-checklist-run-compact-group--collapsed .crew-checklist-run-square-section__grid {
  display: none;
}

.crew-checklist-run-square-section__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: var(--space-3);
  background: var(--square-section-border);
}

/* Cards: clean, subtle shadow, crisp tap target */
.crew-checklist-run-square-card {
  aspect-ratio: 1;
  min-height: 0;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--space-3);
  border: none;
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-default), box-shadow var(--duration-normal) var(--ease-default);
  text-align: center;
  font: inherit;
  color: inherit;
  box-shadow: 0 1px 3px color-mix(in srgb, black 6%, transparent);
}

.crew-checklist-run-square-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px color-mix(in srgb, black 10%, transparent);
}

.crew-checklist-run-square-card:active {
  transform: translateY(0);
}

.crew-checklist-run-square-card:focus-visible {
  outline: 2px solid var(--color-primary, #ea580c);
  outline-offset: 2px;
}

.crew-checklist-run-square-card__icon {
  flex: 0 0 50%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-bg-subtle);
}

.crew-checklist-run-square-card__icon img {
  width: 4rem;
  height: 4rem;
  min-width: 4rem;
  min-height: 4rem;
  object-fit: contain;
}

.crew-checklist-run-square-card__icon-placeholder {
  display: block;
  width: 4rem;
  height: 4rem;
  min-width: 4rem;
  min-height: 4rem;
  background: var(--color-bg-subtle);
  border-radius: var(--radius);
}

.crew-checklist-run-square-card__label {
  flex: 1 1 50%;
  min-height: 0;
  width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  text-align: center;
}

.crew-checklist-run-square-terminal {
  margin-top: var(--space-2);
}

/* Medium view: swipe deck list layout (card chrome: components/swipe_deck.css) */
.crew-checklist-run-medium-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Checklist body inside shared swipe_deck surface (_swipe_deck_item.html.erb) */
.crew-checklist-run-rows .swipe-deck__surface .crew-checklist-run-item-modal__group {
  text-align: center;
}

.crew-checklist-run-swipe-item__icon-wrap {
  display: flex;
  justify-content: center;
  margin: var(--space-2) 0 var(--space-1);
}

.crew-checklist-run-swipe-item__help {
  margin: var(--space-3) 0 0;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.crew-checklist-run-card__left-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  order: 1;
}

/* Classic “i” in a circle — crew long-description trigger */
.crew-info-in-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1;
  user-select: none;
}

.crew-checklist-run-card__info-btn {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border, #e5e7eb);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
}

.crew-checklist-run-card__info-btn:hover {
  background: var(--color-text-muted);
  border-color: var(--color-text-muted);
  color: var(--color-surface);
}

.crew-checklist-run-card__complete-btn {
  order: 3;
  margin-left: auto;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 2px solid var(--color-success, #16a34a);
  background: var(--color-surface);
  color: var(--color-success, #16a34a);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease-default), color var(--duration-fast) var(--ease-default);
}

.crew-checklist-run-card__complete-btn:hover {
  background: var(--color-success, #16a34a);
  color: var(--color-surface);
}

.crew-checklist-run-card__complete-icon {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Item modal (compact) and long-description modal — backdrop from .modal (components/modal.css) */
.crew-checklist-run-item-modal__content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: calc(100vw - 1.25rem);
  max-width: calc(100vw - 1.25rem);
  box-sizing: border-box;
  min-height: 24rem;
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 12px 24px color-mix(in srgb, var(--color-text) 8%, transparent);
}

.crew-checklist-run-item-modal__action-top {
  flex-shrink: 0;
  margin-bottom: var(--space-2);
}

.crew-checklist-run-item-modal__action-top .crew-checklist-run-item-modal__btn-incomplete {
  width: 100%;
  min-height: 3rem;
  font-size: var(--text-base);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.crew-checklist-run-item-modal__middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 14rem;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-2);
}

.crew-checklist-run-item-modal__icon-wrap {
  flex-shrink: 0;
}

.crew-checklist-run-item-modal__task-icon {
  display: block;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--color-bg-subtle);
}

.crew-checklist-run-item-modal__group {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  max-width: 100%;
}

/* Center task title in modal: symmetric columns so heading sits in visual center */
.crew-checklist-run-item-modal__title-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  gap: 0 var(--space-1);
}

.crew-checklist-run-item-modal__title-row .crew-checklist-run-item-modal__info-btn {
  grid-column: 1;
  justify-self: start;
}

.crew-checklist-run-item-modal__title-row .crew-checklist-run-item-modal__task-title {
  grid-column: 2;
  justify-self: stretch;
  text-align: center;
}

.crew-checklist-run-item-modal__title-row--solo {
  grid-template-columns: 1fr;
}

.crew-checklist-run-item-modal__title-row--solo .crew-checklist-run-item-modal__task-title {
  grid-column: 1;
}

.crew-checklist-run-item-modal__task-title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.25;
  max-width: 100%;
  padding: 0;
  min-width: 0;
  text-align: center;
}

.crew-checklist-run-item-modal__task-title--tappable {
  cursor: pointer;
}

.crew-checklist-run-item-modal__task-title--tappable:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-primary, #ea580c);
  text-underline-offset: 0.15em;
}

.crew-checklist-run-item-modal__task-title--tappable:focus {
  outline: none;
}

.crew-checklist-run-item-modal__task-title--tappable:focus-visible {
  outline: 2px solid var(--color-primary, #ea580c);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.crew-checklist-run-item-modal__info-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--color-primary, #ea580c);
  background: var(--color-surface);
  color: var(--color-primary, #ea580c);
  cursor: pointer;
  box-shadow: 0 1px 2px color-mix(in srgb, black 6%, transparent);
  transition: transform var(--duration-fast) var(--ease-default), box-shadow var(--duration-fast) var(--ease-default);
}

.crew-checklist-run-item-modal__info-btn .crew-info-in-circle {
  font-size: 0.75rem;
}

.crew-checklist-run-item-modal__info-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.crew-checklist-run-item-modal__info-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.crew-checklist-run-item-modal__action-bottom {
  flex-shrink: 0;
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.crew-checklist-run-item-modal__action-bottom .crew-checklist-run-item-modal__btn-defer {
  width: 100%;
  min-height: 2.75rem;
  font-weight: 600;
}

.crew-checklist-run-item-modal__action-bottom .crew-checklist-run-item-modal__btn-complete {
  width: 100%;
  min-height: 3rem;
  font-size: var(--text-base);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.crew-checklist-run-long-modal__content {
  position: relative;
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 12px 24px color-mix(in srgb, var(--color-text) 8%, transparent);
  max-width: 20rem;
  width: 100%;
  margin: 0 auto;
}

.crew-checklist-run-long-modal__title {
  margin: 0 0 var(--space-4);
  font-family: "Outfit", var(--font-sans);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

.crew-checklist-run-item-modal__btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 1rem;
  line-height: 1;
  transition: transform var(--duration-normal) var(--ease-default);
}

.crew-checklist-run-item-modal__btn-incomplete .crew-checklist-run-item-modal__btn-icon--warn {
  background: rgba(180, 83, 9, 0.15);
  color: #b45309;
}

/* Mark complete success animation */
.crew-checklist-run-item-modal__btn-complete.crew-checklist-run-item-modal__btn--animating {
  pointer-events: none;
  animation: item-modal-complete var(--duration-slower) var(--ease-spring) forwards;
}

.crew-checklist-run-item-modal__btn-complete.crew-checklist-run-item-modal__btn--animating .crew-checklist-run-item-modal__btn-icon {
  animation: item-modal-complete-icon var(--duration-slower) var(--ease-spring) 0.08s forwards;
}

@keyframes item-modal-complete {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  45% {
    transform: scale(1.04);
    box-shadow: 0 0 0 12px rgba(34, 197, 94, 0.2);
    filter: brightness(1.08);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.45);
  }
}

@keyframes item-modal-complete-icon {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  55% {
    transform: scale(1.25) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Can't complete animation */
.crew-checklist-run-item-modal__btn-incomplete.crew-checklist-run-item-modal__btn--animating {
  pointer-events: none;
  animation: item-modal-incomplete var(--duration-slower) var(--ease-default) forwards;
}

.crew-checklist-run-item-modal__btn-incomplete.crew-checklist-run-item-modal__btn--animating .crew-checklist-run-item-modal__btn-icon {
  animation: item-modal-incomplete-icon var(--duration-slower) var(--ease-default) forwards;
}

@keyframes item-modal-incomplete {
  0%,
  100% {
    transform: translateX(0);
    border-color: var(--color-border, #e5e7eb);
  }
  10%,
  30%,
  50% {
    transform: translateX(-6px);
    background: #fffbeb;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  }
  20%,
  40% {
    transform: translateX(6px);
  }
}

@keyframes item-modal-incomplete-icon {
  0% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-15deg) scale(1.15);
  }
  50% {
    transform: rotate(15deg) scale(1.1);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .crew-checklist-run-item-modal__btn-complete.crew-checklist-run-item-modal__btn--animating,
  .crew-checklist-run-item-modal__btn-incomplete.crew-checklist-run-item-modal__btn--animating,
  .crew-checklist-run-item-modal__btn-complete.crew-checklist-run-item-modal__btn--animating .crew-checklist-run-item-modal__btn-icon,
  .crew-checklist-run-item-modal__btn-incomplete.crew-checklist-run-item-modal__btn--animating .crew-checklist-run-item-modal__btn-icon {
    animation: none;
  }
}

.crew-checklist-run-long-modal__close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 1.375rem;
  cursor: pointer;
  line-height: 1;
  color: var(--color-text-muted);
  transition: background var(--duration-normal) var(--ease-default), color var(--duration-normal) var(--ease-default);
}

.crew-checklist-run-long-modal__close:hover {
  background: color-mix(in srgb, var(--color-text) 6%, transparent);
  color: var(--color-text);
}

.crew-checklist-run-long-modal__body {
  margin: 0 0 var(--space-4);
  white-space: pre-wrap;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.crew-checklist-run-ui-toggle {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.crew-checklist-run-rows {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .crew-checklist-run-rows {
    grid-template-columns: 1fr 18rem;
  }
}

.crew-checklist-run-rows__main {
  min-width: 0;
}

.crew-checklist-run-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crew-checklist-run-list__item {
  margin-bottom: var(--space-3);
}

.crew-checklist-run-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.crew-checklist-run-card__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--color-bg-subtle);
  overflow: hidden;
}

.crew-checklist-run-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crew-checklist-run-card__icon--placeholder {
  background: var(--color-bg-subtle);
}

.crew-checklist-run-card__body {
  flex: 1 1 12rem;
  min-width: 0;
}

.crew-checklist-run-card__group {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-1);
}

.crew-checklist-run-card__question {
  margin: 0 0 var(--space-1);
  font-weight: 500;
}

.crew-checklist-run-card__details {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.crew-checklist-run-card__details-summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: var(--color-bg-subtle);
  font-weight: 600;
}

.crew-checklist-run-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  width: 100%;
  align-items: center;
}

@media (min-width: 640px) {
  .crew-checklist-run-card__actions {
    width: auto;
    flex-shrink: 0;
  }
}

.crew-checklist-run-card--tinder {
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 16rem;
  justify-content: center;
}

.crew-checklist-run-card--tinder .crew-checklist-run-card__icon {
  width: 3rem;
  height: 3rem;
}

.crew-checklist-run-card__actions--tinder {
  justify-content: center;
  width: 100%;
}

/* Medium view: Done bucket uses same <details> pattern as compact terminal */
.crew-checklist-run-gutter-terminal {
  margin: 0;
}

.crew-checklist-run-gutter-terminal .crew-checklist-run-gutter-list {
  padding: 0 var(--space-3) var(--space-3);
}

.crew-checklist-run-gutter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crew-checklist-run-gutter-list__item {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.crew-checklist-run-gutter-list__status {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
  font-weight: 700;
  font-size: var(--text-sm);
}

.crew-checklist-run-gutter-list__status--complete {
  color: #047857;
}

.crew-checklist-run-gutter-list__status--incompletable {
  color: #c2410c;
}

.crew-checklist-run-gutter-list__task {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.crew-checklist-run-gutter-list__restore {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-default), border-color var(--duration-fast) var(--ease-default), background var(--duration-fast) var(--ease-default);
}

.crew-checklist-run-gutter-list__restore:hover {
  color: var(--color-primary, #ea580c);
  border-color: var(--color-primary, #ea580c);
  background: var(--color-bg-subtle);
}

.crew-checklist-run-gutter-list__restore:focus-visible {
  outline: 2px solid var(--color-primary, #ea580c);
  outline-offset: 2px;
}

.crew-checklist-run-gutter-list__restore-icon {
  display: block;
}

.crew-dashboard-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border, #e5e7eb);
}

.crew-checklist-run-back {
  margin-top: var(--space-4);
}

/* Crew completed checklists */
.crew-completed-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.crew-completed-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.crew-completed-list__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.crew-completed-list__checklist {
  font-weight: 600;
}

.crew-completed-list__property {
  color: var(--color-text-muted);
}

.crew-completed-list__date {
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .crew-checklist-run-card__actions {
    width: 100%;
  }

  .crew-checklist-run-card__actions .btn {
    flex: 1;
    min-width: 0;
  }
}

/* Recording Safeguard: IndexedDB vs Server comparison UI */
/* First block on crew dashboard so the banner is above the fold; keep clear separation from header below. */
.recording-safeguard {
  margin: 0 0 var(--space-6);
  animation: recording-safeguard-enter var(--duration-slow) var(--ease-in);
}

@keyframes recording-safeguard-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recording-safeguard__container {
  background: linear-gradient(135deg, #fff5f5 0%, #fff1f1 100%);
  border: 2px solid #fecaca;
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: 0 4px 6px -1px color-mix(in srgb, black 10%, transparent), 0 2px 4px -1px color-mix(in srgb, black 6%, transparent);
}

.recording-safeguard__header {
  margin-bottom: var(--space-4);
}

.recording-safeguard__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #991b1b;
  margin: 0 0 var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.recording-safeguard__description {
  color: #7f1d1d;
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: 0;
}

.recording-safeguard__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.recording-safeguard-item {
  background: white;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  transition: box-shadow var(--duration-slow) var(--ease-default), transform var(--duration-slow) var(--ease-default);
  box-shadow: 0 1px 3px 0 color-mix(in srgb, black 10%, transparent);
}

.recording-safeguard-item:hover {
  box-shadow: 0 4px 6px -1px color-mix(in srgb, black 10%, transparent), 0 2px 4px -1px color-mix(in srgb, black 6%, transparent);
  transform: translateY(-1px);
}

.recording-safeguard-item__info {
  flex: 1 1 auto;
  min-width: 200px;
}

.recording-safeguard-item__title {
  font-weight: 600;
  color: #991b1b;
  margin: 0 0 var(--space-1);
  font-size: var(--text-base);
}

.recording-safeguard-item__meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

.recording-safeguard-item__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.recording-safeguard-item__retry {
  background: #dc2626;
  color: white;
  border: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background-color var(--duration-normal) var(--ease-default), transform var(--duration-normal) var(--ease-default);
}

.recording-safeguard-item__retry:hover:not(:disabled) {
  background: #b91c1c;
  transform: scale(1.02);
}

.recording-safeguard-item__retry:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.recording-safeguard-item__download {
  background: white;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background-color var(--duration-normal) var(--ease-default), border-color var(--duration-normal) var(--ease-default);
}

.recording-safeguard-item__download:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.recording-safeguard-item__dismiss {
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  font-size: var(--text-xl);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--duration-normal) var(--ease-default), color var(--duration-normal) var(--ease-default);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recording-safeguard-item__dismiss:hover {
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 640px) {
  .recording-safeguard__container {
    padding: var(--space-4);
  }

  .recording-safeguard-item {
    flex-direction: column;
    align-items: stretch;
  }

  .recording-safeguard-item__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .recording-safeguard-item__retry,
  .recording-safeguard-item__download {
    flex: 1 1 auto;
    min-width: 0;
  }
}
}
