/* Passenger passport, part 1: the entry stamp (shared), the arrival moment and the start screen entry.
   The booklet is airshow_passport.css. Ink texture is one small image mask; no filters, no blend modes. */
:root {
  --pp-paper: #f5f0e3;
  --pp-ink: #1c1834;
  --pp-sub: #5f596b;
  --pp-rule: #d8cfba;
  --pp-navy: #1D0D78;
}
.pp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- One entry stamp ------------------------------------------------------------------------------------- */
/* Its box is a size container; the stamp takes the largest square that fits and scales its type with it. */
.pps-stamp,
.pp-slot,
.pp-ghost { container-type: size; }
.ppstamp {
  --s: min(100cqw, 100cqh);
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--s);
  height: var(--s);
  padding: 0 calc(var(--s) * 0.13);
  color: var(--ink, #24408f);
  font-family: var(--airshow-ui-font-family, "Pretendard Variable", "Pretendard", sans-serif);
  line-height: 1;
  text-align: center;
  transform: rotate(var(--tilt, -4deg));
  opacity: 0.88;
  -webkit-mask: url("../../images/passport/ink.webp") center / 100% 100% no-repeat;
  mask: url("../../images/passport/ink.webp") center / 100% 100% no-repeat;
}
.ppstamp-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ppstamp-word { font-size: calc(var(--s) * 0.085); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.ppstamp-code { margin: calc(var(--s) * 0.02) 0; font-size: calc(var(--s) * 0.24); font-weight: 850; letter-spacing: 0.02em; }
.ppstamp-city,
.ppstamp-date { max-width: 100%; overflow: hidden; font-size: calc(var(--s) * 0.072); font-weight: 750; letter-spacing: 0.04em; white-space: nowrap; text-overflow: ellipsis; }
.ppstamp-date { margin-top: calc(var(--s) * 0.035); font-weight: 650; }
.ppstamp.is-long .ppstamp-city { font-size: calc(var(--s) * 0.058); letter-spacing: 0.01em; }
.ppstamp[data-shape="rect"] .ppstamp-code,
.ppstamp[data-shape="oval"] .ppstamp-code { font-size: calc(var(--s) * 0.2); }
.ppstamp[data-shape="shield"] { padding-bottom: calc(var(--s) * 0.08); }

/* --- Arrival moment: a passport page slides in, the stamp lands, the miles count up --------------------------- */
.pps-layer { position: fixed; top: 150px; right: 24px; z-index: 2290; pointer-events: none; }
.pps-layer[hidden] { display: none; }
.pps {
  display: grid;
  gap: 12px;
  box-sizing: border-box;
  width: 392px;
  padding: 16px 18px 14px;
  border-radius: 12px;
  background: var(--pp-paper);
  color: var(--pp-ink);
  box-shadow: 0 18px 34px rgba(3, 5, 18, 0.38), 0 2px 5px rgba(3, 5, 18, 0.26);
  font-family: var(--airshow-ui-font-family, "Pretendard Variable", sans-serif);
  font-variant-numeric: tabular-nums;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 200ms ease, transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pps.is-in { opacity: 1; transform: none; }
.pps-page { display: grid; grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: 18px; }
.pps-stamp { display: grid; place-items: center; width: 136px; height: 136px; }
.pps-stamp .ppstamp { opacity: 0; transform: rotate(var(--tilt)) scale(1.5); }
.pps.is-stamped .pps-stamp .ppstamp {
  opacity: 0.9;
  transform: rotate(var(--tilt)) scale(1);
  transition: opacity 120ms ease-out, transform 200ms cubic-bezier(0.3, 1.4, 0.5, 1);
}
.pps-side { display: grid; gap: 6px; min-width: 0; }
.pps-kicker,
.pps-miles { margin: 0; }
.pps-kicker { font-size: 13px; font-weight: 650; color: var(--pp-sub); }
.pps-miles { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 7px; }
.pps-miles b { font-size: clamp(30px, 3vw, 44px); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.pps-miles span { font-size: 16px; font-weight: 650; color: var(--pp-sub); }
.pps-status { display: grid; gap: 5px; margin-top: 4px; }
.pps-bar { display: block; height: 6px; overflow: hidden; border-radius: 3px; background: var(--pp-rule); }
.pps-bar i { display: block; height: 100%; border-radius: inherit; background: var(--pps-tier, #2457b8); transition: width 240ms ease; }
.pps[data-tier="silver"] { --pps-tier: #8d96a4; }
.pps[data-tier="gold"] { --pps-tier: #b8913e; }
.pps[data-tier="platinum"] { --pps-tier: #34373f; }
.pps-status-text { font-size: 13px; font-weight: 650; }
/* Secondary actions: the landing card beside it keeps the one filled button. */
.pps-actions { display: flex; justify-content: flex-end; gap: 6px; }
.pps-open,
.pps-x { min-width: 40px; height: 40px; padding: 0 16px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.pps-open { border: 1.5px solid var(--pp-navy); background: transparent; color: var(--pp-navy); transition: background-color 150ms ease; }
.pps-open:hover { background: rgba(29, 13, 120, 0.08); }
.pps-x { border: 0; background: transparent; color: var(--pp-sub); }
.pps-x:hover { color: var(--pp-ink); }
.pps-open:focus-visible,
.pps-x:focus-visible { outline: 2px solid var(--pp-navy); outline-offset: 2px; }

/* Phone: a small page on the left, clear of the landing strip below and the flight in the middle. */
html.airshow-mobile-runtime .pps-layer { top: 78px; right: auto; left: max(10px, env(safe-area-inset-left, 0px)); }
html.airshow-mobile-runtime .pps { width: 236px; gap: 4px; padding: 8px 10px 6px; border-radius: 10px; }
html.airshow-mobile-runtime .pps-page { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
html.airshow-mobile-runtime .pps-stamp { width: 62px; height: 62px; }
/* The small stamp keeps only its ring and airport code; the page beside it says the rest in readable type. */
html.airshow-mobile-runtime .pps-stamp .ppstamp > span { display: none; }
html.airshow-mobile-runtime .pps-stamp .ppstamp-code { font-size: 17px; }
html.airshow-mobile-runtime .pps-kicker,
html.airshow-mobile-runtime .pps-status-text { font-size: 12px; line-height: 1.2; }
html.airshow-mobile-runtime .pps-miles b { font-size: 24px; }
html.airshow-mobile-runtime .pps-miles span { font-size: 12px; }
html.airshow-mobile-runtime .pps-status { margin-top: 0; gap: 3px; }
html.airshow-mobile-runtime .pps-bar { height: 4px; }
html.airshow-mobile-runtime .pps-open,
html.airshow-mobile-runtime .pps-x { padding: 0 10px; font-size: 13px; }
html.airshow-mobile-runtime .pps-open { flex: 1; }

/* --- Start screen: the passport beside "Your last flight", right under the greeting --------------------------- */
.startup-passport-line { display: flex; flex-wrap: wrap; gap: 8px; box-sizing: border-box; width: 100%; margin: 0 0 10px; }
.startup-root.startup-game-step .startup-passport-line { width: 93.5%; margin: 0 3.25% 8px; }
.startup-passport-line > .startup-my-flight { flex: 1 1 260px; width: auto; margin: 0; }
.startup-root.startup-game-step .startup-passport-line > .startup-my-flight { width: auto; margin: 0; }
.startup-passport-entry {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 40px;
  min-width: 0;
  padding: 6px 14px 6px 10px;
  border: 1px solid rgba(214, 184, 110, 0.55);
  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 150ms ease, background-color 150ms ease;
}
.startup-passport-line:not(:has(.startup-my-flight)) .startup-passport-entry { flex: 1 1 auto; }
.startup-passport-entry:hover,
.startup-passport-entry:focus-visible { border-color: #d6b86e; background: rgba(6, 10, 22, 0.82); }
.startup-passport-entry:focus-visible { outline: 2px solid #9fdfff; outline-offset: 2px; }
.startup-passport-entry > b { flex: none; font-weight: 700; }
.spr-book { position: relative; flex: none; width: 18px; height: 24px; border-radius: 2px 4px 4px 2px; background: #1D0D78; box-shadow: inset 2px 0 0 rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(214, 184, 110, 0.7); }
.startup-passport-entry[data-cover="burgundy"] .spr-book { background: #5c1430; }
.startup-passport-entry[data-cover="forest"] .spr-book { background: #143f2f; }
.startup-passport-entry[data-cover="graphite"] .spr-book { background: #2a2c32; }
.spr-book i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -3px; border: 1.3px solid #d6b86e; border-radius: 50%; }
/* The cover in miniature (start screen side panel only; airshow_startup_side_panels.css shows it): foil on the
   cover colour, the same colours as the book (airshow_passport.css). */
.spr-cover { display: none; }
.startup-passport-entry { --spr-cover: #1D0D78; --spr-foil: #d6b86e; }
.startup-passport-entry[data-cover="burgundy"] { --spr-cover: #5c1430; }
.startup-passport-entry[data-cover="forest"] { --spr-cover: #143f2f; }
.startup-passport-entry[data-cover="graphite"] { --spr-cover: #2a2c32; --spr-foil: #cdd2da; }
.spr-cover-art { display: block; width: 100%; height: 100%; overflow: visible; }
.spr-c-cover { fill: var(--spr-cover); }
.spr-c-spine { fill: rgba(0, 0, 0, 0.3); }
.spr-c-sheen { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; }
.spr-c-foil { stroke: var(--spr-foil); }
.spr-c-solid { fill: var(--spr-foil); }
.spr-c-stem { fill: none; stroke: var(--spr-foil); stroke-width: 0.8; stroke-linecap: round; }
.spr-c-plane { fill: var(--spr-foil); stroke: var(--spr-cover); stroke-width: 1.1; paint-order: stroke; }
.spr-c-text { fill: var(--spr-foil); font-family: var(--airshow-ui-font-family, "Pretendard Variable", "Pretendard", sans-serif); }
.spr-c-title { font-size: 10.5px; font-weight: 700; letter-spacing: 3px; }
.spr-c-brand { font-size: 6.2px; font-weight: 650; letter-spacing: 1.3px; }
.spr-meta { display: flex; min-width: 0; overflow: hidden; color: rgba(246, 242, 234, 0.76); white-space: nowrap; }
.spr-meta span + span::before { content: "·"; margin: 0 6px; }
@media (max-height: 500px) and (orientation: landscape) {
  .startup-passport-entry { min-height: 40px; font-size: 13px; }
  .startup-passport-line,
  .startup-root.startup-game-step .startup-passport-line { margin-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .pps,
  .pps.is-stamped .pps-stamp .ppstamp { transition: none; }
  .pps { transform: none; }
  .pps-stamp .ppstamp { transform: rotate(var(--tilt)); }
}
