/* Airport theme for personal.html#travel -- active only while body.theme-airport
   is set by assets/personal-airport.js. Split-flap departures board, boarding
   passes with a torn stub, and a passport page of country stamps. */

body.theme-airport {
    --ap-ink: #0c1422; --ap-panel: #111b2e; --ap-line: #22314d; --ap-text: #eef3fb; --ap-sub: #95a6c2;
    --ap-amber: #ffc53d; --ap-green: #3ddc84; --ap-blue: #5ab8ff; --ap-red: #ff6b6b; --ap-paper: #fbf7ee;
    background:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(90,184,255,0.16), rgba(90,184,255,0) 70%),
        linear-gradient(180deg, #0a1120 0%, #0d1628 60%, #0a1120 100%) fixed #0a1120;
}
body.theme-airport .gallery-wrap { max-width: 1120px; padding: 0 20px 5rem; }
body.theme-airport .back-bar,
body.theme-airport .hero-title,
body.theme-airport .hero-sub,
body.theme-airport .category-view-header,
body.theme-airport .pcms-admin-only[onclick="openDraftModal()"],
body.theme-airport[data-ap-cat="travel"] .gallery-section[data-category="travel"] { display: none !important; }

/* Windows has no flag emoji (renders "JP"): the same self-hosted, flag-only
   font the Music page uses (Twemoji art, CC-BY 4.0; see
   assets/fonts/TwemojiCountryFlags-LICENSE.md). */
@font-face {
    font-family: 'Twemoji Country Flags';
    src: url('/assets/fonts/TwemojiCountryFlags.woff2') format('woff2');
    unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E007F;
    font-display: swap;
}
body.theme-airport .modal-content { font-family: 'Twemoji Country Flags', var(--font-body, 'Sarabun'), sans-serif; }
#airportView { display: none; font-family: 'Twemoji Country Flags', 'Outfit', 'Mitr', var(--font-body, 'Plus Jakarta Sans', 'Sarabun'), sans-serif; color: var(--ap-text); }
body.theme-airport #airportView { display: block; }
#airportView button { font: inherit; }
#airportView button:focus-visible { outline: 2px solid var(--ap-amber); outline-offset: 3px; }

