.crew-workspace-tabs {
  grid-template-columns: repeat(3, 1fr);
}

.manual-workspace {
  --manual-green: #476b59;
  --manual-green-soft: #e8f0e9;
  --manual-coral: #b85855;
  --manual-coral-soft: #f7e8e4;
}

.manual-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 18px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid #d8cfc6;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 10%, rgba(229, 213, 213, .82), transparent 34%),
    linear-gradient(135deg, #fff 0%, #f8f3ee 100%);
}

.manual-overview h3 {
  margin: 0;
  font: 400 clamp(25px, 3.5vw, 34px)/1.25 var(--serif);
  letter-spacing: -.04em;
}

.manual-overview-copy > p:not(.eyebrow) {
  max-width: 570px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.manual-schedule-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  max-width: 540px;
  margin-top: 19px;
  align-items: center;
  gap: 12px;
}

.manual-schedule-field > span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.manual-schedule-field select {
  width: 100%;
  min-height: 43px;
  padding: 9px 34px 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

#manual-storage-note {
  display: block;
  margin: 8px 0 0;
  color: #968b83;
  font-size: 9px;
  line-height: 1.5;
}

.manual-progress-card {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  min-height: 142px;
  padding: 18px;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(115, 52, 68, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 30px rgba(70, 42, 39, .07);
}

.manual-progress-ring {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--wine) var(--manual-progress), #e9e2dc 0);
  text-align: center;
}

.manual-progress-ring::before {
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: #fff;
  content: "";
}

.manual-progress-ring strong,
.manual-progress-ring span {
  position: relative;
  z-index: 1;
}

.manual-progress-ring strong {
  font: 700 21px/1 var(--serif);
}

.manual-progress-ring span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.manual-progress-card > div:last-child > span,
.manual-progress-card > div:last-child > strong {
  display: block;
}

.manual-progress-card > div:last-child > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.manual-progress-card > div:last-child > strong {
  margin-top: 5px;
  font: 700 20px var(--serif);
}

#manual-next-task {
  margin-top: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wine);
  font-size: 10px;
  font-weight: 900;
  text-align: left;
}

.manual-preflight-banner {
  display: flex;
  margin-top: 14px;
  padding: 17px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #dfc7bd;
  border-radius: 16px;
  background: #fff4ef;
}

.manual-preflight-banner[hidden] {
  display: none;
}

.manual-preflight-banner span,
.manual-preflight-banner strong,
.manual-preflight-banner p {
  display: block;
  margin: 0;
}

.manual-preflight-banner span {
  color: var(--manual-coral);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.manual-preflight-banner strong {
  margin-top: 3px;
  font: 700 20px var(--serif);
}

.manual-preflight-banner p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.manual-preflight-banner button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.manual-preflight-banner button:disabled {
  background: #d9d0c9;
  color: #8b817a;
  cursor: not-allowed;
}

.manual-preflight-banner.complete {
  border-color: #bfd2c4;
  background: var(--manual-green-soft);
}

.manual-preflight-banner.complete span {
  color: var(--manual-green);
}

.manual-complete-banner {
  display: flex;
  margin-top: 14px;
  padding: 16px 18px;
  align-items: center;
  gap: 13px;
  border: 1px solid #bfd2c4;
  border-radius: 16px;
  background: var(--manual-green-soft);
  color: #315441;
}

.manual-complete-banner > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--manual-green);
  color: #fff;
  font-weight: 900;
}

.manual-complete-banner strong,
.manual-complete-banner small {
  display: block;
}

.manual-complete-banner strong {
  font-size: 12px;
}

.manual-complete-banner small {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.5;
}

.manual-stage-nav {
  position: sticky;
  z-index: 7;
  top: 84px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 14px 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(242, 238, 232, .94);
  backdrop-filter: blur(12px);
}

.manual-stage-nav button {
  display: grid;
  min-width: 0;
  min-height: 56px;
  padding: 8px 6px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
}

.manual-stage-nav button:hover,
.manual-stage-nav button.active {
  background: #fff;
  box-shadow: 0 3px 12px rgba(40, 27, 23, .08);
}

