A wallet-style boarding pass that flips in 3D to its back (baggage, fare, confirmation and a drawn seat map), pages between two travellers with stretching dots, and sits under a live status strip: a pulsing on-time pill, a rolling boarding countdown and a gate change banner that slides in while the gate on the pass rolls to its new value. Below it, an add-to-wallet button with loading and done states and a trip timeline with the current step pulsing.
Or let your agent fetch it: connect the gluestack MCP server, then ask for boarding-pass.

Details
1import { useEffect, useMemo, useRef, useState, type ReactNode } from 'react';2import { Pressable, ScrollView, StyleSheet, Text, View, useColorScheme, useWindowDimensions, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';3import Animated, {4 Easing,5 FadeIn,6 FadeInDown,7 interpolate,8 runOnJS,9 useAnimatedReaction,10 useAnimatedScrollHandler,11 useAnimatedStyle,12 useSharedValue,13 withDelay,14 withRepeat,15 withSequence,16 withSpring,17 withTiming,18 type SharedValue,19} from 'react-native-reanimated';20import { useSafeAreaInsets } from 'react-native-safe-area-context';21import { LinearGradient } from 'expo-linear-gradient';22import Svg, { Circle, Ellipse, Line, Path } from 'react-native-svg';23import { Bell, Check, ChevronLeft, DoorOpen, Luggage, Plane, PlaneTakeoff, RotateCw, Share2, ShieldCheck, Sun, TriangleAlert, Wallet, X, type LucideIcon } from 'lucide-react-native';2425// ─── Brand ──────────────────────────────────────────────────────────────────26// The screen's accent and name. Every accent colour below derives from these, so changing them rebrands the screen.2728const ACCENT = '#0E7C86';29const ACCENT_DARK = '#56CFD8'; // the accent as text and icons on dark backgrounds30const ON_ACCENT = '#FFFFFF'; // text and icons on an accent fill31const APP_NAME = 'Meridian Air'; // the airline's name3233/** `hex` at `alpha` opacity, as rgba(). */34function tint(hex: string, alpha: number) {35 const n = parseInt(hex.slice(1), 16);36 return `rgba(${(n >> 16) & 255}, ${(n >> 8) & 255}, ${n & 255}, ${alpha})`;37}3839/** `hex` mixed toward black (amount > 0) or white (amount < 0); amount from -1 to 1. */40function shade(hex: string, amount: number) {41 const n = parseInt(hex.slice(1), 16);42 const target = amount < 0 ? 255 : 0;43 const p = Math.abs(amount);44 const c = (v: number) => Math.round(v + (target - v) * p).toString(16).padStart(2, '0');45 return `#${c((n >> 16) & 255)}${c((n >> 8) & 255)}${c(n & 255)}`.toUpperCase();46}4748/** `hex` with its hue turned by `deg` and its lightness and saturation moved by `light` and `sat` (HSL, -1 to 1), for colours that run warmer, cooler or brighter than the accent. */49function spin(hex: string, deg: number, light = 0, sat = 0) {50 const n = parseInt(hex.slice(1), 16);51 const r = ((n >> 16) & 255) / 255;52 const g = ((n >> 8) & 255) / 255;53 const b = (n & 255) / 255;54 const max = Math.max(r, g, b);55 const min = Math.min(r, g, b);56 const d = max - min;57 const s = Math.min(1, Math.max(0, (d === 0 ? 0 : d / (1 - Math.abs(max + min - 1))) + sat));58 const l = Math.min(1, Math.max(0, (max + min) / 2 + light));59 const h0 = d === 0 ? 0 : max === r ? ((g - b) / d + 6) % 6 : max === g ? (b - r) / d + 2 : (r - g) / d + 4;60 const h = (((h0 * 60 + deg) % 360) + 360) % 360;61 const a = s * Math.min(l, 1 - l);62 const f = (m: number) => {63 const k = (m + h / 30) % 12;64 return Math.round(255 * (l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1)))).toString(16).padStart(2, '0');65 };66 return `#${f(0)}${f(8)}${f(4)}`.toUpperCase();67}6869// ─── Sample data ────────────────────────────────────────────────────────────7071const FLIGHT = {72 number: 'MD 214',73 date: 'Sat 12 Dec 2026',74 aircraft: 'A321neo',75 from: { code: 'SFO', city: 'San Francisco' },76 to: { code: 'JFK', city: 'New York' },77 duration: '5h 25m',78 boards: '9:00 AM',79 departs: '9:40 AM',80 arrives: '6:05 PM',81 terminal: '2',82 gate: 'B14',83 /** The gate the flight moves to when the change comes in. */84 newGate: 'B22',85 confirmation: 'MR7K2Q',86 fare: 'Standard, $283',87 cabin: 'Economy',88 perks: 'Wi-Fi, power, meal',89};9091type Passenger = { id: string; name: string; seat: string; side: string; zone: string; sequence: string; tier: string; flyer: string; ticket: string; bags: string; seed: number };9293const PASSENGERS: Passenger[] = [94 { id: 'maya', name: 'Maya Patel', seat: '14A', side: 'window', zone: '2', sequence: '047', tier: 'Skyline Silver', flyer: 'MA 4821 7730', ticket: '071 2203 885 114', bags: '1 carry-on, 1 checked (23 kg)', seed: 20261212 },95 { id: 'leo', name: 'Leo Patel', seat: '14B', side: 'middle', zone: '2', sequence: '048', tier: 'Skyline Member', flyer: 'MA 6093 1154', ticket: '071 2203 885 115', bags: '1 carry-on', seed: 48151623 },96];9798/** Minutes until boarding when the screen opens. */99const BOARDING_IN = 42;100/** A minute passes every 15 s here so the countdown can be seen ticking. Use the real boarding time in your app. */101const MINUTE_MS = 15000;102/** The gate change arrives on its own after this long; tapping the status pill sends it sooner. */103const GATE_CHANGE_MS = 6000;104105type Step = { id: string; title: string; note: string; time: string; icon: LucideIcon; wait?: { minutes: number; level: number; label: string } };106107const STEPS: Step[] = [108 { id: 'checkin', title: 'Check-in', note: 'Done online, Fri 6:12 PM', time: 'Done', icon: Check },109 { id: 'bags', title: 'Bag drop', note: '1 bag tagged at counter 14', time: '8:02 AM', icon: Luggage },110 { id: 'security', title: 'Security', note: 'Checkpoint B, Terminal 2', time: 'Now', icon: ShieldCheck, wait: { minutes: 12, level: 2, label: 'Light' } },111 { id: 'boarding', title: 'Boarding', note: 'Zone 2 boards third', time: FLIGHT.boards, icon: DoorOpen },112 { id: 'departure', title: 'Departure', note: `Lands in ${FLIGHT.to.city} at ${FLIGHT.arrives}`, time: FLIGHT.departs, icon: PlaneTakeoff },113];114const CURRENT_STEP = 2;115116// Seat map around row 14: the seats other travellers already hold.117const SEAT_ROWS = [12, 13, 14, 15, 16];118const SEAT_COLS = ['A', 'B', 'C', 'D', 'E', 'F'];119const SEATS_TAKEN = ['12A', '12B', '12D', '12F', '13C', '13D', '13E', '14D', '14F', '15A', '15B', '15C', '15E', '16B', '16D', '16E', '16F'];120121// ─── Drawn code ─────────────────────────────────────────────────────────────122123const QR_N = 25;124125/** A QR-shaped code drawn from a fixed seed. It looks right but is not scannable: render the real payload with your QR library. */126function qrPath(seed: number) {127 let s = seed >>> 0;128 const rand = () => {129 s = (s + 0x6d2b79f5) >>> 0;130 let t = Math.imul(s ^ (s >>> 15), 1 | s);131 t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;132 return ((t ^ (t >>> 14)) >>> 0) / 4294967296;133 };134 const ring = (x: number, y: number, ox: number, oy: number, size: number) => {135 const dx = x - ox;136 const dy = y - oy;137 if (dx < 0 || dy < 0 || dx >= size || dy >= size) return null;138 const edge = Math.min(dx, dy, size - 1 - dx, size - 1 - dy);139 return edge !== 1;140 };141 const dark = (x: number, y: number) => {142 const noise = rand() < 0.48;143 for (const [ox, oy] of [[0, 0], [QR_N - 7, 0], [0, QR_N - 7]]) {144 const finder = ring(x, y, ox, oy, 7);145 if (finder !== null) return finder;146 // The quiet band around each finder.147 if (x >= ox - 1 && x <= ox + 7 && y >= oy - 1 && y <= oy + 7) return false;148 }149 const align = ring(x, y, QR_N - 9, QR_N - 9, 5);150 if (align !== null) return align;151 if (x === 6 || y === 6) return (x + y) % 2 === 0;152 return noise;153 };154 let d = '';155 for (let y = 0; y < QR_N; y++) {156 let run = 0;157 for (let x = 0; x <= QR_N; x++) {158 const on = x < QR_N && dark(x, y);159 if (on) run++;160 else if (run) {161 d += `M${x - run} ${y}h${run}v1h${-run}z`;162 run = 0;163 }164 }165 }166 return d;167}168169// ─── Palette ────────────────────────────────────────────────────────────────170171const PRESS = { damping: 16, stiffness: 300, mass: 0.6 };172const TABULAR = { fontVariant: ['tabular-nums' as const] };173const PASS_H = 488;174const BANNER_H = 62;175176function usePalette() {177 const dark = useColorScheme() === 'dark';178 return {179 dark,180 bg: dark ? '#071113' : '#F2F6F6',181 card: dark ? '#0F1C1F' : '#FFFFFF',182 fg: dark ? '#EEF6F6' : '#0C1F22',183 muted: dark ? '#8FA5A8' : '#5E7275',184 faint: dark ? '#5C7275' : '#9AAAAC',185 line: dark ? '#1D2E31' : '#E2EAEA',186 dash: dark ? '#2C4347' : '#C9D6D7',187 pressed: dark ? '#152629' : '#F4F8F8',188 // In the dark, fills lift the accent a little and text and icons use the lighter ACCENT_DARK.189 accent: dark ? spin(ACCENT, 0, 0.06, -0.01) : ACCENT,190 accentText: dark ? ACCENT_DARK : ACCENT,191 accentSoft: dark ? tint(ACCENT_DARK, 0.12) : tint(ACCENT, 0.08),192 ok: dark ? '#4CD39A' : '#0E7F58',193 okSoft: dark ? 'rgba(76,211,154,0.13)' : 'rgba(14,127,88,0.09)',194 warn: dark ? '#F2A65A' : '#B4530A',195 warnSoft: dark ? '#2A2013' : '#FBEEDD',196 warnLine: dark ? '#4A3518' : '#F0D5B0',197 seatTaken: dark ? '#22373B' : '#DCE6E6',198 seatFree: dark ? '#3A5257' : '#BFCFD0',199 // The pass header: the accent deepening toward its corner, a shade deeper in the dark.200 band: (dark ? [shade(ACCENT, 0.48), shade(ACCENT, 0.14)] : [shade(ACCENT, 0.3), ACCENT]) as [string, string],201 };202}203type Palette = ReturnType<typeof usePalette>;204205// ─── Small pieces ───────────────────────────────────────────────────────────206207function Tap({ children, label, onPress, to = 0.94, style }: { children: ReactNode; label: string; onPress?: () => void; to?: number; style?: StyleProp<ViewStyle> }) {208 const scale = useSharedValue(1);209 const anim = useAnimatedStyle(() => ({ transform: [{ scale: scale.value }] }));210 return (211 <Pressable role="button" aria-label={label} onPress={onPress} hitSlop={6} style={style} onPressIn={() => (scale.value = withSpring(to, PRESS))} onPressOut={() => (scale.value = withSpring(1, PRESS))}>212 <Animated.View style={anim}>{children}</Animated.View>213 </Pressable>214 );215}216217/** The airline's mark: a globe with one meridian. */218function BrandMark({ size = 32 }: { size?: number }) {219 return (220 <View style={[styles.brandMark, { width: size, height: size, borderRadius: size / 2 }]}>221 <Svg width={size * 0.54} height={size * 0.54} viewBox="0 0 24 24" fill="none" stroke={ACCENT} strokeWidth={2.4} strokeLinecap="round">222 <Circle cx={12} cy={12} r={9.5} />223 <Ellipse cx={12} cy={12} rx={4} ry={9.5} />224 <Line x1={2.5} y1={12} x2={21.5} y2={12} />225 </Svg>226 </View>227 );228}229230/** Text that rolls to its next value: the old one leaves upward as the new one rises in. */231function Roll({ value, style, rise = 14 }: { value: string; style?: StyleProp<TextStyle>; rise?: number }) {232 const [pair, setPair] = useState({ now: value, before: value });233 const t = useSharedValue(1);234 useEffect(() => {235 if (value === pair.now) return;236 setPair({ now: value, before: pair.now });237 t.value = 0;238 t.value = withTiming(1, { duration: 460, easing: Easing.out(Easing.cubic) });239 }, [value, pair.now, t]);240 const incoming = useAnimatedStyle(() => ({ opacity: t.value, transform: [{ translateY: (1 - t.value) * rise }] }));241 const outgoing = useAnimatedStyle(() => ({ opacity: 1 - t.value, transform: [{ translateY: -t.value * rise }] }));242 return (243 <View>244 <Animated.Text aria-hidden style={[style, styles.rollOld, outgoing]}>245 {pair.before}246 </Animated.Text>247 <Animated.Text style={[style, incoming]}>{pair.now}</Animated.Text>248 </View>249 );250}251252/** A dot with a ring that breathes out from it. */253function Pulse({ color, size = 8 }: { color: string; size?: number }) {254 const t = useSharedValue(0);255 useEffect(() => {256 t.value = withRepeat(withTiming(1, { duration: 1800, easing: Easing.out(Easing.quad) }), -1);257 }, [t]);258 const ring = useAnimatedStyle(() => ({ opacity: 0.45 * (1 - t.value), transform: [{ scale: 1 + t.value * 1.6 }] }));259 return (260 <View style={{ width: size, height: size }}>261 <Animated.View style={[styles.pulseRing, { borderRadius: size / 2, backgroundColor: color }, ring]} />262 <View style={[styles.pulseDot, { borderRadius: size / 2, backgroundColor: color }]} />263 </View>264 );265}266267function Field({ label, children, align = 'left', c }: { label: string; children: ReactNode; align?: 'left' | 'right'; c: Palette }) {268 return (269 <View style={[styles.field, align === 'right' && styles.fieldRight]}>270 <Text style={[styles.fieldLabel, { color: c.faint }]}>{label}</Text>271 {children}272 </View>273 );274}275276// ─── Pass ───────────────────────────────────────────────────────────────────277278const ARC_W = 112;279const ARC_H = 40;280const ARC = { x0: 6, y0: 32, cx: ARC_W / 2, cy: -8, x1: ARC_W - 6, y1: 32 };281282/** The dotted arc between the two airports; the plane flies in to its top on arrival. */283function RouteArc() {284 const t = useSharedValue(0.04);285 useEffect(() => {286 t.value = withDelay(250, withTiming(0.5, { duration: 850, easing: Easing.out(Easing.cubic) }));287 }, [t]);288 const plane = useAnimatedStyle(() => {289 const u = t.value;290 const x = (1 - u) * (1 - u) * ARC.x0 + 2 * (1 - u) * u * ARC.cx + u * u * ARC.x1;291 const y = (1 - u) * (1 - u) * ARC.y0 + 2 * (1 - u) * u * ARC.cy + u * u * ARC.y1;292 const dx = 2 * (1 - u) * (ARC.cx - ARC.x0) + 2 * u * (ARC.x1 - ARC.cx);293 const dy = 2 * (1 - u) * (ARC.cy - ARC.y0) + 2 * u * (ARC.y1 - ARC.cy);294 // The icon points up and to the right, so 45 degrees lays it along the path.295 return { transform: [{ translateX: x - 10 }, { translateY: y - 10 }, { rotate: `${Math.atan2(dy, dx) + Math.PI / 4}rad` }] };296 });297 return (298 <View style={styles.arc}>299 <Svg width={ARC_W} height={ARC_H}>300 <Path d={`M${ARC.x0} ${ARC.y0}Q${ARC.cx} ${ARC.cy} ${ARC.x1} ${ARC.y1}`} fill="none" stroke={tint(ON_ACCENT, 0.55)} strokeWidth={1.6} strokeLinecap="round" strokeDasharray="0.1 5" />301 <Circle cx={ARC.x0} cy={ARC.y0} r={3} fill={ON_ACCENT} />302 <Circle cx={ARC.x1} cy={ARC.y1} r={3} fill="none" stroke={ON_ACCENT} strokeWidth={1.6} />303 </Svg>304 <Animated.View style={[styles.arcPlane, plane]}>305 <Plane size={20} color={ON_ACCENT} fill={ON_ACCENT} strokeWidth={1.5} />306 </Animated.View>307 </View>308 );309}310311/** Rows 12 to 16 with this traveller's seat filled and their companion's outlined. */312function SeatMap({ seat, companion, c }: { seat: string; companion: string; c: Palette }) {313 return (314 <View role="img" aria-label={`Seat map, seat ${seat} highlighted`} style={styles.seatMap}>315 <View style={styles.seatRow}>316 {SEAT_COLS.map((col, i) => (317 <Text key={col} style={[styles.seatCol, i === 3 && styles.seatAisle, { color: c.faint }]}>318 {col}319 </Text>320 ))}321 </View>322 {SEAT_ROWS.map((row) => (323 <View key={row} style={styles.seatRow}>324 {SEAT_COLS.map((col, i) => {325 const id = `${row}${col}`;326 const mine = id === seat;327 const theirs = id === companion;328 const taken = SEATS_TAKEN.includes(id);329 return (330 <View key={id} style={[styles.seatSlot, i === 3 && styles.seatAisle]}>331 {i === 3 && <Text style={[styles.seatRowLabel, TABULAR, { color: row === 14 ? c.fg : c.faint }]}>{row}</Text>}332 <View333 style={[334 styles.seat,335 mine336 ? { backgroundColor: c.accent, borderColor: c.accent }337 : theirs338 ? { backgroundColor: c.accentSoft, borderColor: c.accentText }339 : taken340 ? { backgroundColor: c.seatTaken, borderColor: c.seatTaken }341 : { borderColor: c.seatFree },342 ]}343 >344 {mine && <View style={styles.seatDot} />}345 </View>346 </View>347 );348 })}349 </View>350 ))}351 </View>352 );353}354355/** The notched tear line between the pass and its stub. */356function TearLine({ c }: { c: Palette }) {357 return (358 <View style={styles.tear}>359 <View style={[styles.notch, styles.notchLeft, { backgroundColor: c.bg, borderColor: c.line }]} />360 <Svg width="100%" height={2} style={styles.tearDash}>361 <Line x1={16} y1={1} x2="100%" y2={1} stroke={c.dash} strokeWidth={1.5} strokeDasharray="5 5" strokeLinecap="round" />362 </Svg>363 <View style={[styles.notch, styles.notchRight, { backgroundColor: c.bg, borderColor: c.line }]} />364 </View>365 );366}367368function Band({ title, meta, metaLabel }: { title: string; meta: string; metaLabel: string }) {369 return (370 <View style={styles.bandRow}>371 <BrandMark />372 <Text style={styles.bandName}>{title}</Text>373 <View style={styles.bandFlight}>374 <Text style={styles.bandLabel}>{metaLabel}</Text>375 <Text style={[styles.bandNumber, TABULAR]}>{meta}</Text>376 </View>377 </View>378 );379}380381function Pass({ person, companion, gate, gateChanged, width }: { person: Passenger; companion: Passenger; gate: string; gateChanged: boolean; width: number }) {382 const c = usePalette();383 const [flipped, setFlipped] = useState(false);384 const flip = useSharedValue(0);385 const qr = useMemo(() => qrPath(person.seed), [person.seed]);386387 const toggle = () => {388 const next = !flipped;389 setFlipped(next);390 flip.value = withTiming(next ? 1 : 0, { duration: 640, easing: Easing.inOut(Easing.cubic) });391 };392393 // Each face turns in perspective and hands over at the half-way point by swapping opacity,394 // which works the same on web as on device. The pass dips slightly as it turns.395 const front = useAnimatedStyle(() => ({396 opacity: flip.value < 0.5 ? 1 : 0,397 transform: [{ perspective: 1200 }, { rotateY: `${flip.value * 180}deg` }, { scale: 1 - Math.sin(flip.value * Math.PI) * 0.05 }],398 }));399 const back = useAnimatedStyle(() => ({400 opacity: flip.value < 0.5 ? 0 : 1,401 transform: [{ perspective: 1200 }, { rotateY: `${flip.value * 180 - 180}deg` }, { scale: 1 - Math.sin(flip.value * Math.PI) * 0.05 }],402 }));403404 // The gate cell flashes when its value changes.405 const flash = useSharedValue(0);406 const first = useRef(true);407 useEffect(() => {408 if (first.current) {409 first.current = false;410 return;411 }412 flash.value = withSequence(withTiming(1, { duration: 220 }), withDelay(900, withTiming(gateChanged ? 0.55 : 0, { duration: 500 })));413 }, [gate, gateChanged, flash]);414 const gateGlow = useAnimatedStyle(() => ({ opacity: flash.value }));415416 // A shadow's props stay together in one style object: React Native Web builds the shadow per object.417 const face = [styles.face, { width }, c.dark ? styles.faceDark : styles.faceLight];418 const sheet = [styles.faceClip, { backgroundColor: c.card, borderColor: c.line }];419 const value = [styles.fieldValue, TABULAR, { color: c.fg }];420421 return (422 // The whole pass turns on a tap; the Details and Back to pass buttons are the labelled controls for the same action.423 <Pressable onPress={toggle} style={[styles.pass, { width }]}>424 {/* Front */}425 <Animated.View pointerEvents={flipped ? 'none' : 'auto'} style={[face, front]}>426 <View style={sheet}>427 <LinearGradient colors={c.band} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles.top}>428 <Svg width={220} height={220} style={styles.topRings} fill="none" stroke={tint(ON_ACCENT, 0.08)} strokeWidth={1.5}>429 <Circle cx={170} cy={40} r={60} />430 <Circle cx={170} cy={40} r={110} />431 <Circle cx={170} cy={40} r={160} />432 <Ellipse cx={170} cy={40} rx={46} ry={160} />433 </Svg>434 <Band title={APP_NAME} metaLabel="FLIGHT" meta={FLIGHT.number} />435 <View style={styles.route}>436 <View>437 <Text style={styles.code}>{FLIGHT.from.code}</Text>438 <Text style={styles.city}>{FLIGHT.from.city}</Text>439 </View>440 <View style={styles.routeMiddle}>441 <RouteArc />442 <Text style={styles.duration}>{FLIGHT.duration} nonstop</Text>443 </View>444 <View style={styles.routeEnd}>445 <Text style={styles.code}>{FLIGHT.to.code}</Text>446 <Text style={styles.city}>{FLIGHT.to.city}</Text>447 </View>448 </View>449 </LinearGradient>450451 <View style={styles.details}>452 <View style={styles.fieldRow}>453 <Field label="PASSENGER" c={c}>454 <Text style={[styles.passenger, { color: c.fg }]}>{person.name}</Text>455 </Field>456 <Field label="CLASS" align="right" c={c}>457 <Text style={value}>{FLIGHT.cabin}</Text>458 </Field>459 </View>460 <View style={styles.fieldRow}>461 <Field label="BOARDING" c={c}>462 <Text style={[styles.fieldValue, TABULAR, { color: c.accentText }]}>{FLIGHT.boards}</Text>463 </Field>464 <Field label="DEPARTS" c={c}>465 <Text style={value}>{FLIGHT.departs}</Text>466 </Field>467 <View style={[styles.field, styles.fieldRight]}>468 <Animated.View style={[styles.gateGlow, { backgroundColor: c.warnSoft, borderColor: c.warnLine }, gateGlow]} />469 <Text style={[styles.fieldLabel, { color: gateChanged ? c.warn : c.faint }]}>{gateChanged ? 'NEW GATE' : 'GATE'}</Text>470 <Roll value={gate} style={[styles.fieldValue, TABULAR, { color: gateChanged ? c.warn : c.fg }]} />471 </View>472 </View>473 <View style={styles.fieldRow}>474 <Field label="TERMINAL" c={c}>475 <Text style={value}>{FLIGHT.terminal}</Text>476 </Field>477 <Field label="SEAT" c={c}>478 <Text style={value}>{person.seat}</Text>479 </Field>480 <Field label="ZONE" align="right" c={c}>481 <Text style={value}>{person.zone}</Text>482 </Field>483 </View>484 </View>485486 <TearLine c={c} />487488 <View style={styles.stub}>489 {/* The code keeps a white backdrop in both themes so a scanner can read it. */}490 <View role="img" aria-label={`Boarding code for ${person.name}`} style={[styles.qr, { borderColor: c.line }]}>491 <Svg width={96} height={96} viewBox={`0 0 ${QR_N} ${QR_N}`}>492 <Path d={qr} fill="#0A1416" />493 </Svg>494 </View>495 <View style={styles.stubSide}>496 <Text style={[styles.fieldLabel, { color: c.faint }]}>SCAN AT THE GATE</Text>497 <Text style={[styles.sequence, TABULAR, { color: c.fg }]}>Seq {person.sequence}</Text>498 <View style={styles.bright}>499 <Sun size={13} color={c.accentText} strokeWidth={2.4} />500 <Text style={[styles.brightText, { color: c.muted }]}>Brightness raised for scanning</Text>501 </View>502 <Pressable role="button" aria-label={`Details for ${person.name}`} onPress={toggle} hitSlop={6} style={({ pressed }) => [styles.detailsButton, { borderColor: c.line, backgroundColor: pressed ? c.pressed : 'transparent' }]}>503 <RotateCw size={13} color={c.fg} strokeWidth={2.4} />504 <Text style={[styles.detailsText, { color: c.fg }]}>Details</Text>505 </Pressable>506 </View>507 </View>508 </View>509 </Animated.View>510511 {/* Back */}512 <Animated.View pointerEvents={flipped ? 'auto' : 'none'} style={[face, styles.faceBack, back]}>513 <View style={sheet}>514 <LinearGradient colors={c.band} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles.backTop}>515 <Band title="Trip details" metaLabel={FLIGHT.date.toUpperCase()} meta={`${FLIGHT.from.code} to ${FLIGHT.to.code}`} />516 </LinearGradient>517 <View style={styles.backBody}>518 <View style={styles.fieldRow}>519 <Field label="CONFIRMATION" c={c}>520 <Text style={[styles.confirmation, { color: c.fg }]}>{FLIGHT.confirmation}</Text>521 </Field>522 <Field label="FARE" align="right" c={c}>523 <Text style={[styles.backValue, TABULAR, { color: c.fg }]}>{FLIGHT.fare}</Text>524 </Field>525 </View>526 <View style={styles.fieldRow}>527 <Field label="FREQUENT FLYER" c={c}>528 <Text style={[styles.backValue, TABULAR, { color: c.fg }]}>{person.flyer}</Text>529 <Text style={[styles.backNote, { color: c.accentText }]}>{person.tier}</Text>530 </Field>531 <Field label="TICKET" align="right" c={c}>532 <Text style={[styles.backValue, TABULAR, { color: c.fg }]}>{person.ticket}</Text>533 </Field>534 </View>535 <View style={styles.fieldRow}>536 <Field label="BAGGAGE" c={c}>537 <View style={styles.bagRow}>538 <Luggage size={15} color={c.accentText} strokeWidth={2.2} />539 <Text style={[styles.backValue, { color: c.fg }]}>{person.bags}</Text>540 </View>541 </Field>542 </View>543 <View style={styles.fieldRow}>544 <Field label="ON BOARD" c={c}>545 <Text style={[styles.backValue, { color: c.fg }]}>{FLIGHT.perks}</Text>546 </Field>547 <Field label="AIRCRAFT" align="right" c={c}>548 <Text style={[styles.backValue, { color: c.fg }]}>{FLIGHT.aircraft}</Text>549 </Field>550 </View>551 </View>552 <View style={[styles.seatPanel, { borderTopColor: c.line }]}>553 <View style={styles.seatInfo}>554 <Text style={[styles.fieldLabel, { color: c.faint }]}>YOUR SEAT</Text>555 <Text style={[styles.seatTitle, { color: c.fg }]}>Seat {person.seat}, {person.side}</Text>556 <Text style={[styles.backNote, { color: c.muted }]}>Row 14, left side.{'\n'}Next to {companion.name.split(' ')[0]} in {companion.seat}.</Text>557 <Pressable role="button" aria-label="Back to pass" onPress={toggle} hitSlop={8} style={({ pressed }) => [styles.flipHint, { opacity: pressed ? 0.5 : 1 }]}>558 <RotateCw size={12} color={c.muted} strokeWidth={2.4} />559 <Text style={[styles.flipHintText, { color: c.muted }]}>Back to pass</Text>560 </Pressable>561 </View>562 <SeatMap seat={person.seat} companion={companion.seat} c={c} />563 </View>564 </View>565 </Animated.View>566 </Pressable>567 );568}569570function Dot({ index, scrollX, width, color }: { index: number; scrollX: SharedValue<number>; width: number; color: string }) {571 const anim = useAnimatedStyle(() => {572 const near = interpolate(scrollX.value, [(index - 1) * width, index * width, (index + 1) * width], [0, 1, 0], 'clamp');573 return { width: 7 + near * 13, opacity: 0.28 + near * 0.72 };574 });575 return <Animated.View style={[styles.dot, { backgroundColor: color }, anim]} />;576}577578// ─── Timeline ───────────────────────────────────────────────────────────────579580function TimelineStep({ step, index, gate, gateChanged, c }: { step: Step; index: number; gate: string; gateChanged: boolean; c: Palette }) {581 const done = index < CURRENT_STEP;582 const current = index === CURRENT_STEP;583 const last = index === STEPS.length - 1;584 const Icon = done ? Check : step.icon;585 const boarding = step.id === 'boarding';586 return (587 <View style={styles.step}>588 <View style={styles.rail}>589 <View style={[styles.node, done ? { backgroundColor: c.accent, borderColor: c.accent } : current ? { backgroundColor: c.card, borderColor: c.accentText } : { backgroundColor: c.card, borderColor: c.line }]}>590 <Icon size={14} color={done ? ON_ACCENT : current ? c.accentText : c.faint} strokeWidth={done ? 3 : 2.2} />591 </View>592 {!last && <View style={[styles.connector, { backgroundColor: done ? c.accent : c.line }]} />}593 </View>594 <View style={[styles.stepCard, { backgroundColor: c.card, borderColor: current ? c.accentText : c.line }, current && (c.dark ? styles.stepCurrentDark : styles.stepCurrentLight)]}>595 <View style={styles.stepHead}>596 <View style={styles.grow}>597 <Text style={[styles.stepTitle, { color: done ? c.muted : c.fg }]}>{step.title}</Text>598 {boarding ? (599 <View style={styles.stepGate}>600 <Text style={[styles.stepNote, { color: gateChanged ? c.warn : c.muted }]}>Gate </Text>601 <Roll value={gate} rise={10} style={[styles.stepNote, TABULAR, { color: gateChanged ? c.warn : c.muted }]} />602 <Text style={[styles.stepNote, { color: c.muted }]}>, {step.note.toLowerCase()}</Text>603 </View>604 ) : (605 <Text style={[styles.stepNote, { color: c.muted }]}>{step.note}</Text>606 )}607 </View>608 {current ? (609 <View style={[styles.nowPill, { backgroundColor: c.accentSoft }]}>610 <Pulse color={c.accentText} size={6} />611 <Text style={[styles.nowText, { color: c.accentText }]}>Now</Text>612 </View>613 ) : (614 <Text style={[styles.stepTime, TABULAR, { color: done ? c.faint : c.fg }]}>{step.time}</Text>615 )}616 </View>617 {step.wait && (618 <View style={[styles.wait, { borderTopColor: c.line }]}>619 <Text style={[styles.waitValue, TABULAR, { color: c.fg }]}>620 {step.wait.minutes} min <Text style={[styles.waitUnit, { color: c.muted }]}>estimated wait</Text>621 </Text>622 <View role="img" aria-label={`${step.wait.label} queue`} style={styles.meter}>623 {[0, 1, 2, 3, 4].map((i) => (624 <View key={i} style={[styles.meterBar, { height: 6 + i * 3, backgroundColor: i < step.wait!.level ? c.accentText : c.line }]} />625 ))}626 <Text style={[styles.meterLabel, { color: c.accentText }]}>{step.wait.label}</Text>627 </View>628 </View>629 )}630 </View>631 </View>632 );633}634635// ─── Screen ─────────────────────────────────────────────────────────────────636637export default function BoardingPassScreen() {638 const c = usePalette();639 const insets = useSafeAreaInsets();640 const { width } = useWindowDimensions();641 const pager = useRef<Animated.ScrollView>(null);642 const scrollX = useSharedValue(0);643 const [page, setPage] = useState(0);644 const [minutes, setMinutes] = useState(BOARDING_IN);645 const [gateChanged, setGateChanged] = useState(false);646 const [banner, setBanner] = useState(false);647 const [wallet, setWallet] = useState<'idle' | 'adding' | 'added'>('idle');648 const [shared, setShared] = useState(false);649 const gate = gateChanged ? FLIGHT.newGate : FLIGHT.gate;650651 // The countdown. Replace with the minutes left until your flight's boarding time.652 useEffect(() => {653 const id = setInterval(() => setMinutes((m) => Math.max(0, m - 1)), MINUTE_MS);654 return () => clearInterval(id);655 }, []);656657 // The gate change comes in once on its own, unless the pill was tapped first. Drive it from your flight status feed.658 const touched = useRef(false);659 useEffect(() => {660 const id = setTimeout(() => {661 if (touched.current) return;662 setGateChanged(true);663 setBanner(true);664 }, GATE_CHANGE_MS);665 return () => clearTimeout(id);666 }, []);667 const toggleGate = () => {668 touched.current = true;669 setBanner(!gateChanged);670 setGateChanged(!gateChanged);671 };672673 const bannerT = useSharedValue(0);674 useEffect(() => {675 bannerT.value = banner ? withTiming(1, { duration: 420, easing: Easing.out(Easing.back(1.2)) }) : withTiming(0, { duration: 240, easing: Easing.in(Easing.quad) });676 }, [banner, bannerT]);677 const bannerSlot = useAnimatedStyle(() => ({ height: Math.max(0, bannerT.value) * (BANNER_H + 10) }));678 const bannerCard = useAnimatedStyle(() => ({ opacity: Math.min(1, Math.max(0, bannerT.value)), transform: [{ translateY: (bannerT.value - 1) * 24 }] }));679680 const onScroll = useAnimatedScrollHandler((e) => {681 scrollX.value = e.contentOffset.x;682 });683 // Mirror the settled page into state for the caption under the dots.684 useAnimatedReaction(685 () => Math.min(PASSENGERS.length - 1, Math.max(0, Math.round(scrollX.value / width))),686 (now, before) => {687 if (now !== before) runOnJS(setPage)(now);688 }689 );690691 const addToWallet = () => {692 if (wallet !== 'idle') return setWallet('idle');693 // Replace with your wallet pass module.694 setWallet('adding');695 setTimeout(() => setWallet('added'), 900);696 };697 useEffect(() => {698 if (!shared) return;699 const id = setTimeout(() => setShared(false), 1800);700 return () => clearTimeout(id);701 }, [shared]);702703 return (704 <View style={[styles.screen, { backgroundColor: c.bg }]}>705 <ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={{ paddingTop: insets.top + 4, paddingBottom: insets.bottom + 28 }}>706 {/* Header */}707 <View style={styles.header}>708 <Tap label="Back" to={0.88}>709 <View style={[styles.round, { backgroundColor: c.card, borderColor: c.line }]}>710 <ChevronLeft size={20} color={c.fg} strokeWidth={2.4} />711 </View>712 </Tap>713 <View style={styles.headerText}>714 <Text role="heading" aria-level={1} style={[styles.title, { color: c.fg }]}>715 Boarding pass716 </Text>717 <Text style={[styles.subtitle, { color: c.muted }]}>{FLIGHT.date}</Text>718 </View>719 <Tap label="Flight alerts" to={0.88}>720 <View style={[styles.round, { backgroundColor: c.card, borderColor: c.line }]}>721 <Bell size={18} color={c.fg} strokeWidth={2.2} />722 </View>723 </Tap>724 </View>725726 {/* Live status */}727 <Animated.View entering={FadeIn.duration(320)} style={styles.status}>728 <Tap label={gateChanged ? 'On time. Tap to undo the gate change.' : 'On time. Tap to send the gate change.'} onPress={toggleGate} to={0.93}>729 <View style={[styles.pill, { backgroundColor: c.okSoft }]}>730 <Pulse color={c.ok} />731 <Text style={[styles.pillText, { color: c.ok }]}>On time</Text>732 </View>733 </Tap>734 <View style={styles.grow} />735 <View role="timer" aria-label={minutes > 0 ? `Boarding in ${minutes} minutes` : 'Boarding now'} style={styles.countdown}>736 {minutes > 0 ? (737 <>738 <Text style={[styles.countdownText, { color: c.muted }]}>Boarding in </Text>739 <Roll value={String(minutes)} rise={12} style={[styles.countdownValue, TABULAR, { color: c.fg }]} />740 <Text style={[styles.countdownValue, { color: c.fg }]}> min</Text>741 </>742 ) : (743 <Text style={[styles.countdownValue, { color: c.accentText }]}>Boarding now</Text>744 )}745 </View>746 </Animated.View>747748 {/* Gate change alert */}749 <Animated.View pointerEvents={banner ? 'auto' : 'none'} style={[styles.bannerSlot, bannerSlot]}>750 <Animated.View role="alert" aria-hidden={!banner} style={[styles.banner, { backgroundColor: c.warnSoft, borderColor: c.warnLine }, bannerCard]}>751 <View style={[styles.bannerIcon, { backgroundColor: c.warn }]}>752 <TriangleAlert size={16} color={c.warnSoft} strokeWidth={2.4} />753 </View>754 <View style={styles.grow}>755 <Text style={[styles.bannerTitle, { color: c.fg }]}>Gate changed to {FLIGHT.newGate}</Text>756 <Text numberOfLines={1} style={[styles.bannerNote, { color: c.muted }]}>757 Was {FLIGHT.gate}. 6 min walk from security.758 </Text>759 </View>760 <Pressable role="button" aria-label="Dismiss gate change" onPress={() => setBanner(false)} hitSlop={10} style={({ pressed }) => [styles.bannerClose, { opacity: pressed ? 0.5 : 1 }]}>761 <X size={16} color={c.muted} strokeWidth={2.4} />762 </Pressable>763 </Animated.View>764 </Animated.View>765766 {/* Passes, one per traveller */}767 <Animated.View entering={FadeInDown.duration(420)}>768 <Animated.ScrollView769 ref={pager}770 horizontal771 pagingEnabled772 bounces={false}773 decelerationRate="fast"774 showsHorizontalScrollIndicator={false}775 scrollEventThrottle={16}776 onScroll={onScroll}777 aria-label="Boarding passes"778 >779 {PASSENGERS.map((p, i) => (780 <View key={p.id} style={[styles.page, { width }]}>781 <Pass person={p} companion={PASSENGERS[1 - i]} gate={gate} gateChanged={gateChanged} width={width - 40} />782 </View>783 ))}784 </Animated.ScrollView>785 </Animated.View>786787 <View style={styles.pagerFoot}>788 <View role="tablist" aria-label="Travellers" style={styles.dots}>789 {PASSENGERS.map((p, i) => (790 <Pressable key={p.id} role="tab" aria-selected={i === page} aria-label={`${p.name}'s pass`} hitSlop={10} onPress={() => pager.current?.scrollTo({ x: i * width, animated: true })}>791 <Dot index={i} scrollX={scrollX} width={width} color={c.accentText} />792 </Pressable>793 ))}794 </View>795 <Text style={[styles.pagerCaption, TABULAR, { color: c.muted }]}>796 {PASSENGERS[page].name}, {page + 1} of {PASSENGERS.length}797 </Text>798 </View>799800 {/* Actions */}801 <Animated.View entering={FadeInDown.delay(120).duration(380)} style={styles.actions}>802 <Tap label={wallet === 'added' ? 'Added to wallet' : 'Add to phone wallet'} onPress={addToWallet} to={0.97} style={styles.grow}>803 <View style={[styles.primary, { backgroundColor: wallet === 'added' ? c.accentSoft : c.accent }]}>804 {wallet === 'added' ? <Check size={18} color={c.accentText} strokeWidth={2.8} /> : <Wallet size={18} color={ON_ACCENT} strokeWidth={2.2} />}805 <Text style={[styles.primaryText, wallet === 'added' && { color: c.accentText }, { opacity: wallet === 'adding' ? 0.7 : 1 }]}>806 {wallet === 'idle' ? 'Add to phone wallet' : wallet === 'adding' ? 'Adding pass' : 'Added to wallet'}807 </Text>808 </View>809 </Tap>810 <Tap label={shared ? 'Pass link copied' : 'Share pass'} onPress={() => setShared(true)} to={0.95}>811 <View style={[styles.secondary, { backgroundColor: c.card, borderColor: c.line }]}>812 {shared ? <Check size={17} color={c.accentText} strokeWidth={2.8} /> : <Share2 size={17} color={c.fg} strokeWidth={2.2} />}813 <Text style={[styles.secondaryText, { color: shared ? c.accentText : c.fg }]}>{shared ? 'Copied' : 'Share'}</Text>814 </View>815 </Tap>816 </Animated.View>817818 {/* Timeline */}819 <Animated.View entering={FadeInDown.delay(200).duration(380)} style={styles.timeline}>820 <View style={styles.sectionHead}>821 <Text role="heading" aria-level={2} style={[styles.sectionTitle, { color: c.fg }]}>822 Today at {FLIGHT.from.code}823 </Text>824 <Text style={[styles.sectionMeta, { color: c.muted }]}>Step 3 of 5</Text>825 </View>826 {STEPS.map((step, i) => (827 <TimelineStep key={step.id} step={step} index={i} gate={gate} gateChanged={gateChanged} c={c} />828 ))}829 </Animated.View>830 </ScrollView>831 </View>832 );833}834835// ─── Styles ─────────────────────────────────────────────────────────────────836837const styles = StyleSheet.create({838 screen: { flex: 1 },839 grow: { flex: 1 },840841 // Header842 header: { flexDirection: 'row', alignItems: 'center', paddingHorizontal: 20, height: 48 },843 round: { width: 40, height: 40, borderRadius: 20, borderWidth: StyleSheet.hairlineWidth, alignItems: 'center', justifyContent: 'center' },844 headerText: { flex: 1, alignItems: 'center' },845 title: { fontSize: 17, fontWeight: '700', letterSpacing: -0.3 },846 subtitle: { fontSize: 12.5, fontWeight: '500', marginTop: 1 },847848 // Status849 status: { flexDirection: 'row', alignItems: 'center', paddingHorizontal: 20, marginTop: 12, height: 32 },850 pill: { flexDirection: 'row', alignItems: 'center', gap: 8, height: 32, paddingHorizontal: 12, borderRadius: 16 },851 pillText: { fontSize: 13.5, fontWeight: '700', letterSpacing: -0.1 },852 pulseRing: { position: 'absolute', top: 0, right: 0, bottom: 0, left: 0 },853 pulseDot: { flex: 1 },854 countdown: { flexDirection: 'row', alignItems: 'center' },855 countdownText: { fontSize: 14, fontWeight: '500' },856 countdownValue: { fontSize: 14, fontWeight: '700', letterSpacing: -0.1 },857 rollOld: { position: 'absolute', top: 0, left: 0, right: 0 },858859 // Gate change banner860 bannerSlot: { paddingHorizontal: 20, justifyContent: 'flex-end', overflow: 'hidden' },861 banner: { height: BANNER_H, borderRadius: 16, borderWidth: 1, flexDirection: 'row', alignItems: 'center', gap: 12, paddingLeft: 12, paddingRight: 6 },862 bannerIcon: { width: 34, height: 34, borderRadius: 17, alignItems: 'center', justifyContent: 'center' },863 bannerTitle: { fontSize: 15, fontWeight: '700', letterSpacing: -0.2 },864 bannerNote: { fontSize: 13, fontWeight: '500', marginTop: 1 },865 bannerClose: { width: 36, height: 36, alignItems: 'center', justifyContent: 'center' },866867 // Pass868 page: { paddingHorizontal: 20, paddingTop: 14, paddingBottom: 26 },869 pass: { height: PASS_H },870 face: { height: PASS_H, borderRadius: 24, backfaceVisibility: 'hidden' },871 faceBack: { position: 'absolute', top: 0, left: 0 },872 faceLight: { shadowColor: '#0B3A40', shadowOpacity: 0.16, shadowRadius: 22, shadowOffset: { width: 0, height: 12 } },873 faceDark: { shadowColor: '#000000', shadowOpacity: 0.45, shadowRadius: 22, shadowOffset: { width: 0, height: 12 } },874 faceClip: { flex: 1, borderRadius: 24, borderWidth: StyleSheet.hairlineWidth, overflow: 'hidden' },875 top: { paddingHorizontal: 18, paddingTop: 16, paddingBottom: 18, overflow: 'hidden' },876 topRings: { position: 'absolute', top: 0, right: 0 },877 bandRow: { flexDirection: 'row', alignItems: 'center', gap: 10 },878 brandMark: { backgroundColor: '#FFFFFF', alignItems: 'center', justifyContent: 'center' },879 bandName: { flex: 1, fontSize: 16, fontWeight: '700', letterSpacing: -0.3, color: ON_ACCENT },880 bandFlight: { alignItems: 'flex-end' },881 bandLabel: { fontSize: 10, fontWeight: '700', letterSpacing: 0.9, color: tint(ON_ACCENT, 0.66) },882 bandNumber: { fontSize: 16, fontWeight: '700', letterSpacing: -0.2, color: ON_ACCENT, marginTop: 1 },883 route: { flexDirection: 'row', alignItems: 'flex-end', justifyContent: 'space-between', marginTop: 18 },884 routeEnd: { alignItems: 'flex-end' },885 routeMiddle: { alignItems: 'center', paddingBottom: 2 },886 code: { fontSize: 44, lineHeight: 46, fontWeight: '800', letterSpacing: -1.6, color: ON_ACCENT },887 city: { fontSize: 13, fontWeight: '500', color: tint(ON_ACCENT, 0.78), marginTop: 2 },888 arc: { width: ARC_W, height: ARC_H },889 arcPlane: { position: 'absolute', top: 0, left: 0, width: 20, height: 20 },890 duration: { fontSize: 11.5, fontWeight: '600', color: tint(ON_ACCENT, 0.78), marginTop: 6 },891892 details: { flex: 1, paddingHorizontal: 18, paddingTop: 16, paddingBottom: 6, justifyContent: 'space-between' },893 fieldRow: { flexDirection: 'row', alignItems: 'flex-end', gap: 12 },894 field: { flex: 1 },895 fieldRight: { alignItems: 'flex-end' },896 fieldLabel: { fontSize: 10.5, fontWeight: '700', letterSpacing: 0.8, marginBottom: 3 },897 fieldValue: { fontSize: 18, lineHeight: 22, fontWeight: '700', letterSpacing: -0.3 },898 passenger: { fontSize: 20, lineHeight: 24, fontWeight: '700', letterSpacing: -0.4 },899 gateGlow: { position: 'absolute', top: -6, right: -10, bottom: -6, width: 84, borderRadius: 12, borderWidth: 1 },900901 tear: { height: 22, justifyContent: 'center' },902 tearDash: { marginRight: 16 },903 notch: { position: 'absolute', top: 0, width: 22, height: 22, borderRadius: 11, borderWidth: StyleSheet.hairlineWidth },904 notchLeft: { left: -11 },905 notchRight: { right: -11 },906907 stub: { flexDirection: 'row', alignItems: 'center', gap: 16, paddingHorizontal: 18, paddingTop: 6, paddingBottom: 18 },908 qr: { width: 116, height: 116, borderRadius: 14, borderWidth: StyleSheet.hairlineWidth, backgroundColor: '#FFFFFF', alignItems: 'center', justifyContent: 'center' },909 stubSide: { flex: 1, alignItems: 'flex-start' },910 sequence: { fontSize: 18, fontWeight: '700', letterSpacing: -0.3 },911 bright: { flexDirection: 'row', alignItems: 'center', gap: 5, marginTop: 8 },912 brightText: { flex: 1, fontSize: 11.5, lineHeight: 14, fontWeight: '500' },913 detailsButton: { flexDirection: 'row', alignItems: 'center', gap: 6, height: 32, paddingHorizontal: 12, borderRadius: 16, borderWidth: 1, marginTop: 10 },914 detailsText: { fontSize: 13, fontWeight: '600' },915916 // Pass back917 backTop: { paddingHorizontal: 18, paddingVertical: 16 },918 backBody: { flex: 1, paddingHorizontal: 18, paddingVertical: 18, justifyContent: 'space-between' },919 confirmation: { fontSize: 22, lineHeight: 26, fontWeight: '800', letterSpacing: 2 },920 backValue: { fontSize: 15, lineHeight: 20, fontWeight: '600', letterSpacing: -0.2 },921 backNote: { fontSize: 12.5, lineHeight: 17, fontWeight: '500', marginTop: 1 },922 bagRow: { flexDirection: 'row', alignItems: 'center', gap: 7 },923 seatPanel: { flexDirection: 'row', alignItems: 'center', gap: 12, borderTopWidth: StyleSheet.hairlineWidth, paddingHorizontal: 18, paddingVertical: 16 },924 seatInfo: { flex: 1 },925 seatTitle: { fontSize: 18, fontWeight: '700', letterSpacing: -0.3 },926 flipHint: { flexDirection: 'row', alignItems: 'center', gap: 5, marginTop: 14 },927 flipHintText: { fontSize: 12, fontWeight: '600' },928 seatMap: { gap: 4 },929 seatRow: { flexDirection: 'row', gap: 4 },930 seatCol: { width: 17, textAlign: 'center', fontSize: 9.5, fontWeight: '700' },931 seatSlot: { flexDirection: 'row', alignItems: 'center' },932 seatAisle: { marginLeft: 22 },933 seatRowLabel: { position: 'absolute', left: -24, width: 22, textAlign: 'center', fontSize: 9.5, fontWeight: '700' },934 seat: { width: 17, height: 17, borderRadius: 5, borderWidth: 1.5, alignItems: 'center', justifyContent: 'center' },935 seatDot: { width: 5, height: 5, borderRadius: 2.5, backgroundColor: ON_ACCENT },936937 // Pager938 pagerFoot: { alignItems: 'center', gap: 8, marginTop: -8 },939 dots: { flexDirection: 'row', alignItems: 'center', gap: 6, height: 7 },940 dot: { height: 7, borderRadius: 3.5 },941 pagerCaption: { fontSize: 12.5, fontWeight: '500' },942943 // Actions944 actions: { flexDirection: 'row', gap: 10, paddingHorizontal: 20, marginTop: 18 },945 primary: { height: 52, borderRadius: 16, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', gap: 9 },946 primaryText: { fontSize: 16, fontWeight: '700', letterSpacing: -0.2, color: ON_ACCENT },947 secondary: { height: 52, borderRadius: 16, borderWidth: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', gap: 8, width: 108 },948 secondaryText: { fontSize: 15, fontWeight: '600', letterSpacing: -0.2 },949950 // Timeline951 timeline: { paddingHorizontal: 20, marginTop: 30 },952 sectionHead: { flexDirection: 'row', alignItems: 'baseline', justifyContent: 'space-between', marginBottom: 14 },953 sectionTitle: { fontSize: 20, fontWeight: '700', letterSpacing: -0.5 },954 sectionMeta: { fontSize: 13, fontWeight: '500' },955 step: { flexDirection: 'row', gap: 12 },956 rail: { width: 28, alignItems: 'center', paddingTop: 14 },957 node: { width: 28, height: 28, borderRadius: 14, borderWidth: 1.5, alignItems: 'center', justifyContent: 'center' },958 connector: { flex: 1, width: 2, borderRadius: 1, marginTop: 4, marginBottom: -10 },959 stepCard: { flex: 1, borderRadius: 16, borderWidth: 1, paddingHorizontal: 14, paddingVertical: 12, marginBottom: 10 },960 stepCurrentLight: { shadowColor: '#0B3A40', shadowOpacity: 0.1, shadowRadius: 14, shadowOffset: { width: 0, height: 6 } },961 stepCurrentDark: { shadowColor: '#000000', shadowOpacity: 0.35, shadowRadius: 14, shadowOffset: { width: 0, height: 6 } },962 stepHead: { flexDirection: 'row', alignItems: 'center', gap: 10 },963 stepTitle: { fontSize: 15.5, fontWeight: '700', letterSpacing: -0.2 },964 stepNote: { fontSize: 13, lineHeight: 18, fontWeight: '500' },965 stepGate: { flexDirection: 'row', alignItems: 'center' },966 stepTime: { fontSize: 13.5, fontWeight: '600' },967 nowPill: { flexDirection: 'row', alignItems: 'center', gap: 6, height: 26, paddingHorizontal: 10, borderRadius: 13 },968 nowText: { fontSize: 12.5, fontWeight: '700' },969 wait: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', borderTopWidth: StyleSheet.hairlineWidth, marginTop: 12, paddingTop: 10 },970 waitValue: { fontSize: 17, fontWeight: '700', letterSpacing: -0.3 },971 waitUnit: { fontSize: 13, fontWeight: '500', letterSpacing: 0 },972 meter: { flexDirection: 'row', alignItems: 'flex-end', gap: 3 },973 meterBar: { width: 4, borderRadius: 2 },974 meterLabel: { fontSize: 12.5, fontWeight: '700', marginLeft: 5 },975});