/* ═══════════════════════════════════════════════════════════════
   TRATOK DESIGN SYSTEM v2.0
   Target: Adventure-seeking millennials (25-35)
   Aesthetic: Bold expedition meets premium fintech
   ═══════════════════════════════════════════════════════════════ */

/* Fonts self-hosted — see styles/vendor/fonts/fonts.css */
@import url('styles/vendor/fonts/fonts.css');

:root {
    /* ─── Primary Palette ─── */
    --ember: #E85D3A;
    --ember-glow: #FF7B5C;
    --ember-deep: #C43D1E;
    --teal: #2ECDA7;
    --teal-glow: #5BFFCF;
    --teal-deep: #1A9B7A;
    --amber: #F5A623;
    --amber-glow: #FFD076;

    /* ─── Dark Canvas ─── */
    --void: #0B0E17;
    --abyss: #111827;
    --slate: #1E293B;
    --surface: #243044;
    --surface-hover: #2D3B52;

    /* ─── Text ─── */
    --white: #FFFFFF;
    --snow: #F1F5F9;
    --mist: #94A3B8;
    /* --ghost is the *body-secondary* token used for sub-labels, helper
       copy and timestamps. Lifted from #64748B to #94A3B8 so it clears
       WCAG AA on the dark canvas at small sizes. For genuinely-weak
       grey (footer signatures, separators), use --whisper. */
    --ghost: #94A3B8;
    --whisper: #64748B;
    --faint: rgba(255, 255, 255, 0.06);

    /* ─── Glass ─── */
    /* Lifted from 4% → 7% so cards visibly elevate off the canvas. */
    --glass: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-hover: rgba(255, 255, 255, 0.10);
    --glass-active: rgba(255, 255, 255, 0.14);

    /* ─── Feedback ─── */
    --success: #22C55E;
    --warning: #EAB308;
    --danger: #EF4444;
    --info: #3B82F6;

    /* ─── Elevation ─── */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
    --shadow-ember: 0 4px 20px rgba(232, 93, 58, 0.25);
    --shadow-teal: 0 4px 20px rgba(46, 205, 167, 0.2);

    /* ─── Radii ─── */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* ─── Motion ─── */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.15s;
    --duration: 0.3s;
    --duration-slow: 0.5s;

    /* ─── Spacing ─── */
    --header-h: 64px;
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
    --safe-left: env(safe-area-inset-left);
    --safe-right: env(safe-area-inset-right);

    /* ─── PHASE 1 DESIGN TOKENS (2026-05-06) ───────────────
       Premium surface, border, shadow, and font-family tokens
       used across the polished desktop pages. Pages can either
       reference these directly via var(--…) or use the utility
       classes defined further down in this file (.t-card etc.).
       ─────────────────────────────────────────────────────── */

    /* Premium card surface — the gradient + inset highlight every
       polished card uses. */
    --surface-card: linear-gradient(180deg, #131B2E 0%, #0F172A 100%);
    --surface-card-hover: linear-gradient(180deg, #161E33 0%, #111827 100%);
    --surface-glass: rgba(255, 255, 255, 0.04);
    --surface-glass-hover: rgba(255, 255, 255, 0.07);

    /* Borders — three levels of subtlety */
    --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
    --border-medium: 1px solid rgba(255, 255, 255, 0.10);
    --border-strong: 1px solid rgba(255, 255, 255, 0.16);
    --border-ember: 1px solid rgba(232, 93, 58, 0.32);
    --border-teal: 1px solid rgba(46, 205, 167, 0.32);

    /* Shadow combos used on cards (inset highlight + drop) */
    --shadow-card:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 4px 18px rgba(0, 0, 0, 0.18);
    --shadow-card-hover:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 14px 32px rgba(0, 0, 0, 0.32);
    --shadow-card-ember:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 16px 36px rgba(232, 93, 58, 0.18);

    /* Glow rings for focus / hero atmospheres */
    --glow-ember-soft: 0 0 0 4px rgba(232, 93, 58, 0.12);
    --glow-teal-soft: 0 0 0 4px rgba(46, 205, 167, 0.12);

    /* Font families (canonical) */
    --font-display: 'Playfair Display', 'DM Sans', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Letter-spacing scale for the display family */
    --tracking-tight: -0.022em;
    --tracking-normal: -0.012em;
    --tracking-wide: 0.06em;
    --tracking-caps: 0.12em;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', 'Noto Naskh Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans', -apple-system, sans-serif;
    background: var(--void);
    color: var(--snow);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

/* Ambient background grain texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.85rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.35rem); }

p { color: var(--mist); }

a {
    color: var(--teal);
    text-decoration: none;
    transition: color var(--duration) var(--ease-out);
}
a:hover { color: var(--teal-glow); }

.text-gradient {
    background: linear-gradient(135deg, var(--ember-glow), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-teal {
    background: linear-gradient(135deg, var(--teal), var(--teal-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eyebrow {
    font-family: 'Sora', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ember);
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.content-frame {
    flex: 1;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER v2
   ═══════════════════════════════════════════════════════════════ */

.t-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(11, 14, 23, 0.85);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 1rem;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.t-header__btn {
    background: none;
    border: none;
    color: var(--mist);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.t-header__btn:hover {
    color: var(--white);
    background: var(--glass-hover);
}

.t-header__btn:active {
    transform: scale(0.92);
}

.t-header__btn--accent:hover {
    color: var(--ember);
    background: rgba(232, 93, 58, 0.1);
}

.t-header__nav {
    display: flex;
    gap: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   FULLSCREEN MENU v2
   ═══════════════════════════════════════════════════════════════ */

.t-menu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--void);
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.t-menu.is-open {
    transform: translateX(0);
}

.t-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.t-menu__logo {
    height: 32px;
    width: auto;
}

.t-menu__close {
    background: none;
    border: none;
    color: var(--mist);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease-out);
}

.t-menu__close:hover {
    color: var(--white);
    background: var(--glass-hover);
}

.t-menu__list {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
}

.t-menu__item {
    border-bottom: 1px solid var(--faint);
}

.t-menu__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--snow);
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--duration) var(--ease-out);
    text-decoration: none;
}

.t-menu__link:hover {
    background: var(--glass-hover);
    color: var(--ember);
    padding-left: 2rem;
}

.t-menu__link i {
    width: 1.5rem;
    text-align: center;
    color: var(--ghost);
    font-size: 1rem;
    transition: color var(--duration) var(--ease-out);
}

.t-menu__link:hover i {
    color: var(--ember);
}

.t-menu__badge {
    margin-left: auto;
    background: var(--ember);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

/* ═══════════════════════════════════════════════════════════════
   CARDS & GLASS SURFACES
   ═══════════════════════════════════════════════════════════════ */

.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    transition: all var(--duration) var(--ease-out);
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
}

.solid-card {
    background: var(--slate);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid transparent;
    transition: all var(--duration) var(--ease-out);
}

.solid-card:hover {
    background: var(--surface);
    border-color: var(--glass-border);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-family: 'Sora', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.08));
    opacity: 0;
    transition: opacity var(--duration) var(--ease-out);
}

.btn:hover::after { opacity: 1; }

.btn:active {
    transform: scale(0.97);
}

.btn--primary {
    background: linear-gradient(135deg, var(--ember), var(--ember-deep));
    color: var(--white);
    box-shadow: var(--shadow-ember);
}

.btn--primary:hover {
    box-shadow: 0 6px 28px rgba(232, 93, 58, 0.4);
    transform: translateY(-2px);
}

.btn--teal {
    background: linear-gradient(135deg, var(--teal), var(--teal-deep));
    color: var(--void);
    box-shadow: var(--shadow-teal);
}

.btn--teal:hover {
    box-shadow: 0 6px 28px rgba(46, 205, 167, 0.35);
    transform: translateY(-2px);
}

.btn--ghost {
    background: var(--glass);
    color: var(--snow);
    border: 1px solid var(--glass-border);
}

.btn--ghost:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn--block {
    width: 100%;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn--sm {
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mist);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: 'DM Sans', 'Noto Naskh Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--white);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--duration) var(--ease-out);
    outline: none;
    height: 50px;
}

.form-input::placeholder {
    color: var(--ghost);
}

