/* Japlan Dashboard stylesheet.
 *
 * Color and layout tokens are pulled from japlanhub.com/css/styles.css and
 * kept here verbatim so the LAN dashboard matches the public site's vibe
 * without hot-linking its proprietary fonts (MOBO, KozGoProRegular,
 * GN-KillGothic-U-KanaNA). Display headings use Zen Maru Gothic from Google
 * Fonts as a free Japanese-style fallback; body uses Noto Sans JP.
 */

/* Kosan — custom display font for hero headings (neon sign style). */
@font-face {
    font-family: 'Kosan';
    src: url('/static/Kosan.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* KozGoPro — Japanese Gothic for neon sub-headings. */
@font-face {
    font-family: 'KozGoPro';
    src: url('/static/KozGoPr6NRegular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Cherry-blossom pink — the primary accent. */
    --accent: #D73B56;
    --accent-glow: rgba(194, 47, 69, 0.9);
    --accent-soft: #dc5265;
    --accent-pink-soft: #ffe6eb;
    --accent-pink-text: #ffe9ed;

    /* Dark navy palette lifted from japlanhub.com. */
    --bg-deep: #23203b;          /* content body card background */
    --bg-deep-translucent: rgba(35, 32, 59, 0.75);
    --bg-card: rgba(23, 21, 43, 0.7);
    --bg-card-solid: #17152b;
    --bg-outer: rgb(37, 58, 102); /* outer content container */
    --text-muted: #8a98a0;
    --text-bright: #ffffff;
    --text-card: #f5f3ff;        /* brightened from #e9e6ff for better contrast */
    --text-soft: rgba(245, 243, 255, 0.78);  /* was 0.55/0.45 — pushed up */

    --radius-card: 30px;
    --radius-button: 5px;
    --shadow-card: 0 0 10px rgba(0, 0, 0, 0.3);

    --font-display: 'Zen Maru Gothic', 'Noto Sans JP', Arial, sans-serif;
    --font-body: 'Noto Sans JP', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--text-card);
    background:
        linear-gradient(rgba(35, 32, 59, 0.78), rgba(35, 32, 59, 0.92)),
        url("https://japlanhub.com/2026/image/bg.gif") center / cover no-repeat fixed #17152b;
    background-attachment: fixed, fixed;
    min-height: 100vh;
}

a {
    color: var(--accent-soft);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.15s ease;
}
a:hover { border-bottom-color: var(--accent-soft); }

code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent-pink-text);
}

/* ---- Top nav ---- */

.topnav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 18px;
    flex-wrap: wrap;
}
.topnav a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-card);
    background: rgba(23, 21, 43, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 8px 16px;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.topnav a:hover {
    color: var(--accent);
    border-color: rgba(215, 59, 86, 0.4);
    background: rgba(23, 21, 43, 0.85);
}
.topnav a.active {
    color: #fff;
    background: linear-gradient(155deg, rgba(215, 59, 86, 0.85), rgba(215, 59, 86, 0.5));
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(215, 59, 86, 0.45);
}

/* ---- Page shell ---- */

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ---- Hero ---- */

.hero {
    text-align: center;
    margin-bottom: 28px;
    padding: 32px 20px;
}

/* Neon flicker — runs once on page load, then the inline script below
   re-triggers it on a random 30–90s cadence. Steps mimic a failing
   tube: two short on-pulses, an off-gap, one more pulse, then settle.
   Total runtime 0.5s — long enough to see the stutter without feeling
   like a real fault. */
@keyframes japlan-neon-flicker {
    0%   { opacity: 1; }
    4%   { opacity: 0.25; }
    8%   { opacity: 1; }
    14%  { opacity: 0.4; }
    18%  { opacity: 0.95; }
    24%  { opacity: 0.2; }
    30%  { opacity: 1; }
    36%  { opacity: 0.6; }
    44%  { opacity: 1; }
    100% { opacity: 1; }
}
.hero h1.flicker {
    animation: japlan-neon-flicker 0.5s steps(1, end) 1 both;
}
@media (prefers-reduced-motion: reduce) {
.hero h1.flicker { animation: none; }
}

/* ---- "Electric Boogaloo" click-burst ----
   Triggered by an inline script in _base.html that adds .boogalo-active
   to the subtitle. The scale + glow-boost is the click feedback, and
   .boogalo-active stays on for ~1.2s while the particles fly and fade.
   Particles are generated by the script (16 CSS-painted pink dots +
   8 emoji). The script handles reduced-motion as well. */
.hero .neon-ja.boogaloo-click {
    cursor: pointer;
    user-select: none;
    transition: text-shadow 200ms ease-out, transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero .neon-ja.boogaloo-active {
    /* Scale up + boost the existing neon glow. The text-shadow here
       REPLACES the one in .hero .neon-ja during the burst, then the
       .boogaloo-active class is removed and the original returns. */
    transform: scale(1.35);
    display: inline-block;
    text-shadow:
        0 0 1px #fff,
        0 0 16px #fff,
        0 0 1px #fcb5c1,
        0 0 14px #fcb5c1,
        0 0 42px var(--accent),
        0 0 86px var(--accent),
        0 0 138px var(--accent),
        0 0 226px var(--accent);
}
@media (prefers-reduced-motion: reduce) {
    .hero .neon-ja.boogaloo-active {
        /* No scale + no glow boost for reduced-motion users; the
           particles script also short-circuits the fly-out, so they
           just see a brief text-color flash. */
        transform: none;
    }
    .hero .neon-ja.boogaloo-click { cursor: pointer; }
}

/* Burst particle — small pink dot painted with a radial gradient so
   each one has a soft edge. JS sets the --tx / --ty custom properties
   to animate each particle outward. The .boogaloo-active class on the
   subtitle triggers the fly. */
.boogalo-particle {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #ffb3c2 40%, rgba(215, 59, 86, 0) 80%);
    pointer-events: none;
    z-index: 9999;
    will-change: transform, opacity;
    --tx: 0px;
    --ty: 0px;
    opacity: 0;
}
.hero .neon-ja.boogaloo-active ~ .boogalo-particle {
    /* When the subtitle is .boogaloo-active, fly each particle to
       (--tx, --ty) while fading. JS sets --tx/--ty per particle. */
    animation: boogalo-fly 1100ms cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}
/* Emoji particles are larger so the unicode glyph renders crisp. */
.boogalo-particle.boogalo-emoji {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    background: none;
    font-size: 22px;
    line-height: 1;
}
@keyframes boogalo-fly {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
    10%  { opacity: 1; }
    60%  { opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .boogalo-particle { display: none; }
}
.hero h1 {
    font-family: 'Kosan', var(--font-display);
    font-weight: normal;
    font-size: clamp(40px, 6vw, 64px);
    margin: 0;
    color: #ffe8ea;
    letter-spacing: 0.04em;
    text-shadow:
        0 0 1px #fff,
        0 0 10px #fff,
        0 0 1px #fcb5c1,
        0 0 8px #fcb5c1,
        0 0 42px var(--accent),
        0 0 82px var(--accent),
        0 0 92px var(--accent),
        0 0 102px var(--accent),
        0 0 151px var(--accent);
}
.hero .neon-rule {
    border: none;
    height: 2px;
    margin: 12px auto 10px;
    width: min(280px, 60%);
    background: var(--accent);
    box-shadow:
        0 0 6px var(--accent),
        0 0 16px var(--accent),
        0 0 40px var(--accent),
        0 0 60px rgba(215, 59, 86, 0.4);
    border-radius: 2px;
}
.hero .neon-ja {
    font-family: 'KozGoPro', 'Noto Sans JP', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 2.5vw, 22px);
    color: #ffe8ea;
    letter-spacing: 0.15em;
    margin: 0;
    text-shadow:
        0 0 1px #fff,
        0 0 6px #fff,
        0 0 1px #fcb5c1,
        0 0 6px #fcb5c1,
        0 0 28px var(--accent),
        0 0 56px var(--accent);
}
.hero .subtitle {
    margin: 6px 0 0;
    color: var(--accent-pink-text);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.04em;
}
.hero .last-fetched {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--text-soft);
}
.hero .last-fetched .dot {
    margin: 0 6px;
    opacity: 0.5;
}

/* ---- Countdown ---- */

.countdown-card {
    /* Pink-tinted glassy surface so the countdown reads as the dashboard's
       hero element above the KPI grid. */
    text-align: center;
    background:
        linear-gradient(135deg, rgba(215, 59, 86, 0.12), rgba(232, 134, 155, 0.04));
    border: 1px solid rgba(215, 59, 86, 0.32);
    overflow: hidden;
}

.countdown {
    /* Tiles laid out as a responsive grid. The days tile is wider than the
       other four (it's the visual anchor) so it spans 2 columns on desktop.
       HH/MM/SS/MS tiles share the remaining columns. The ms tile is the
       smallest visually since its digits tick fast — a "live ticker". */
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 0.7fr;
    gap: 8px;
    margin: 18px auto 10px;
    max-width: 580px;
    padding: 0 8px;
}

.cd-tile {
    /* Each tile: rounded slab with the number on top, label below.
       Background is a soft dark glass; numbers pop in tabular mono. */
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    position: relative;
    overflow: hidden;
}
.cd-tile::before {
    /* Subtle top accent line on each tile — gives them a "ticker" feel
       without screaming. */
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 100%
    );
}