.manual-stage-nav button.complete {
  color: var(--manual-green);
}

.manual-stage-nav i {
  color: var(--wine);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.manual-stage-nav button.complete i::after {
  content: " ✓";
}

.manual-stage-nav span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-stage-nav b {
  color: var(--muted);
  font-size: 8px;
}

.manual-stage-list {
  display: grid;
  gap: 14px;
}

.manual-stage[hidden],
.manual-stage-nav[hidden] {
  display: none !important;
}

.manual-stage {
  scroll-margin-top: 162px;
  padding: clamp(18px, 3vw, 27px);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fff;
}

.manual-stage.is-complete {
  border-color: #b9cdbf;
  box-shadow: inset 0 4px 0 var(--manual-green);
}

.manual-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.manual-stage-head > div > span {
  color: var(--wine);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
}

.manual-stage-head h4 {
  margin: 5px 0 0;
  font: 400 clamp(22px, 3vw, 28px)/1.3 var(--serif);
}

.manual-stage-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.manual-stage-progress {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: #f1ebe6;
  color: var(--wine);
  font-size: 10px;
}

.manual-stage.is-complete .manual-stage-progress {
  background: var(--manual-green-soft);
  color: var(--manual-green);
}

.manual-visual {
  position: relative;
  overflow: hidden;
  margin: 18px 0;
  aspect-ratio: 18 / 6;
  border-radius: 16px;
  background: #f4ece3;
}

.manual-visual::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, transparent 45%, rgba(42, 31, 26, .42));
  content: "";
  pointer-events: none;
}

.manual-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manual-visual figcaption {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 15px;
  max-width: 38%;
  color: #fff;
  font: 700 14px/1.45 var(--serif);
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .48);
}

.manual-check-list {
  display: grid;
  gap: 8px;
}

.manual-check {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 66px;
  padding: 12px 13px;
  align-items: center;
  gap: 11px;
  border: 1px solid #e1dad3;
  border-radius: 14px;
  background: #fcfbf9;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}

.manual-check:hover {
  border-color: #bda9a8;
  transform: translateY(-1px);
}

.manual-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.manual-check > i {
  position: relative;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1.5px solid #c7bbb3;
  border-radius: 8px;
  background: #fff;
}

.manual-check input:focus-visible + i {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

.manual-check:has(input:checked) {
  border-color: #bfd0c2;
  background: #f2f7f2;
}

.manual-check input:checked + i {
  border-color: var(--manual-green);
  background: var(--manual-green);
}

.manual-check input:checked + i::after {
  color: #fff;
  content: "✓";
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.manual-check > span > strong,
.manual-check > span > small {
  display: block;
}

.manual-check > span > strong {
  font-size: 12px;
  line-height: 1.45;
}

.manual-check > span > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.manual-check input:checked ~ span > strong {
  color: #526159;
  text-decoration: line-through;
  text-decoration-color: #9aafa0;
}

.manual-check > em {
  padding: 6px 8px;
  border-radius: 999px;
  background: #eee9e4;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.manual-check > em.manual-required {
  background: var(--manual-coral-soft);
  color: var(--manual-coral);
}

.manual-check-alert {
  border-color: #e1c2bb;
  background: #fff9f7;
}

.manual-role-notice {
  display: flex;
  margin: 0 0 12px;
  padding: 12px 14px;
  align-items: center;
  gap: 10px;
  border-radius: 13px;
  background: #f2ece7;
}

.manual-role-notice > span {
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--wine);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
}

.manual-role-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.manual-duty-grid,
.manual-reference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.manual-duty-grid > section {
  padding: 13px;
  border: 1px solid #e1dad3;
  border-radius: 16px;
  background: #f8f5f1;
}

.manual-duty-title {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  gap: 10px;
}

.manual-duty-title > b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--wine);
  color: #fff;
  font: 700 19px var(--serif);
}

.manual-duty-grid > section:last-child .manual-duty-title > b {
  background: #3f6583;
}

.manual-duty-title strong,
.manual-duty-title small {
  display: block;
}

.manual-duty-title strong {
  font-size: 12px;
}