.form-input:focus,
.form-select:focus {
    background: var(--glass-hover);
    border-color: var(--ember);
    box-shadow: 0 0 0 3px rgba(232, 93, 58, 0.15);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 01.708 0L8 8.293l2.646-2.647a.5.5 0 01.708.708l-3 3a.5.5 0 01-.708 0l-3-3a.5.5 0 010-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-select option {
    background: var(--abyss);
    color: var(--white);
}

.form-row {
    display: flex;
    gap: 0.75rem;
}

.form-row > * { flex: 1; }

/* Toggle switch */
.toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--snow);
}

.toggle input { display: none; }

.toggle__track {
    width: 2.75rem;
    height: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--duration) var(--ease-out);
    flex-shrink: 0;
}

.toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 1rem;
    height: 1rem;
    background: var(--mist);
    border-radius: 50%;
    transition: all var(--duration) var(--ease-spring);
}

.toggle input:checked + .toggle__track {
    background: var(--ember);
    border-color: var(--ember);
}

.toggle input:checked + .toggle__track::after {
    transform: translateX(1.2rem);
    background: var(--white);
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOM SELECTS v2
   ═══════════════════════════════════════════════════════════════ */

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-toggle {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: 'DM Sans', 'Noto Naskh Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--white);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    height: 50px;
    display: flex;
    align-items: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 01.708 0L8 8.293l2.646-2.647a.5.5 0 01.708.708l-3 3a.5.5 0 01-.708 0l-3-3a.5.5 0 010-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.custom-select-toggle:focus {
    background-color: var(--glass-hover);
    border-color: var(--ember);
    box-shadow: 0 0 0 3px rgba(232, 93, 58, 0.15);
    outline: none;
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--abyss);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 220px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: t-dropdown 0.25s var(--ease-out);
}

.custom-select-options.show { display: block; }

.custom-select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--snow);
    font-size: 0.9rem;
    transition: all var(--duration-fast) ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.custom-select-option:hover,
.custom-select-option.selected,
.custom-select-option.focused {
    background: rgba(232, 93, 58, 0.12);
    color: var(--ember-glow);
}

.custom-select-option i {
    font-size: 0.85rem;
    color: var(--ghost);
}

.custom-select-option:hover i,
.custom-select-option.selected i {
    color: var(--ember);
}

.custom-select select { display: none; }

/* ═══════════════════════════════════════════════════════════════
   SUGGESTIONS DROPDOWN
   ═══════════════════════════════════════════════════════════════ */

#suggestions, #suggestions-air-depart, #suggestions-air-return,
#suggestions-activity, #suggestions-car {
    display: none;
    background: var(--abyss);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 250px;
    overflow-y: auto;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    animation: t-dropdown 0.25s var(--ease-out);
}

.suggestions-list {
    list-style: none;
    padding: 0.25rem 0;
}

.suggestions-list li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.suggestions-list li:hover,
.suggestions-list li.focused {
    background: rgba(232, 93, 58, 0.1);
}

.suggestion-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.suggestion-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.suggestion-icon i {
    color: var(--ember);
    font-size: 0.8rem;
}

.suggestion-main {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
}

.suggestion-sub {
    font-size: 0.75rem;
    color: var(--ghost);
    margin-top: 0.1rem;
}

.no-results {
    color: var(--ghost) !important;
    font-size: 0.85rem;
    text-align: center;
    cursor: default !important;
    padding: 1rem !important;
}

.suggestions-loading {
    padding: 1rem;
    text-align: center;
    color: var(--ghost);
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════
   TAB NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

.tab-nav {
    display: flex;
    gap: 2px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 4px;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-nav button {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    color: var(--ghost);
    font-family: 'Sora', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    border-radius: var(--radius-md);
    position: relative;
}

.tab-nav button i {
    font-size: 1.15rem;
    transition: all var(--duration) var(--ease-spring);
}

.tab-nav button span {
    transition: all var(--duration) var(--ease-out);
    white-space: nowrap;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tab-nav button:not(.active) span {
    opacity: 0.6;
    font-size: 0.6rem;
}

.tab-nav button.active {
    background: var(--ember);
    color: var(--white);
    box-shadow: var(--shadow-ember);
}

.tab-nav button.active i {
    transform: scale(1.1);
}

.tab-nav button:not(.active):hover {
    background: var(--glass-hover);
    color: var(--mist);
}

/* ═══════════════════════════════════════════════════════════════
   CHECKBOX / TOGGLE GROUP
   ═══════════════════════════════════════════════════════════════ */

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--snow);
    font-size: 0.9rem;
    font-weight: 500;
    user-select: none;
    gap: 0.6rem;
}

.checkbox-group input[type="checkbox"] {
    display: none;
}

.checkbox-group .checkmark {
    width: 2.75rem;
    height: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--duration) var(--ease-out);
    flex-shrink: 0;
}

.checkbox-group .checkmark::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    background: var(--mist);
    border-radius: 50%;
    transition: all var(--duration) var(--ease-spring);
}

.checkbox-group input:checked ~ .checkmark {
    background: var(--ember);
    border-color: var(--ember);
}

.checkbox-group input:checked ~ .checkmark::before {
    transform: translate(1.15rem, -50%);
    background: var(--white);
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH BOX
   ═══════════════════════════════════════════════════════════════ */

.search-box { display: none; }
.search-box.active { display: block; }

.search-box label {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--mist);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.search-box input,
.search-box select {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: 'DM Sans', 'Noto Naskh Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--white);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--duration) var(--ease-out);
    outline: none;
    height: 50px;
    margin-bottom: 0.85rem;
}

.search-box input::placeholder { color: var(--ghost); }

.search-box input:focus,
.search-box select:focus {
    background: var(--glass-hover);
    border-color: var(--ember);
    box-shadow: 0 0 0 3px rgba(232, 93, 58, 0.15);
}

.search-box select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 01.708 0L8 8.293l2.646-2.647a.5.5 0 01.708.708l-3 3a.5.5 0 01-.708 0l-3-3a.5.5 0 010-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.search-box select option {
    background: var(--abyss);
    color: var(--white);
}

.search-box button[type="submit"],
.search-box button[type="button"] {
    width: 100%;
    padding: 0.9rem;
    font-family: 'Sora', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--ember), var(--ember-deep));
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    box-shadow: var(--shadow-ember);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(232, 93, 58, 0.4);
}

.search-box button:active {
    transform: scale(0.98);
}

.date-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.date-group .date-input { flex: 1; }
.date-group label { font-size: 0.7rem; margin-bottom: 0.25rem; }
.date-group input { margin-bottom: 0; }

/* Flatpickr overrides */
.flatpickr-input, .flatpickr-input.active {
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    font-family: 'DM Sans', 'Noto Naskh Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans', sans-serif !important;
    font-size: 0.95rem !important;
    color: var(--white) !important;
    background: var(--glass) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md) !important;
    height: 50px !important;
    outline: none !important;
}

.flatpickr-input:focus, .flatpickr-input.active:focus {
    background: var(--glass-hover) !important;
    border-color: var(--ember) !important;
    box-shadow: 0 0 0 3px rgba(232, 93, 58, 0.15) !important;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes t-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes t-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes t-slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes t-dropdown {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes t-scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes t-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes t-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes t-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.animate-in {
    animation: t-slideUp 0.6s var(--ease-out) both;
}

.animate-in-delayed {
    animation: t-slideUp 0.6s var(--ease-out) 0.15s both;
}

.animate-fade {
    animation: t-fadeIn 0.5s var(--ease-out) both;
}

/* Stagger children */
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.16s; }
.stagger > *:nth-child(4) { animation-delay: 0.24s; }
.stagger > *:nth-child(5) { animation-delay: 0.32s; }
.stagger > *:nth-child(6) { animation-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ember); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.t-footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

.t-footer p {
    font-size: 0.75rem;
    color: var(--ghost);
}

.t-footer a {
    color: var(--mist);
    font-weight: 500;
}

.t-footer a:hover { color: var(--ember); }

/* ═══════════════════════════════════════════════════════════════
   SWEETALERT2 THEME OVERRIDE
   ═══════════════════════════════════════════════════════════════ */

.swal2-popup {
    background: var(--abyss) !important;
    color: var(--white) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    font-family: 'DM Sans', 'Noto Naskh Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans', sans-serif !important;
}

.swal2-title {
    font-family: 'Sora', sans-serif !important;
    color: var(--white) !important;
}

.swal2-html-container {
    color: var(--mist) !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--ember), var(--ember-deep)) !important;
    border-radius: var(--radius-md) !important;
    font-family: 'Sora', sans-serif !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-ember) !important;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .content-frame {
        padding: 0.75rem;
    }

    .tab-nav button {
        padding: 0.65rem 0.3rem;
        font-size: 0.6rem;
    }

    .tab-nav button i {
        font-size: 1rem;
    }

    .glass-card, .solid-card {
        padding: 1.15rem;
    }

    .btn--lg {
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .tab-nav {
        flex-wrap: wrap;
    }

    .tab-nav button {
        flex: 1 1 30%;
    }
}