.cd-tile--days {
    /* The days tile is the hero — pink-tinted, larger, gradient-filled. */
    background: linear-gradient(155deg, var(--accent), #ff7a93);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 22px rgba(215, 59, 86, 0.35);
    min-height: 96px;
}
.cd-tile--days .cd-num {
    /* White-on-pink for max contrast on the hero tile. */
    color: #fff;
}
.cd-tile--days .cd-label {
    color: rgba(255, 255, 255, 0.85);
}

.cd-num {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 30px;
    line-height: 1;
    color: var(--accent);
    letter-spacing: 0.02em;
}
.cd-tile--days .cd-num {
    /* Hero tile uses a much bigger number. */
    font-size: 44px;
}

/* Millisecond tile — same background, border, and text colors as HH/MM/SS
   so all four sub-day tiles look uniform. The number is just rendered
   smaller because ms only has 3 digits and ticks fast — that already
   reads as a "ticker" without needing extra visual treatment. */
.cd-tile--ms {
    padding: 12px 2px 8px;
    min-height: 78px;
}
.cd-tile--ms .cd-num {
    font-size: 18px;
    letter-spacing: 0;
}
.cd-tile--ms .cd-label {
    font-size: 9px;
    letter-spacing: 0.12em;
}

.cd-label {
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* .cd-ms lives inside its own .cd-tile--ms tile (see above). The ms value
   ticks fast by design — that's the point. */

.countdown-meta {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-soft);
}

/* ---- Countdown responsive ----
   Tiers (broad → narrow):
     ≤ 600px  shrink fonts, tighten tile padding
     ≤ 480px  stack: days tile on top, hh/mm/ss on a 3-col row below
     ≤ 380px  full 2x2 grid for hh/mm/ss tiles, days tile full width
*/

@media (max-width: 600px) {
    .countdown { gap: 6px; padding: 0 4px; }
    .cd-tile { padding: 10px 4px 7px; min-height: 64px; border-radius: 10px; }
    .cd-tile--days { min-height: 78px; }
    .cd-tile--ms { padding: 10px 2px 7px; }
    .cd-num { font-size: 24px; }
    .cd-tile--days .cd-num { font-size: 36px; }
    .cd-tile--ms .cd-num { font-size: 14px; }
    .cd-label { font-size: 9px; letter-spacing: 0.12em; }
    .countdown-meta { font-size: 12px; }
}

@media (max-width: 480px) {
    /* Days tile spans the full first row, hh/mm/ss/ms share row 2. */
    .countdown {
        grid-template-columns: 1fr 1fr 1fr 0.6fr;
        grid-template-rows: auto auto;
    }
    .cd-tile--days {
        grid-column: 1 / -1;
        min-height: 72px;
    }
    .cd-tile--days .cd-num { font-size: 40px; }
    .cd-num { font-size: 26px; }
    .cd-tile--ms .cd-num { font-size: 13px; }
}

@media (max-width: 380px) {
    /* On really narrow phones, hh/mm/ss/ms wrap to a 2x2 grid below the days tile. */
    .countdown {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
    }
    .cd-tile--days {
        grid-column: 1 / -1;
    }
    .cd-tile--days .cd-num { font-size: 34px; }
    .cd-num { font-size: 22px; }
    .cd-tile--ms .cd-num { font-size: 12px; }
    .cd-label { font-size: 9px; }
}

/* ---- Public /takeoff page ----
   A standalone screen with the countdown card centered on top of the
   bg.gif page background. The countdown tiles get a generous size
   bump here (it's a "share it on a TV" experience, not a dashboard
   widget) and the card itself uses a heavier glassy treatment so
   it stands out against the busy gif. */

.page-takeoff {
    /* Full-width: override the .page container constraints so the
       background bleeds edge-to-edge with only the card centered. */
    max-width: none;
    margin: 0;
    padding: 0;

    /* Lighter overlay than the dashboard so the bg.gif stays visible
       behind the card. The dashboard uses 0.78/0.92 darkening for
       readability across many cards; here we have one card centered
       and we want the gif to breathe. */
    background:
        linear-gradient(rgba(23, 21, 43, 0.55), rgba(23, 21, 43, 0.65)),
        url("/static/bg.gif") center / cover no-repeat fixed #17152b;
    background-attachment: fixed, fixed;
    min-height: 100vh;
}

.takeoff-stage {
    /* Full-viewport flex container that vertically and horizontally
       centers the card. */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.takeoff-card-wrap {
    width: 100%;
    max-width: 640px;
}

.takeoff-card-wrap .countdown-card {
    /* Beefier glass: more opaque so the card stays readable over any
       frame of the bg.gif, with a stronger drop shadow to lift it. */
    background:
        linear-gradient(135deg, rgba(215, 59, 86, 0.18), rgba(232, 134, 155, 0.08)),
        rgba(23, 21, 43, 0.92);
    border: 1px solid rgba(215, 59, 86, 0.45);
    border-radius: 22px;
    padding: 32px 28px 28px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(10px);
}

.takeoff-card-wrap .countdown {
    /* Scale the tiles up for the public screen. The grid columns stay
       the same proportions as the dashboard so days still feels like
       the hero, but everything reads at a comfortable distance. */
    max-width: 100%;
    margin-top: 22px;
    gap: 10px;
    padding: 0;
}
.takeoff-card-wrap .cd-tile {
    min-height: 92px;
    border-radius: 14px;
    padding: 14px 6px 10px;
}
.takeoff-card-wrap .cd-tile--days {
    min-height: 116px;
}
.takeoff-card-wrap .cd-num {
    font-size: 36px;
}
.takeoff-card-wrap .cd-tile--days .cd-num {
    font-size: 54px;
}
.takeoff-card-wrap .cd-tile--ms .cd-num {
    font-size: 22px;
}
.takeoff-card-wrap .cd-label {
    font-size: 11px;
}
.takeoff-card-wrap .cd-tile--ms .cd-label {
    font-size: 10px;
}
.takeoff-card-wrap .countdown-meta {
    margin-top: 14px;
    font-size: 14px;
}

@media (max-width: 600px) {
    .takeoff-card-wrap .cd-tile { min-height: 72px; padding: 10px 4px 8px; }
    .takeoff-card-wrap .cd-tile--days { min-height: 90px; }
    .takeoff-card-wrap .cd-num { font-size: 28px; }
    .takeoff-card-wrap .cd-tile--days .cd-num { font-size: 42px; }
    .takeoff-card-wrap .cd-tile--ms .cd-num { font-size: 16px; }
    .takeoff-card-wrap .cd-label { font-size: 10px; }
    .takeoff-card-wrap .countdown-card { padding: 24px 18px 20px; }
}

@media (max-width: 380px) {
    .takeoff-card-wrap .cd-tile { min-height: 60px; padding: 8px 2px 6px; }
    .takeoff-card-wrap .cd-tile--days { min-height: 76px; }
    .takeoff-card-wrap .cd-num { font-size: 24px; }
    .takeoff-card-wrap .cd-tile--days .cd-num { font-size: 36px; }
    .takeoff-card-wrap .cd-tile--ms .cd-num { font-size: 14px; }
    .takeoff-card-wrap .cd-label { font-size: 9px; }
}

/* ---- Cards ---- */

.card {
    background-color: rgba(23, 21, 43, 0.88);
    border-radius: var(--radius-card);
    padding: 20px 24px 24px;
    margin: 20px auto;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.card h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    color: var(--accent);
    margin: 4px 0 8px;
    text-align: center;
    letter-spacing: 0.02em;
}

.card hr {
    margin: 0 auto 18px;
    border: none;
    background-color: var(--accent);
    height: 2px;
    width: 90%;
    border-radius: 2px;
    opacity: 0.85;
}

/* ---- Pay Online card ---- */

.pay-online {
    text-align: center;
}
.pay-online-desc {
    color: var(--text-soft);
    margin: 0 0 18px;
    font-size: 15px;
}
.pay-online-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    background: rgba(215, 59, 86, 0.18);
    border: 1px solid rgba(215, 59, 86, 0.45);
    text-decoration: none;
    color: var(--text-bright);
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.pay-online-btn:hover {
    background: rgba(215, 59, 86, 0.32);
    border-color: rgba(215, 59, 86, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(215, 59, 86, 0.25);
}
.pay-online-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}
.pay-online-btn span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.02em;
}

.card-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-soft);
}
.card-footer strong {
    color: var(--text-bright);
    font-weight: 700;
}

