/* Keep the homepage controls compact with a visible count and generous hit areas. */
body[data-page="start"] .personnel-quantity {
  width: max-content;
  max-width: calc(100% - 24px);
  grid-template-columns: auto 36px 2ch 36px;
  gap: 3px;
  margin: 0 12px 12px auto;
  padding: 3px;
  border-color: #4b4b51;
}
body[data-page="start"] .personnel-quantity > span { padding-inline: 7px 4px; }
body[data-page="start"] .personnel-quantity button {
  width: 36px;
  height: 36px;
  border: 0;
}
body[data-page="start"] .personnel-role-actions .personnel-quantity {
  margin: 0;
  min-width: 0;
}

@media (max-width: 760px) {
  :root {
    --site-gutter: clamp(14px, 4.5vw, 25px);
    --elevents-display: clamp(34px, 9.7vw, 60px);
    --elevents-section: clamp(27px, 7vw, 42px);
    --elevents-lead: 16px;
    --mobile-dock: calc(62px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(var(--mobile-dock) + 12px);
  }
  .launch, .jobs-hero-grid, .contact-rail, .about-hero-inner { min-width: 0; }
  .launch-copy, .jobs-hero-copy, .contact-intro { min-width: 0; }
  html body .launch-label .launch-location { display: inline-block; white-space: nowrap; }
  html body main :is(.launch-copy, .jobs-hero, .contact-intro, .about-hero) h1 {
    overflow-wrap: break-word;
    text-wrap: balance;
  }
  html body main :is(.launch-copy, .jobs-hero-copy, .contact-intro, .about-hero-inner) h1 {
    text-wrap: pretty;
  }
  html body :is(header.header, header.el-header) :is(.crew-basket-toggle, .mobile-menu, .preview-menu-toggle) {
    min-height: 44px;
  }
  html body header.header nav .menu-group a { min-height: 44px; }
  body .preview-dock {
    width: min(100%, 430px);
    min-height: var(--mobile-dock);
    padding: 3px 6px calc(3px + env(safe-area-inset-bottom, 0px));
    border-radius: 14px 14px 0 0;
  }
  body .preview-dock a { min-height: 54px; font-size: 12px; }
  body .back-to-top {
    bottom: calc(var(--mobile-dock) + 10px);
    right: var(--site-gutter);
    width: 46px;
    height: 46px;
  }
  body .back-to-top svg { width: 42px; height: 42px; }
  body[data-page="eventpersonal"] .crew-quick {
    bottom: calc(var(--mobile-dock) + 10px);
    right: calc(var(--site-gutter) + 56px);
  }
  body .crew-announcer.crew-announcer-visible { bottom: calc(var(--mobile-dock) + 66px); }
  body .cookie-notice { bottom: calc(var(--mobile-dock) + 10px); max-height: calc(100dvh - var(--mobile-dock) - 26px); overflow: auto; }
  body .cookie-notice-actions :is(a, button), body .cookie-settings [data-cookie-close] { min-height: 44px; }
  body .crew-basket { padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  body .crew-basket-row strong { min-width: 0; overflow-wrap: anywhere; }
  body .crew-basket :is([data-basket-close], .crew-quantity button) { width: 44px; height: 44px; flex: none; }
  body .crew-basket-footer { padding-top: 12px; }
  body .crew-basket-footer a { display: grid; align-items: center; min-height: 44px; }
  html body main #crew .category-tabs button { min-height: 44px; }
  html body main #crew .crew-product .role-card h3 { overflow-wrap: anywhere; }
  html body main #crew .crew-product .role-card p { font-size: 14px; }
  html body .personnel-quantity {
    grid-template-columns: minmax(0, 1fr) 44px minmax(2ch, auto) 44px;
    gap: 3px;
  }
  html body .personnel-quantity button { width: 44px; height: 44px; }
  html body .personnel-quantity > span { font-size: 11px; }
  body[data-page="start"] .crew-product .personnel-quantity {
    margin-right: 10px;
    grid-template-columns: auto 44px 2ch 44px;
  }
  body[data-page="start"] .personnel-role-actions .personnel-quantity {
    grid-template-columns: auto 44px 2ch 44px;
  }
  html body :is(#role-dialog, #request-dialog, #apply-dialog, #contact-review, #cookie-settings) {
    max-width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }
  html body :is(#role-dialog, #request-dialog, #apply-dialog) [data-close] { min-width: 44px; min-height: 44px; }
  html body #request-dialog .field :is(input, select, textarea),
  html body #apply-dialog .field :is(input, select, textarea),
  html body #crew-search { font-size: 16px; }
  html body #request-dialog .form-nav { position: static; }
  html body :is(.contact-faq-filters, .contact-review-head) button,
  html body .jobs-role-list summary { min-height: 44px; }
  html body .contact-direct a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  html body footer.footer { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  html body footer.footer nav { gap: 3px; }
  html body footer.footer nav a { display: inline-flex; align-items: center; min-height: 40px; }
}

@media (max-width: 480px) {
  html body:is([data-page="start"], [data-page="eventpersonal"]) main #crew .role-grid { grid-template-columns: minmax(0, 1fr); }
  html body:is([data-page="start"], [data-page="eventpersonal"]) main #crew .crew-product .role-card-copy { min-height: 0; padding: 14px; }
  html body:is([data-page="start"], [data-page="eventpersonal"]) main #crew .crew-product .role-card-photo { aspect-ratio: 1.65; }
  html body #request-dialog .field-grid { grid-template-columns: minmax(0, 1fr); }
  html body #request-dialog .role-choices { grid-template-columns: minmax(0, 1fr); }
  html body #request-dialog :is(.field, .role-choice) { min-width: 0; }
}

@media (max-height: 520px) and (max-width: 950px) {
  html body:is([data-page="start"], [data-page="eventpersonal"]) #role-dialog .role-detail-layout {
    grid-template-columns: minmax(0, .65fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  html body:is([data-page="start"], [data-page="eventpersonal"]) #role-dialog .role-detail-copy { padding-top: 42px; }
}

.cookie-tab {
  position: fixed;
  z-index: 29;
  inset: auto 0 max(155px, 15vh) auto;
  display: grid;
  place-items: center;
  min-width: 38px;
  padding: 14px 8px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border: 1px solid #ffffff2b;
  border-right: 3px solid #f6531d;
  border-radius: 0 10px 10px 0;
  background: #202023;
  color: #fff;
  font: 700 12px/1.2 var(--finish-type, system-ui);
  cursor: pointer;
}
.cookie-tab:is(:hover, :focus-visible) { background: #f6531d; color: #171719; }
.cookie-tab:focus-visible { outline: 2px solid #202023; outline-offset: 2px; }
.cookie-tab[hidden] { display: none; }
body.footer-in-view .cookie-tab, body.modal-open .cookie-tab { visibility: hidden; pointer-events: none; }

@media (max-width: 760px) {
  .cookie-tab {
    inset: auto auto calc(var(--mobile-dock) + 8px) 0;
    min-width: 64px;
    min-height: 44px;
    padding: 6px 10px;
    writing-mode: horizontal-tb;
    transform: none;
    border: 1px solid #ffffff2b;
    border-left: 3px solid #f6531d;
    border-radius: 0 9px 9px 0;
  }
  body.ed-legal .el-legal-section :is(h2, h3, p, a) {
    hyphens: auto;
    overflow-wrap: anywhere;
  }
}