/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION SYSTEM v3 (replaces SweetAlert2)
   ═══════════════════════════════════════════════════════════════ */

.t-toast-container {
    position: fixed;
    top: calc(var(--header-h, 56px) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    width: 100%;
    max-width: 420px;
    padding: 0 1rem;
}

.t-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    background: var(--abyss);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: t-toastIn 0.4s var(--ease-spring) both;
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.t-toast.is-leaving { animation: t-toastOut 0.3s var(--ease-out) both; }

.t-toast__icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.85rem;
}

.t-toast--success .t-toast__icon { background: rgba(34,197,94,0.12); color: var(--success); }
.t-toast--error .t-toast__icon { background: rgba(239,68,68,0.12); color: var(--danger); }
.t-toast--warning .t-toast__icon { background: rgba(234,179,8,0.12); color: var(--warning); }
.t-toast--info .t-toast__icon { background: rgba(59,130,246,0.12); color: var(--info); }

.t-toast__body { flex: 1; min-width: 0; }
.t-toast__title { font-family: 'Sora', sans-serif; font-size: 0.82rem; font-weight: 600; color: var(--white); line-height: 1.3; }
.t-toast__text { font-size: 0.78rem; color: var(--mist); margin-top: 0.1rem; line-height: 1.35; }
.t-toast__close { background: none; border: none; color: var(--ghost); font-size: 0.9rem; cursor: pointer; padding: 0.25rem; border-radius: var(--radius-sm); transition: all var(--duration-fast) ease; flex-shrink: 0; line-height: 1; }
.t-toast__close:hover { color: var(--white); background: var(--glass-hover); }
.t-toast__progress { position: absolute; bottom: 0; left: 0; height: 2px; border-radius: 0 0 var(--radius-md) var(--radius-md); animation: t-toastProgress linear both; }
.t-toast--success .t-toast__progress { background: var(--success); }
.t-toast--error .t-toast__progress { background: var(--danger); }
.t-toast--warning .t-toast__progress { background: var(--warning); }
.t-toast--info .t-toast__progress { background: var(--info); }

@keyframes t-toastIn { from { opacity: 0; transform: translateY(-16px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes t-toastOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-12px) scale(0.96); } }
@keyframes t-toastProgress { from { width: 100%; } to { width: 0%; } }

/* ═══════════════════════════════════════════════════════════════
   INLINE ALERT BANNERS
   ═══════════════════════════════════════════════════════════════ */

.t-alert {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.85rem 1rem; border-radius: var(--radius-md);
    margin-bottom: 1rem; animation: t-slideDown 0.35s var(--ease-out) both;
    border: 1px solid transparent;
}
.t-alert__icon { flex-shrink: 0; width: 20px; text-align: center; padding-top: 0.1rem; }
.t-alert__content { flex: 1; font-size: 0.88rem; line-height: 1.4; }
.t-alert__content strong { font-weight: 600; display: block; margin-bottom: 0.15rem; }

.t-alert--success { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.2); }
.t-alert--success .t-alert__icon { color: var(--success); }
.t-alert--success .t-alert__content { color: #86EFAC; }
.t-alert--error { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.2); }
.t-alert--error .t-alert__icon { color: var(--danger); }
.t-alert--error .t-alert__content { color: #FCA5A5; }
.t-alert--warning { background: rgba(234,179,8,0.12); border-color: rgba(234,179,8,0.2); }
.t-alert--warning .t-alert__icon { color: var(--warning); }
.t-alert--warning .t-alert__content { color: #FDE68A; }
.t-alert--info { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.2); }
.t-alert--info .t-alert__icon { color: var(--info); }
.t-alert--info .t-alert__content { color: #93C5FD; }

/* ═══════════════════════════════════════════════════════════════
   MODAL SYSTEM (for confirmations, prompts)
   ═══════════════════════════════════════════════════════════════ */

.t-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(11,14,23,0.8);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 9999; display: none; align-items: center; justify-content: center;
    padding: 1.5rem; opacity: 0; transition: opacity 0.25s var(--ease-out);
}
.t-modal-overlay.is-visible { display: flex; opacity: 1; }
.t-modal-overlay.is-leaving { opacity: 0; }

.t-modal {
    background: var(--abyss); border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl); padding: 2rem 1.75rem;
    width: 100%; max-width: 380px; text-align: center;
    animation: t-scaleIn 0.35s var(--ease-spring) both;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
}
.t-modal__icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.35rem; }
.t-modal__icon--success { background: rgba(34,197,94,0.12); color: var(--success); }
.t-modal__icon--error { background: rgba(239,68,68,0.12); color: var(--danger); }
.t-modal__icon--info { background: rgba(59,130,246,0.12); color: var(--info); }
.t-modal__title { font-family: 'Sora', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--white); margin-bottom: 0.5rem; }
.t-modal__text { font-size: 0.9rem; color: var(--mist); margin-bottom: 1.5rem; line-height: 1.5; }
.t-modal__actions { display: flex; gap: 0.75rem; }
.t-modal__actions .btn { flex: 1; }
.t-modal__input { width: 100%; padding: 0.85rem 1rem; font-family: 'DM Sans', 'Noto Naskh Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans', sans-serif; font-size: 0.95rem; color: var(--white); background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-md); outline: none; margin-bottom: 1rem; transition: all var(--duration) var(--ease-out); }
.t-modal__input:focus { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(232,93,58,0.15); }

.coming-soon-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.35rem 0.75rem; background: rgba(245,166,35,0.12);
    border: 1px solid rgba(245,166,35,0.2); border-radius: var(--radius-full);
    font-family: 'Sora', sans-serif; font-size: 0.65rem; font-weight: 600;
    color: var(--amber); text-transform: uppercase; letter-spacing: 0.08em;
}

@keyframes t-spin { to { transform: rotate(360deg); } }

/* Skeleton */
.t-skeleton { background: linear-gradient(90deg, var(--glass) 25%, var(--glass-hover) 50%, var(--glass) 75%); background-size: 200% 100%; animation: t-shimmer 1.5s infinite; border-radius: var(--radius-sm); }

/* Empty states */
.t-empty { text-align: center; padding: 3rem 1.5rem; }
.t-empty__icon { font-size: 2.5rem; color: var(--ghost); margin-bottom: 1rem; opacity: 0.5; }
.t-empty__title { font-family: 'Sora', sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--snow); margin-bottom: 0.35rem; }
.t-empty__text { font-size: 0.88rem; color: var(--ghost); max-width: 280px; margin: 0 auto; }

/* Utility */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }

@media (max-width: 480px) {
    .t-toast-container { max-width: 100%; padding: 0 0.75rem; }
    .t-toast { padding: 0.75rem 1rem; }
    .t-modal { padding: 1.5rem 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════
   BOTTOM TAB BAR  —  primary mobile nav, sticks to viewport bottom
   ═══════════════════════════════════════════════════════════════ */

/* Reserve space at the bottom of the page so content isn't hidden
   under the bar. Pages opt-in by adding `has-bottom-nav` to body. */
body.has-bottom-nav {
    padding-bottom: 56px;
}

/* The legacy bottom nav (.bn) emitted by app_header.php duplicates this one.
   Hide it on any page that opts into has-bottom-nav so users see one nav, not
   two stacked at bottom:0. The legacy .bn is taller (~64px + safe-area) and
   was poking out above this nav, creating the appearance of a "blank space"
   below the labels. */
body.has-bottom-nav .bn { display: none !important; }

/* .t-bottom-nav styling lives in tratok_aurora.css (loaded by app_header.php
   on every page that renders the nav). The legacy docked-bar rules that used
   to live here fought aurora's floating pill with !importants — pages loading
   BOTH stylesheets (explore, search pages) got a hybrid bar that didn't match
   the rest of the app. Keep nav rules out of this file. */

/* ═══════════════════════════════════════════════════════════════
   SKELETON CARD VARIANTS  —  shimmering placeholders by content shape
   ═══════════════════════════════════════════════════════════════ */

.t-skel-line {
    height: 12px;
    background: linear-gradient(90deg, var(--glass) 25%, var(--glass-hover) 50%, var(--glass) 75%);
    background-size: 200% 100%;
    animation: t-shimmer 1.5s infinite linear;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.t-skel-line--xs { height: 8px; width: 40%; }
.t-skel-line--sm { height: 10px; width: 60%; }
.t-skel-line--md { height: 14px; width: 80%; }
.t-skel-line--lg { height: 18px; width: 90%; }
.t-skel-line--full { width: 100%; }

.t-skel-circle {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--glass) 25%, var(--glass-hover) 50%, var(--glass) 75%);
    background-size: 200% 100%;
    animation: t-shimmer 1.5s infinite linear;
    flex-shrink: 0;
}

.t-skel-rect {
    width: 100%;
    background: linear-gradient(90deg, var(--glass) 25%, var(--glass-hover) 50%, var(--glass) 75%);
    background-size: 200% 100%;
    animation: t-shimmer 1.5s infinite linear;
    border-radius: var(--radius-md);
}

/* Pre-shaped skeletons for common card types */
.t-skel-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 12px;
}
.t-skel-card--row { display: flex; gap: 12px; align-items: center; }

.t-skel-card--listing .t-skel-rect { height: 160px; margin-bottom: 12px; }

.t-skel-card--feed { padding: 0.85rem; }
.t-skel-card--feed .t-skel-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.t-skel-card--feed .t-skel-card__body { width: 100%; }

.t-skel-card--chat { padding: 0.75rem 1rem; }

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE — already had `t-empty`; here's a richer variant
   ═══════════════════════════════════════════════════════════════ */

.t-empty__action {
    margin-top: 1.25rem;
    display: inline-flex;
}

.t-empty__illust {
    width: 96px; height: 96px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(232, 93, 58, 0.25), transparent 60%),
                var(--glass);
    border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--ember);
    font-size: 2.25rem;
    box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════════════════════════
   STORIES STRIP  —  horizontal avatar carousel above the feed
   ═══════════════════════════════════════════════════════════════ */

.t-stories {
    display: flex;
    gap: 14px;
    padding: 14px 14px 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.t-stories::-webkit-scrollbar { display: none; }

.t-story {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    cursor: pointer;
    background: none; border: none; padding: 0;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    scroll-snap-align: start;
}

.t-story__ring {
    width: 64px; height: 64px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, var(--ember), var(--amber), var(--teal));
    transition: transform var(--duration) var(--ease-spring);
}
.t-story:active .t-story__ring { transform: scale(0.93); }

/* Already-seen state: muted ring */
.t-story--seen .t-story__ring {
    background: var(--glass-border);
}

.t-story__avatar {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: var(--abyss);
    border: 2px solid var(--void);
    display: block;
    object-fit: cover;
}

.t-story__name {
    font-size: 0.7rem;
    color: var(--mist);
    max-width: 70px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* "Add story" tile (own avatar with + badge) */
.t-story--add .t-story__ring {
    background: var(--glass);
    border: 1.5px dashed var(--glass-border);
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.t-story--add .t-story__avatar {
    width: 56px; height: 56px;
    border: none;
}
.t-story--add::after {
    content: '+';
    position: absolute;
    bottom: 22px; right: -2px;
    width: 20px; height: 20px;
    background: var(--ember);
    color: var(--white);
    border: 2px solid var(--void);
    border-radius: 50%;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
}

/* Story viewer overlay (full-screen) */
.t-story-viewer {
    position: fixed; inset: 0; z-index: 1100;
    background: var(--void);
    display: none;
    flex-direction: column;
    animation: t-fadeIn 0.2s var(--ease-out);
}
.t-story-viewer.is-open { display: flex; }

.t-story-viewer__progress {
    display: flex; gap: 4px;
    padding: calc(env(safe-area-inset-top) + 12px) 12px 8px;
}
.t-story-viewer__bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}
.t-story-viewer__bar-fill {
    width: 0;
    height: 100%;
    background: var(--white);
    border-radius: 2px;
    transition: width 0.1s linear;
}
.t-story-viewer__bar.is-done .t-story-viewer__bar-fill { width: 100%; }

.t-story-viewer__head {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px 12px;
}
.t-story-viewer__avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--abyss);
}
.t-story-viewer__user {
    flex: 1;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
}
.t-story-viewer__time {
    font-size: 0.7rem;
    color: var(--mist);
}
.t-story-viewer__close {
    background: none; border: none;
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
}
.t-story-viewer__media {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.t-story-viewer__media img,
.t-story-viewer__media video {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
}

/* Tap zones for prev/next inside viewer */
.t-story-viewer__nav { display: flex; height: 100%; }
.t-story-viewer__nav-zone { flex: 1; cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════
   FRIEND AVATAR PILE  —  "X friends have been here"
   ═══════════════════════════════════════════════════════════════ */

.t-friend-pile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    background: rgba(46, 205, 167, 0.12);
    border: 1px solid rgba(46, 205, 167, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    color: var(--teal-glow);
    font-weight: 500;
}

.t-friend-pile__avatars {
    display: flex;
}
.t-friend-pile__avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid var(--void);
    background: var(--abyss);
    object-fit: cover;
    margin-right: -8px;
    box-shadow: 0 0 0 1px var(--glass-border);
}
.t-friend-pile__avatar:last-child { margin-right: 0; }

.t-friend-pile__avatar--more {
    background: var(--ember);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border-color: var(--void);
}

/* ═══════════════════════════════════════════════════════════════
   LIVE TICKER + ANIMATED COUNTERS
   ═══════════════════════════════════════════════════════════════ */

.t-ticker {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-variant-numeric: tabular-nums;
}

.t-ticker__price {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--white);
    font-size: 1.05rem;
}

.t-ticker__delta {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    line-height: 1.1;
}
.t-ticker__delta--up   { color: var(--success); background: rgba(34, 197, 94, 0.12); }
.t-ticker__delta--down { color: var(--danger);  background: rgba(239, 68, 68, 0.12); }

.t-ticker__delta i { margin-right: 2px; font-size: 0.6rem; }

.t-counter {
    font-variant-numeric: tabular-nums;
    transition: color 0.4s ease;
}
.t-counter.is-flashing { color: var(--ember-glow); }

/* Sparkline container */
.t-sparkline {
    display: block;
    width: 100%;
    height: 40px;
}

/* ═══════════════════════════════════════════════════════════════
   BOOKING HOLD COUNTDOWN BAR  —  sticky alert under header
   ═══════════════════════════════════════════════════════════════ */

.t-hold-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 850;
    background: linear-gradient(135deg, rgba(232, 93, 58, 0.18), rgba(245, 166, 35, 0.18));
    border-bottom: 1px solid rgba(232, 93, 58, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--snow);
    animation: t-slideDown 0.3s var(--ease-out) both;
}
.t-hold-bar__icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--ember);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
}
.t-hold-bar__body { flex: 1; min-width: 0; }
.t-hold-bar__title {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    color: var(--white);
    font-size: 0.82rem;
    line-height: 1.2;
}
.t-hold-bar__sub {
    font-size: 0.72rem;
    color: var(--mist);
    margin-top: 1px;
}
.t-hold-bar__time {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--ember-glow);
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.t-hold-bar__cta {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--ember);
    color: var(--white);
    border-radius: var(--radius-md);
    font-family: 'Sora', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--duration) var(--ease-out);
}
.t-hold-bar__cta:hover {
    background: var(--ember-deep);
    color: var(--white);
}