/* ---- KPI grid (hero tiles) ---- */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    padding: 18px;
}
.kpi {
    background: linear-gradient(155deg, rgba(215, 59, 86, 0.16), rgba(35, 32, 59, 0.5));
    border: 1px solid rgba(215, 59, 86, 0.35);
    border-radius: 18px;
    padding: 18px 14px;
    text-align: center;
    box-shadow: 0 0 18px rgba(194, 47, 69, 0.18);
}
.kpi-label {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--text-bright);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
    opacity: 0.85;
}
.kpi-value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 30px;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(215, 59, 86, 0.3);
}
.kpi-sub {
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-soft);
}

/* ---- Row of two cards ---- */

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 800px) {
    .row { grid-template-columns: 1fr; }
}
.half { margin: 0; }

/* ---- Tables ---- */

.table-wrap { overflow-x: auto; }

table {
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    font-size: 14px;
}
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
th {
    color: var(--text-bright);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(215, 59, 86, 0.4);
    opacity: 0.9;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tr:hover td { background-color: rgba(215, 59, 86, 0.04); }

.person-name {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-bright);
    font-size: 15px;
}
.person-meta {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-soft);
}
.group {
    font-size: 22px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge.ok {
    background: rgba(80, 200, 120, 0.18);
    color: #7be39c;
    border: 1px solid rgba(80, 200, 120, 0.4);
}
.badge.partial {
    background: rgba(230, 180, 60, 0.18);
    color: #f7d774;
    border: 1px solid rgba(230, 180, 60, 0.4);
}
.badge.pending {
    background: rgba(215, 59, 86, 0.15);
    color: #ffb3c0;
    border: 1px solid rgba(215, 59, 86, 0.4);
}

.num.neg { color: #ffb3c0; }

/* ---- Per-person totals grid ---- */

.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.total-tile {
    display: block;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-card);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.total-tile:hover {
    border-color: var(--accent);
    background: rgba(215, 59, 86, 0.12);
    transform: translateY(-2px);
}
.total-name {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-bright);
    font-size: 14px;
    margin-bottom: 4px;
}
.total-amount {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 20px;
    color: var(--accent);
}
.total-tile.empty {
    opacity: 0.55;
    border-style: dashed;
}
.total-tile.empty:hover {
    opacity: 1;
}
.total-tile.empty .total-amount {
    color: var(--text-soft);
}
/* ---- Funding tiles (budget page) ---- */

.funding-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.funding-tile {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
}
.funding-tile.highlight {
    border-color: rgba(215, 59, 86, 0.5);
    background: rgba(215, 59, 86, 0.12);
    box-shadow: 0 0 18px rgba(215, 59, 86, 0.18);
}
.ft-label {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}
.ft-value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 22px;
    color: var(--accent);
}
.ft-value.ok { color: #7be39c; }
.ft-value.pending { color: #ffb3c0; }
.ft-sub {
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-soft);
}

/* ---- Big progress bar (traveler profile) ---- */

.big-bar {
    position: relative;
    height: 36px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.big-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #ff7a93 100%);
    box-shadow: 0 0 14px var(--accent-glow);
    transition: width 0.4s ease;
}
.big-bar span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* ---- Misc ---- */

.group-hero {
    font-size: 0.7em;
    vertical-align: middle;
    margin-left: 6px;
}
.link-name {
    color: inherit;
    text-decoration: none;
    border-bottom: none;
}
.link-name:hover .person-name {
    color: var(--accent);
}
.email, .discord-id {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    color: var(--accent-pink-text);
    word-break: break-all;
}
.empty {
    text-align: center;
    color: var(--text-soft);
    padding: 30px 0;
    font-style: italic;
}
tfoot td {
    border-top: 2px solid rgba(215, 59, 86, 0.4);
    border-bottom: none;
    padding-top: 14px;
    background: rgba(0, 0, 0, 0.2);
}

/* ---- Funding bar (small, in dashboard travelers table) ---- */

.bar-wrap {
    position: relative;
    height: 22px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 11px;
    overflow: hidden;
    min-width: 110px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #ff7a93 100%);
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 0.4s ease;
}
.bar-wrap span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* ---- Deadlines list ---- */

.deadlines {
    list-style: none;
    padding: 0;
    margin: 0;
}
.deadlines li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    color: var(--text-bright);
    font-size: 15px;
}
.deadlines li:last-child { border-bottom: none; }
.deadline-label { color: var(--text-soft); }
.deadline-value {
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
}

/* ---- Receipts table ---- */

/* ---- Footer ---- */

.page-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 12px;
    color: var(--text-soft);
}
.page-footer p { margin: 0; }

/* ---- Suggested payment pace tiles ---- */

.suggested-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 4px 0 8px;
}
.suggested-tile {
    background: linear-gradient(135deg, rgba(215, 59, 86, 0.10) 0%, rgba(215, 59, 86, 0.04) 100%);
    border: 1px solid rgba(215, 59, 86, 0.25);
    border-radius: 18px;
    padding: 18px 20px;
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.suggested-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(215, 59, 86, 0.55);
}
.suggested-tile .st-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.suggested-tile .st-value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 30px;
    line-height: 1.1;
    color: var(--accent);
    margin-bottom: 6px;
}
.suggested-tile .st-sub {
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.4;
}
.suggested-tile .st-sub strong {
    color: var(--text-card);
    font-weight: 700;
}

/* ---- Flights page ---- */

.flight-confirm {
    text-align: center;
}
.plane-ticket-lottie {
    /* Sized for a centered hero above the Confirmation heading. Collapses
       to 0 height when lottie-web fails to load so the rest of the card
       stays clean. max-width keeps it from overflowing on narrow viewports. */
    width: 100%;
    max-width: 280px;
    height: 180px;
    margin: 4px auto 14px;
    line-height: 0;
}
.flight-confirm .confirm-code {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 48px;
    letter-spacing: 0.16em;
    color: var(--accent);
    text-shadow: 0 0 22px rgba(215, 59, 86, 0.4);
    margin: 6px 0 8px;
}
.click-copy {
    cursor: pointer;
}
/* --- Click-to-copy effects --- */
.copy-fly-line {
    position: fixed;
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--accent);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
    animation: fly-out 0.5s ease-out forwards;
}
@keyframes fly-out {
    0%   { opacity: 1;   transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) translateY(0); }
    100% { opacity: 0;   transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) translateY(calc(-1 * var(--dist, 50px))); }
}
.copy-popup {
    position: fixed;
    transform: translateX(-50%);
    font-family: var(--font-display, sans-serif);
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
    background: var(--card-bg, #fff);
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    pointer-events: none;
    z-index: 9999;
    animation: pop-up 0.8s ease-out forwards;
    white-space: nowrap;
}
@keyframes pop-up {
    0%   { opacity: 1;   transform: translateX(-50%) translateY(0); }
    100% { opacity: 0;   transform: translateX(-50%) translateY(-28px); }
}
.flight-confirm .confirm-note {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
}
.flight-confirm a { color: var(--accent); }
.confirm-inline {
    font-family: var(--font-display);
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 8px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.flight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px auto;
}
@media (max-width: 700px) {
    .flight-grid { grid-template-columns: 1fr; }
}
.flight-card { margin: 0; }
.flight-direction {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.flight-emoji { font-size: 24px; }
.flight-route {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 18px;
    color: var(--accent);
    letter-spacing: 0.08em;
}
.flight-card h2 { margin-bottom: 6px; }
.flight-details {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 6px 14px;
    margin: 12px 0 0;
}
.flight-details dt {
    color: var(--text-soft);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 2px;
    font-weight: 600;
}
.flight-details dd {
    margin: 0;
    color: var(--text-bright);
    font-size: 14px;
}
.flight-details dd strong { color: var(--accent); font-weight: 800; }
.flight-details .airport {
    color: var(--text-soft);
    margin-left: 6px;
    font-size: 12px;
}
.flight-details .day-next {
    color: var(--accent);
    font-style: italic;
    font-size: 12px;
    margin-left: 6px;
}

.ticket-steps {
    margin: 0;
    padding-left: 22px;
    color: var(--text-card);
    line-height: 1.7;
    font-size: 14px;
}
.ticket-steps li { margin: 2px 0; }
.ticket-steps a { color: var(--accent); }

.seating-card .seating-note {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 13px;
}
.seating-image {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 12px;
}
.seating-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}
.seating-image img:hover { transform: scale(1.01); }

/* ---- Housing page ---- */

.housing-image {
    border-radius: 18px;
    overflow: hidden;
    margin: 12px 0;
}

.housing-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
}

.housing-image-caption {
    text-align: center;
    font-size: 13px;
    margin-top: 8px;
}

