/* ============================================================
   guest.css — v0.2 LUXURY EDITION
   Editorial Hero + Status Timeline + Framed Receipt
   Navy + Gold palette, RTL, Vazirmatn font
   ============================================================ */

:root {
    /* New theme palette — deep navy + warm gold */
    --lx-navy: #0c1826;
    --lx-navy-soft: #0c1826;
    --lx-navy-700: #16294a;
    --lx-sky-1: #16294a;
    --lx-sky-2: #24406f;
    --lx-gold: #D7B072;
    --lx-gold-soft: #EBE397;
    --lx-gold-deep: #5F1102;
    --lx-cream: #EBE397;
    --lx-muted: #c8bfae;

    /* Legacy palette — mapped to the new theme */
    --teal-950: #0c1826;
    --teal-900: #0c1826;
    --teal-700: #16294a;
    --gold-600: #D7B072;
    --gold-500: #D7B072;
    --gold-100: #EBE397;
    --sand: #EBE397;
    --line: #5F1102;

    /* Status colors */
    --ok-bg: rgba(21,122,74,0.18);
    --ok-fg: #b9f5d8;
    --ok-border: rgba(21,122,74,0.45);
    --warn-bg: rgba(146,98,13,0.18);
    --warn-fg: #fde8b8;
    --warn-border: rgba(146,98,13,0.45);
    --bad-bg: rgba(95,17,2,0.28);
    --bad-fg: #ff8a75;
    --bad-border: rgba(95,17,2,0.6);

    /* Animation timings */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --dur-fast: 0.15s;
    --dur-mid: 0.3s;
    --dur-slow: 0.6s;
}

* {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: var(--lx-navy);
    color: #fff;
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

/* Subtle animated background gradient with layered depth */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: var(--lx-navy);
}

/* A secondary "veil" layer for extra depth behind content */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(215,176,114,0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 100% 100%, rgba(0,0,47,0.35) 0%, transparent 45%);
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes bgFloat {
    0%, 100% { background-position: 0% 50%, 100% 50%, 0% 0%; }
    50% { background-position: 100% 50%, 0% 50%, 0% 0%; }
}

/* ===================== Top bar (refined) ===================== */
.gp-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 24, 38, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(215,176,114,0.18);
    padding: 14px 24px;
}

.gp-topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.gp-brand-emblem {
    width: 44px;
    height: 44px;
    border: 2px solid var(--lx-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px -6px rgba(215,176,114,0.5), inset 0 0 8px rgba(215,176,114,0.15);
    flex-shrink: 0;
    animation: emblemPulse 4s ease-in-out infinite;
}

@keyframes emblemPulse {
    0%, 100% { box-shadow: 0 0 24px -6px rgba(215,176,114,0.5), inset 0 0 8px rgba(215,176,114,0.15); }
    50%      { box-shadow: 0 0 32px -4px rgba(215,176,114,0.7), inset 0 0 12px rgba(215,176,114,0.25); }
}

.gp-brand-emblem svg { width: 60%; height: 60%; }

.gp-brand-text {
    flex: 1;
    min-width: 0;
}

.gp-brand-title {
    color: var(--lx-gold);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.gp-brand-sub {
    color: var(--lx-cream);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 1px;
}

.gp-topbar-spacer { flex: 1; }

.gp-topbar-status {
    color: var(--lx-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(215,176,114,0.18);
    border-radius: 999px;
}

.gp-topbar-status .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--lx-gold);
    border-radius: 50%;
    margin-left: 6px;
    box-shadow: 0 0 8px var(--lx-gold);
}

/* ===================== Main ===================== */
.gp-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* ===================== Hero (lookup page) ===================== */
.gp-hero {
    position: relative;
    width: 100%;
    height: 280px;
    margin-bottom: 24px;
    border-radius: 20px;
    overflow: hidden;
    /* Richer sky gradient with depth */
    background:
        linear-gradient(180deg,
            #0c1826 0%,
            var(--lx-navy-soft) 25%,
            var(--lx-sky-1) 60%,
            var(--lx-sky-2) 100%);
    /* Layered shadow for a "hovering card" effect */
    box-shadow:
        0 30px 60px -25px rgba(0,0,0,0.75),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 0 40px -6px rgba(215,176,114,0.08);
    border: 1px solid rgba(215,176,114,0.18);
    /* Subtle entry animation for the whole hero */
    opacity: 0;
    transform: translateY(12px);
    animation: heroIn 0.85s cubic-bezier(0.22,1,0.36,1) 0.35s both;
}

@keyframes heroIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Parallax layers for extra depth */
.gp-hero-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
.gp-hero-layer.far { z-index: 1; }
.gp-hero-layer.mid { z-index: 2; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25)); }
.gp-hero-layer.near { z-index: 3; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4)); }

.gp-hero-sun {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, #fcd34d 0%, #f59e0b 40%, transparent 70%);
    opacity: 0.85;
    animation: sunGlow 8s ease-in-out infinite;
}

@keyframes sunGlow {
    0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
    50%      { opacity: 0.95; transform: translateX(-50%) scale(1.05); }
}

.gp-hero-mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 2;
}

.gp-hero-skyline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 2;
}

.gp-hero-building {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 220px;
    z-index: 3;
    filter: drop-shadow(0 -8px 16px rgba(0,0,0,0.5));
}

.gp-hero-airplane {
    /* Legacy airplane element — superseded by the modern offset-path plane.
       Visually hidden so existing markup stays valid. */
    display: none;
}

@keyframes planeFly {
    0%   { transform: translateX(0) translateY(0); }
    50%  { transform: translateX(-300px) translateY(20px); }
    100% { transform: translateX(-700px) translateY(40px); opacity: 0; }
}

/* ===================== Hero flight scene (hotel + ticket) ===================== */
.gp-hero-flightpath {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 62%;
    z-index: 2;
    opacity: 0.9;
    /* dash "marching ants" along the route */
    animation: pathDash 28s linear infinite;
}

@keyframes pathDash {
    to { stroke-dashoffset: -240; }
}

/*
  Modern hero plane.
  Arc path (matched to the visual flight-path SVG in lookup.html):
  starts high on the right (aircraft entering the scene from the
  direction of the service badges / hotel), banks up across the sky, then
  glides down toward the hotel/skyline on the left.
  Motion is right→left, matching the visual story.
*/
.gp-hero-plane {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 34px;
    height: 34px;
    z-index: 4;
    /* Match the visual flight path in the template */
    offset-path: path('M 880 30 Q 560 150 300 120 Q 120 100 40 190');
    offset-distance: 0%;
    animation: planeJourney 18s cubic-bezier(0.42, 0, 0.55, 1) infinite;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.45));
    pointer-events: none;
    /* Scale only for parallax — translation is handled by offset-path */
    transform-origin: center;
    transform: scale(1);
    will-change: transform, offset-distance;
}