/* Below 1 minute — pulse to grab attention */
.t-hold-bar.is-urgent .t-hold-bar__time {
    animation: t-pulse 1s infinite;
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   COMMAND PALETTE  —  Cmd-K / "/" overlay
   ═══════════════════════════════════════════════════════════════ */

.t-cmdk {
    position: fixed; inset: 0;
    z-index: 1200;
    background: rgba(11, 14, 23, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 1rem;
    animation: t-fadeIn 0.18s var(--ease-out);
}
.t-cmdk.is-open { display: flex; }

.t-cmdk__panel {
    width: 100%;
    max-width: 560px;
    background: var(--abyss);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: t-scaleIn 0.22s var(--ease-spring);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.t-cmdk__input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
}
.t-cmdk__input-wrap i {
    color: var(--mist);
    font-size: 0.95rem;
}
.t-cmdk__input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--white);
    font-size: 1rem;
    font-family: 'DM Sans', 'Noto Naskh Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans', sans-serif;
}
.t-cmdk__input::placeholder { color: var(--ghost); }

.t-cmdk__hint {
    font-size: 0.68rem;
    color: var(--ghost);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Sora', sans-serif;
    flex-shrink: 0;
}

.t-cmdk__list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.t-cmdk__group {
    padding: 4px 0;
}
.t-cmdk__group-label {
    padding: 8px 16px 4px;
    font-family: 'Sora', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ghost);
}

.t-cmdk__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    color: var(--snow);
    transition: background var(--duration-fast) ease;
    text-decoration: none;
}
.t-cmdk__item:hover,
.t-cmdk__item.is-active {
    background: rgba(232, 93, 58, 0.1);
}
.t-cmdk__item-icon {
    width: 28px; height: 28px;
    border-radius: var(--radius-sm);
    background: var(--glass);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--mist);
    font-size: 0.85rem;
}
.t-cmdk__item.is-active .t-cmdk__item-icon { color: var(--ember); }
.t-cmdk__item-body { flex: 1; min-width: 0; }
.t-cmdk__item-title {
    font-size: 0.88rem;
    color: var(--white);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.t-cmdk__item-sub {
    font-size: 0.72rem;
    color: var(--ghost);
    margin-top: 1px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.t-cmdk__item-shortcut {
    font-size: 0.7rem;
    color: var(--ghost);
    font-family: 'Sora', sans-serif;
}

.t-cmdk__empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--ghost);
    font-size: 0.85rem;
}

.t-cmdk__footer {
    padding: 8px 14px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.7rem;
    color: var(--ghost);
}
.t-cmdk__footer kbd {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: 'Sora', sans-serif;
    color: var(--mist);
    margin-right: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   MOTION PREFERENCES
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* The light theme has been removed — Tratok uses a single dark theme
   matching its expedition/fintech identity. Theme-toggle UI in
   app_header.php and TratokUI.toggleTheme in js/tratok-ui.js were
   removed alongside this block. */

/* ═══════════════════════════════════════════════════════════════
   FOCUS RINGS  —  visible, accessible, theme-aware
   ═══════════════════════════════════════════════════════════════ */

*:focus { outline: none; }
*:focus-visible {
    outline: 2px solid var(--ember);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    box-shadow: 0 0 0 3px rgba(232, 93, 58, 0.25);
    outline-offset: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   VERIFIED TRATOKIAN TICK
   ═══════════════════════════════════════════════════════════════ */

.t-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px; height: 14px;
    margin-left: 4px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--void);
    font-size: 0.55rem;
    flex-shrink: 0;
    vertical-align: middle;
    box-shadow: 0 0 0 2px rgba(46, 205, 167, 0.18);
}
.t-verified::before {
    content: "\f00c"; /* Font Awesome check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}
.t-verified--lg { width: 18px; height: 18px; font-size: 0.7rem; }
.t-verified--host { background: var(--ember); box-shadow: 0 0 0 2px rgba(232, 93, 58, 0.18); }
.t-verified--partner { background: var(--amber); box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.18); }
.t-verified--staff { background: #3D8BFD; color: #fff; box-shadow: 0 0 0 2px rgba(61, 139, 253, 0.22); }
.t-verified--founder { background: #8B5CF6; color: #fff; box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.22); }
.t-verified--founder::before { content: "\f005"; /* Font Awesome star */ }

/* ═══════════════════════════════════════════════════════════════
   STAGGER-FADE  —  IntersectionObserver-driven reveal-on-scroll
   Wired by tratok-ui.js: any [data-tratok-reveal] children get
   .is-revealed when they scroll into view. Each child delays by
   its index inside the parent.
   ═══════════════════════════════════════════════════════════════ */

[data-tratok-reveal] > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
[data-tratok-reveal] > .is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   BOTTOM SHEET — drag handle + sheet base (existing pages already
   define their own .sheet styles; this is the canonical version
   tratok-ui.js's drag gesture targets via .t-sheet).
   ═══════════════════════════════════════════════════════════════ */

.t-sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1050;
    background: var(--abyss);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.32s var(--ease-out);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
}
.t-sheet.is-open { transform: translateY(0); }

.t-sheet__handle {
    width: 40px;
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    margin: 10px auto;
    cursor: grab;
    touch-action: none;
}
.t-sheet__handle:active { cursor: grabbing; }

.t-sheet__head {
    padding: 0 20px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.t-sheet__title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--white);
    flex: 1;
}
.t-sheet__body {
    padding: 8px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE TABS  —  pill-style tab bar with sliding underline
   ═══════════════════════════════════════════════════════════════ */

.t-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--glass-border);
    overflow-x: auto;
    scrollbar-width: none;
    margin: 18px 0 12px;
    -webkit-overflow-scrolling: touch;
}
.t-tabs::-webkit-scrollbar { display: none; }

.t-tabs__btn {
    flex: 0 0 auto;
    background: none;
    border: none;
    padding: 10px 16px;
    font-family: 'Sora', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--mist);
    cursor: pointer;
    transition: color var(--duration) var(--ease-out);
    border-bottom: 2px solid transparent;
    position: relative;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.t-tabs__btn:hover { color: var(--snow); }

.t-tabs__btn.is-active {
    color: var(--ember);
    border-bottom-color: var(--ember);
}

.t-tabs__count {
    background: var(--glass);
    color: var(--mist);
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}
.t-tabs__btn.is-active .t-tabs__count {
    background: rgba(232, 93, 58, 0.15);
    color: var(--ember);
}

.t-tabs__panel { display: none; }
.t-tabs__panel.is-active { display: block; animation: t-fadeIn 0.3s var(--ease-out); }

/* ═══════════════════════════════════════════════════════════════
   FILTER CHIPS  —  used in wallet history filter, search refine, etc.
   ═══════════════════════════════════════════════════════════════ */

.t-filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.t-filter-chips::-webkit-scrollbar { display: none; }

.t-filter-chip {
    flex: 0 0 auto;
    padding: 6px 12px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--mist);
    font-family: 'Sora', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    -webkit-tap-highlight-color: transparent;
}
.t-filter-chip:hover { color: var(--snow); border-color: var(--glass-active); }
.t-filter-chip.is-active {
    background: var(--ember);
    color: var(--white);
    border-color: var(--ember);
}

/* ═══════════════════════════════════════════════════════════════
   PASSPORT MAP  —  styling for the SVG world map on profile
   ═══════════════════════════════════════════════════════════════ */

.t-passport {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
}
.t-passport__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}
.t-passport__title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--white);
    font-size: 0.95rem;
}
.t-passport__count {
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    color: var(--ember-glow);
}
.t-passport__map {
    width: 100%;
    height: auto;
    display: block;
}
.t-passport__country {
    fill: var(--glass-border);
    stroke: var(--abyss);
    stroke-width: 0.4;
    transition: fill var(--duration) var(--ease-out);
}
.t-passport__country.is-visited {
    fill: var(--ember);
}
.t-passport__country.is-visited:hover { fill: var(--ember-glow); }