.housing-list {
    list-style: disc;
    padding-left: 22px;
    margin: 4px 0 16px;
    color: var(--text-card);
}

.housing-list li {
    margin: 4px 0 6px;
}

/* ---- Map links (housing page) ---- */
.map-link {
    color: var(--text-card);
    text-decoration: none;
    border-bottom: 1px dotted rgba(215, 59, 86, 0.45);
    transition: border-color 0.15s, color 0.15s;
}
.map-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.map-link strong { color: inherit; }
.map-emoji {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.85em;
    opacity: 0.7;
}

/* ---- Map embed (housing page) ---- */
.map-embed-card { text-align: center; }
.map-embed-wrap {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 14px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    aspect-ratio: 4 / 3;
}
.map-embed-wrap iframe {
    width: 100%;
    height: 100%;
    display: block;
}
.map-embed-caption {
    margin: 0;
    font-size: 13px;
    color: var(--text-soft);
}
.map-embed-caption a { color: var(--accent); }

.card h3 {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--accent);
    margin: 16px 0 6px;
}

@media (max-width: 600px) {
    .housing-image {
        border-radius: 14px;
    }
}

/* ---- Villa photo carousel ---- */

.carousel {
    margin: 12px 0;
}

.carousel-stage {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.30);
    border-radius: 18px;
    overflow: hidden;
}

.carousel-viewport {
    flex: 1;
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 70vh;
    cursor: zoom-in;
    user-select: none;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease-in-out;
}

.carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.carousel-caption {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-soft);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.carousel-arrow {
    background: rgba(35, 32, 59, 0.65);
    color: var(--accent);
    border: 1px solid rgba(215, 59, 86, 0.40);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 150ms ease, transform 150ms ease;
}

.carousel-arrow:hover {
    background: rgba(215, 59, 86, 0.35);
    transform: scale(1.05);
}

.carousel-arrow:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.carousel-counter {
    text-align: center;
    font-size: 13px;
    color: var(--text-soft);
    margin: 8px 0 12px;
    font-variant-numeric: tabular-nums;
}

.carousel-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 6px 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.carousel-thumb {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    width: 64px;
    height: 48px;
    flex-shrink: 0;
    overflow: hidden;
    transition: border-color 150ms ease, transform 150ms ease;
    opacity: 0.55;
}

.carousel-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.carousel-thumb.is-active {
    border-color: var(--accent);
    opacity: 1;
}

.carousel-thumb:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-soft);
    margin: 8px 0 0;
    opacity: 0.7;
}

/* ---- Lightbox (zoom overlay) ---- */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 20, 0.94);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.lightbox-close,
.lightbox-arrow {
    position: absolute;
    background: rgba(35, 32, 59, 0.65);
    color: var(--accent);
    border: 1px solid rgba(215, 59, 86, 0.40);
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
}

.lightbox-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-arrow {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 36px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-arrow--prev { left: 18px; }
.lightbox-arrow--next { right: 18px; }

.lightbox-close:hover,
.lightbox-arrow:hover {
    background: rgba(215, 59, 86, 0.45);
    transform: scale(1.05);
}

.lightbox-arrow:hover {
    transform: translateY(-50%) scale(1.05);
}

.lightbox-close:focus-visible,
.lightbox-arrow:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(35, 32, 59, 0.75);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-card);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
    .carousel-thumb {
        width: 48px;
        height: 36px;
    }
    .lightbox-arrow {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
}

/* ---- Responsive tweaks ---- */

@media (max-width: 600px) {
    .page { padding: 24px 12px 40px; }
    .card { padding: 16px 14px 18px; }
    .kpi-value { font-size: 24px; }
    .hero h1 { font-size: 40px; }
}

/* ---- Login page ---- */

.page--login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.login-card {
    background: rgba(23, 21, 43, 0.92);
    border: 1px solid rgba(215, 59, 86, 0.25);
    border-radius: 24px;
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55),
                0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(8px);
}

.login-card h1 {
    text-align: center;
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 36px;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.login-card .subtitle {
    text-align: center;
    margin: 0 0 18px;
    color: var(--text-soft);
    font-size: 14px;
}

.login-card hr {
    border: none;
    height: 1px;
    background: rgba(215, 59, 86, 0.2);
    margin: 0 auto 22px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-top: 8px;
}

.login-form input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--text-card);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-form input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.5);
}

.login-form button {
    margin-top: 18px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 13px 18px;
    font: inherit;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.login-form button:hover {
    background: #e64e69;
    transform: translateY(-1px);
}

.login-form button:active {
    transform: translateY(0);
}

.login-error {
    background: rgba(215, 59, 86, 0.15);
    border: 1px solid rgba(215, 59, 86, 0.4);
    color: #ffb6c2;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin: 0 0 14px;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin: 22px 0 0;
    color: var(--text-soft);
    font-size: 12px;
    font-style: italic;
}

.login-cross-link {
    text-align: center;
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-soft);
}

.login-cross-link a {
    color: var(--accent, #D73B56);
    text-decoration: none;
    font-weight: 600;
}

.login-cross-link a:hover,
.login-cross-link a:focus {
    text-decoration: underline;
}

/* ---- Logged-in indicator (topnav) ---- */

.topnav .logged-in {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 6px;
    font-size: 13px;
    color: var(--text-soft);
}

.topnav .logged-in .who {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent);
}

.topnav .logged-in form {
    display: inline;
    margin: 0;
    padding: 0;
}

.topnav .logged-in button {
    background: none;
    border: 1px solid rgba(215, 59, 86, 0.3);
    color: var(--text-soft);
    border-radius: 6px;
    padding: 4px 10px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.topnav .logged-in button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---- Shuttle section (flights page) ---- */

.shuttle-card { margin: 20px auto; }
.shuttle-service {
    /* Inherits .menu-service panel styling; tweak inner spacing only. */
    display: flex;
    flex-direction: column;
}
.shuttle-when {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text-soft);
    font-style: italic;
}
.shuttle-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 14px;
    row-gap: 6px;
    margin: 0;
    font-size: 13px;
}
.shuttle-details dt {
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.08em;
    padding-top: 2px;
    align-self: start;
}
.shuttle-details dd {
    margin: 0;
    color: var(--text-bright);
}
.shuttle-details dd strong { color: var(--accent); font-weight: 800; }
.shuttle-details .airport {
    color: var(--text-soft);
    margin-left: 4px;
    font-size: 11px;
}
.shuttle-pickup {
    margin: 16px 0 0;
    padding: 12px 16px;
    background: rgba(215, 59, 86, 0.12);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-bright);
}
.shuttle-pickup a { color: var(--accent); }

/* ---- Lodging section (flights page) ---- */

.lodging-card h2 { line-height: 1.3; }
.lodging-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}
.lodging-block {
    text-align: center;
    padding: 14px 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
}
.lodging-block.lodging-arrow {
    background: transparent;
    border: 1px dashed rgba(245, 243, 255, 0.25);
    padding: 12px 16px;
}
.lodging-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.lodging-value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 17px;
    color: var(--text-card);
    margin-bottom: 4px;
}
.lodging-sub {
    font-size: 12px;
    color: var(--text-soft);
}
.lodging-arrow-text {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 14px;
    color: var(--accent);
    text-align: center;
}
.lodging-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 16px;
    row-gap: 8px;
    margin: 0 0 16px;
}
.lodging-details dt {
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    align-self: center;
}
.lodging-details dd {
    margin: 0;
    color: var(--text-card);
}
.lodging-note {
    margin: 0;
    padding: 12px 16px;
    background: rgba(215, 59, 86, 0.12);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-bright);
}
.lodging-note strong { color: var(--accent); }

/* ---- About this property card ---- */
.lodging-about-paragraph {
    margin: 0 0 14px;
    line-height: 1.55;
    color: var(--text-card);
    font-size: 14px;
}
.lodging-about-paragraph:last-of-type {
    margin-bottom: 6px;
}
.lodging-about-paragraph strong {
    color: var(--text-bright);
}
.lodging-about-amenities-heading {
    margin: 8px 0 12px;
    font-size: 15px;
    color: var(--text-bright);
    letter-spacing: 0.02em;
}
.lodging-amenities {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lodging-amenity {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(215, 59, 86, 0.10);
    border: 1px solid rgba(215, 59, 86, 0.35);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-bright);
    letter-spacing: 0.01em;
}

/* Amenity with a footnote-style tooltip. */
.lodging-amenity--noted {
    position: relative;
    cursor: help;
}
.amenity-note {
    margin-left: 1px;
    color: var(--accent);
    font-weight: 700;
}
.amenity-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 260px;
    padding: 8px 12px;
    background: var(--bg-card-solid);
    border: 1px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(215, 59, 86, 0.25);
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-card);
    text-align: center;
    letter-spacing: 0.01em;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
    z-index: 10;
}
.lodging-amenity--noted:hover .amenity-tooltip,
.lodging-amenity--noted:focus .amenity-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}
.amenity-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent) transparent transparent transparent;
}