.manual-duty-title small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.manual-duty-grid .manual-check {
  background: #fff;
}

.manual-reference-grid {
  margin-top: 12px;
}

.manual-ticket-guide,
.manual-script {
  margin: 0;
  padding: 18px;
  border-radius: 16px;
}

.manual-ticket-guide {
  border: 1px solid #d9cfc7;
  background: #faf7f3;
}

.manual-ticket-guide > div span,
.manual-ticket-guide > div strong {
  display: block;
}

.manual-ticket-guide > div span,
.manual-script > span {
  color: var(--wine);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.manual-ticket-guide > div strong {
  margin-top: 5px;
  font: 400 18px var(--serif);
}

.manual-ticket-guide dl {
  display: grid;
  gap: 0;
  margin: 13px 0 0;
}

.manual-ticket-guide dl > div {
  display: flex;
  padding: 9px 0;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e5ddd7;
  font-size: 10px;
}

.manual-ticket-guide dt {
  color: var(--muted);
}

.manual-ticket-guide dd {
  margin: 0;
  font-weight: 900;
}

.manual-script {
  border: 1px solid #e5c9c1;
  background: var(--manual-coral-soft);
  color: #623c37;
}

.manual-script p {
  margin: 10px 0 0;
  font: 700 15px/1.65 var(--serif);
}

.manual-script small {
  display: block;
  margin-top: 10px;
  color: #8c6963;
  font-size: 9px;
}

.manual-critical {
  display: flex;
  margin-top: 12px;
  padding: 15px 17px;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  background: #342d2a;
  color: #fff;
}

.manual-critical > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  color: #f4c2b7;
  font-weight: 900;
}

.manual-critical p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.manual-critical strong {
  display: block;
  color: #f8d0c7;
  font-size: 11px;
}

.manual-stage-final {
  border-color: #c8b9b4;
  background: linear-gradient(135deg, #fff, #f7efeb);
}

.manual-footer-actions {
  display: flex;
  padding: 18px 4px 2px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.manual-footer-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.manual-footer-actions button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .manual-overview {
    grid-template-columns: 1fr;
  }

  .manual-progress-card {
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: auto;
  }

  .manual-progress-ring {
    width: 72px;
    height: 72px;
  }

  .manual-progress-ring strong {
    font-size: 17px;
  }

  .manual-stage-nav {
    grid-template-columns: repeat(6, minmax(104px, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }

  .manual-stage-nav::-webkit-scrollbar {
    display: none;
  }

  .manual-duty-grid,
  .manual-reference-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .crew-workspace-tabs {
    grid-template-columns: repeat(3, minmax(105px, 1fr));
    overflow-x: auto;
    border-radius: 15px;
    scrollbar-width: none;
  }

  .crew-workspace-tabs::-webkit-scrollbar {
    display: none;
  }

  .crew-workspace-tabs button {
    padding-right: 10px;
    padding-left: 10px;
    white-space: nowrap;
  }

  .manual-overview,
  .manual-stage {
    padding: 17px 13px;
    border-radius: 17px;
  }

  .manual-schedule-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .manual-stage-nav {
    top: 74px;
    margin-right: -13px;
    margin-left: -13px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .manual-stage {
    scroll-margin-top: 148px;
  }

  .manual-stage-head p {
    padding-right: 4px;
  }

  .manual-visual {
    aspect-ratio: 16 / 8;
  }

  .manual-visual figcaption {
    right: 12px;
    bottom: 10px;
    font-size: 11px;
  }

  .manual-check {
    grid-template-columns: 27px minmax(0, 1fr);
    padding: 12px 11px;
  }

  .manual-check > em {
    grid-column: 2;
    width: max-content;
    margin-top: -3px;
  }

  .manual-duty-grid > section {
    padding: 10px;
  }

  .manual-footer-actions {
    display: block;
    text-align: center;
  }

  .manual-footer-actions button {
    margin-top: 12px;
  }

  .manual-preflight-banner {
    display: grid;
    padding: 15px 13px;
  }

  .manual-preflight-banner button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manual-check {
    transition: none;
  }
}