.t-passport__list {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.t-passport__chip {
    padding: 3px 9px;
    background: rgba(232, 93, 58, 0.12);
    border: 1px solid rgba(232, 93, 58, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    color: var(--ember-glow);
}

/* ═══════════════════════════════════════════════════════════════
   IMAGE HELPERS  —  blurhash placeholder + lazy aspect ratio
   ═══════════════════════════════════════════════════════════════ */

.t-img {
    background: var(--glass);
    overflow: hidden;
    position: relative;
}
.t-img__el {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s var(--ease-out);
    opacity: 0;
}
.t-img__el.is-loaded { opacity: 1; }
.t-img--16x9 { aspect-ratio: 16 / 9; }
.t-img--4x3  { aspect-ratio: 4 / 3; }
.t-img--1x1  { aspect-ratio: 1 / 1; }

/* ═══════════════════════════════════════════════════════════════
   OPTIMISTIC HEART / WISHLIST  —  flips immediately on tap
   ═══════════════════════════════════════════════════════════════ */

.t-heart {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ghost);
    font-size: 1.05rem;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
}
.t-heart:hover { color: var(--ember-glow); }
.t-heart.is-on { color: var(--ember); }
.t-heart.is-on:active { transform: scale(0.85); }
.t-heart.is-flying { animation: t-heartPop 0.55s var(--ease-spring); }

@keyframes t-heartPop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.35); }
    70%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}

/* Theme-toggle CSS removed — Tratok uses a single dark theme. */

/* ═══════════════════════════════════════════════════════════════
   CSV-EXPORT / SECONDARY BUTTON ROW
   ═══════════════════════════════════════════════════════════════ */

.t-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   ARIA LIVE REGIONS  —  visually hidden but announced by SR
   ═══════════════════════════════════════════════════════════════ */

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════════════════════════════════════════════════════════
   VISION 2026 RESPONSIVE SCAFFOLD
   The mobile pages were built max-width: 540px. Everything below
   widens them to tablet/desktop without rewriting any markup.
   Breakpoints:
       md (tablet):     768px+
       lg (laptop):    1024px+
       xl (desktop):   1280px+
       2xl (wide):     1536px+
   ═══════════════════════════════════════════════════════════════ */

:root {
    --container-md: 768px;
    --container-lg: 1200px;     /* was 1024 — pages no longer look "alone in the middle" on 1440+ */
    --container-xl: 1440px;     /* was 1280 — proper desktop breathing room */
    --container-2xl: 1680px;    /* was 1536 — for ≥1920 monitors */
    --container-content: 760px; /* long-form text columns (FAQ, terms, articles) */
    --side-pad: 1rem;
}

/* Mobile defaults (no change to existing behaviour). */

@media (min-width: 768px) {
    :root { --side-pad: 1.5rem; }

    /* Bottom tab bar visibility is governed by tratok_aurora.css
       (hidden ≥1024px where the sidebar takes over) — do not hide it
       here or design-system pages lose the nav on tablets while the
       rest of the app keeps it. */

    /* Page container scales with viewport. Pages that already used
       a bespoke container (.page, .content-frame) inherit this. */
    .page,
    .content-frame {
        max-width: var(--container-md);
        padding-left: var(--side-pad);
        padding-right: var(--side-pad);
        margin-left: auto;
        margin-right: auto;
    }

    /* Card grids: any container marked with `.t-grid` becomes a
       responsive 2-up grid. The mobile-specific result lists
       (#carResults, #activityResults, .results, .car-list, etc.)
       are also opted-in here. */
    .t-grid,
    #carResults,
    #activityResults,
    #hotelResults,
    .results,
    .car-list,
    .activity-list,
    .hotel-list,
    .feed,
    .chat-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    /* Bottom sheets become anchored panels, not full-width drawers. */
    .t-sheet,
    .sheet,
    .sheet-overlay > .sheet {
        max-width: 480px;
        left: 50%;
        transform: translate(-50%, 100%);
        border-radius: var(--radius-lg);
        bottom: 24px;
    }
    .t-sheet.is-open,
    .sheet-overlay.open > .sheet {
        transform: translate(-50%, 0);
    }

    /* Stories strip gets a little more breathing room. */
    .t-stories { padding: 18px 22px; gap: 18px; }
    .t-story__ring { width: 76px; height: 76px; padding: 3px; }
    .t-story__name { max-width: 86px; font-size: .8rem; }

    /* Wallet "balance hero" can sit beside the actions, not above. */
    .bal-card { max-width: 540px; margin-left: auto; margin-right: auto; }
}

@media (min-width: 1024px) {
    :root { --side-pad: 2rem; }

    .page,
    .content-frame { max-width: var(--container-lg); }

    /* Three-up grid at laptop. */
    .t-grid,
    #carResults,
    #activityResults,
    #hotelResults,
    .results,
    .car-list,
    .activity-list,
    .hotel-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .feed,
    .chat-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 880px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Search page: filter sidebar + results split.
       Pages opt in by wrapping the filter chips and results in
       a single `.t-search-shell`. Existing pages don't need the
       wrapper to work — they just stay single-column. */
    .t-search-shell {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 28px;
        align-items: start;
    }
    .t-search-shell__sidebar {
        position: sticky;
        top: calc(var(--header-h) + 16px);
        max-height: calc(100vh - var(--header-h) - 32px);
        overflow-y: auto;
    }

    /* Profile gets a 2-column hero on laptop. */
    .p-hero { max-width: 720px; margin: 0 auto; }
    .wall-sec { max-width: 720px; margin-left: auto; margin-right: auto; }
}

@media (min-width: 1280px) {
    .page,
    .content-frame { max-width: var(--container-xl); }

    .t-grid,
    #carResults,
    #activityResults,
    #hotelResults,
    .results,
    .car-list,
    .activity-list,
    .hotel-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1536px) {
    .page,
    .content-frame { max-width: var(--container-2xl); }

    /* Wide screens get four-up grids. */
    #carResults,
    #activityResults,
    #hotelResults,
    .results,
    .car-list,
    .activity-list,
    .hotel-list,
    .t-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Hover states — only when device supports a fine pointer, so they
   don't trigger sticky tap states on touch devices. */
@media (hover: hover) and (pointer: fine) {
    .t-bottom-nav__item:hover i { transform: translateY(-1px); }
    .car-card:hover,
    .ac-card:hover,
    .hotel-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }
}

/* On desktop, the "search-bar" hero shouldn't full-bleed; centre it. */
@media (min-width: 768px) {
    .search-bar {
        max-width: 720px;
        margin: 0 auto 14px;
    }
    .chips {
        max-width: 720px;
        margin: 0 auto 12px;
    }
    .result-count {
        max-width: 720px;
        margin: 0 auto 12px;
    }
}

/* Cards don't need the mobile "full-width-card" margins on grid layouts. */
@media (min-width: 768px) {
    .car-card,
    .ac-card,
    .hotel-card,
    .activity-card { margin-bottom: 0 !important; }
}