@media (max-width: 700px) {
    .lodging-grid {
        grid-template-columns: 1fr;
    }
    .lodging-block.lodging-arrow {
        order: 0;
    }
}

/* ---- Fare badge ---- */
.fare-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(215, 59, 86, 0.15);
    border: 1px solid rgba(215, 59, 86, 0.4);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
}

/* ---- Baggage section ---- */
.baggage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}
.baggage-block {
    text-align: center;
    padding: 16px 10px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}
.baggage-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.baggage-value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 22px;
    color: var(--text-bright);
}
.baggage-value small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-soft);
}
.baggage-note {
    margin: 0;
    padding: 12px 16px;
    background: rgba(215, 59, 86, 0.12);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-bright);
}
@media (max-width: 500px) {
    .baggage-grid { grid-template-columns: 1fr; }
}

/* ---- In-flight menu ---- */
.menu-note {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 13px;
}
.menu-service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
@media (max-width: 600px) {
    .menu-service-grid { grid-template-columns: 1fr; }
}
.menu-service {
    padding: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}
.menu-service-phase {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 2px;
}
.menu-service-type {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-bright);
    margin-bottom: 6px;
}
.menu-service p {
    margin: 0;
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.5;
}
.menu-beverages {
    padding: 14px;
    background: rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}
.menu-beverages h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--text-bright);
}
.menu-bev-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 500px) {
    .menu-bev-grid { grid-template-columns: 1fr; }
}
.menu-bev strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-bright);
    margin-bottom: 4px;
}
.menu-bev p {
    margin: 0;
    font-size: 13px;
    color: var(--text-soft);
}

/* ---- Interactive seating chart (flights page) ---- */

/* Outer card gets extra right-padding so the chart and roster side-by-side
   sit comfortably without the roster hugging the card edge. */
.seating-card {
    overflow: hidden;
}
.seating-card .seating-note {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 13px;
}

/* Tabs: two large click targets that swap between outbound / return.
   Sit side-by-side on desktop, stack on mobile. */
.seat-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 16px;
}
@media (max-width: 600px) {
    .seat-tabs { grid-template-columns: 1fr; }
}
.seat-tab {
    appearance: none;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    color: var(--text-card);
    text-align: left;
    font-family: inherit;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
}
.seat-tab:hover {
    border-color: rgba(215, 59, 86, 0.4);
    background: rgba(215, 59, 86, 0.06);
}
.seat-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.seat-tab.is-active {
    border-color: var(--accent);
    background:
        linear-gradient(155deg, rgba(215, 59, 86, 0.18), rgba(215, 59, 86, 0.04));
    box-shadow: 0 0 18px rgba(215, 59, 86, 0.18);
}
.seat-tab-emoji {
    grid-row: 1 / span 2;
    font-size: 26px;
    line-height: 1;
}
.seat-tab-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-bright);
    line-height: 1.2;
}
.seat-tab-sub {
    font-size: 11px;
    color: var(--text-soft);
    letter-spacing: 0.02em;
}
.seat-tab.is-active .seat-tab-label { color: #fff; }

/* Panel: chart on the left, roster on the right.
   On narrow screens the roster drops below the chart. */
.seat-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: start;
}
.seat-panel[hidden] { display: none; }

/* Cabin frame: rounded dark slab with a faint nose/tail cue.
   Holds the rows; horizontal scroll on overflow so mobile works.
   Width is fluid — no min-width. The seat-row-cells grid uses minmax(0, 1fr)
   so columns can shrink on narrow screens without overflowing. */
.seat-canvas {
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 18px 14px 14px;
    overflow-x: auto;
}
.seat-cabin {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(35, 32, 59, 0.55), rgba(23, 21, 43, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px 999px 18px 18px / 60px 60px 18px 18px;
    padding: 12px 14px 18px;
    position: relative;
}
.seat-nose,
.seat-tail {
    text-align: center;
    font-size: 11px;
    color: var(--text-soft);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 4px 0 8px;
}
.seat-tail {
    padding: 8px 0 4px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    margin-top: 6px;
}

/* One row: [row#] [cells........] [row# mirror].
   Row-num columns use `auto` (intrinsic sizing) so they shrink to the
   2-3 digit row number on narrow screens; the cells column gets the
   remaining width via minmax(0, 1fr). */
.seat-row {
    display: grid;
    grid-template-columns: minmax(18px, auto) minmax(0, 1fr) minmax(18px, auto);
    align-items: center;
    gap: 6px;
    margin: 2px 0;
}
.seat-row--bare {
    /* Gap row (row 61) — no row numbers, just the divider bar across the cells column. */
    grid-template-columns: minmax(0, 1fr);
}
.seat-row-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    color: var(--text-soft);
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.seat-row-num--mirror { color: var(--text-soft); opacity: 0.5; }

/* Cells live in an 11-column grid (3 + aisle + 3 + aisle + 3 = 11).
   minmax(0, 1fr) lets the grid shrink below its content's intrinsic
   width on narrow viewports; otherwise the seat cells overflow the
   canvas and force a horizontal scroll on phones. */
.seat-row-cells {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 4px;
}

/* Aisle = invisible spacer between seat blocks. */
.seat-aisle {
    /* takes one grid column */
}

/* Each seat is a small rounded square with a single letter. */
.seat-cell {
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    user-select: none;
    transition: transform 120ms ease, box-shadow 150ms ease, background 150ms ease;
}
.seat-letter { display: block; }

.seat-empty {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.seat-ours {
    background: linear-gradient(155deg, var(--accent), #ff7a93);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: 0 0 14px rgba(215, 59, 86, 0.55);
    position: relative;
}
.seat-ours::after {
    /* Tiny dot in the corner to mark occupied seats even when name strip is hidden. */
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}
.seat-ours:hover {
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(215, 59, 86, 0.75);
    z-index: 2;
}
/* Collision marker: two travelers assigned to the same rendered seat. */
.seat-conflict {
    background: linear-gradient(155deg, #ffd66b, #ff9b3d);
    color: #1a1530;
    border-color: #ffd66b;
    box-shadow: 0 0 18px rgba(255, 200, 80, 0.55);
}
.seat-conflict::before {
    content: "⚠";
    position: absolute;
    top: -4px;
    left: -4px;
    width: 12px;
    height: 12px;
    background: #1a1530;
    color: #ffd66b;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 3;
    border: 1px solid #ffd66b;
}
.seat-flash {
    animation: seat-flash 1.6s ease-out;
}
@keyframes seat-flash {
    0%   { box-shadow: 0 0 0 0 rgba(255, 235, 130, 0.85); transform: scale(1.18); }
    60%  { box-shadow: 0 0 0 14px rgba(255, 235, 130, 0.0); transform: scale(1.0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 235, 130, 0); transform: scale(1.0); }
}

/* Name strip below an occupied seat — small, fits in the seat's own height. */
.seat-name {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translate(-50%, 60%);
    background: rgba(23, 21, 43, 0.92);
    color: var(--text-bright);
    border: 1px solid rgba(215, 59, 86, 0.45);
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 150ms ease;
}
.seat-ours { position: relative; }
.seat-row:hover .seat-name,
.seat-ours:hover .seat-name { opacity: 1; }

/* Lavatory / galley cells span the seat column count (set inline via style attr).
   Visually distinct, low-saturation. */
.seat-lavatory,
.seat-galley {
    background: rgba(0, 0, 0, 0.45);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    color: var(--text-soft);
    flex-direction: column;
    gap: 1px;
    aspect-ratio: auto;
    padding: 4px 2px;
}
.seat-lavatory .seat-cell-icon,
.seat-galley .seat-cell-icon {
    font-size: 16px;
    line-height: 1;
}
.seat-cell-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
    line-height: 1;
}
.seat-galley {
    background: rgba(245, 200, 90, 0.08);
    border-color: rgba(245, 200, 90, 0.30);
}

/* Row 61 divider — full-width faint bar signalling the wall between the
   rear economy cabin and the back galley cluster. No interactive state. */
.seat-gap {
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    margin: 4px 0;
}
.seat-gap .seat-gap-bar {
    flex: 1;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(155, 132, 200, 0.25) 20%,
        rgba(155, 132, 200, 0.4) 50%,
        rgba(155, 132, 200, 0.25) 80%,
        transparent 100%
    );
    border-radius: 2px;
}
/* Row 62 side walls — visually represent the bulkhead behind the rear
   galley on each side of the cabin. Same color family as lavatory/galley. */
.seat-wall {
    height: 28px;
    background: linear-gradient(
        180deg,
        rgba(155, 132, 200, 0.12) 0%,
        rgba(155, 132, 200, 0.06) 100%
    );
    border-top: 1px dashed rgba(155, 132, 200, 0.25);
    border-bottom: 1px dashed rgba(155, 132, 200, 0.25);
    pointer-events: none;
    border-radius: 4px;
}

/* Legend */
.seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: 14px auto 0;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.20);
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-soft);
    max-width: 540px;
}
.seat-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.seat-legend-swatch {
    width: 14px;
    height: 14px;
    aspect-ratio: auto;
    border-radius: 4px;
}
.seat-legend-icon {
    font-size: 13px;
}

