/* Boarding calls (airshow_boarding_calls*.js).
   The switch on the pilot card is an overhead cabin sign: a dark plate whose bell lights warm white when calls are
   on. The opt-in is one printed sheet of cabin announcement (navy rule, the call quoted in the text, one navy key).
   The start screen's list and the "no longer on the map" note are printed paper like the "Now boarding" pass. */

/* --- Cabin sign on the pilot card ----------------------------------------------------------------------------- */
.boarding-sign {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  margin: 12px 0 2px;
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, #272b36, #1d2029);
  color: #eef1f7;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.boarding-sign[hidden] { display: none; }
.boarding-sign:disabled { cursor: progress; opacity: 0.75; }
.boarding-sign:hover { border-color: rgba(255, 255, 255, 0.24); }
.boarding-sign:focus-visible { outline: 2px solid #9fdfff; outline-offset: 2px; }
.boarding-sign-plate {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: #121419;
  color: rgba(238, 241, 247, 0.3);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.boarding-sign-plate svg { width: 20px; height: 20px; }
.boarding-sign-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.boarding-sign-label { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
/* The state wraps instead of being cut (long languages, a phone held sideways). */
.boarding-sign-state { font-size: 12px; font-weight: 500; line-height: 1.3; color: rgba(200, 212, 232, 0.72); text-wrap: pretty; }
.boarding-sign-lamp {
  position: relative;
  flex: none;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: #3a3f4c;
  transition: background-color 0.2s ease;
}
.boarding-sign-lamp::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c9ceda;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease;
}
.boarding-sign.is-on .boarding-sign-plate { background: #2a2416; color: #ffe2a3; }
.boarding-sign.is-on .boarding-sign-state { color: #ffe2a3; }
.boarding-sign.is-on .boarding-sign-lamp { background: #c9a24f; }
.boarding-sign.is-on .boarding-sign-lamp::after { transform: translateX(14px); background: #fff7e2; }
/* On a short screen the sign is a lit bell beside the pilot card's own keys (same size), so the card keeps its height. */
.boarding-sign.is-compact {
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border-radius: 7px;
  background: #121419;
}
.boarding-sign.is-compact .boarding-sign-plate { width: 100%; height: 100%; border: 0; border-radius: 7px; box-shadow: none; }
.boarding-sign.is-compact .boarding-sign-plate svg { width: 15px; height: 15px; }
.boarding-sign.is-compact .boarding-sign-text,
.boarding-sign.is-compact .boarding-sign-lamp { display: none; }
.boarding-sign.is-compact.is-on { border-color: #c9a24f; }
.topbar-player-identity.has-boarding-bell { padding-right: 100px; }

/* --- Printed paper shared by the opt-in, the list and the landed note ----------------------------------------- */
.boarding-card,
.boarding-list,
.startup-landed {
  --bc-paper: #f8f6f1;
  --bc-ink: #17182d;
  --bc-text: #3b3d52;
  --bc-muted: #5f6072;
  --bc-rule: rgba(23, 24, 45, 0.22);
  --bc-navy: #1d0d78;
  box-sizing: border-box;
  border-radius: 12px;
  background: var(--bc-paper);
  color: var(--bc-ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.24);
  font-family: var(--airshow-ui-font-family, "Pretendard Variable", "Pretendard", sans-serif);
  text-align: left;
}
.startup-landed { background: linear-gradient(90deg, #96b8ff, #cf9eff) top / 100% 4px no-repeat, var(--bc-paper); }
.boarding-card p, .boarding-list p, .startup-landed p { margin: 0; }
.boarding-card-btn,
.boarding-list-add,
.startup-landed-btn {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--bc-navy);
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.boarding-card-btn:hover, .boarding-list-add:hover, .startup-landed-btn:hover,
.boarding-card-btn:focus-visible, .boarding-list-add:focus-visible, .startup-landed-btn:focus-visible { background: #2d1ba8; }
.boarding-card-quiet, .startup-landed-quiet, .boarding-list-stop {
  border: 1px solid var(--bc-rule);
  background: transparent;
  color: var(--bc-ink);
}
.boarding-card-quiet:hover, .startup-landed-quiet:hover, .boarding-list-stop:hover,
.boarding-card-quiet:focus-visible, .startup-landed-quiet:focus-visible { background: rgba(23, 24, 45, 0.06); }
.boarding-card button:focus-visible, .boarding-list button:focus-visible, .startup-landed button:focus-visible {
  outline: 2px solid #004aad;
  outline-offset: 2px;
}

/* --- The opt-in: one printed cabin announcement --------------------------------------------------------------- */
.boarding-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 2147483647; /* over the pilot card (2147483646), whose sign it answers, and the docks */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px;
  background: rgba(4, 6, 14, 0.42);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.boarding-card-scrim[hidden] { display: none; }
.boarding-card-scrim.open { opacity: 1; }
.boarding-card {
  width: min(440px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 18px 22px 16px;
  border-top: 3px solid var(--bc-navy);
  border-radius: 4px 4px 12px 12px;
  transform: translateY(10px);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.boarding-card-scrim.open .boarding-card { transform: none; }
.boarding-card-head { display: flex; align-items: center; gap: 8px; color: var(--bc-navy); }
.boarding-card-pa { flex: none; width: 22px; height: 22px; }
.boarding-card-kicker { font-size: 12.5px; font-weight: 650; line-height: 1.2; }
.boarding-card-title { margin: 8px 0 0; font-size: 20px; font-weight: 750; line-height: 1.25; letter-spacing: -0.01em; }
.boarding-card-line { margin-top: 8px !important; font-size: 14px; line-height: 1.5; color: var(--bc-text); text-wrap: pretty; }
/* The call itself, quoted the way an announcement reads it out: a ruled line in the text, not a box. */
.boarding-card-quote {
  margin: 12px 0 0 !important;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--bc-navy);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--bc-ink);
}
.boarding-card-quote::before { content: "\201C"; }
.boarding-card-quote::after { content: "\201D"; }
.boarding-card-note { margin: 12px 0 0 !important; font-size: 13.5px; line-height: 1.45; color: var(--bc-ink); text-wrap: pretty; }
.boarding-card-note:empty,
.boarding-card-scrim[data-mode="ok"] .boarding-card-note,
.boarding-card-scrim:not([data-mode="ok"]) .boarding-card-quiet { display: none; }
.boarding-card-actions { display: flex; gap: 8px; margin-top: 16px; }
.boarding-card-on { flex: 1 1 auto; }
.boarding-card-small { margin-top: 10px !important; font-size: 12px; line-height: 1.35; color: var(--bc-muted); }

/* --- Start screen: the line with the followed pilots and its list --------------------------------------------- */
.startup-calls-line {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  margin: 0 0 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  background: rgba(6, 10, 22, 0.62);
  color: #f6f2ea;
  font-family: var(--airshow-ui-font-family, "Pretendard Variable", "Pretendard", sans-serif);
  font-size: 14px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.startup-root.startup-game-step .startup-calls-line { width: 93.5%; margin: 0 3.25% 8px; }
.startup-calls-line:hover, .startup-calls-line:focus-visible { border-color: #ffe2a3; background: rgba(6, 10, 22, 0.82); }
.startup-calls-line:focus-visible { outline: 2px solid #ffe2a3; outline-offset: 2px; }
.startup-calls-label { flex: none; color: rgba(246, 242, 234, 0.76); }
.startup-calls-names { flex: 0 1 auto; min-width: 0; overflow: hidden; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.startup-calls-go { flex: none; margin-left: auto; color: #ffe2a3; font-weight: 650; }
.boarding-list {
  margin: 0 0 10px;
  padding: 14px 16px 14px;
}
.startup-root.startup-game-step .boarding-list { margin: 0 3.25% 8px; }
.boarding-list[hidden] { display: none; }
/* While the list is open in place, the simulator cards step aside (nothing covers the slips). */
.startup-root.startup-boarding-calls-open .startup-grid-hero { display: none; }
.boarding-list-title { font-size: 16px; font-weight: 750; letter-spacing: -0.01em; }
.boarding-list-rows { margin: 8px 0 10px; padding: 0; list-style: none; }
.boarding-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--bc-rule);
}
.boarding-list-row:last-child { border-bottom: 1px solid var(--bc-rule); }
.boarding-list-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.boarding-list-who b { font-size: 15px; font-weight: 750; }
.boarding-list-pilot { overflow: hidden; font-size: 12.5px; color: var(--bc-muted); white-space: nowrap; text-overflow: ellipsis; }
.boarding-list-remove {
  flex: none;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--bc-rule);
  border-radius: 7px;
  background: transparent;
  color: var(--bc-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.boarding-list-remove:hover { background: rgba(23, 24, 45, 0.06); }
.boarding-list-status { font-size: 12.5px; line-height: 1.4; color: var(--bc-muted); }
.boarding-list-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.boarding-list-stop {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Start screen: a call whose flight cannot be seated -------------------------------------------------------
   One row in the place of the "Now boarding" pass, which waits underneath until this slip is closed. */
.startup-landed {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 13px 14px 12px 16px;
}
.startup-root.startup-game-step .startup-landed { margin: 0 3.25% 8px; }
.startup-landed ~ .startup-boarding { display: none; }
.startup-landed-icon { flex: none; width: 30px; height: 30px; color: var(--bc-navy); }
.startup-landed-text { flex: 1 1 auto; min-width: 0; }
.startup-landed-kicker { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--bc-muted); }
.startup-landed-kicker b { margin-left: 4px; font-weight: 750; color: var(--bc-ink); }
.startup-landed-title { margin-top: 2px !important; font-size: 17px; font-weight: 750; line-height: 1.3; letter-spacing: -0.01em; }
.startup-landed-line { margin-top: 2px !important; font-size: 13.5px; line-height: 1.35; color: var(--bc-text); }
.startup-landed-actions { flex: none; display: flex; gap: 8px; }
.startup-landed-btn { height: 40px; font-size: 14px; }
@media (max-width: 520px) and (orientation: portrait) {
  .startup-landed { flex-wrap: wrap; }
  .startup-landed-text { flex-basis: calc(100% - 46px); }
  .startup-landed-actions { flex: 1 1 100%; }
  .startup-landed-actions .startup-landed-btn:first-child { flex: 1 1 auto; }
}
/* While a tapped call is looked up, the first step stays still instead of offering other flights. */
.startup-root.startup-boarding-call-lookup .startup-boarding,
.startup-root.startup-boarding-call-lookup .startup-grid-hero { opacity: 0.35; pointer-events: none; }

/* Short screens (a phone held sideways). */
@media (max-height: 500px) {
  .boarding-card { padding: 12px 18px 12px; }
  .boarding-card-title { margin-top: 4px; font-size: 17px; }
  .boarding-card-line { margin-top: 4px !important; font-size: 13px; line-height: 1.4; }
  .boarding-card-quote { margin-top: 8px !important; font-size: 14px; }
  .boarding-card-actions { margin-top: 10px; }
  .boarding-card-btn { height: 36px; font-size: 13.5px; }
  .boarding-card-small { display: none; }
  .startup-calls-line { min-height: 30px; margin-bottom: 6px; padding: 4px 12px; font-size: 13px; }
  .startup-root.startup-game-step .startup-calls-line { margin-bottom: 6px; }
  /* The list as one strip: the pilots as tags with their Remove key, then the keys. */
  .boarding-list { padding: 8px 12px 8px; }
  .boarding-list-title { font-size: 14px; }
  .boarding-list-rows { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
  .boarding-list-row, .boarding-list-row:last-child { gap: 6px; padding: 2px 3px 2px 10px; border: 1px solid var(--bc-rule); border-radius: 999px; }
  .boarding-list-who b { font-size: 13px; }
  .boarding-list-pilot, .boarding-list-status { display: none; }
  .boarding-list-remove { height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; }
  .boarding-list-actions { margin-top: 6px; }
  .boarding-list-add, .boarding-list-stop { height: 30px; padding: 0 12px; font-size: 13px; }
  .startup-landed { gap: 10px; margin-bottom: 10px; padding: 9px 10px 8px 12px; }
  .startup-landed-icon { width: 24px; height: 24px; }
  .startup-landed-title { font-size: 15px; }
  .startup-landed-line { display: none; }
  .startup-landed-btn { height: 34px; padding: 0 12px; font-size: 13.5px; }
}

/* Korean wraps between words, not inside them. */
html:lang(ko) .boarding-card, html:lang(ko) .boarding-list, html:lang(ko) .startup-landed, html:lang(ko) .boarding-sign { word-break: keep-all; }

@media (prefers-reduced-motion: reduce) {
  .boarding-sign, .boarding-sign-plate, .boarding-sign-lamp, .boarding-sign-lamp::after,
  .boarding-card-scrim, .boarding-card { transition: none; }
  .boarding-card { transform: none; }
}