/* ═══════════════════════════════════════════════════════════════
   VISION 2026.1 — DESKTOP POLISH
   Body-prefixed selectors win against the inline `.page { max-width: 520px }`
   rules that the mobile templates carry.  Everything below is gated to
   ≥ 768 px so phones see no change.
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    /* ─── Page container: outrank inline .page max-width ─────── */
    body .page {
        max-width: var(--container-md);
        padding: 24px var(--side-pad) 32px;   /* drop the 100px mobile bottom-nav reserve */
        margin-left: auto;
        margin-right: auto;
    }

    /* ─── Header: real desktop nav bar ───────────────────────────
       The header BAR fills the full viewport width — capping it at
       --container-xl was leaving ~240px of empty space either side on
       a 1920px monitor and made the page look unfinished. Only the
       *inner* content gets constrained for readability. */
    body .th {
        width: 100%;
        max-width: none;
        padding: 0 24px;
        height: 68px;
    }
    body .th-center {
        max-width: 540px;
        margin: 0 auto;
    }
    body .th-avatar { width: 40px; height: 40px; }

    /* ─── Heroes: constrain to a readable width, centre ─────── */
    body .feed-hero,
    body .p-hero,
    body .bal-card,
    body .search-bar,
    body .chips,
    body .result-count,
    body .banner,
    body .form-card,
    body .hero,
    body .onboard {
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    body .feed-hero { padding: 28px 32px; border-radius: var(--radius-xl); }
    body .feed-hero h1 { font-size: 1.85rem; }

    body .bal-card { padding: 32px 28px 26px; }
    body .bal-total { font-size: 2.2rem; }

    /* ─── Stories strip: centre and add some breathing room ─── */
    body .t-stories {
        max-width: 720px;
        margin: 0 auto;
    }

    /* ─── Filter tab bar: scale up labels ─────────────────── */
    body .tab-nav { max-width: 720px; margin: 0 auto 1.5rem; }
    body .tab-nav button { padding: 0.95rem 0.6rem; font-size: 0.75rem; }
    body .tab-nav button i { font-size: 1.3rem; }
    body .tab-nav button span { font-size: 0.7rem; }

    /* ─── app_index.php tab pill row + search form-card ───── */
    body .tabs {
        max-width: 720px;
        margin: 0 auto;
        justify-content: center;
        gap: 10px;
    }
    body .tab-link {
        padding: 12px 22px;
        font-size: 0.92rem;
        border-radius: var(--radius-full);
    }
    body .form-card {
        max-width: 720px;
        margin: 0 auto 24px;
        padding: 28px 32px;
        background: var(--glass);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-xl);
    }
    body .quick-actions {
        max-width: 720px;
        margin: 24px auto 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }
    body .qa-card {
        padding: 20px;
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    body .qa-ico { width: 44px; height: 44px; font-size: 1.1rem; border-radius: var(--radius-md); }

    /* ─── Action grid (wallet) — 2-up on desktop ─────────── */
    body .actions {
        max-width: 720px;
        margin: 12px auto;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }
    body .act { padding: 16px 12px; }

    /* ─── Section cards (wallet sub-sections) — keep readable width ─── */
    body .section-card {
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    /* ─── Profile: sidebar layout ──────────────────────────── */
    body .p-hero {
        padding: 32px 28px;
        border-radius: var(--radius-xl);
        background: var(--glass);
        border: 1px solid var(--glass-border);
    }
    body .p-name { font-size: 1.5rem; }
    body .wall-sec { max-width: 720px; margin-left: auto; margin-right: auto; }
    body .t-passport { max-width: 720px; margin-left: auto; margin-right: auto; }

    /* ─── Card-list sections (chat list, friends list) ─────── */
    body .chat-list,
    body .feed { max-width: 720px; margin-left: auto; margin-right: auto; }

    /* ─── Footer: real desktop layout ────────────────────────── */
    body .t-footer {
        padding: 2.5rem 1.5rem 1.5rem;
        border-top: 1px solid var(--glass-border);
        margin-top: 3rem;
    }
    body .t-footer p { max-width: 960px; margin: 0 auto; font-size: 0.82rem; }

    /* ─── Hide bottom-nav padding & the bar itself ───────────── */
    body.has-bottom-nav { padding-bottom: 0; }

    /* ─── Inline mobile max-widths that need outranking ──────── */
    body .app,
    body .app-page,
    body .container { max-width: var(--container-md); margin-left: auto; margin-right: auto; }

    /* Banners, alerts, modals stay sensibly sized on wide screens */
    body .t-modal { max-width: 480px; }
}

@media (min-width: 1024px) {
    body .page {
        max-width: var(--container-lg);
        padding-top: 28px;
    }

    /* Hero growths */
    body .feed-hero,
    body .p-hero,
    body .bal-card,
    body .banner { max-width: 880px; }
    body .feed-hero h1 { font-size: 2.1rem; }

    /* Multi-column for wallet: balance + actions side-by-side */
    body .bal-card.main-view,
    body .actions.main-view {
        max-width: none;
    }

    body .bal-card { padding: 36px 32px 28px; }

    /* Profile: actual two-column hero */
    body .p-hero { padding: 40px 32px; }
    body .p-bio { max-width: 60ch; margin-left: auto; margin-right: auto; }

    /* Stories: keep them snug and centered */
    body .t-stories {
        max-width: 880px;
        padding: 22px 28px;
    }

    /* Result list grid breathing room */
    body .car-card .cc-img-wrap { aspect-ratio: 16 / 10; }
    body .car-card .cc-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

    /* Chat list capped; conversation thread centered when present */
    body .chat-list { max-width: 720px; margin-left: auto; margin-right: auto; }

    /* Tighter container for forms (signup, login, contact) */
    body .form-card,
    body .auth-card,
    body .sc-wrap {
        max-width: 540px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1280px) {
    body .page { max-width: var(--container-xl); }
    body .feed-hero,
    body .bal-card,
    body .p-hero { max-width: 960px; }
}

@media (min-width: 1536px) {
    body .page { max-width: var(--container-2xl); }
    body .feed-hero,
    body .bal-card,
    body .p-hero { max-width: 1040px; }
}

/* ─── Card hover lift only on real-pointer devices ─────────── */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
    .car-card, .ac-card, .hotel-card, .activity-card,
    .glass-card, .solid-card,
    .chat-item, .t-skel-card {
        transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
    }
    .car-card:hover, .ac-card:hover, .hotel-card:hover, .activity-card:hover,
    .glass-card:hover, .solid-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(0,0,0,0.35);
    }
}

/* ─── Background grain a touch lighter on desktop so it doesn't dominate ─── */
@media (min-width: 768px) {
    body::before { opacity: 0.7; }
}

/* ─── Type scaling on big screens — slightly bigger so it doesn't look small ─ */
@media (min-width: 1024px) {
    html { font-size: 16.5px; }
}
@media (min-width: 1280px) {
    html { font-size: 17px; }
}

/* ═════════════════════════════════════════════════════════════════════
   PHASE A — DESKTOP CONTAINER OVERRIDE (2026-05-05)

   Every page in the codebase hard-coded `.page { max-width: 520px }`
   directly inside its own <style> block (or in a per-page stylesheet
   like accommodations.css / activities.css / cars.css / gallery.css /
   image.css / profile.css). Those inline blocks load AFTER this design
   system file in the cascade, so the design system's earlier rules
   couldn't widen them at desktop sizes — content was trapped in a 520px
   phone column on every monitor wider than 600px.

   Fix: this block is intentionally last in the design system and uses
   `body .page` (higher specificity) PLUS `!important` so it wins
   against any page-specific rule regardless of load order.

   Applies to:
     .page         — every top-level page wrapper across the codebase
     .content-frame — used by some legacy pages

   Mobile (<768px): no rules here apply — pages keep their 520px column,
   which is correct for small screens.
   ═════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    body .page,
    body .content-frame {
        max-width: var(--container-md, 720px) !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
@media (min-width: 1024px) {
    body .page,
    body .content-frame {
        max-width: var(--container-lg, 1100px) !important;
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
}
@media (min-width: 1440px) {
    body .page,
    body .content-frame {
        max-width: var(--container-xl, 1280px) !important;
    }
}
@media (min-width: 1920px) {
    body .page,
    body .content-frame {
        max-width: var(--container-2xl, 1440px) !important;
    }
}

/* The two-pane chat shell (chat.php / chats.php) intentionally breaks
   out of .page's max-width on desktop — undo the override there so
   .cm-shell can claim the full content area. The chat shell sets its
   own #chatPage overrides in app_sidebar.css, but we re-assert here in
   case load order ever flips. */