/* Roster side panel: name + seat pill, click jumps to seat. */
.seat-roster {
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 12px;
    position: sticky;
    top: 14px;
}
.seat-roster-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 4px 10px;
    text-align: center;
}
.seat-roster-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.seat-roster-link {
    width: 100%;
    appearance: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--text-card);
    font-family: inherit;
    font-size: 13px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    align-items: center;
    text-align: left;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.seat-roster-link:hover {
    background: rgba(215, 59, 86, 0.10);
    border-color: rgba(215, 59, 86, 0.45);
    transform: translateX(-2px);
}
.seat-roster-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.seat-roster-link.is-active {
    background: rgba(215, 59, 86, 0.18);
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(215, 59, 86, 0.30);
}
.seat-roster-name {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-bright);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.seat-roster-seat {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 700;
    font-size: 11px;
    color: var(--accent);
    background: rgba(215, 59, 86, 0.12);
    border: 1px solid rgba(215, 59, 86, 0.35);
    border-radius: 6px;
    padding: 2px 6px;
    letter-spacing: 0.06em;
}

/* Footnote at the bottom of the seating card. */
.seating-footnote {
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.55;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.20);
    border-left: 3px solid rgba(215, 59, 86, 0.4);
    border-radius: 6px;
}

/* ---- Responsive: keep the chart legible on phones. ----
   Tiers (broad → narrow):
     ≤ 820px  stack roster under chart (existing)
     ≤ 600px  tighten paddings + smaller seat letters
     ≤ 480px  drop mirror row#, tighten seat gaps
     ≤ 380px  drop left row# too, leave only the seat-letter grid
*/

@media (max-width: 820px) {
    .seat-panel { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .seat-tabs { gap: 6px; }
    .seat-tab { padding: 8px 10px; font-size: 12px; }
    .seat-tab-sub { font-size: 10px; }
    .seat-row { gap: 4px; }
    .seat-row-cells { gap: 2px; }
    .seat-row-num { font-size: 10px; }
    .seat-cell { font-size: 10px; border-radius: 5px; }
    .seat-cabin { padding: 10px 8px 14px; }
    .seat-canvas { padding: 12px 8px; }
    .seat-roster { position: static; padding: 12px 10px; }
    .seat-roster-name { font-size: 12px; }
    .seat-roster-seat { font-size: 10px; }
}

@media (max-width: 480px) {
    /* Drop the mirror row-num column on the right to recover ~30px of width. */
    .seat-row {
        grid-template-columns: minmax(16px, auto) minmax(0, 1fr);
    }
    .seat-row-num--mirror { display: none; }
    .seat-row-cells { gap: 2px; }
    .seat-cell { font-size: 9px; border-radius: 4px; }
    /* On really narrow phones, drop the seats' min height so they don't
       overflow the canvas. The seat-letter font shrinks accordingly. */
    .seat-empty,
    .seat-ours {
        min-height: 22px;
    }
    .seat-cell-label { font-size: 8px; }
    .seat-cell-icon { font-size: 14px; }
    .seat-tab-emoji { font-size: 16px; }
}

@media (max-width: 380px) {
    /* Last resort: drop the LEFT row-num too. The row number is still
       recoverable via the `data-row` attribute (visible on tap) but at
       this point the chart fits a 320px-wide phone in one column. */
    .seat-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .seat-row-num { display: none; }
    .seat-row-cells { gap: 1.5px; }
    .seat-cell { font-size: 8px; }
    .seat-empty,
    .seat-ours { min-height: 20px; }
    .seat-cabin { padding: 8px 6px 12px; }
    .seat-canvas { padding: 10px 6px; }
}


/* ============================================================
   Timeline page (/timeline)
   Three phase cards (Departure, In Japan, Return Home), each
   with one or more day sub-sections. Each day sub-section is a
   list of .tl-event rows connected by a vertical rail drawn
   by .tl-events::before. The rail is scoped to the .tl-events
   container so it does NOT cross between sub-sections.
   ============================================================ */

.tl-phase {
    margin-top: 22px;
    padding-top: 22px;
}

.tl-phase-head {
    padding-bottom: 6px;
    text-align: left;
}

.tl-phase-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 22px;
    line-height: 1;
    background: linear-gradient(
        135deg,
        rgba(215, 59, 86, 0.20),
        rgba(255, 230, 235, 0.06)
    );
    border: 1px solid rgba(215, 59, 86, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
    margin-right: 10px;
    vertical-align: middle;
}

.tl-phase--onward .tl-phase-emoji {
    background: linear-gradient(
        135deg,
        rgba(184, 182, 201, 0.16),
        rgba(255, 230, 235, 0.04)
    );
    border-color: rgba(184, 182, 201, 0.32);
}

.tl-phase--return .tl-phase-emoji {
    background: linear-gradient(
        135deg,
        rgba(215, 59, 86, 0.22),
        rgba(255, 230, 235, 0.10)
    );
    border-color: rgba(215, 59, 86, 0.45);
}

.tl-phase-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.01em;
    color: var(--text-card);
    line-height: 1.15;
    text-align: left;
    /* Push the emoji up so its middle aligns with the text middle. */
    display: flex;
    align-items: center;
}

.tl-phase-sub {
    margin: 6px 0 0 50px;
    font-size: 13px;
    color: var(--text-soft);
    letter-spacing: 0.02em;
    text-align: left;
}

/* Day sub-heading — sits inside a phase card, under the phase
   header and hr, and above a .tl-events list. */
.tl-day-head {
    margin: 22px 0 0;
    padding: 0 0 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.01em;
    color: var(--text-card);
    border-bottom: 1px solid rgba(215, 59, 86, 0.18);
    text-align: left;
}

.tl-day-head:first-of-type {
    margin-top: 14px;
}

/* ---- The events list and the vertical rail ---- */

.tl-events {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    position: relative;
    --tl-rail-x: 86px;
}

.tl-events::before {
    content: "";
    position: absolute;
    left: var(--tl-rail-x);
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(215, 59, 86, 0.55),
        rgba(215, 59, 86, 0.25) 40%,
        rgba(215, 59, 86, 0.18) 60%,
        rgba(215, 59, 86, 0.55)
    );
    border-radius: 2px;
}

.tl-event {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0 24px;
    padding: 4px 0 14px;
    min-height: 48px;
}

.tl-dot {
    position: absolute;
    left: calc(var(--tl-rail-x) - 6px);
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(23, 21, 43, 0.95),
                0 0 0 4px rgba(215, 59, 86, 0.35);
    z-index: 1;
}

.tl-dot--flight {
    background: #ffe6eb;
    box-shadow: 0 0 0 3px rgba(23, 21, 43, 0.95),
                0 0 0 4px rgba(255, 230, 235, 0.45);
}

.tl-dot--gap {
    top: 15px;
    background: #b8b6c9;
    box-shadow: 0 0 0 3px rgba(23, 21, 43, 0.95),
                0 0 0 4px #b8b6c9;
}

.tl-dot--last {
    background: linear-gradient(135deg, #D73B56, #dc5265);
    box-shadow: 0 0 0 3px rgba(23, 21, 43, 0.95),
                0 0 0 4px rgba(215, 59, 86, 0.45),
                0 0 18px rgba(215, 59, 86, 0.6);
}

.tl-time {
    flex: 0 0 86px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    color: var(--accent);
    text-align: left;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 0;
}

.tl-body {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    z-index: 0;
}

.tl-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    color: var(--text-card);
    margin-bottom: 2px;
}

