/* ==========================================================================
   Passenger app screens, as shown on the website.
   These are the app's real screens (Home, trip Overview, Jet Lag, Timeline,
   Packing) redrawn in the Passenger design system: Night and Dawn tokens,
   Petrona headlines, Fira Mono data, Albert Sans text. Copy and structure come
   from the app; the trip is sample data (LHR to JFK).

   Each screen is built at its native 390×844 and scaled by --s. Put
   data-phase="night|dawn" on a .device to pin one phase.

   They are pictures, not controls: the markup is aria-hidden and uses spans
   instead of buttons and links, so nothing steals keyboard focus.
   ========================================================================== */

.device {
  --s: .82;
  position: relative; flex: none;
  width: calc(390px * var(--s)); height: calc(844px * var(--s));
  border-radius: calc(46px * var(--s)); overflow: hidden;
  background: var(--bg); color: var(--tx);
  box-shadow: var(--sh), 0 0 0 calc(7px * var(--s)) var(--sf2);
}
.device--hero { --s: .9; }
@media (max-width: 960px) { .device--hero { --s: .82; } }
@media (max-width: 640px) { .device, .device--hero { --s: .76; } }

.ap {
  position: absolute; left: 0; top: 0; width: 390px; height: 844px; overflow: hidden;
  transform: scale(var(--s)); transform-origin: 0 0;
  background: var(--bg); color: var(--tx);
  font: 400 16px/1.5 var(--font-body); text-align: left;
}
.ap__body { padding: var(--sp8) var(--sp6) 0; display: flex; flex-direction: column; gap: var(--sp4); position: relative; }
.ap .ic { width: 24px; height: 24px; }
.ap .ic.sm { width: 20px; height: 20px; }
.ap .ic.xs { width: 16px; height: 16px; }
.ap .t21 { font-size: 21.2px; } .ap .t28 { font-size: 28.1px; } .ap .t37 { font-size: 37.2px; }
.ap .fw5 { font-weight: 500; }
.ap .ok { color: var(--ok); } .ap .in { color: var(--in); } .ap .em { color: var(--em); } .ap .du { color: var(--du); }
.ap .grow { flex: 1; min-width: 0; }
.ap-glow { position: absolute; pointer-events: none; border-radius: 50%; filter: blur(50px); opacity: .55; background: radial-gradient(circle at 50% 60%, var(--glow-1) 0%, var(--glow-2) 38%, var(--glow-3) 72%, transparent 100%); }
.ap-glow.g-home { width: 220px; height: 150px; right: -90px; top: -100px; }

/* Buttons (pictures of them) */
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp2); min-height: 44px; padding: 0 var(--sp6); border-radius: 999px; font: 500 15px/1 var(--font-body); white-space: nowrap; }
.ap-btn--p { background: var(--acf); color: var(--onac); }
.ap-btn--s { background: var(--sf2); color: var(--tx); }
.ap-btn--icon { width: 44px; padding: 0; }

/* Bottom bar: Home, Trips, add, Stats, Account */
.ap-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 88px; padding: var(--sp2) var(--sp4) var(--sp4); display: flex; justify-content: space-between; align-items: center; background: color-mix(in srgb, var(--ph) 6%, var(--sf1)); box-shadow: var(--sh); }
.ap-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 56px; min-height: 56px; color: var(--mu); font-size: 11px; font-weight: 500; }
.ap-tab.on { color: var(--tx); }
.ap-pill { width: 56px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.ap-tab.on .ap-pill { background: var(--acf); color: var(--onac); }
.ap-fab { width: 56px; height: 56px; border-radius: 999px; background: var(--acf); color: var(--onac); display: flex; align-items: center; justify-content: center; margin-top: -22px; }

/* Home */
.ap-card { padding: var(--sp6); display: flex; flex-direction: column; gap: var(--sp3); }
.ap-card--hero { position: relative; overflow: hidden; }
.ap-route { display: flex; align-items: center; gap: var(--sp4); position: relative; }
.ap-route__code { font-size: 28.1px; line-height: 1.1; }
.ap-route__line { flex: 1; display: flex; align-items: center; gap: var(--sp2); color: var(--mu); }
.ap-route__line i { flex: 1; height: 1px; background: currentColor; opacity: .5; }
.ap-route--lg .ap-route__code { font-size: 37.2px; }
.ap-lead { color: var(--act); position: relative; }
.ap-prio { padding: var(--sp4); display: flex; gap: var(--sp4); align-items: center; }
.ap-prio__icon { width: 44px; height: 44px; border-radius: 999px; background: var(--sf2); display: flex; align-items: center; justify-content: center; flex: none; }
.ap-prio .dt { font-size: 21.2px; }
.ap-soon { padding: var(--sp4); display: flex; gap: var(--sp4); align-items: center; opacity: .7; }

/* Trip header and tab strip (all trip screens) */
.ap-th { padding: var(--sp8) var(--sp6) 0; display: flex; flex-direction: column; gap: var(--sp3); }
.ap-th__bar { display: flex; align-items: center; justify-content: space-between; }
.ap-th__bar .end { display: flex; gap: var(--sp2); }
.ap-th__meta { display: flex; flex-direction: column; gap: 2px; }
.ap-strip { display: flex; justify-content: space-between; padding: 0 var(--sp6); margin-top: var(--sp2); box-shadow: inset 0 -2px 0 var(--sf2); }
.ap-strip span { display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; color: var(--mu); box-shadow: inset 0 -2px 0 transparent; }
.ap-strip span.on { color: var(--tx); box-shadow: inset 0 -2px 0 var(--acf); }
.ap-pane { padding: var(--sp4) var(--sp6) 0; display: flex; flex-direction: column; gap: var(--sp4); position: relative; }

/* Overview */
.ap-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--sp3); border-radius: 999px; background: color-mix(in srgb, var(--em) 16%, var(--sf1)); color: var(--em); font-size: 11px; font-weight: 500; }
.ap-cost { padding: var(--sp4); display: flex; gap: var(--sp3); }
.ap-cost .ic { color: var(--er); }
.ap-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp3); }
.ap-tile2 { padding: var(--sp4) var(--sp2); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ap-tile2 .dt { font-size: 21.2px; line-height: 1.2; }
.ap-chipfull { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp2); min-height: 36px; padding: 0 var(--sp4); border-radius: 999px; background: var(--sf2); font-size: 14px; }
.ap-chipfull i { width: 8px; height: 8px; border-radius: 999px; background: var(--acf); }