@media (min-width: 1024px) {
    body.has-side-nav #chatPage {
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 1C — DESIGN SYSTEM PATTERN PRIMITIVES (≥1024px only)
   Reusable utility classes for the polished desktop redesign.
   These were introduced 2026-05-06 alongside the sidebar rework
   and are gradually adopted by the page-level CSS in Phases 2-4.

   Naming convention: `t-` prefix to match existing tokens.
   All rules gated to ≥1024px so mobile is never affected.
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {

    /* ── AMBIENT GLOW — drop above any hero element ─────────────
       Use as a sibling pseudo or as ::before on a positioned parent. */
    .t-ambient-glow,
    .t-ambient-glow::before {
        position: relative;
    }
    .t-ambient-glow > .t-glow,
    .t-glow {
        content: '';
        position: absolute;
        top: -60px; left: -40px; right: -40px;
        height: 380px;
        background:
            radial-gradient(ellipse 700px 360px at 22% 30%, rgba(232,93,58,0.12), transparent 60%),
            radial-gradient(ellipse 600px 320px at 82% 60%, rgba(46,205,167,0.06), transparent 60%);
        z-index: -1;
        pointer-events: none;
        filter: blur(60px);
    }

    /* ── HERO PATTERN — confident headline + lead paragraph ──── */
    .t-hero {
        text-align: center;
        padding: 56px 24px 38px;
        margin: 0 auto;
        max-width: 820px;
    }
    .t-hero h1, .t-hero__title {
        font-family: var(--font-display);
        font-size: 3rem;
        font-weight: 700;
        letter-spacing: var(--tracking-tight);
        line-height: 1.05;
        color: var(--snow);
        margin: 0;
    }
    .t-hero__lead, .t-hero p {
        font-size: 1.1rem;
        line-height: 1.65;
        color: var(--mist);
        max-width: 560px;
        margin: 14px auto 0;
    }

    /* ── CARD PATTERN — gradient surface + inset highlight ───── */
    .t-card {
        background: var(--surface-card);
        border: var(--border-subtle);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
        padding: 24px 26px;
        transition:
            transform 0.22s var(--ease-out),
            border-color 0.22s var(--ease-out),
            box-shadow 0.22s var(--ease-out);
    }
    .t-card--lift:hover,
    .t-card.is-interactive:hover {
        transform: translateY(-3px);
        border-color: rgba(232,93,58,0.28);
        box-shadow: var(--shadow-card-hover);
    }

    /* ── STAT CARD — Playfair number + muted label ──────────── */
    .t-stat {
        background: var(--surface-card);
        border: var(--border-subtle);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
        padding: 22px 24px;
        transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
    }
    .t-stat:hover {
        transform: translateY(-3px);
        border-color: rgba(232,93,58,0.28);
        box-shadow: var(--shadow-card-hover);
    }
    .t-stat__num {
        font-family: var(--font-display);
        font-size: 2.2rem;
        font-weight: 800;
        line-height: 1.05;
        letter-spacing: var(--tracking-normal);
        color: var(--snow);
        font-feature-settings: 'tnum';
        font-variant-numeric: tabular-nums;
    }
    .t-stat__label {
        font-size: 0.85rem;
        color: var(--mist);
        margin-top: 4px;
        font-weight: 600;
    }

    /* ── SECTION HEADER — Playfair title + count pill ───────── */
    .t-section-head {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 32px 0 14px;
    }
    .t-section-head__title {
        font-family: var(--font-display);
        font-size: 1.55rem;
        font-weight: 700;
        letter-spacing: var(--tracking-normal);
        color: var(--snow);
        margin: 0;
    }
    .t-section-head__pill {
        padding: 4px 12px;
        font-size: 0.78rem;
        font-weight: 800;
        border-radius: 99px;
        background: rgba(232,93,58,0.14);
        color: #FB923C;
        border: 1px solid rgba(232,93,58,0.32);
    }

    /* ── BUTTON — primary ember with gradient + hover glow ──── */
    .t-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 13px 24px;
        font-family: var(--font-body);
        font-size: 0.95rem;
        font-weight: 700;
        border-radius: var(--radius-md);
        border: 0;
        cursor: pointer;
        text-decoration: none;
        transition: filter 0.18s var(--ease-out),
                    box-shadow 0.18s var(--ease-out),
                    transform 0.15s var(--ease-out),
                    background 0.18s var(--ease-out);
        white-space: nowrap;
    }
    .t-btn-primary {
        background: linear-gradient(135deg, #E85D3A, #D94B2A);
        color: #fff;
        box-shadow: 0 6px 18px rgba(232,93,58,0.32);
    }
    .t-btn-primary:hover {
        filter: brightness(1.06);
        box-shadow: 0 10px 26px rgba(232,93,58,0.42);
        transform: translateY(-1px);
    }
    .t-btn-ghost {
        background: var(--surface-glass);
        color: var(--snow);
        border: var(--border-medium);
    }
    .t-btn-ghost:hover {
        background: var(--surface-glass-hover);
        border-color: rgba(232,93,58,0.32);
    }
    .t-btn-danger:hover { color: #F87171; }

    /* ── INPUT — premium dark form field with ember focus ring */
    .t-input {
        width: 100%;
        padding: 14px 16px;
        font-family: var(--font-body);
        font-size: 0.95rem;
        background: #0B1020;
        border: var(--border-medium);
        border-radius: var(--radius-md);
        color: var(--snow);
        transition: border-color 0.2s var(--ease-out),
                    box-shadow 0.2s var(--ease-out),
                    background 0.2s var(--ease-out);
    }
    .t-input::placeholder { color: var(--whisper); }
    .t-input:hover { border-color: rgba(255,255,255,0.16); }
    .t-input:focus {
        outline: none;
        border-color: rgba(232,93,58,0.5);
        box-shadow: var(--glow-ember-soft);
        background: #0F172A;
    }

    /* ── LABEL — uppercase letterspaced field caption ──────── */
    .t-label {
        font-size: 0.74rem;
        font-weight: 800;
        color: var(--mist);
        text-transform: uppercase;
        letter-spacing: var(--tracking-caps);
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 8px;
    }
    .t-label i { color: var(--ember); font-size: 0.7em; }

    /* ── MODAL SHELL — sticky header + scrollable body + sticky footer
       Use on the .sheet element. The header/foot use the named children. */
    .t-modal {
        display: flex;
        flex-direction: column;
        max-width: 640px;
        width: 92vw;
        max-height: 88vh;
        padding: 0;
        overflow: hidden;
        background: var(--surface-card);
        border: var(--border-subtle);
        border-radius: var(--radius-xl);
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.04),
            0 24px 70px rgba(0,0,0,0.55);
    }
    .t-modal__head {
        flex-shrink: 0;
        padding: 22px 28px 18px;
        border-bottom: var(--border-subtle);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
    .t-modal__title {
        font-family: var(--font-display);
        font-size: 1.45rem;
        font-weight: 700;
        letter-spacing: var(--tracking-normal);
        color: var(--snow);
        margin: 0;
    }
    .t-modal__close {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--surface-glass);
        border: var(--border-medium);
        color: var(--mist);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: background 0.18s var(--ease-out),
                    color 0.18s var(--ease-out),
                    transform 0.18s var(--ease-out);
    }
    .t-modal__close:hover {
        background: rgba(232,93,58,0.16);
        color: #FB923C;
        transform: rotate(90deg);
    }
    .t-modal__body {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 22px 28px;
        min-height: 0;
    }
    .t-modal__foot {
        flex-shrink: 0;
        padding: 16px 28px 22px;
        border-top: var(--border-subtle);
        background:
            linear-gradient(180deg, rgba(15,23,42,0.85), rgba(15,23,42,0.98));
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        display: flex;
        gap: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════
   TIER BADGES — "Staff" / "VIP" pills (staff & vip verification tiers).
   Class is t-tierbadge, NOT t-badge — .t-badge is already taken by the
   notification-count badge component in this sheet. Mirrored across
   tratok_design_system.css, tratok_aurora.css and styles/components.css
   — keep the three copies in sync. Style: V2 "glass & glow".
   ═══════════════════════════════════════════════════════════ */
.t-tierbadge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-inline-start: 8px;
    padding: 3px 11px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    vertical-align: 2px;
    line-height: 1.25;
    flex-shrink: 0;
    white-space: nowrap;
}
.t-tierbadge::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.6rem;
}
.t-tierbadge--staff {
    color: #8FBCFF;
    border-color: rgba(110, 165, 255, 0.4);
    background: linear-gradient(180deg, rgba(43, 92, 176, 0.25), rgba(24, 52, 104, 0.35));
    text-shadow: 0 0 14px rgba(110, 165, 255, 0.45);
}
.t-tierbadge--staff::before { content: "\f058"; /* circle-check */ }
.t-tierbadge--vip {
    color: #FFD98A;
    border-color: rgba(238, 186, 86, 0.45);
    background: linear-gradient(180deg, rgba(150, 104, 20, 0.28), rgba(92, 62, 10, 0.38));
    text-shadow: 0 0 14px rgba(255, 200, 90, 0.45);
}
.t-tierbadge--vip::before { content: "\f521"; /* crown */ }
.t-tierbadge--lg { font-size: 0.78rem; padding: 4px 14px; }
.t-tierbadge--lg::before { font-size: 0.72rem; }