.gp-hero-plane svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes planeJourney {
    0%   { offset-distance: 0%;   opacity: 0; }
    8%   { opacity: 1; }
    88%  { opacity: 1; }
    95%  { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* Fallback for browsers that don't support offset-path */
@supports not (offset-path: path('M 0 0')) {
    .gp-hero-plane {
        /* Fallback: classic transform animation from left to right */
        animation: planeFallbackFly 18s cubic-bezier(0.42, 0, 0.55, 1) infinite;
        transform-origin: center;
    }

    @keyframes planeFallbackFly {
        0%   { transform: translate(0, 0) scale(1); opacity: 0; }
        8%   { opacity: 1; }
        50%  { transform: translate(280px, 8px) scale(1.03); opacity: 1; }
        88%  { opacity: 1; }
        100% { transform: translate(820px, 20px) scale(1); opacity: 0; }
    }
}

/* Fallback for browsers that don't support offset-path at all */
@supports not (offset-path: path('')) {
    .gp-hero-plane {
        animation: planeFallbackFly 18s cubic-bezier(0.42, 0, 0.55, 1) infinite;
    }
}

/* Fallback for browsers that don't support offset-path property */
/*@supports not (offset-path: path('M 0 0')) {
    .gp-hero-plane {
        position: absolute;
        top: 18px;
        right: 24px;
        width: 34px;
        height: 34px;
        animation: planeFallbackFly 18s cubic-bezier(0.42, 0, 0.55, 1) infinite;
        transform-origin: center;
    }
}*/

/* Jet exhaust trail — positioned behind the plane via JS transform */
.gp-plane-trail {
    position: absolute;
    top: 50%;
    right: 96%;
    width: 46px;
    height: 3px;
    background: linear-gradient(to left, rgba(229,192,123,0.85), rgba(229,192,123,0));
    border-radius: 999px;
    animation: trailPulse 0.7s ease-in-out infinite;
    transform: translateY(-50%);
}

@keyframes trailPulse {
    0%, 100% { opacity: 0.5; transform: scaleX(0.8); }
    50%      { opacity: 1; transform: scaleX(1.15); }
}

/* Drifting clouds */
.gp-hero-cloud {
    position: absolute;
    background: rgba(244, 228, 188, 0.14);
    border-radius: 999px;
    z-index: 3;
    filter: blur(1px);
}

.gp-hero-cloud::before,
.gp-hero-cloud::after {
    content: "";
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.gp-hero-cloud-1 {
    width: 90px; height: 22px; top: 26%; left: -100px;
    animation: cloudDrift 34s linear infinite;
}
.gp-hero-cloud-1::before { width: 40px; height: 40px; top: -18px; left: 14px; }
.gp-hero-cloud-1::after  { width: 28px; height: 28px; top: -10px; left: 52px; }

.gp-hero-cloud-2 {
    width: 70px; height: 18px; top: 14%; left: -80px;
    animation: cloudDrift 46s linear 12s infinite;
    opacity: 0.7;
}
.gp-hero-cloud-2::before { width: 32px; height: 32px; top: -14px; left: 12px; }

.gp-hero-cloud-3 {
    width: 110px; height: 26px; top: 42%; left: -120px;
    animation: cloudDrift 58s linear 24s infinite;
    opacity: 0.5;
}
.gp-hero-cloud-3::before { width: 44px; height: 44px; top: -20px; left: 18px; }
.gp-hero-cloud-3::after  { width: 30px; height: 30px; top: -12px; left: 62px; }

@keyframes cloudDrift {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(100vw + 240px)); }
}

/* Service badges: هتل + بلیط هواپیما */
.gp-hero-badges {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.gp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--lx-cream);
    /* Pill badge with inner shadow for a "pressed" feel */
    background:
        linear-gradient(135deg,
            rgba(215,176,114,0.16),
            rgba(215,176,114,0.08));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(215,176,114,0.45);
    border-right-color: rgba(215,176,114,0.6);
    border-radius: 999px;
    padding: 6px 13px;
    box-shadow:
        0 4px 12px -4px rgba(0,0,0,0.35),
        inset 0 0 0 1px rgba(255,255,255,0.1);
    /* Pulsing gold inner-glow on hover (via parent) */
    transition: all 0.3s var(--ease-out);
    animation: badgeIn 0.7s ease both;
}

/* Gentle hover pulse for badges */
.gp-hero-badges:hover .gp-hero-badge {
    border-color: rgba(215,176,114,0.7);
    box-shadow:
        0 6px 18px -4px rgba(0,0,0,0.45),
        inset 0 0 16px -2px rgba(215,176,114,0.15),
        0 0 14px -2px rgba(215,176,114,0.35);
}

.gp-hero-badge svg { width: 15px; height: 15px; }

.gp-hero-badge-flight { animation-delay: 0.35s; }

@keyframes badgeIn {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: translateX(0); }
}

.gp-hero-sub {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--lx-gold-soft);
    opacity: 1;
    margin-top: 4px;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.65), 0 0 14px rgba(215,176,114,0.35);
}

.gp-hero-text {
    position: absolute;
    bottom: 18px;
    right: 24px;
    left: 24px;
    z-index: 6;
    text-align: center;
    color: #fff;
}

.gp-hero-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--lx-cream);
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.gp-hero-sub {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--lx-gold-soft);
    opacity: 1;
    margin-top: 4px;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.65), 0 0 14px rgba(215,176,114,0.35);
}

/* ===================== Sultan mascot (live emblem) ===================== */
.gp-mascot {
    position: absolute;
    top: 6px;
    left: 26px;
    width: 92px;
    height: 184px; /* viewBox 120x240 → keep aspect */
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45));
}

.gp-mascot svg { width: 100%; height: 100%; display: block; overflow: visible; }

.gp-m-breathe { transform-box: fill-box; transform-origin: center; animation: mBreathe 4s ease-in-out infinite; }
@keyframes mBreathe { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.15); opacity: .85; } }

.gp-m-crown { transform-box: fill-box; transform-origin: center; animation: mCrownDip 5s ease-in-out infinite; }
@keyframes mCrownDip { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.gp-m-eye { transform-box: fill-box; transform-origin: center; animation: mBlink 4.4s infinite; }
.gp-m-eye-2 { animation-delay: .2s; }
@keyframes mBlink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

.gp-m-beat { transform-box: fill-box; transform-origin: center; animation: mBeat 1.5s ease-in-out infinite; }
@keyframes mBeat { 0%,100% { transform: scale(1); } 14% { transform: scale(1.12); } 28% { transform: scale(1); } 42% { transform: scale(1.07); } 56% { transform: scale(1); } }

.gp-m-wave { transform-box: fill-box; transform-origin: 12% 88%; animation: mWave 1.6s ease-in-out infinite; }
@keyframes mWave { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-17deg); } }

.gp-m-bob { transform-box: fill-box; transform-origin: center; animation: mBob 3.4s ease-in-out infinite; }
@keyframes mBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.gp-m-float { transform-box: fill-box; transform-origin: center; animation: mFloat 3.2s ease-in-out infinite; }
.gp-m-float-2 { animation-delay: 1.1s; }
@keyframes mFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Mascot entrance */
.gp-mascot { animation: mascotIn 0.9s cubic-bezier(0.22,1,0.36,1) 0.3s both; }
@keyframes mascotIn { from { opacity: 0; transform: translateY(-14px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Mascot reacts to input focus (class toggled by JS) */
.gp-mascot.gp-mascot-excited .gp-m-wave { animation-duration: 0.7s; }
.gp-mascot.gp-mascot-excited .gp-m-beat { animation-duration: 0.8s; }
.gp-mascot.gp-mascot-excited { filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45)) drop-shadow(0 0 14px rgba(215,176,114,0.35)); }

/* ===================== Page mascot (result page) with moods ===================== */
.gp-mascot-page {
    position: fixed;
    bottom: 14px;
    left: 10px;
    width: 64px;
    height: 128px;
    z-index: 90;
    animation: mascotIn 0.9s cubic-bezier(0.22,1,0.36,1) 0.4s both;
}

.gp-mascot-page .gp-m-bob { animation-duration: 2.6s; } /* calmer when page mascot */

/* Mood: waiting (pre-reservation) — slower, thoughtful */
.gp-mascot-page.gp-mood-wait .gp-m-wave { animation-duration: 3.5s; }
.gp-mascot-page.gp-mood-wait .gp-m-beat { animation-duration: 2.2s; }

/* Mood: party (confirmed) — bouncy + confetti glow */
.gp-mascot-page.gp-mood-party { animation: mascotPartyJump 1.1s ease-in-out infinite 1s; }
.gp-mascot-page.gp-mood-party .gp-m-wave { animation-duration: 0.5s; }
.gp-mascot-page.gp-mood-party .gp-m-beat { animation-duration: 0.6s; }
.gp-mascot-page.gp-mood-party { filter: drop-shadow(0 0 16px rgba(215,176,114,0.45)); }

@keyframes mascotPartyJump {
    0%, 100% { transform: translateY(0); }
    35% { transform: translateY(-10px) rotate(-3deg); }
    70% { transform: translateY(0) rotate(2deg); }
}

/* Speech bubble */
/* نکته: حباب داخل مسکوت (عرض ۶۴px) است؛ بدون width:max-content عرضش به همان ۶۴px
   فشرده می‌شد و متن کلمه‌به‌کلمه زیر هم می‌آمد. */
.gp-mascot-bubble {
    position: absolute;
    bottom: 92%;
    left: 50%;
    transform: translateX(-30%) translateY(6px);
    background: linear-gradient(135deg, var(--lx-gold-soft), var(--lx-gold));
    color: #1a1208;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.75;
    padding: 9px 14px;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 10px 26px -8px rgba(215,176,114,0.55), inset 0 1px 0 rgba(255,255,255,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out);
    width: max-content;
    max-width: min(240px, 78vw);
    white-space: normal;
    text-align: center;
}

.gp-mascot-bubble.show {
    opacity: 1;
    transform: translateX(-30%) translateY(0);
}

/* خط اول پیام پررنگ، خط‌های بعدی ریزتر */
.gp-bub-title { display: block; font-weight: 900; }
.gp-bub-sub   { display: block; font-weight: 700; font-size: 0.86em; opacity: 0.82; margin-top: 3px; }

.gp-mascot-bubble::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 18px;
    border: 6px solid transparent;
    border-top-color: var(--lx-gold);
    border-bottom: 0;
}