/* Jet lag */
.ap-model { padding: var(--sp6); display: flex; flex-direction: column; gap: var(--sp3); }
.ap-model__shift { display: flex; align-items: flex-end; gap: var(--sp3); }
.ap-model__num { font-family: var(--font-head); font-size: 86.6px; line-height: .9; color: var(--act); }
.ap-bar { height: 8px; border-radius: 999px; background: var(--sf2); overflow: hidden; }
.ap-bar i { display: block; height: 100%; width: 34%; border-radius: 999px; background: var(--acf); }
.ap-bar-labels { display: flex; justify-content: space-between; }
.ap-chip { display: inline-flex; align-self: flex-start; align-items: center; height: 32px; padding: 0 var(--sp4); border-radius: 999px; background: var(--sf2); color: var(--act); font-size: 12px; font-weight: 500; }
.ap-days { display: flex; gap: var(--sp3); padding: 0 var(--sp1); }
.ap-days span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--mu); }
.ap-days i { width: 10px; height: 10px; border-radius: 999px; background: var(--sf2); }
.ap-days .on { color: var(--tx); } .ap-days .on i { background: var(--acf); }
.ap-plan { padding: var(--sp4); display: flex; flex-direction: column; gap: var(--sp3); }
.ap-plan__head { display: flex; align-items: center; gap: var(--sp3); }
.ap-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp2); }
.ap-time { background: var(--sf2); border-radius: var(--r); padding: var(--sp3) var(--sp2); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ap-time .dt { font-size: 15px; }
.ap-note { display: flex; align-items: center; gap: var(--sp2); color: var(--mu); font-size: 14px; }

/* Timeline */
.ap-tl2 { display: flex; flex-direction: column; gap: var(--sp2); }
.ap-tl2__day { margin-top: var(--sp3); }
.ap-tl2__row { display: flex; gap: var(--sp3); }
.ap-tl2__rail { display: flex; flex-direction: column; align-items: center; width: 20px; flex: none; }
.ap-tl2__mark { width: 20px; height: 20px; margin-top: 4px; flex: none; display: flex; align-items: center; justify-content: center; }
.ap-tl2__mark .dot { width: 14px; height: 14px; border-radius: 999px; background: var(--acf); }
.ap-tl2__line { flex: 1; width: 2px; background: var(--sf2); margin: 2px 0; }
.ap-tl2__body { padding-bottom: var(--sp4); display: flex; flex-direction: column; gap: 2px; }
.ap-tl2__body .done { color: var(--mu); text-decoration: line-through; }
.ap-tl2__body p:nth-child(2) { color: var(--mu); font-size: 14px; }

/* Packing */
.ap-group { padding: 0; overflow: hidden; }
.ap-group__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp3) var(--sp4); }
.ap-pack { display: flex; align-items: center; gap: var(--sp3); min-height: 48px; padding: 0 var(--sp4); box-shadow: inset 0 1px 0 var(--sf2); }
.ap-pack.done span { color: var(--mu); }
.ap-pack.add { color: var(--mu); }
.ap-soonrow { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 var(--sp4); border-radius: var(--r); background: var(--sf1); font-weight: 500; }

.ap .ta-r { text-align: right; }
.ap .er { color: var(--er); }
.ap .rel { position: relative; }
.ap .dt.lb { font-size: 12px; }