.tl-place {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.tl-place a {
    color: var(--text-soft);
    text-decoration: none;
    border-bottom: 1px dotted rgba(184, 182, 201, 0.35);
    transition: color 120ms ease, border-color 120ms ease;
}

.tl-place a:hover,
.tl-place a:focus-visible {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tl-route {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-soft);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.tl-note {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-soft);
}

.tl-note a {
    color: var(--accent-soft);
    text-decoration: none;
    border-bottom: 1px dotted rgba(220, 82, 101, 0.45);
}

.tl-note a:hover,
.tl-note a:focus-visible {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ---- Calendar request card at the bottom of the timeline ---- */
.tl-calendar-card {
    margin-top: 24px;
}

.tl-phase--calendar .tl-phase-emoji {
    background: linear-gradient(
        135deg,
        rgba(110, 180, 255, 0.20),
        rgba(255, 230, 235, 0.06)
    );
    border-color: rgba(110, 180, 255, 0.40);
}

.tl-calendar-form {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
}

.tl-calendar-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.tl-calendar-fields .field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tl-calendar-fields .field--wide {
    grid-column: 1 / -1;
}

.tl-calendar-fields label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}

.tl-calendar-fields input {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.tl-calendar-fields input:focus-visible {
    border-color: var(--accent);
}

.tl-calendar-fields input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

.tl-calendar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tl-calendar-feedback {
    margin: 10px 0 0;
    font-size: 14px;
    min-height: 1.4em;
}

.tl-calendar-feedback.is-success {
    color: #6ee7b7;
}

.tl-calendar-feedback.is-info {
    color: #93c5fd;
}

.tl-calendar-feedback.is-error {
    color: #fca5a5;
}

.tl-calendar-info {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.5;
}

.tl-calendar-info p {
    margin: 0;
}

.tl-calendar-dialog {
    background: #1b1322;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0;
    width: min(520px, 92vw);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.tl-calendar-dialog::backdrop {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.tl-calendar-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tl-calendar-dialog__header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.tl-calendar-dialog__close {
    background: transparent;
    border: none;
    color: var(--text-soft);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.tl-calendar-dialog__body {
    padding: 16px 18px;
}

.tl-calendar-dialog__body > p {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--text-soft);
}

.tl-calendar-dialog__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px 18px;
}

.tl-calendar-dialog .button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tl-calendar-dialog .button:hover {
    background: #e64e69;
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(215, 59, 86, 0.45);
}

.tl-calendar-dialog .button:active {
    transform: translateY(0);
}

.tl-calendar-dialog .button--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-soft);
}

.tl-calendar-dialog .button--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-card);
    box-shadow: none;
    transform: none;
}

.tl-calendar-dialog .tl-calendar-form {
    border-top: none;
    padding-top: 0;
}

.tl-calendar-dialog .tl-calendar-feedback {
    padding: 0 18px 14px;
    margin: 0;
}

.tl-calendar-actions .button,
.tl-calendar-actions a.button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 0 0 rgba(215, 59, 86, 0);
    text-decoration: none;
    display: inline-block;
}

.tl-calendar-actions .button:hover,
.tl-calendar-actions a.button:hover {
    background: #e64e69;
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(215, 59, 86, 0.45);
    color: #fff;
    border-bottom: none;
}

.tl-calendar-actions .button:active,
.tl-calendar-actions a.button:active {
    transform: translateY(0);
}

.tl-calendar-actions .button--secondary,
.tl-calendar-actions a.button--secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: var(--text-card);
    box-shadow: none;
}

.tl-calendar-actions .button--secondary:hover,
.tl-calendar-actions a.button--secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.18);
}

.tl-calendar-actions .button--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-soft);
    box-shadow: none;
}

.tl-calendar-actions .button--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-card);
}

.tl-event--flight .tl-body {
    background: linear-gradient(
        135deg,
        rgba(215, 59, 86, 0.10),
        rgba(255, 230, 235, 0.04)
    );
    border: 1px solid rgba(215, 59, 86, 0.30);
    border-radius: 14px;
    padding: 12px 14px;
    margin-left: -2px;
}

.tl-event--last .tl-body {
    background: linear-gradient(
        135deg,
        rgba(215, 59, 86, 0.16),
        rgba(255, 230, 235, 0.08)
    );
    border: 1px solid rgba(215, 59, 86, 0.40);
    border-radius: 14px;
    padding: 12px 14px;
    margin-left: -2px;
}

.tl-event {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0 24px;
    padding: 4px 0 14px;
    min-height: 48px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.tl-event.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- The "make your own plans" gap row ---- */

.tl-gap {
    list-style: none;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0 24px;
    padding: 4px 0 14px;
    min-height: 48px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.tl-gap.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay for children so each row in a list reveals
   slightly after the previous one once the parent is in view. */
.tl-events.is-visible .tl-event,
.tl-events.is-visible .tl-gap {
    transition-delay: calc(var(--tl-index, 0) * 0.08s);
}

/* No-js fallback: everything visible immediately. */
.no-js .tl-event,
.no-js .tl-gap {
    opacity: 1;
    transform: none;
}

/* The In Japan card's rail is muted because the content is
   uncommitted/free — the line still passes through for visual
   continuity but doesn't shout. */
.tl-phase--onward .tl-events::before {
    background: linear-gradient(
        to bottom,
        rgba(184, 182, 201, 0.18),
        rgba(184, 182, 201, 0.10) 50%,
        rgba(184, 182, 201, 0.18)
    );
}

.tl-body--gap {
    background: rgba(23, 21, 43, 0.55);
    border: 1px dashed rgba(184, 182, 201, 0.30);
    border-radius: 14px;
    padding: 6px 18px;
}

.tl-body--gap .tl-title {
    color: var(--text-soft);
    font-style: italic;
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 4px;
}

.tl-body--gap .tl-note {
    color: var(--text-soft);
    opacity: 0.85;
}

.tl-links {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-soft);
}

.tl-links a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.tl-links a:hover {
    text-decoration: underline;
}

/* ---- Mobile: narrow the time column and shrink the dot offset ---- */

@media (max-width: 600px) {
    .tl-phase-head {
        gap: 10px;
    }
    .tl-phase-emoji {
        width: 36px;
        height: 36px;
        font-size: 20px;
        border-radius: 10px;
        margin-right: 8px;
    }
    .tl-phase-title {
        font-size: 22px;
    }
    .tl-phase-sub {
        margin-left: 44px;
    }
    .tl-events {
        --tl-rail-x: 72px;
    }
    .tl-event {
        padding: 2px 0 10px;
    }
    .tl-time {
        flex: 0 0 72px;
        font-size: 12px;
        padding: 0 12px 0 0;
    }
    .tl-dot {
        left: calc(var(--tl-rail-x) - 5px);
        top: 5px;
        width: 10px;
        height: 10px;
    }
    .tl-title {
        font-size: 15px;
    }
    .tl-place,
    .tl-note {
        font-size: 13px;
    }
}

/* ---- Guides page ---- */

.guide-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 0 28px;
}

.guide-tab {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-card);
    background: rgba(23, 21, 43, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 8px 16px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.guide-tab:hover {
    color: var(--accent);
    border-color: rgba(215, 59, 86, 0.4);
    background: rgba(23, 21, 43, 0.85);
}
.guide-tab.active {
    color: #fff;
    background: linear-gradient(155deg, rgba(215, 59, 86, 0.85), rgba(215, 59, 86, 0.5));
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(215, 59, 86, 0.45);
}

.guide-panel.hidden {
    display: none;
}

.guide-intro {
    font-size: 15px;
    color: var(--text-soft);
    margin-bottom: 20px;
}

.guide-section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--accent-pink-text);
    margin: 28px 0 12px;
    letter-spacing: 0.02em;
}

/* Smaller sub-section heading used inside a guide section,
   e.g. "Passport Prep" under "Tasks". Sized to sit between
   the section h2 and the timeline phase title (h4). */
.guide-subsection-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-card);
    margin: 18px 0 8px;
    letter-spacing: 0.02em;
}

.guide-list {
    margin: 0 0 16px;
    padding-left: 24px;
    line-height: 1.7;
    color: var(--text-card);
}
.guide-list li {
    margin-bottom: 6px;
}
.guide-list ul {
    margin-top: 4px;
    margin-bottom: 4px;
    padding-left: 22px;
}
.guide-list ul li {
    margin-bottom: 4px;
    color: var(--text-soft);
}

/* ---- Task cards (vertically stacked) ----
   Used under a section heading (e.g. "Tasks") to give each
   task a clear container without going all the way to a
   timeline. Each card is a left-stripe, dark-backdrop block;
   the passport card has nested .task-card-steps as bullets. */
.task-cards {
    list-style: none;
    margin: 6px 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.task-card {
    background: rgba(0, 0, 0, 0.18);
    border-left: 3px solid rgba(215, 59, 86, 0.55);
    border-radius: 0 10px 10px 0;
    padding: 12px 16px;
    color: var(--text-card);
}
.task-card-head {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    color: var(--text-card);
    line-height: 1.4;
}
.task-card-head a {
    color: var(--accent-soft);
    text-decoration: none;
    border-bottom: 1px dotted rgba(220, 82, 101, 0.45);
}
.task-card-head a:hover,
.task-card-head a:focus-visible {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.task-card-meta {
    font-weight: 500;
    color: var(--text-soft);
    font-size: 13px;
    margin-left: 4px;
}
.task-card-note {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-soft);
}
.task-card-note a {
    color: var(--accent-soft);
    text-decoration: none;
    border-bottom: 1px dotted rgba(220, 82, 101, 0.45);
}
.task-card-note a:hover,
.task-card-note a:focus-visible {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.task-card-steps {
    list-style: disc;
    margin: 6px 0 0;
    padding-left: 22px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}
.task-card-steps li {
    margin-bottom: 2px;
}

/* Option list inside a task card — used when the card previews
   multiple choices (e.g. cell-service options). Slightly more
   breathing room than .task-card-steps since each item carries
   a bold lead-in. */
.task-card-options {
    list-style: disc;
    margin: 6px 0 4px;
    padding-left: 22px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}
.task-card-options li {
    margin-bottom: 4px;
}
.task-card-options li:last-child {
    margin-bottom: 0;
}

.guide-sub-card {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin: 16px 0;
}
.guide-sub-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-pink-text);
    margin: 0 0 10px;
}