/* ===================== مسکوت: جای ثابت بالای صفحه ===================== */
/* مسکوت یک جای ثابت دارد (بالا، کمی پایین‌تر از هدر) و جابه‌جا نمی‌شود.
   فقط بار اول (یا وقتی وضعیت رزرو عوض شده) برای اعلام می‌آید وسط صفحه و برمی‌گردد.
   حباب به‌سمت پایین باز می‌شود تا از صفحه بیرون نزند. */
.gp-mascot-stage {
    position: fixed;
    top: calc(86px + env(safe-area-inset-top, 0px));
    left: 28px;   /* فرش پرنده ~۲۵px از هر طرف بیرون جعبه می‌زند؛ این فاصله جلوی بریده‌شدن در لبه را می‌گیرد */
    width: 72px;
    height: 144px;
    z-index: 95;
    transition: top 0.85s cubic-bezier(0.3, 1.1, 0.5, 1),
                left 0.8s cubic-bezier(0.45, 0.05, 0.25, 1);
    pointer-events: none;   /* فقط خود مسکوت (.gp-mascot-page) کلیک می‌گیرد */
}

/* مسکوت داخل استیج می‌ماند و اندازه‌اش را از استیج می‌گیرد
   (قبلاً `.gp-mascot` داخلی ۹۲×۱۸۴ بود و از جعبه‌ی ۶۴×۱۲۸ بیرون می‌زد؛ حالا هر دو یک اندازه‌اند) */
.gp-mascot-stage .gp-mascot-page,
.gp-mascot-stage .gp-mascot-page .gp-mascot {
    position: absolute;
    top: 0;
    left: 0;
    bottom: auto;
    width: 100%;
    height: 100%;
}

.gp-mascot-stage.gp-stage-center {
    top: 30vh;
    left: calc(50% - 36px);   /* وسط صفحه */
}

/* هاله‌ی طلایی و جرقه موقع نشستن */
.gp-mascot-stage::before,
.gp-mascot-stage::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 0;
}
.gp-mascot-stage::before {
    left: 50%; bottom: 4px;
    width: 96px; height: 96px; margin-left: -48px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(215,176,114,0.6), rgba(215,176,114,0) 70%);
}
.gp-mascot-stage::after {
    left: 50%; bottom: 30px;
    width: 6px; height: 6px; margin-left: -3px;
    border-radius: 50%;
    background: #fff4cf;
    box-shadow: -34px -14px 0 0 #f1d49b, 30px -26px 0 -1px #fff4cf, -16px -58px 0 -1px #f1d49b,
                22px -70px 0 0 #fff4cf, -40px -44px 0 -2px #fff4cf, 40px -48px 0 -2px #f1d49b;
}
.gp-mascot-stage.gp-stage-landing::before { animation: landGlow 1.4s ease-out 0.55s both; }
.gp-mascot-stage.gp-stage-landing::after  { animation: landSpark 1.5s ease-out 0.6s both; }
@keyframes landGlow  { 0% { opacity: 0; transform: scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(2); } }
@keyframes landSpark { 0% { opacity: 0; transform: scale(0.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6) translateY(-10px); } }

.gp-mascot-stage.gp-stage-landing .gp-mascot-page .gp-m-bob { animation-duration: 1.2s; }
/* وقتی حرف می‌زند کمی پرانرژی‌تر دست تکان می‌دهد */
.gp-mascot-stage.gp-talking .gp-mascot-page .gp-m-wave { animation-duration: 0.7s; }

/* حباب در جای ثابت: زیر مسکوت، از لبه‌ی چپ او به سمت داخل صفحه */
.gp-mascot-stage .gp-mascot-bubble {
    top: 100%;
    bottom: auto;
    left: -14px;
    transform: translateY(-6px);
    max-width: min(250px, calc(100vw - 36px));
    border-bottom-right-radius: 16px;
    border-top-left-radius: 4px;
}
.gp-mascot-stage .gp-mascot-bubble.show { transform: translateY(0); }
.gp-mascot-stage .gp-mascot-bubble::after {
    bottom: auto;
    top: -6px;
    right: auto;
    left: 42px;
    border: 6px solid transparent;
    border-top: 0;
    border-bottom-color: var(--lx-gold);
}

/* اعلام وسط صفحه: حباب بزرگ‌تر، بالای مسکوت */
.gp-stage-center .gp-mascot-bubble {
    font-size: 14.5px;
    max-width: min(300px, 84vw);
    padding: 14px 24px;
    border-radius: 20px;
    top: auto;
    bottom: 80%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    box-shadow: 0 16px 44px -10px rgba(0,0,0,0.6), 0 0 34px rgba(215,176,114,0.42), inset 0 1px 0 rgba(255,255,255,0.5);
}
.gp-stage-center .gp-mascot-bubble.show { transform: translateX(-50%) translateY(0); }
.gp-stage-center .gp-mascot-bubble::after {
    top: auto;
    bottom: -8px;
    right: auto;
    left: 50%;
    margin-left: -8px;
    border: 8px solid transparent;
    border-bottom: 0;
    border-top-color: var(--lx-gold);
}

/* هایلایت دکمه/بخشی که مسکوت درباره‌اش حرف می‌زند */
.gp-nudge-glow { animation: nudgeGlow 1.5s ease-in-out 2; }
@keyframes nudgeGlow {
    0%   { box-shadow: 0 0 0 0 rgba(212,175,55,0.75); }
    70%  { box-shadow: 0 0 0 12px rgba(212,175,55,0); }
    100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); }
}

@media (max-width: 768px) {
    .gp-mascot-stage { top: calc(136px + env(safe-area-inset-top, 0px)); left: 20px; width: 54px; height: 108px; }   /* زیر تب‌های «خلاصه/رسید» تا جلوی لمس آن‌ها را نگیرد */
    .gp-mascot-stage.gp-stage-center { top: 28vh; left: calc(50% - 27px); }
    .gp-mascot-stage .gp-mascot-bubble { left: -12px; font-size: 11.5px; padding: 8px 12px; max-width: min(230px, calc(100vw - 40px)); }
    .gp-mascot-stage .gp-mascot-bubble::after { left: 36px; }
}