/* ---------- header ---------- */
.ap-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 26px 0 8px; }
.ap-back { justify-self: start; background: none; border: 0; color: var(--ap-sub); cursor: pointer; font-size: 1rem; padding: 6px 0; transition: color .2s ease; }
.ap-back span { display: inline-block; font-size: 1.3rem; line-height: 1; margin-right: 4px; transition: transform .25s ease; }
.ap-back:hover { color: var(--ap-text); }
.ap-back:hover span { transform: translateX(-3px); }
.ap-brand { display: flex; align-items: center; gap: 12px; }
.ap-logo { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 1.5rem; color: #0a1120;
    background: linear-gradient(135deg, var(--ap-amber), #ff8a3d); box-shadow: 0 8px 24px rgba(255,165,61,0.35); transform: rotate(-8deg); }
.ap-brand b { display: block; font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; font-size: 2.1rem; font-weight: 400; letter-spacing: .08em; line-height: 1; }
.ap-brand small { display: block; color: var(--ap-sub); font-size: .85rem; margin-top: 2px; }
.ap-top-r { justify-self: end; }
.ap-add { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 9px 18px; cursor: pointer; font-weight: 600; color: #0a1120;
    background: linear-gradient(135deg, var(--ap-amber), #ff9f43); box-shadow: 0 6px 18px rgba(255,165,61,0.3); transition: transform .2s ease, box-shadow .2s ease; }
.ap-add:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,165,61,0.45); }
.ap-stats { display: flex; justify-content: center; gap: 22px; margin: 6px 0 22px; color: var(--ap-sub); font-size: .95rem; }
.ap-stats b { color: var(--ap-text); font-size: 1.15rem; margin-right: 2px; }

/* ---------- split-flap departures board ---------- */
.ap-board { --tile: calc(1.21rem + 2px); background: #05080f; border: 1px solid #1d2638; border-radius: 14px; padding: 14px 16px 10px; margin-bottom: 26px;
    box-shadow: inset 0 0 0 4px #0d1320, 0 20px 50px rgba(0,0,0,0.5); overflow: hidden; }
.ap-board-head { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 12px; border-bottom: 1px solid #1a2233; margin-bottom: 6px; }
.ap-board-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; letter-spacing: .14em; color: var(--ap-amber); }
.ap-board-title i { font-style: normal; display: inline-block; transform: rotate(-30deg); margin-right: 4px; }
.ap-board-title em { font-style: normal; font-family: 'Outfit', 'Mitr', sans-serif; font-size: .85rem; letter-spacing: 0; color: var(--ap-sub); margin-left: 8px; }
.ap-clock { font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--ap-amber); font-size: 1.1rem; letter-spacing: .06em; }
.ap-row { box-sizing: border-box; display: grid; grid-template-columns: calc(5 * var(--tile)) calc(var(--dw, 14) * var(--tile)) minmax(0, 1fr) calc(var(--sw, 5) * var(--tile) + 16px); align-items: center; gap: 22px; width: 100%; text-align: left;
    padding: 7px 4px; border: 0; border-bottom: 1px solid #111827; background: none; color: var(--ap-text); cursor: pointer; font-size: 1rem; transition: background .15s ease; }
button.ap-row:hover { background: rgba(255,197,61,0.06); }
.ap-row:last-child { border-bottom: 0; }
.ap-row-head { cursor: default; font-family: 'IBM Plex Mono', monospace; font-size: .7rem; letter-spacing: .14em; color: #5f6f8c; padding-top: 2px; padding-bottom: 6px; }
.ap-row-empty { display: block; cursor: default; }
.ap-flaps { display: inline-flex; gap: 2px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.ap-f { position: relative; isolation: isolate; display: inline-grid; place-items: center; width: 1.21rem; height: 1.65rem; border-radius: 3px; overflow: hidden;
    font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 1.1rem; color: #f3f3f3; text-shadow: 0 1px 0 rgba(0,0,0,0.6);
    background: linear-gradient(180deg, #1d2230 0 49%, #10131b 51% 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 1px 2px rgba(0,0,0,0.6); }
.ap-f::after { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,0.8); }
.ap-f.is-spin { color: #9aa3b5; animation: apFlip .11s linear infinite; }
@keyframes apFlip { 0% { transform: scaleY(1); } 50% { transform: scaleY(.55); } 100% { transform: scaleY(1); } }
.ap-plain { font-weight: 600; }
.ap-row-head .ap-col-status { padding-left: 16px; }
.ap-col-country { color: #c8d3e6; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-row-head .ap-col-country { color: #5f6f8c; font-size: .7rem; }
.ap-flag { margin-right: 6px; }
.ap-col-status { display: inline-flex; align-items: center; gap: 8px; }
.ap-lamp { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: #444; }
.ap-row.is-dream .ap-col-status .ap-f { color: var(--ap-amber); }
.ap-row.is-dream .ap-lamp { background: var(--ap-amber); box-shadow: 0 0 8px var(--ap-amber); }
.ap-row.is-booked .ap-col-status .ap-f { color: var(--ap-green); }
.ap-row.is-booked .ap-lamp { background: var(--ap-green); box-shadow: 0 0 8px var(--ap-green); }
.ap-row.is-trip .ap-col-status .ap-f { color: var(--ap-blue); }
.ap-row.is-trip .ap-lamp { background: var(--ap-blue); box-shadow: 0 0 8px var(--ap-blue); animation: apBlink 1.2s ease-in-out infinite; }
.ap-row.is-landed .ap-col-status .ap-f { color: #d8dde8; }
.ap-row.is-landed .ap-lamp { background: #d8dde8; }
.ap-row.is-cancel .ap-col-status .ap-f { color: var(--ap-red); }
.ap-row.is-cancel .ap-lamp { background: var(--ap-red); }
@keyframes apBlink { 50% { opacity: .25; } }

/* ---------- status tabs ---------- */
.ap-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 22px; }
.ap-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: .95rem; font-weight: 500;
    color: var(--ap-text); background: var(--ap-panel); border: 1px solid var(--ap-line); transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.ap-tab:hover { border-color: #3a4d72; transform: translateY(-1px); }
.ap-tab i { font-style: normal; font-size: .76rem; font-weight: 700; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #1d2a44; color: var(--ap-sub); text-align: center; }
.ap-tab.is-on { background: var(--ap-text); color: #0a1120; border-color: var(--ap-text); }
.ap-tab.is-on i { background: #0a1120; color: #fff; }
.ap-tab.is-dream.is-on { background: var(--ap-amber); border-color: var(--ap-amber); }
.ap-tab.is-booked.is-on { background: var(--ap-green); border-color: var(--ap-green); }
.ap-tab.is-trip.is-on { background: var(--ap-blue); border-color: var(--ap-blue); }

/* ---------- boarding passes ---------- */
.ap-passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 18px; }
.ap-pass { position: relative; display: grid; grid-template-columns: 38% minmax(0, 1fr) 64px; min-height: 196px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: pointer; text-align: left;
    background: var(--ap-paper); color: #1b2436; box-shadow: 0 14px 34px rgba(0,0,0,0.45); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease; }
.ap-pass:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 22px 44px rgba(0,0,0,0.55); }
.ap-pass-photo { position: relative; overflow: hidden; background: #cfd8e6; }
.ap-pass-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ap-pass:hover .ap-pass-photo img { transform: scale(1.06); }
.ap-noimg { display: grid; place-items: center; height: 100%; font-size: 3rem; }
.ap-pass-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 14px 18px; min-width: 0; }
.ap-pass-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 1.5px dashed #d5cdb9; padding-bottom: 8px; }
.ap-pass-top b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 1.15rem; letter-spacing: .1em; color: #1d4ed8; }
.ap-pass-top i { font-style: normal; font-family: 'IBM Plex Mono', monospace; font-size: .64rem; letter-spacing: .16em; color: #8a8270; }
.ap-route { display: grid; grid-template-columns: auto minmax(40px, 1fr) minmax(0, auto); align-items: center; gap: 10px; }
.ap-end { display: flex; flex-direction: column; min-width: 0; }
.ap-end small, .ap-meta small, .ap-stub small { font-family: 'IBM Plex Mono', monospace; font-size: .6rem; letter-spacing: .14em; color: #8a8270; }
.ap-end b { font-size: 1.6rem; line-height: 1.1; font-weight: 400; }
.ap-end em { font-style: normal; font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-end.is-to { text-align: right; align-items: flex-end; }
.ap-end.is-to em { font-family: 'Bebas Neue', 'Outfit', 'Mitr', sans-serif; font-weight: 400; font-size: 1.45rem; letter-spacing: .03em; line-height: 1.05; white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ap-path { position: relative; display: grid; place-items: center; height: 20px; }
.ap-path i { position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dotted #b7ae98; }
.ap-path span { position: relative; background: var(--ap-paper); padding: 0 5px; color: #1d4ed8; font-size: 1.05rem; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.ap-pass:hover .ap-path span { transform: translateX(18px); }
.ap-meta { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 6px 12px; font-size: .84rem; font-weight: 600; }
.ap-meta > span { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; }
.ap-st { font-weight: 700; }
.is-dream .ap-st { color: #b7791f; } .is-booked .ap-st { color: #15803d; } .is-trip .ap-st { color: #1d4ed8; } .is-landed .ap-st { color: #334155; } .is-cancel .ap-st { color: #b91c1c; }
.ap-stars { color: #e0a100; letter-spacing: .08em; font-size: .95rem; }
.ap-stars i { font-style: normal; color: #d8d0bd; }
.ap-note { font-size: .82rem; color: #5b6475; line-height: 1.4; }
/* Stub: perforated edge + barcode */
.ap-stub { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 0; border-left: 2px dashed #d5cdb9; background: #f3ecdc; }
.ap-stub::before, .ap-stub::after { content: ''; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: #0c1526; }
.ap-stub::before { top: -10px; } .ap-stub::after { bottom: -10px; }
.ap-stub b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 1.4rem; line-height: 1; }
.ap-bars { display: flex; flex-direction: column; gap: 2px; margin-top: auto; width: 34px; }
.ap-bars i { display: block; width: 100%; height: 0; border-top: 1px solid #1b2436; }
.ap-bars i.w2 { border-top-width: 2px; } .ap-bars i.w3 { border-top-width: 3px; }
/* Rubber stamp over the photo */
.ap-stamp { position: absolute; right: 10px; bottom: 12px; display: flex; flex-direction: column; align-items: center; padding: 5px 10px; border: 3px double currentColor; border-radius: 8px;
    font-family: 'Bebas Neue', sans-serif; font-size: 1.25rem; letter-spacing: .12em; line-height: 1; transform: rotate(-12deg); background: rgba(255,255,255,0.12);
    backdrop-filter: blur(2px); text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.ap-stamp small { font-family: 'IBM Plex Mono', monospace; font-size: .62rem; letter-spacing: .1em; margin-top: 2px; }
.is-dream .ap-stamp { color: #ffd166; } .is-booked .ap-stamp { color: #6ee7a0; } .is-trip .ap-stamp { color: #8fd0ff; }
.is-landed .ap-stamp { color: #ff5a5a; transform: rotate(-12deg) scale(1.08); } .is-cancel .ap-stamp { color: #ff8a8a; }
.ap-filter-note { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 16px; color: var(--ap-sub); }
.ap-clear { border: 1px solid var(--ap-line); background: var(--ap-panel); color: var(--ap-text); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: .85rem; }
.ap-empty { text-align: center; color: var(--ap-sub); padding: 28px 10px; background: var(--ap-panel); border: 1px dashed var(--ap-line); border-radius: 14px; margin: 0; }

/* ---------- passport ---------- */
.ap-passport { margin-top: 38px; border-radius: 18px; overflow: hidden; background: #1b2a4a; box-shadow: 0 18px 40px rgba(0,0,0,0.45); }
.ap-pp-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: linear-gradient(135deg, #16284d, #0f1d3a); border-bottom: 2px solid #c9a24a; }
.ap-pp-crest { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2px solid #c9a24a; color: #e7c46b; font-size: 1.3rem;
    box-shadow: inset 0 0 0 4px #13244a, inset 0 0 0 5px rgba(201,162,74,0.5); transform: rotate(-20deg); }
.ap-pp-head b { display: block; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 1.5rem; letter-spacing: .12em; color: #e7c46b; line-height: 1; }
.ap-pp-head span { color: #a9b8d6; font-size: .88rem; }
.ap-pp-page { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 26px; padding: 28px 20px 30px;
    background: radial-gradient(circle at 20% 20%, rgba(201,162,74,0.1), transparent 40%), repeating-linear-gradient(45deg, #f4efe2 0 12px, #efe8d7 12px 24px); }
.ap-visa { --ink: #6f7a90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 132px; height: 132px; border-radius: 50%; cursor: pointer;
    border: 3px dashed var(--ink); color: var(--ink); background: transparent; transform: rotate(var(--r, 0deg)); opacity: .82; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.ap-visa:hover { opacity: 1; transform: rotate(0deg) scale(1.05); }
.ap-visa-flag { font-size: 1.9rem; line-height: 1; filter: grayscale(.55) opacity(.85); }
.ap-visa b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 1.1rem; letter-spacing: .08em; line-height: 1.05; text-align: center; padding: 0 10px; }
.ap-visa small { font-family: 'IBM Plex Mono', monospace; font-size: .6rem; letter-spacing: .12em; }
.ap-visa.is-inked { --ink: #c0262d; border-style: double; border-width: 5px; opacity: 1; background: rgba(192,38,45,0.05); }
.ap-visa.is-inked .ap-visa-flag { filter: none; }
.ap-visa:nth-child(3n+2).is-inked { --ink: #1d4ed8; } .ap-visa:nth-child(3n).is-inked { --ink: #15803d; }
.ap-visa.is-on { opacity: 1; transform: rotate(0deg) scale(1.08); box-shadow: 0 0 0 4px rgba(29,78,216,0.25); --ink: #1d4ed8; }

@media (prefers-reduced-motion: reduce) {
    .ap-pass, .ap-pass-photo img, .ap-path span, .ap-visa, .ap-tab { transition: none; }
    .ap-f.is-spin, .ap-row.is-trip .ap-lamp { animation: none; }
}
@media (max-width: 760px) {
    .ap-top { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
    .ap-back { grid-row: 1; grid-column: 1; }
    .ap-top-r { grid-row: 1; grid-column: 2; }
    .ap-brand { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
    .ap-brand b { font-size: 1.8rem; }
    .ap-stats { gap: 14px; font-size: .88rem; }
    .ap-board { padding: 10px 8px 6px; }
    .ap-board-title { font-size: 1.3rem; }
    .ap-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; font-size: .78rem; }
    .ap-col-flight, .ap-row .ap-col-country { display: none; }
    .ap-f { width: .8rem; height: 1.15rem; font-size: .78rem; }
    .ap-f.ap-pad { display: none; }
    .ap-lamp { display: none; }
    .ap-pass { grid-template-columns: 1fr; grid-template-rows: 150px auto auto; }
    .ap-stub { flex-direction: row; justify-content: space-between; padding: 10px 16px; border-left: 0; border-top: 2px dashed #d5cdb9; }
    .ap-stub::before, .ap-stub::after { top: -11px; left: auto; }
    .ap-stub::before { left: -10px; } .ap-stub::after { right: -10px; bottom: auto; }
    .ap-bars { flex-direction: row; width: 120px; height: 26px; margin: 0 0 0 auto; }
    .ap-bars i { width: 0; height: 100%; border-top: 0; border-left: 1px solid #1b2436; }
    .ap-bars i.w2 { border-left-width: 2px; } .ap-bars i.w3 { border-left-width: 3px; }
    .ap-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ap-visa { width: 108px; height: 108px; }
    .ap-pp-page { gap: 14px; }
}

.ap-credit { margin: 18px 0 0; text-align: center; color: #56657f; font-size: .7rem; }
.ap-credit a { color: inherit; }

/* v2 polish (2026-09-29): scrolling info ticker under the board, a faint
   plane watermark + sheen on the passes. */
.ap-ticker { position: relative; overflow: hidden; margin: 8px -16px -10px; padding: 8px 0; background: #ffc53d; color: #1a1204;
    font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: .82rem; letter-spacing: .08em; white-space: nowrap; }
.ap-ticker-track { display: inline-flex; animation: apTicker var(--dur, 30s) linear infinite; }
.ap-ticker-track span { padding-right: 48px; }
.ap-ticker:hover .ap-ticker-track { animation-play-state: paused; }
@keyframes apTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ap-pass-body { position: relative; isolation: isolate; }
.ap-pass-body::before { content: '✈'; position: absolute; z-index: -1; right: 8px; bottom: -18px; font-size: 7.5rem; line-height: 1; color: rgba(29,78,216,0.05); transform: rotate(-18deg); pointer-events: none; }
.ap-pass::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(115deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0) 65%); background-size: 250% 100%; background-position: 130% 0; transition: background-position .8s ease; }
.ap-pass:hover::after { background-position: -30% 0; }
@media (prefers-reduced-motion: reduce) { .ap-ticker-track { animation: none; } .ap-pass::after { display: none; } }
@media (max-width: 760px) { .ap-ticker { margin: 6px -8px -6px; font-size: .72rem; } .ap-row { gap: 8px; } }