/* Nested timeline inside a guide panel — keeps the rail/dot
   styling from .tl-events but drops the outer .card chrome so it
   doesn't double up on the parent .guide-panel's background. */
.guide-tl-nested {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin: 14px 0 18px;
    padding: 16px 18px 8px;
}
.guide-tl-nested .tl-phase-title {
    font-size: 19px;
}
.guide-tl-nested .tl-phase-sub {
    margin-left: 0;
}

/* Footnote-style note that sits under a section (e.g. the
   bank-notification disclaimer under the Finance funding
   schedule). Subdued background + left accent stripe so it
   reads as supplementary info, not a primary callout. */
.guide-note {
    margin: 6px 0 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.18);
    border-left: 3px solid rgba(215, 59, 86, 0.55);
    border-radius: 0 10px 10px 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-soft);
}
.guide-note p {
    margin: 0 0 6px;
}
.guide-note p:last-child {
    margin-bottom: 0;
}
.guide-note strong {
    color: var(--text-card);
}

.guide-link-btn {
    display: inline-block;
    background: linear-gradient(155deg, rgba(215, 59, 86, 0.85), rgba(215, 59, 86, 0.5));
    color: #fff;
    border-radius: var(--radius-button);
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: none;
    transition: box-shadow 0.15s ease;
}
.guide-link-btn:hover {
    box-shadow: 0 0 14px rgba(215, 59, 86, 0.45);
    color: #fff;
    border-bottom: none;
}

/* Guides responsive */
@media (max-width: 600px) {
    .guide-tabs {
        gap: 6px;
    }
    .guide-tab {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* ---- Guide images ---- */

.guide-inline-img {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 10px;
    margin: 10px auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Neon sign headings inside guide cards ---- */

.guide-panel .neon-heading {
    font-family: 'Kosan', var(--font-display);
    font-weight: normal;
    font-size: clamp(36px, 8vw, 72px);
    margin: 0 0 2px;
    color: #ffe8ea;
    letter-spacing: 0.04em;
    text-align: center;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    text-shadow:
        0 0 1px #fff,
        0 0 10px #fff,
        0 0 1px #fcb5c1,
        0 0 8px #fcb5c1,
        0 0 42px var(--accent),
        0 0 82px var(--accent),
        0 0 92px var(--accent),
        0 0 102px var(--accent),
        0 0 151px var(--accent);
}
.guide-panel .neon-rule {
    border: none;
    height: 3px;
    margin: 8px auto 6px;
    width: min(380px, 70%);
    background: var(--accent);
    box-shadow:
        0 0 6px var(--accent),
        0 0 16px var(--accent),
        0 0 40px var(--accent),
        0 0 60px rgba(215, 59, 86, 0.4);
    border-radius: 2px;
}
.guide-panel .neon-ja {
    font-family: 'KozGoPro', 'Noto Sans JP', sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 3vw, 28px);
    color: #ffe8ea;
    letter-spacing: 0.15em;
    margin: 0 0 16px;
    text-align: center;
    text-shadow:
        0 0 1px #fff,
        0 0 6px #fff,
        0 0 1px #fcb5c1,
        0 0 6px #fcb5c1,
        0 0 28px var(--accent),
        0 0 56px var(--accent);
}

@media (max-width: 600px) {
    .guide-inline-img {
        max-width: 100%;
    }
}

/* ---- Package pricing cards (Budget page) ---- */

.pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.pkg-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 18px 16px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-card);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.pkg-card:hover {
    border-color: rgba(215, 59, 86, 0.35);
    background: rgba(215, 59, 86, 0.06);
    transform: translateY(-2px);
}
.pkg-card-icon {
    font-size: 28px;
    line-height: 1;
}
.pkg-card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--accent-pink-text);
}
.pkg-card-desc {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.4;
}
.pkg-card-prices {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.pkg-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pkg-price-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
}
.pkg-price-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    color: var(--text-bright);
}

/* ---- Package detail page ---- */

.pkg-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 12px;
}
.pkg-breakdown-table th,
.pkg-breakdown-table td {
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pkg-breakdown-table th {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
}
.pkg-breakdown-table th.num,
.pkg-breakdown-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.pkg-breakdown-table tbody tr:hover {
    background: rgba(215, 59, 86, 0.04);
}

.pkg-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-soft);
}
.pkg-subtotal-amounts {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-bright);
    font-size: 15px;
}

.pkg-note {
    font-size: 12px;
    color: var(--text-soft);
    margin-left: 4px;
}

.pkg-total-card {
    border: 2px solid rgba(215, 59, 86, 0.3);
    background: rgba(215, 59, 86, 0.05);
}
.pkg-grand-total {
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 16px 0 8px;
}
.pkg-grand-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.pkg-grand-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
}
.pkg-grand-value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 28px;
    color: var(--accent-pink-text);
    text-shadow: 0 0 20px rgba(215, 59, 86, 0.3);
}

.pkg-back {
    text-align: center;
    margin: 20px 0;
}
.pkg-back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s ease;
}
.pkg-back-link:hover {
    color: var(--accent-pink-text);
}

.pkg-more-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.15s ease;
}
.pkg-more-link:hover {
    color: var(--accent-pink-text);
}

@media (max-width: 600px) {
    .pkg-grid {
        grid-template-columns: 1fr;
    }
    .pkg-breakdown-table th,
    .pkg-breakdown-table td {
        padding: 8px 8px;
        font-size: 13px;
    }
    .pkg-grand-value {
        font-size: 24px;
    }
}

/* ---- Language Learning: phrase cards ---- */

.phrase-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 14px 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.phrase-card:hover {
    border-color: rgba(215, 59, 86, 0.25);
    background: rgba(215, 59, 86, 0.04);
}

.phrase-card .audio-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(155deg, rgba(215, 59, 86, 0.85), rgba(215, 59, 86, 0.5));
    border: 1px solid rgba(215, 59, 86, 0.5);
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.phrase-card .audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 14px rgba(215, 59, 86, 0.45);
}
.phrase-card .audio-btn:active {
    transform: scale(0.95);
}
.phrase-card .audio-btn .audio-icon {
    width: 18px;
    height: 18px;
}

/* Inline audio button inside list items */
.audio-btn-inline {
    display: inline-flex;
    width: 26px;
    height: 26px;
    background: linear-gradient(155deg, rgba(215, 59, 86, 0.7), rgba(215, 59, 86, 0.4));
    border: 1px solid rgba(215, 59, 86, 0.4);
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 4px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.audio-btn-inline:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(215, 59, 86, 0.4);
}
.audio-icon-sm {
    width: 13px;
    height: 13px;
}

.phrase-content {
    flex: 1;
    min-width: 0;
}
.phrase-en {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-pink-text);
    margin-bottom: 2px;
}
.phrase-en--label {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
    margin-bottom: 4px;
}
.phrase-jp {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 4px 0 2px;
    line-height: 1.4;
}
.phrase-romaji {
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.5;
}
.pronunciation {
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
}
.phrase-note {
    font-size: 13px;
    color: var(--text-soft);
    margin: 8px 0 4px;
    font-style: italic;
}
.phrase-sub-list {
    list-style: disc;
    padding-left: 20px;
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}
.phrase-sub-list li {
    margin: 3px 0;
}

/* Interactive select phrase cards */
.phrase-card--interactive {
    border-color: rgba(215, 59, 86, 0.2);
    background: rgba(215, 59, 86, 0.06);
}
.phrase-select-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.phrase-select-row select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--text-card);
    cursor: pointer;
    transition: border-color 0.15s ease;
    appearance: auto;
    max-width: 100%;
    width: 100%;
}
.phrase-select-row select:hover {
    border-color: var(--accent);
}
.phrase-select-row select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.phrase-select-row select option {
    background: #130e1c;
    color: var(--text-card);
}
.phrase-select-suffix {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent-pink-text);
    font-size: 15px;
}

/* Responsive tweaks for phrase cards */
@media (max-width: 500px) {
    .phrase-card {
        flex-direction: column;
        gap: 10px;
        padding: 14px 14px;
    }
    .phrase-card .audio-btn {
        align-self: flex-start;
    }
    .phrase-jp {
        font-size: 18px;
    }
}