/* Dim the page behind the announcement */
.gp-stage-backdrop {
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(7, 15, 26, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.gp-stage-backdrop.show { opacity: 1; }

/* ===================== Light theme (day mode) ===================== */
html.gp-light {
    --lx-navy: #f4f1ea;
    --lx-navy-soft: #ece8de;
    --lx-navy-700: #ddd7c8;
    --lx-cream: #4a3f2a;
    --lx-muted: #7a705c;
    --lx-gold: #D7B072;
    --lx-gold-soft: #EBE397;
    --lx-gold-deep: #5F1102;
    color-scheme: light;
}

html.gp-light body { color: #2a2416; }

html.gp-light body::before {
    background:
        radial-gradient(ellipse at 20% 10%, rgba(215,176,114,0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(59,89,152,0.06) 0%, transparent 50%),
        linear-gradient(180deg, #f7f4ed 0%, #ece8de 100%);
}

html.gp-light .gp-card,
html.gp-light .gp-info-card,
html.gp-light .gp-money-card,
html.gp-light .gp-timeline,
html.gp-light .gp-rules-list-card,
html.gp-light .gp-rules-accept-card,
html.gp-light .gp-receipt-card,
html.gp-light .gp-actions {
    background: rgba(255,255,255,0.85);
    border-color: rgba(184,134,11,0.35);
    box-shadow: 0 12px 40px -20px rgba(90,70,20,0.35);
}

html.gp-light .gp-info-val,
html.gp-light .gp-money-v { color: #2a2416; }

html.gp-light .gp-topbar { background: rgba(247,244,237,0.9); }

html.gp-light .gp-res-input {
    color: #2a2416;
    background: rgba(255,255,255,0.7);
    border-color: rgba(184,134,11,0.4);
}

html.gp-light .gp-res-input::placeholder { color: rgba(122,112,92,0.6); }

html.gp-light .gp-hero { border-color: rgba(184,134,11,0.35); }

html.gp-light .gp-hero-title,
html.gp-light .gp-hero-sub { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.55); }

html.gp-light .gp-chip,
html.gp-light .gp-icon-btn,
html.gp-light .gp-btn-soft,
html.gp-light .gp-result-tab {
    background: rgba(255,255,255,0.7);
    color: #4a3f2a;
}

html.gp-light .gp-stat-lbl,
html.gp-light .gp-info-lbl,
html.gp-light .gp-money-t,
html.gp-light .gp-receipt-sub,
html.gp-light .gp-timeline-label,
html.gp-light .gp-res-hero-lbl { color: #7a705c; }

html.gp-light .gp-state-banner.gp-state-ok { color: #14602f; }
html.gp-light .gp-state-banner.gp-state-warn { color: #7a5208; }
html.gp-light .gp-state-banner.gp-state-bad { color: #8e2a24; }

html.gp-light .gp-mascot-bubble { color: #1a1208; }

html.gp-light .gp-rc-viewer { background: rgba(240, 236, 226, 0.96); }
html.gp-light .gp-intro { background: radial-gradient(900px 500px at 50% -10%, #f5edd8, #e6dfc9); }
html.gp-light .gp-intro-sub { color: #5a4c28; }
html.gp-light .gp-intro-skip { color: #8a7d5c; }

/* Theme toggle button */
.gp-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(215,176,114,0.35);
    background: rgba(255,255,255,0.06);
    cursor: pointer;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--dur-fast) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.gp-theme-toggle:hover { background: rgba(215,176,114,0.18); transform: rotate(15deg); }

/* ===================== Countdown to trip ===================== */
.gp-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(215,176,114,0.09), rgba(215,176,114,0.03));
    border: 1px solid rgba(215,176,114,0.35);
    border-radius: 14px;
    color: var(--lx-gold);
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-align: center;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

@keyframes goldShimmer {
    0%, 100% { box-shadow: 0 0 0 rgba(215,176,114,0); }
    50% { box-shadow: 0 0 16px -4px rgba(215,176,114,0.28); }
}

.gp-countdown.gp-countdown-today {
    background: linear-gradient(135deg, rgba(21,122,74,0.25), rgba(21,122,74,0.08));
    border-color: var(--ok-border);
    color: var(--ok-fg);
}

.gp-countdown.gp-countdown-gone {
    border-color: var(--warn-border);
    color: var(--warn-fg);
    animation: none;
}

/* ===================== Travel card (story share) ===================== */
.gp-travelcard-overlay {
    position: fixed;
    inset: 0;
    z-index: 210;
    background: rgba(7, 15, 26, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
}

.gp-travelcard-overlay[hidden] { display: none; }

.gp-travelcard {
    width: min(340px, 88vw);
    aspect-ratio: 4/5; /* story-friendly */
    background:
        radial-gradient(ellipse at 50% -10%, rgba(215,176,114,0.25), transparent 60%),
        linear-gradient(165deg, #0c1826 0%, #060d18 70%);
    border: 2px solid var(--lx-gold);
    border-radius: 22px;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8), inset 0 0 0 6px rgba(215,176,114,0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
}

.gp-travelcard-head {
    text-align: center;
    padding: 26px 20px 10px;
    border-bottom: 1px dashed rgba(215,176,114,0.35);
}

.gp-travelcard-brand {
    font-size: 26px;
    font-weight: 800;
    color: var(--lx-gold-soft);
    text-shadow: 0 0 18px rgba(215,176,114,0.5);
}

.gp-travelcard-sub {
    margin-top: 4px;
    font-size: 10.5px;
    letter-spacing: 3px;
    color: var(--lx-muted);
    font-weight: 700;
}

.gp-travelcard-body {
    flex: 1;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.gp-travelcard-guest {
    font-size: 24px;
    font-weight: 800;
    color: var(--lx-cream);
    text-align: center;
    margin-bottom: 6px;
}

.gp-travelcard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14.5px;
    border-bottom: 1px dashed rgba(215,176,114,0.2);
    padding-bottom: 10px;
}

.gp-travelcard-row span { color: var(--lx-muted); font-weight: 700; font-size: 12.5px; }
.gp-travelcard-row b { color: #fff; font-weight: 800; }

.gp-travelcard-res {
    text-align: center;
    font-family: ui-monospace, monospace;
    color: var(--lx-gold);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1px;
    padding: 8px;
    background: rgba(215,176,114,0.1);
    border-radius: 10px;
    border: 1px dashed rgba(215,176,114,0.4);
}

.gp-travelcard-foot {
    text-align: center;
    padding: 14px;
    font-size: 13px;
    font-weight: 800;
    color: var(--lx-gold-soft);
    background: rgba(215,176,114,0.08);
    border-top: 1px solid rgba(215,176,114,0.3);
}

.gp-travelcard-actions {
    display: flex;
    gap: 10px;
    width: min(340px, 88vw);
}

.gp-travelcard-actions .gp-btn-gold { flex: 1; justify-content: center; }

/* ===================== Rules guide mascot ===================== */
.gp-mascot-rules { animation: none; } /* no entrance bounce on rules page */

/* صفحه‌ی قوانین (مثل مسکوت صفحه‌ی نتیجه):
   ۱) top از .gp-mascot به ارث می‌رسید و bottom را بی‌اثر می‌کرد → مسکوت چسبیده به لبه‌ی بالا بود
   ۲) .gp-mascot داخلی ۹۲×۱۸۴ بود و از جعبه‌ی ۶۴×۱۲۸ بیرون می‌زد → حباب روی بدن/فرش می‌افتاد
   اینجا جعبه یک جای ثابت و اندازه‌ی مشخص دارد، مسکوت داخلی هم‌اندازه‌ی جعبه است
   و حباب زیر فرش باز می‌شود. اگر جای مسکوت را می‌خواهی عوض کنی فقط top/left همین‌جا را تغییر بده. */
.gp-mascot-rules {
    top: calc(86px + env(safe-area-inset-top, 0px));
    left: 28px;
    bottom: auto;
    width: 72px;
    height: 144px;
}
.gp-mascot-rules .gp-mascot {
    position: absolute;
    top: 0;
    left: 0;
    bottom: auto;
    width: 100%;
    height: 100%;
}
.gp-mascot-rules .gp-mascot-bubble {
    top: calc(100% + 6px);
    bottom: auto;
    left: -14px;
    transform: translateY(-6px);
    max-width: min(240px, calc(100vw - 64px));
    border-bottom-right-radius: 16px;
    border-top-left-radius: 4px;
}
.gp-mascot-rules .gp-mascot-bubble.show { transform: translateY(0); }
.gp-mascot-rules .gp-mascot-bubble::after {
    bottom: auto;
    top: -6px;
    right: auto;
    left: 42px;
    border: 6px solid transparent;
    border-top: 0;
    border-bottom-color: var(--lx-gold);
}

.gp-rule-highlight {
    background: rgba(215,176,114,0.12) !important;
    border-radius: 10px;
    transition: background 0.5s ease;
}

/* ===================== Confetti (confirmed reservation celebration) ===================== */
.gp-confetti {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    overflow: hidden;
}

.gp-confetti-piece {
    position: absolute;
    top: -20px;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall linear infinite;
}

@keyframes confettiFall {
    0%   { transform: translateY(-30px) rotate(0deg) rotateY(0deg); opacity: 0; }
    8%   { opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(105vh) rotate(660deg) rotateY(540deg); opacity: 0; }
}

/* ===================== Cinematic intro (first visit) ===================== */
.gp-intro {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: radial-gradient(900px 500px at 50% -10%, #1c1030, #0b0a18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: introOut 0.7s ease 3.4s both;
    pointer-events: auto;
}

.gp-intro.gp-intro-done { display: none; }

@keyframes introOut {
    to { opacity: 0; visibility: hidden; }
}

.gp-intro-stars { position: absolute; inset: 0; }

.gp-intro-star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffe08a;
    box-shadow: 0 0 8px 2px rgba(255,224,138,0.6);
    animation: introTwinkle 2.6s ease-in-out infinite;
}

@keyframes introTwinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.gp-intro-mascot {
    width: 150px;
    height: 300px;
    animation: introFly 2.6s cubic-bezier(0.25, 0.8, 0.3, 1) both;
}

.gp-intro-mascot .gp-mascot {
    position: static;
    width: 100%;
    height: 100%;
    animation: none; /* entrance already handled by introFly */
}

@keyframes introFly {
    0%   { transform: translate(320px, 160px) rotate(5deg); opacity: 0; }
    40%  { transform: translate(-26px, -42px) rotate(-3deg); opacity: 1; }
    70%  { transform: translate(6px, 7px) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(0); }
}

.gp-intro-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--lx-gold-soft);
    text-shadow: 0 0 24px rgba(215,176,114,0.5), 0 2px 12px rgba(0,0,0,0.7);
    animation: introTitle 1s ease 1.4s both;
    letter-spacing: 0.02em;
}

@keyframes introTitle {
    from { opacity: 0; transform: translateY(18px) scale(0.92); filter: blur(6px); }
    to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.gp-intro-sub {
    font-size: 14px;
    color: #e8dcff;
    opacity: 0;
    animation: introSub 0.8s ease 2.1s both;
}

@keyframes introSub {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 0.9; transform: translateY(0); }
}

/* Skip hint */
.gp-intro-skip {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    color: #8fa3bf;
    font-size: 12px;
    opacity: 0.7;
    animation: introSub 0.6s ease 2.4s both;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gp-intro { display: none; }
    .gp-mascot, .gp-mascot svg * { animation: none !important; }
    .gp-hero-plane { animation: none !important; }
}

/* ===================== Cards (refined) ===================== */
.gp-card {
    /* Layered glass look: outer glow + inner sheen */
    background: linear-gradient(145deg, rgba(12, 24, 38, 0.82), rgba(12, 24, 38, 0.75));
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(215,176,114,0.22);
    border-radius: 20px;
    padding: 28px 28px;
    box-shadow:
        /* Outer floating glow */
        0 24px 60px -28px rgba(0,0,0,0.75),
        /* Inner highlight rim */
        inset 0 1px 0 rgba(255,255,255,0.08),
        /* Inner gold inner-glow (subtle) */
        inset 0 0 16px -4px rgba(215,176,114,0.06);
    margin-bottom: 18px;
    color: #fff;
    /* Smooth transition for hover lifts */
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

/* Lift + glow on hover for a more tangible "floating" feel */
.gp-card:hover {
    transform: translateY(-4px);
    border-color: rgba(215,176,114,0.35);
    box-shadow:
        0 32px 70px -30px rgba(0,0,0,0.8),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 0 20px -4px rgba(215,176,114,0.09);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.992); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gp-card-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 800;
    color: var(--lx-gold);
    text-align: center;
    letter-spacing: -0.01em;
}

.gp-hint {
    color: var(--lx-cream);
    opacity: 0.82;
    font-size: 13.5px;
    line-height: 2;
    margin: 0 0 18px;
    text-align: justify;
}

/* ===================== Lookup form ===================== */
.gp-lookup-card {
    text-align: center;
}

.gp-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border: 2px solid var(--lx-gold-soft);
    border-radius: 50%;
    background: rgba(215,176,114,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px -6px rgba(215,176,114,0.4);
}

.gp-card-icon svg { width: 28px; height: 28px; }

.gp-lookup-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 560px;
    margin: 0 auto;
}

.gp-res-input {
    flex: 1 1 280px;
    min-width: 0;
    direction: ltr;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    padding: 14px 16px;
    border: 2px solid rgba(215,176,114,0.25);
    border-radius: 14px;
    /* Input "well": slightly luminous, as if it glows from within */
    background:
        linear-gradient(150deg,
            rgba(255,255,255,0.08),
            rgba(215,176,114,0.03));
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.1),
        0 4px 14px -4px rgba(0,0,0,0.3);
    transition:
        border-color 0.28s var(--ease-out),
        box-shadow 0.32s var(--ease-out),
        background 0.28s var(--ease-out),
        transform 0.18s var(--ease-out);
    /* Ripple effect on press */
    position: relative;
    overflow: hidden;
}

/* The ripple span is injected by JS (inputRipple). Fallback: none needed. */

.gp-res-input::placeholder {
    color: rgba(244,228,188,0.45);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Focused state: warm gold halo + subtle lift */
.gp-res-input:focus {
    border-color: var(--lx-gold-soft);
    box-shadow:
        0 0 0 4px rgba(215,176,114,0.28),
        0 0 32px -8px rgba(215,176,114,0.5),
        inset 0 0 0 1px rgba(215,176,114,0.2);
    outline: none;
    transform: translateY(-1px);
    background:
        linear-gradient(150deg,
            rgba(255,255,255,0.12),
            rgba(215,176,114,0.05));
}

.gp-lookup-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px dashed rgba(215,176,114,0.20);
}

.gp-stat-item {
    text-align: center;
}

.gp-stat-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--lx-gold);
    line-height: 1;
}

.gp-stat-lbl {
    font-size: 11px;
    color: var(--lx-muted);
    margin-top: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===================== Buttons ===================== */
.gp-btn-gold {
    background: linear-gradient(135deg, var(--lx-gold-soft) 0%, var(--lx-gold) 50%, var(--lx-gold-deep) 100%);
    color: #1a1208;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 14.5px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    cursor: pointer;
    transition: all var(--dur-mid) var(--ease-out);
    box-shadow: 0 8px 24px -6px rgba(215,176,114,0.55), inset 0 1px 0 rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.gp-btn-gold::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: left var(--dur-slow) var(--ease-out);
}

.gp-btn-gold:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 12px 32px -6px rgba(215,176,114,0.7), inset 0 1px 0 rgba(255,255,255,0.5);
}

.gp-btn-gold:hover::before { left: 120%; }

.gp-btn-gold:active { transform: translateY(1px); }

.gp-btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(40%);
    transform: none;
}

.gp-btn-soft {
    background: rgba(255,255,255,0.06);
    color: var(--lx-cream);
    font-weight: 700;
    border: 1px solid rgba(215,176,114,0.30);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--dur-mid) var(--ease-out);
}

.gp-btn-soft:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--lx-gold);
    color: #fff;
    transform: translateY(-1px);
}

.gp-btn-large { padding: 16px 24px; font-size: 15.5px; width: 100%; justify-content: center; }

/* ===================== Status banner (refined) ===================== */
.gp-state-banner {
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.9;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-state-banner.gp-state-ok {
    background: var(--ok-bg);
    border: 1px solid var(--ok-border);
    color: var(--ok-fg);
}

.gp-state-banner.gp-state-warn {
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    color: var(--warn-fg);
}

.gp-state-banner.gp-state-bad {
    background: var(--bad-bg);
    border: 1px solid var(--bad-border);
    color: var(--bad-fg);
}

.gp-state-banner-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================== Status Timeline ===================== */
.gp-timeline {
    background: rgba(12, 24, 38, 0.72);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(215,176,114,0.20);
    border-radius: 18px;
    padding: 22px 28px;
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    position: relative;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-timeline::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 28px;
    right: 28px;
    height: 2px;
    background: rgba(215,176,114,0.18);
    z-index: 0;
}

.gp-timeline-step {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.gp-timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--lx-navy);
    border: 2px solid rgba(215,176,114,0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lx-muted);
    font-weight: 800;
    font-size: 12px;
    transition: all var(--dur-mid) var(--ease-out);
}

.gp-timeline-step.done .gp-timeline-dot {
    background: linear-gradient(135deg, var(--lx-gold-soft), var(--lx-gold-deep));
    border-color: var(--lx-gold);
    color: var(--lx-navy);
    box-shadow: 0 0 14px -2px rgba(215,176,114,0.45);
}

.gp-timeline-step.current .gp-timeline-dot {
    background: linear-gradient(135deg, var(--lx-gold-soft), var(--lx-gold));
    border-color: var(--lx-gold-soft);
    color: var(--lx-navy);
    box-shadow: 0 0 24px -2px rgba(215,176,114,0.7);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 24px -2px rgba(215,176,114,0.7); transform: scale(1); }
    50%      { box-shadow: 0 0 32px -2px rgba(215,176,114,0.9); transform: scale(1.06); }
}

.gp-timeline-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--lx-muted);
    margin-top: 4px;
}

.gp-timeline-step.done .gp-timeline-label,
.gp-timeline-step.current .gp-timeline-label {
    color: var(--lx-gold);
}

/* ===================== Reservation number (hero card) ===================== */
.gp-res-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(215,176,114,0.08), rgba(215,176,114,0.03));
    border: 1px solid rgba(215,176,114,0.30);
    border-radius: 16px;
    margin-bottom: 18px;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-res-hero-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gp-res-hero-lbl {
    font-size: 11.5px;
    color: var(--lx-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gp-res-hero-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--lx-gold);
    letter-spacing: 0.04em;
    direction: ltr;
    font-family: 'Vazirmatn', ui-monospace, monospace;
}

.gp-res-hero-right {
    display: flex;
    gap: 8px;
}

.gp-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(215,176,114,0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    color: var(--lx-gold);
}

.gp-icon-btn:hover {
    background: rgba(215,176,114,0.18);
    border-color: var(--lx-gold);
    transform: translateY(-1px);
}

.gp-icon-btn svg { width: 18px; height: 18px; }

/* ===================== Two-column layout ===================== */
.gp-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.gp-info-card {
    background: rgba(12, 24, 38, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(215,176,114,0.20);
    border-radius: 16px;
    padding: 22px 22px;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-info-card-title {
    font-size: 12px;
    color: var(--lx-muted);
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(215,176,114,0.20);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-info-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 8px 0;
    align-items: center;
}

.gp-info-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(215,176,114,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lx-gold-soft);
    flex-shrink: 0;
}

.gp-info-icon svg { width: 16px; height: 16px; }

.gp-info-text { min-width: 0; }

.gp-info-lbl {
    font-size: 11px;
    color: var(--lx-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.gp-info-val {
    font-size: 14px;
    color: #fff;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

.gp-info-val-large {
    font-size: 18px;
    font-weight: 800;
    color: var(--lx-gold);
}

/* ===================== Money section ===================== */
.gp-money-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.gp-money-card {
    background: rgba(12, 24, 38, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(215,176,114,0.20);
    border-radius: 16px;
    padding: 20px 18px;
    text-align: center;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-money-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(215,176,114,0.12);
    color: var(--lx-gold);
}

.gp-money-icon svg { width: 18px; height: 18px; }

.gp-money-card.total .gp-money-icon { background: rgba(215,176,114,0.18); color: var(--lx-gold); }
.gp-money-card.paid .gp-money-icon  { background: rgba(21,122,74,0.20); color: #b9f5d8; }
.gp-money-card.debt .gp-money-icon  { background: rgba(163,53,47,0.20); color: #ffc8c4; }

.gp-money-t {
    font-size: 11.5px;
    color: var(--lx-muted);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.gp-money-v {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}

.gp-money-card.total .gp-money-v { color: var(--lx-gold); }
.gp-money-card.paid .gp-money-v  { color: var(--ok-fg); }
.gp-money-card.debt .gp-money-v { color: var(--bad-fg); }

.gp-money-unit {
    font-size: 11px;
    color: var(--lx-muted);
    margin-top: 2px;
    font-weight: 600;
}

/* Progress bar showing payment status */
.gp-payment-progress {
    margin-top: 10px;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.gp-payment-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lx-gold-deep), var(--lx-gold));
    border-radius: 999px;
    transition: width var(--dur-slow) var(--ease-out);
}

/* ===================== Chips ===================== */
.gp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 999px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(215,176,114,0.25);
    color: var(--lx-cream);
    transition: all var(--dur-fast) var(--ease-out);
}

.gp-chip:hover {
    background: rgba(215,176,114,0.12);
    border-color: var(--lx-gold);
    transform: translateY(-1px);
}

.gp-chip-warn {
    background: var(--warn-bg);
    border-color: var(--warn-border);
    color: var(--warn-fg);
}

.gp-chip-ok {
    background: var(--ok-bg);
    border-color: var(--ok-border);
    color: var(--ok-fg);
}

.gp-chip-badge {
    background: rgba(59,89,152,0.20);
    border: 1px solid rgba(59,89,152,0.40);
    color: #c9d4eb;
}

.gp-caravan-badge {
    text-align: center;
    background: rgba(59,89,152,0.22);
    border: 1px solid rgba(59,89,152,0.40);
    color: #c9d4eb;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===================== Receipt frame ===================== */
.gp-receipt-card {
    padding: 24px;
    background: linear-gradient(180deg, rgba(16,35,75,0.85), rgba(16,35,75,0.92));
    border: 1px solid rgba(215,176,114,0.30);
    border-radius: 20px;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-receipt-header {
    text-align: center;
    margin-bottom: 18px;
}

.gp-receipt-title {
    color: var(--lx-gold);
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 6px;
}

.gp-receipt-sub {
    color: var(--lx-muted);
    font-size: 11.5px;
    letter-spacing: 1px;
}

/* Ornamental frame around receipt */
.gp-receipt-frame {
    position: relative;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(215,176,114,0.06), rgba(215,176,114,0.02)),
        #fff;
    border-radius: 14px;
    box-shadow:
        inset 0 0 0 2px rgba(215,176,114,0.40),
        inset 0 0 0 4px rgba(255,255,255,1),
        inset 0 0 0 5px rgba(215,176,114,0.30);
}

.gp-receipt-frame::before,
.gp-receipt-frame::after {
    content: "✦";
    position: absolute;
    color: var(--lx-gold);
    font-size: 16px;
    z-index: 1;
    background: #fff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.gp-receipt-frame::before { top: -12px; right: 50%; transform: translateX(50%); }
.gp-receipt-frame::after  { bottom: -12px; right: 50%; transform: translateX(50%); }

.gp-rc-stage-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    aspect-ratio: 2540/3485;
    direction: ltr;
    container-type: inline-size;
}

.gp-rc-stage {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 100%);
    background-size: cover;
    background-position: center;
}

.gp-rc-slot {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    direction: rtl;
    /* خط پایه‌ی Vazirmatn پایین‌تر از وسط خط می‌نشیند و متن را بالاتر از برچسب‌های
       داخل عکس نشان می‌داد؛ این مقدار متن را کمی پایین می‌آورد.
       اگر هنوز بالا/پایین بود فقط همین عدد را عوض کن (مثلاً 0.2em یا 0.35em). */
    transform: translateY(var(--rc-y-nudge, 0.28em));
}

.gp-rc-slot.gp-rc-right {
    /* اسلات direction:rtl دارد؛ در فلکس راست‌به‌چپ، flex-start = سمت راست
       (چسبیده به برچسب فیلد). flex-end متن را به چپ می‌برد و باعث می‌شد
       جای‌گذاری با رسید برنامه‌ی رزرو فرق کند. */
    justify-content: flex-start;
    text-align: right;
    padding-right: 8px;
}

.gp-preview-rules-note {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    color: var(--warn-fg);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===================== Actions bar ===================== */
.gp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding: 16px;
    background: rgba(12, 24, 38, 0.55);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(215,176,114,0.20);
    border-radius: 14px;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-actions > * {
    flex: 1 1 auto;
    min-width: 120px;
    justify-content: center;
}

/* ===================== Rules page (split layout) ===================== */
.gp-rules-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
}

.gp-rules-list-card {
    background: rgba(12, 24, 38, 0.65);
    border: 1px solid rgba(215,176,114,0.20);
    border-radius: 18px;
    padding: 22px;
    max-height: 580px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--lx-gold-deep) rgba(255,255,255,0.05);
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-rules-list-card::-webkit-scrollbar { width: 8px; }
.gp-rules-list-card::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
.gp-rules-list-card::-webkit-scrollbar-thumb {
    background: var(--lx-gold-deep);
    border-radius: 4px;
}

.gp-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: ruleNum;
}

.gp-rules-list li {
    counter-increment: ruleNum;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed rgba(215,176,114,0.18);
    align-items: start;
}

.gp-rules-list li:last-child { border-bottom: none; }

.gp-rules-list li::before {
    content: counter(ruleNum);
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(215,176,114,0.18), rgba(215,176,114,0.08));
    border: 1px solid rgba(215,176,114,0.40);
    color: var(--lx-gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.gp-rules-list-text {
    color: var(--lx-cream);
    font-size: 13.5px;
    line-height: 1.9;
    padding-top: 4px;
}

/* Rules with grouped subsections (title + body) */
.gp-rules-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gp-rules-group-title {
    color: var(--lx-gold-soft);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 2px;
}

.gp-rules-group-text {
    color: var(--lx-cream);
    font-size: 13.5px;
    line-height: 1.9;
}

.gp-rules-accept-card {
    background: rgba(12, 24, 38, 0.65);
    border: 1px solid rgba(215,176,114,0.25);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: sticky;
    top: 100px;
    height: fit-content;
    animation: cardIn var(--dur-slow) var(--ease-out) both;
}

.gp-rules-accept-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border: 2px solid var(--lx-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(215,176,114,0.08);
    box-shadow: 0 0 28px -6px rgba(215,176,114,0.5);
}

.gp-rules-accept-icon svg { width: 32px; height: 32px; }

.gp-rules-accept-card h2 {
    color: var(--lx-gold);
    font-size: 17px;
    margin-bottom: 12px;
    font-weight: 800;
}

.gp-rules-accept-card p {
    color: var(--lx-cream);
    opacity: 0.85;
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 22px;
}

.gp-rules-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(215,176,114,0.08);
    border: 1px solid rgba(215,176,114,0.30);
    border-radius: 14px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 14px;
    transition: all var(--dur-mid) var(--ease-out);
}

.gp-rules-toggle:hover {
    background: rgba(215,176,114,0.14);
}

.gp-rules-toggle input {
    width: 28px;
    height: 28px;
    accent-color: var(--lx-gold);
    cursor: pointer;
    flex: 0 0 auto;
}

.gp-rules-toggle span {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--lx-cream);
    line-height: 1.6;
}

/* ===================== Cancel page (illustrated) ===================== */
.gp-cancel-card {
    text-align: center;
    padding: 48px 32px;
}

.gp-cancel-illustration {
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
    position: relative;
}

.gp-cancel-illustration svg { width: 100%; height: 100%; }

.gp-cancel-title {
    color: var(--bad-fg);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.gp-cancel-card .gp-hint {
    text-align: center;
    color: var(--lx-cream);
    opacity: 0.85;
    font-size: 14.5px;
    line-height: 2;
    margin-bottom: 24px;
}

.gp-cancel-contact {
    background: rgba(215,176,114,0.08);
    border: 1px solid rgba(215,176,114,0.30);
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 24px;
    text-align: center;
}

.gp-cancel-contact-label {
    color: var(--lx-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.gp-cancel-contact-phone {
    color: var(--lx-gold);
    font-size: 22px;
    font-weight: 800;
    direction: ltr;
    margin-top: 6px;
    text-decoration: none;
    display: inline-block;
}

.gp-cancel-contact-phone:hover {
    text-decoration: underline;
}

/* ===================== Error page ===================== */
.gp-error-card {
    text-align: center;
    padding: 48px 32px;
}

.gp-error-illustration {
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
    position: relative;
}

.gp-error-illustration svg { width: 100%; height: 100%; }

.gp-error-code {
    color: var(--lx-muted);
    font-size: 12px;
    font-family: ui-monospace, monospace;
    margin-top: 12px;
    letter-spacing: 1px;
}

.gp-error-retry {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    color: var(--lx-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.gp-error-retry b {
    color: var(--lx-gold);
    font-size: 16px;
    margin-left: 4px;
}

/* ===================== Mock notice (smaller, badge-style) ===================== */
.gp-mock-notice {
    background: rgba(59,89,152,0.18);
    border: 1px solid rgba(59,89,152,0.45);
    color: var(--lx-cream);
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.9;
    margin-top: 20px;
    text-align: right;
}

.gp-mock-notice b { color: var(--lx-gold); }

.gp-mock-notice ul {
    margin: 10px 0 0;
    padding-right: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
}

.gp-mock-notice li {
    padding: 4px 0;
    font-size: 12px;
}

.gp-mock-notice code {
    background: rgba(255,255,255,0.10);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--lx-gold);
    font-family: ui-monospace, monospace;
    font-size: 11px;
}

/* ===================== Error box (lookup) ===================== */
.gp-error-box {
    background: var(--bad-bg);
    border: 1px solid var(--bad-border);
    color: var(--bad-fg);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.9;
    text-align: center;
    animation: cardIn var(--dur-mid) var(--ease-out) both;
}

/* ===================== Toast ===================== */
.gp-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 100;
    background: linear-gradient(135deg, var(--lx-gold-soft), var(--lx-gold));
    color: var(--lx-navy);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 12px 32px -8px rgba(215,176,114,0.6);
    transition: transform var(--dur-mid) var(--ease-out);
    pointer-events: none;
}

.gp-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===================== Footer ===================== */
.gp-footer {
    text-align: center;
    color: var(--lx-muted);
    font-size: 11.5px;
    line-height: 2;
    padding: 32px 16px;
    margin-top: 32px;
}

.gp-footer-sub {
    color: var(--lx-cream);
    opacity: 0.7;
    font-size: 12px;
    margin-top: 4px;
}

.gp-footer-version {
    color: var(--lx-muted);
    opacity: 0.5;
    font-size: 10px;
    margin-top: 8px;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.5px;
}

/* ===================== Receipt fullscreen viewer ===================== */
.gp-rc-zoom-btn {
    display: none; /* desktop: inline receipt is already readable */
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    align-items: center;
    gap: 6px;
    background: rgba(12, 24, 38, 0.85);
    backdrop-filter: blur(8px);
    color: var(--lx-cream);
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(215,176,114,0.40);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
}

.gp-rc-zoom-btn:active { transform: scale(0.96); }

.gp-rc-viewer {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(7, 15, 26, 0.96);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

/* The HTML `hidden` attribute must always win over the display rule above */
.gp-rc-viewer[hidden] { display: none; }

.gp-rc-viewer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    color: var(--lx-cream);
    font-size: 13px;
    font-weight: 800;
    border-bottom: 1px solid rgba(215,176,114,0.20);
    flex: 0 0 auto;
}

.gp-rc-viewer-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(215,176,114,0.40);
    background: rgba(255,255,255,0.06);
    color: var(--lx-gold);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gp-rc-viewer-body {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
}

/* The cloned stage fills the viewer width; height follows aspect ratio */
.gp-rc-viewer-body .gp-rc-stage-wrap {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    aspect-ratio: 2540/3485;
    background: #fff;
    border-radius: 8px;
    direction: ltr;
    container-type: inline-size;
}

/* ===================== Receipt: mobile tabbed experience ===================== */
/* On phones the 2540px-wide receipt becomes unreadable (~6px text) and the
   page gets very long. Tabs keep the summary first; the receipt opens
   full-screen on tap. */
.gp-result-tabs { display: none; }

@media (max-width: 768px) {
    .gp-result-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 14px;
        animation: cardIn var(--dur-slow) var(--ease-out) both;
    }

    .gp-result-tab {
        flex: 1;
        font-family: 'Vazirmatn', 'Tahoma', sans-serif;
        font-size: 14px;
        font-weight: 800;
        color: var(--lx-cream);
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(215,176,114,0.30);
        border-radius: 12px;
        padding: 13px 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        transition: all var(--dur-fast) var(--ease-out);
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .gp-result-tab.active {
        background: linear-gradient(135deg, var(--lx-gold-soft), var(--lx-gold));
        color: #1a1208;
        border-color: var(--lx-gold);
        box-shadow: 0 8px 22px -6px rgba(215,176,114,0.55);
    }

    /* Tab mode: hide stacked sections, show only the active pane */
    body.gp-tabmode .gp-mobile-summary,
    body.gp-tabmode .gp-mobile-receipt { display: none; }
    body.gp-tab-show-summary .gp-mobile-summary { display: block; }
    body.gp-tab-show-receipt .gp-mobile-receipt { display: block; }

    /* Receipt pane: lighter frame, tap-to-zoom hint */
    body.gp-tab-show-receipt .gp-receipt-card { padding: 10px; }
    body.gp-tab-show-receipt .gp-receipt-frame { padding: 6px; }
    body.gp-tab-show-receipt .gp-receipt-header { margin-bottom: 10px; }
    body.gp-tab-show-receipt .gp-receipt-title { font-size: 15px; }

    /* Timeline + banner belong to the summary pane in tab mode */
    body.gp-tabmode .gp-timeline,
    body.gp-tabmode .gp-state-banner { display: none; }
    body.gp-tab-show-summary .gp-state-banner { display: flex; }
    body.gp-tab-show-summary .gp-timeline { display: grid; }

    body.gp-tabmode .gp-chips { margin-bottom: 12px; }
}

/* ===================== Responsive (mobile ≤768px) ===================== */
@media (max-width: 768px) {
    .gp-topbar { padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); }
    .gp-brand-emblem { width: 36px; height: 36px; }
    .gp-brand-title { font-size: 16px; }
    .gp-brand-sub { font-size: 9.5px; letter-spacing: 1.5px; }
    .gp-topbar-status { display: none; }

    .gp-main { padding: 14px 12px 32px; }

    .gp-hero { height: 170px; border-radius: 14px; margin-bottom: 16px; }
    .gp-hero-title { font-size: 19px; }
    .gp-hero-sub { font-size: 11px; }
    .gp-hero-airplane { display: none; }
    .gp-hero-plane { width: 26px; height: 26px; }
    .gp-plane-trail { width: 30px; }
    .gp-hero-flightpath { height: 56%; }
    .gp-hero-badges { top: 8px; left: 10px; gap: 6px; }
    .gp-hero-badge { font-size: 10px; padding: 5px 10px; white-space: nowrap; flex: 0 0 auto; }
    .gp-hero-badge svg { width: 12px; height: 12px; flex: 0 0 auto; }
    .gp-hero-cloud-1 { width: 60px; height: 15px; }
    .gp-hero-building { width: 130px; height: 145px; }
    .gp-hero-mountains { height: 55px; }
    .gp-hero-skyline { height: 40px; }
    .gp-hero-text { bottom: 12px; }
    .gp-mascot { width: 66px; height: 132px; top: 10px; left: 14px; }
    /* Keep the mascot's base above the hero's bottom edge so it isn't clipped */
    .gp-hero .gp-mascot { top: auto; bottom: 52px; height: 120px; }

    .gp-card { padding: 20px 16px; border-radius: 16px; }
    .gp-card-title { font-size: 18px; }
    .gp-hint { font-size: 13px; text-align: right; }

    /* Lookup: bigger touch targets */
    .gp-lookup-form { flex-direction: column; gap: 10px; }
    .gp-res-input { flex: 1 1 auto; font-size: 18px; padding: 15px 14px; border-radius: 14px; -webkit-text-size-adjust: 100%; }
    .gp-btn-gold { width: 100%; justify-content: center; padding: 15px 20px; font-size: 15px; }
    .gp-btn-gold:active { transform: scale(0.98); }
    .gp-card-icon { width: 52px; height: 52px; margin-bottom: 12px; }
    .gp-card-icon svg { width: 24px; height: 24px; }

    .gp-lookup-stats { gap: 12px; }
    .gp-stat-num { font-size: 16px; }
    .gp-stat-lbl { font-size: 10px; }

    /* Timeline: 2×2 grid on narrow screens */
    .gp-timeline { grid-template-columns: repeat(2, 1fr); padding: 16px 12px; gap: 14px 8px; }
    .gp-timeline::before { display: none; }
    .gp-timeline-dot { width: 30px; height: 30px; font-size: 11px; }
    .gp-timeline-label { font-size: 10.5px; }

    .gp-res-hero { grid-template-columns: 1fr; text-align: center; padding: 16px 14px; gap: 10px; }
    .gp-res-hero-right { justify-content: center; }
    .gp-res-hero-num { font-size: 16px; word-break: break-all; }

    /* Single column stacks */
    .gp-two-col { grid-template-columns: 1fr; gap: 12px; }
    .gp-money-section { grid-template-columns: 1fr; gap: 10px; }
    .gp-money-card { display: flex; align-items: center; text-align: right; gap: 12px; padding: 14px 16px; }
    .gp-money-icon { margin: 0; flex: 0 0 auto; }
    .gp-money-card > div:not(.gp-money-icon) { flex: 1; }
    .gp-money-t { margin-bottom: 2px; }
    .gp-money-v { font-size: 15px; }

    .gp-chips { gap: 6px; }
    .gp-chip { font-size: 11.5px; padding: 6px 12px; }

    /* Receipt: zoom button + full-bleed frame */
    .gp-rc-zoom-btn { display: inline-flex; }
    .gp-receipt-card { padding: 14px; }
    .gp-receipt-frame { padding: 10px; }
    .gp-preview-rules-note { font-size: 12px; }

    .gp-mock-notice ul { grid-template-columns: 1fr; }

    .gp-actions { flex-direction: column; padding: 12px; gap: 8px; }
    .gp-actions > * { width: 100%; min-height: 48px; }

    /* Rules: stacked, sticky accept card at bottom */
    .gp-rules-grid { grid-template-columns: 1fr; gap: 12px; }
    .gp-rules-list-card { max-height: none; padding: 16px; }
    .gp-rules-list-text { font-size: 13px; }
    .gp-rules-list li { padding: 12px 0; gap: 10px; }
    .gp-rules-list li::before { width: 28px; height: 28px; font-size: 12.5px; }
    .gp-rules-accept-card { position: sticky; bottom: 0; top: auto; padding: 16px; }
    .gp-rules-toggle { padding: 14px; }
    .gp-rules-toggle input { width: 24px; height: 24px; }
    .gp-rules-toggle span { font-size: 13.5px; }

    .gp-cancel-card, .gp-error-card { padding: 32px 18px; }
    .gp-cancel-illustration, .gp-error-illustration { width: 110px; height: 110px; }
    .gp-cancel-contact-phone { font-size: 18px; }
}

/* Very narrow phones (≤380px) */
@media (max-width: 380px) {
    .gp-hero { height: 140px; }
    .gp-hero-title { font-size: 17px; }
    .gp-res-hero-num { font-size: 14px; }
    .gp-timeline-label { font-size: 9.5px; }
    .gp-mascot { width: 56px; height: 112px; top: 8px; left: 10px; }
    .gp-hero .gp-mascot { top: auto; bottom: 42px; height: 102px; }
}

/* iOS Safari: prevent double-tap zoom jank on buttons */
@media (hover: none) and (pointer: coarse) {
    .gp-btn-gold, .gp-btn-soft, .gp-icon-btn, .gp-rc-viewer-close {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* ===================== Print (Ctrl+P) — فقط خودِ رسید، یک صفحه ===================== */
/* عکس رسید روی صفحه با background-image نمایش داده می‌شود (اسلات‌ها رویش می‌نشینند)،
   ولی مرورگر پیش‌فرض بک‌گراند را چاپ نمی‌کند؛ برای چاپ یک <img> واقعی زیر اسلات‌ها
   گذاشته شده (gp-rc-print-img) که همیشه چاپ می‌شود. */
.gp-rc-print-img { display: none; }

@page { size: A4 portrait; margin: 0; }

@media print {
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body::before, body::after { display: none !important; }

    /* همه‌چیز غیر از رسید حذف شود: هدر، فوتر، مسکوت/بالون، کانفتی، تب‌ها، خلاصه، دکمه‌ها،
       کارت سفر، نمایشگر تمام‌صفحه، توست */
    body > *:not(main) { display: none !important; }
    .gp-main > * { display: none !important; }
    .gp-main > .gp-mobile-receipt { display: block !important; }
    /* دکمه‌ها و کارت سفر داخل همین پنل قرار گرفته‌اند؛ فقط کارت رسید بماند */
    .gp-mobile-receipt > *:not(.gp-receipt-card) { display: none !important; }

    .gp-main {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* کارت و قاب تزئینی دور رسید حذف؛ فقط خود رسید */
    .gp-receipt-card {
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        animation: none !important;
        /* اسکریپت «ظاهر شدن با اسکرول» ممکن است opacity:0 بگذارد؛ در چاپ همیشه دیده شود */
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .gp-receipt-header,
    .gp-rc-zoom-btn,
    .gp-preview-rules-note { display: none !important; }

    .gp-receipt-frame {
        padding: 0 !important;
        background: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .gp-receipt-frame::before,
    .gp-receipt-frame::after { display: none !important; }

    /* رسید: وسط صفحه، با همان نسبت اصلی؛ ۲۰۰ میلی‌متر عرض هم در A4 و هم در Letter در یک صفحه جا می‌شود */
    .gp-rc-stage-wrap {
        width: min(100%, 200mm) !important;
        margin: 0 auto !important;
        border-radius: 0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
        break-after: avoid;
    }
    .gp-rc-stage { background-image: none !important; }
    .gp-rc-print-img {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
    }
    .gp-rc-slot { z-index: 1; color: #1f2937; }
    .gp-mascot-page, .gp-mascot-stage { display: none !important; }
}
