@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600..800&family=DM+Sans:opsz,wght@9..40,400..700&display=swap');

/* =====================================================================
   Bientôt — v3 "night & circumflex" (brand colours, font and logo: brand.css + js/brand.js)
   A blend of v1 (navy, colour-coded categories, colour blocks,
   a display face with attitude) and v2 (achromatic iOS: photography,
   grouped lists, quiet chrome).
   Ink:     #14182e        Primary / night:  #252d63 / #151a38 (navy, v1's indigo pulled toward v2's ink)
   Accent:  #d85a30 brand circumflex — time-until, live, meters, the one hot button
   Type:    Bricolage Grotesque for titles and big figures, DM Sans (v1) for text
   Desktop: a plain rounded box, no device bezel.
   ===================================================================== */

:root {
    --ground: var(--brand-ground);
    --surface: #ffffff;
    --raised: #f8f8fb;
    --fill: #ececf1;          /* search fields, segmented track, grey capsules */
    --fill-press: #e2e3ea;
    --separator: #e3e4ec;     /* row rules inside groups */
    --control: #c4c6d2;

    --text: var(--brand-ink); /* navy-tinted ink */
    --muted: #63677c;         /* 5.4:1 on white */
    --primary: #252d63;       /* night blue: buttons, active tab, avatars */
    --primary-hover: #313b7c;
    --on-primary: #ffffff;
    --night: var(--brand-night); /* dark fields: welcome sheet, live cards, pass stubs */
    --night-2: #222a55;
    --on-night-muted: #b6bbd8;

    --accent: var(--brand-coral);         /* brand circumflex — marks, meters, dots */
    --accent-ink: var(--brand-coral-ink); /* the same coral, dark enough for text and white-on-coral */
    --accent-soft: #fdebe3;

    /* Categories (v1 colour-coding, softened) */
    --cat-hackathon: #e5484d;  --cat-hackathon-bg: #fdecec;  --cat-hackathon-ink: #9b1c22;
    --cat-conference: #3e63dd; --cat-conference-bg: #e9effd; --cat-conference-ink: #1f3a8a;
    --cat-meetup: #1f9d6b;     --cat-meetup-bg: #e2f5ec;     --cat-meetup-ink: #0f5c3d;
    --cat-fair: #e09a12;       --cat-fair-bg: #fdf3dc;       --cat-fair-ink: #7a4b00;

    --positive: #1f7a3a;
    --pill-positive-bg: #dcf6e4;
    --pill-positive-ink: #0b3d1b;
    --negative: #c4242a;
    --pill-negative-bg: #ffedea;
    --pill-negative-ink: #831c1e;
    --pill-warning-bg: #fff4e0;
    --pill-warning-ink: #8a4b00;
    --pill-neutral-bg: #ececf1;
    --pill-neutral-ink: #3a3e55;
    --switch-on: #1f9d6b;

    --r-card: 20px;
    --r-media: 14px;
    --r-thumb: 12px;

    --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;

    --fs-large: 34px;     /* large title (h1) */
    --fs-title: 22px;     /* section heading */
    --fs-head: 17px;      /* row title, buttons */
    --fs-body: 15px;      /* body */
    --fs-meta: 13px;      /* meta, captions */
    --fs-small: 12px;     /* tab labels, pills */

    --ease: cubic-bezier(.32, .72, 0, 1);  /* iOS sheet / push curve */
    --gutter: 20px;
    --status: 44px;
    --tabbar: 68px;
}

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

html,
body {
    height: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: #e6e7ee;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
    border-radius: 8px;
}

.num {
    font-variant-numeric: tabular-nums;
}

.ic {
    width: 20px;
    height: 20px;
    flex: none;
}

.ic-sm {
    width: 16px;
    height: 16px;
}

.ic-lg {
    width: 24px;
    height: 24px;
}


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

/* ==================== DEVICE FRAME ==================== */

/* Desktop: the app sits in a plain box — no bezel, no notch */
#mobile {
    position: relative;
    width: 420px;
    height: min(calc(100vh - 48px), 880px);
    background: var(--ground);
    border: 1px solid #d5d7e2;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(21, 26, 56, .05);
}

.mobile-statusbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--status);
    pointer-events: none;
    padding: 0 28px 0 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 120;
    background: transparent;
    font-variant-numeric: tabular-nums;
    transition: color .2s ease;
}

.mobile-battery {
    pointer-events: auto;
}

.mobile-statusbar.on-dark {
    color: #fff;
}

.mobile-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-time {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.mobile-notification {
    display: none;
}

.mobile-right {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.mobile-connection {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
}

.connection-bar {
    width: 3px;
    background: currentColor;
    border-radius: 1px;
}

.connectionbar1 { height: 35%; }
.connectionbar2 { height: 55%; }
.connectionbar3 { height: 78%; }
.connectionbar4 { height: 100%; }

.mobile-wifi {
    width: 16px;
    height: 12px;
}

.mobile-battery {
    position: relative;
    width: 25px;
    height: 12px;
    border: 1.2px solid currentColor;
    border-radius: 4px;
    opacity: .9;
    cursor: pointer;
    padding: 1.5px;
}

.mobile-battery::after {
    content: "";
    position: absolute;
    right: -4px;
    top: 3.5px;
    width: 2px;
    height: 4px;
    border-radius: 0 1px 1px 0;
    background: currentColor;
    opacity: .5;
}

.battery-filler {
    height: 100%;
    width: 70%;
    background: currentColor;
    border-radius: 2px;
}

.battery-number {
    display: none;
}

#app {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

@media screen and (max-width: 560px) {
    body {
        background: var(--ground);
    }

    #mobile {
        height: 100%;
        width: 100%;
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .mobile-statusbar {
        padding: 0 22px 0 26px;
    }
}

/* ==================== PAGES & ROUTING ==================== */

.app-page {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--ground);
    scrollbar-width: none;
    overscroll-behavior: contain;
}

.app-page::-webkit-scrollbar {
    display: none;
}

.app-page.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.app-page.exiting {
    visibility: visible;
    pointer-events: none;
    z-index: 1;
}

.page {
    padding: 0 var(--gutter) calc(var(--tabbar) + 40px);
}

.page-flush {
    padding-bottom: calc(var(--tabbar) + 40px);
}

/* Navigation bar: sticky, title fades in once the large title scrolls away */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: calc(48px + var(--status));
    padding-top: var(--status) !important;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 12px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: transparent;
    transition: background-color .2s ease, box-shadow .2s ease;
}

.page-flush>.nav-bar {
    margin: 0;
}

.nav-bar .nav-left {
    justify-self: start;
    display: flex;
    align-items: center;
}

.nav-bar .nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-title {
    font-size: var(--fs-head);
    font-weight: 600;
    letter-spacing: -.01em;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.nav-bar.always .nav-title,
.scrolled .nav-bar .nav-title {
    opacity: 1;
    transform: none;
}

.scrolled .nav-bar,
.nav-bar.solid {
    background: rgba(242, 242, 247, .94);
    box-shadow: 0 .5px 0 rgba(0, 0, 0, .16);
}

@supports (backdrop-filter: blur(1px)) {
    .scrolled .nav-bar,
    .nav-bar.solid {
        background: rgba(242, 242, 247, .82);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 44px;
    padding: 0 8px 0 2px;
    font-size: var(--fs-head);
    color: var(--text);
    border-radius: 10px;
}

.nav-back .ic {
    width: 24px;
    height: 24px;
    stroke-width: 2.2;
}

.nav-text-btn {
    height: 44px;
    padding: 0 8px;
    font-size: var(--fs-head);
    font-weight: 600;
    color: var(--text);
    border-radius: 10px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text);
    transition: background-color .15s ease, transform .15s ease;
}

.icon-btn:active {
    background: var(--fill);
    transform: scale(.94);
}

.icon-btn.round {
    width: 36px;
    height: 36px;
    background: var(--fill);
}

/* Large title block */
.large-title {
    font-size: var(--fs-large);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -.025em;
    padding-top: 2px;
}

.title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.title-sub {
    margin-top: 4px;
    font-size: var(--fs-body);
    color: var(--muted);
    line-height: 1.4;
}

.avatar-btn {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .01em;
    transition: transform .15s ease;
}

.avatar-btn:active {
    transform: scale(.94);
}

/* ==================== SECTION HEADINGS ==================== */

.section {
    margin-top: 32px;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.section-title {
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.section-see-all {
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--muted);
    padding: 10px 0 10px 12px;
    margin: -10px 0;
    transition: color .15s ease;
}

.section-see-all:hover {
    color: var(--text);
}

.group-label {
    font-size: var(--fs-meta);
    color: var(--muted);
    padding: 0 16px 8px;
    margin-top: 28px;
}

.group-label:first-child {
    margin-top: 8px;
}

.group-foot {
    font-size: var(--fs-meta);
    color: var(--muted);
    padding: 8px 16px 0;
    line-height: 1.4;
}

/* ==================== INSET GROUPED LIST ==================== */

.group {
    background: var(--surface);
    border-radius: var(--r-card);
    overflow: hidden;
}

.row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 16px;
    width: 100%;
    text-align: left;
    font-size: var(--fs-head);
    background: var(--surface);
    transition: background-color .15s ease;
}

button.row,
a.row,
.row.tap {
    cursor: pointer;
}

button.row:active,
.row.tap:active {
    background: var(--fill-press);
}

@media (hover: hover) {
    button.row:hover,
    .row.tap:hover {
        background: var(--raised);
    }
}

.row+.row::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 16px;
    height: 1px;
    background: var(--separator);
    transform: scaleY(.6);
    transform-origin: top;
}

.row.has-icon+.row::before,
.row+.row.has-icon::before {
    left: 48px;
}

.row.has-thumb+.row::before,
.row+.row.has-thumb::before {
    left: 84px;
}

.row-icon {
    width: 20px;
    color: var(--muted);
    display: inline-flex;
    flex: none;
}

.row-main {
    flex: 1;
    min-width: 0;
}

.row-title {
    font-size: var(--fs-head);
    line-height: 1.3;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-title.wrap {
    white-space: normal;
}

.row-sub {
    font-size: var(--fs-meta);
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-sub.wrap {
    white-space: normal;
}

.row-value {
    flex: none;
    font-size: var(--fs-body);
    color: var(--muted);
    text-align: right;
}

.row-chev {
    flex: none;
    color: var(--control);
    margin-right: -4px;
}

.row-chev .ic {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.row.destructive,
.row.destructive .row-icon {
    color: var(--negative);
}

.row.center {
    justify-content: center;
    font-weight: 500;
}

.thumb {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: var(--r-thumb);
    object-fit: cover;
    background: var(--fill);
}

.thumb-sm {
    width: 44px;
    height: 44px;
    border-radius: 9px;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: var(--fs-head);
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
    transition: transform .15s var(--ease), background-color .15s ease, opacity .15s ease;
}

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

.btn:disabled {
    opacity: .5;
    cursor: default;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
}

@media (hover: hover) {
    .btn-primary:hover {
        background: #333;
    }

    .btn-grey:hover {
        background: var(--fill-press);
    }
}

.btn-grey {
    background: var(--fill);
    color: var(--text);
}

.btn-white {
    background: #fff;
    color: var(--text);
}

.btn-outline {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--control);
}

.btn-danger {
    background: var(--pill-negative-bg);
    color: var(--negative);
}

.btn-success {
    background: var(--positive);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: var(--fs-body);
}

.btn .ic {
    width: 19px;
    height: 19px;
}

/* App Store-style "Get" capsule */
.get-btn {
    flex: none;
    min-width: 72px;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--fill);
    color: var(--text);
    font-size: var(--fs-body);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: transform .15s var(--ease), background-color .15s ease;
    position: relative;
}

.get-btn::after {
    content: "";
    position: absolute;
    inset: -6px -2px;
}

.get-btn:active {
    transform: scale(.94);
}

.get-btn .ic {
    width: 15px;
    height: 15px;
    stroke-width: 2.6;
}

.get-btn.joined {
    background: var(--surface);
    border: 1px solid var(--control);
    font-weight: 600;
}

.get-btn.ended {
    background: transparent;
    color: var(--muted);
    font-weight: 500;
    pointer-events: none;
}

/* ==================== PILLS ==================== */

.pill {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: var(--fs-small);
    font-weight: 600;
    white-space: nowrap;
    background: var(--pill-neutral-bg);
    color: var(--pill-neutral-ink);
}

.pill .ic {
    width: 13px;
    height: 13px;
    stroke-width: 2.4;
}

.pill-positive {
    background: var(--pill-positive-bg);
    color: var(--pill-positive-ink);
}

.pill-negative {
    background: var(--pill-negative-bg);
    color: var(--pill-negative-ink);
}

.pill-warning {
    background: var(--pill-warning-bg);
    color: var(--pill-warning-ink);
}

.pill-live {
    background: var(--accent-soft);
    color: #9a3412;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

/* The "soon" figure: time-until in the brand orange */
.soon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}


/* ==================== SEARCH FIELD & SEGMENTED CONTROL ==================== */

.search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: var(--fill);
    color: var(--muted);
    flex: 1;
    min-width: 0;
    transition: box-shadow .15s ease;
}

.search-field:focus-within {
    box-shadow: inset 0 0 0 1.5px var(--text);
}

.search-field .ic {
    width: 18px;
    height: 18px;
}

.search-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: var(--fs-head);
    color: var(--text);
}

.search-field input::placeholder {
    color: var(--muted);
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.segmented {
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 10px;
    background: var(--fill);
    overflow-x: auto;
    scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
    display: none;
}

.segmented.fit {
    display: inline-flex;
    max-width: 100%;
}

.segmented button {
    flex: 1 0 auto;
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: var(--fs-meta);
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: background-color .2s ease, box-shadow .2s ease;
}

.segmented button.active {
    background: var(--surface);
    font-weight: 600;
}

.segmented .count {
    color: var(--muted);
    font-weight: 500;
    margin-left: 3px;
    font-variant-numeric: tabular-nums;
}

/* Filter chips that scroll (homepage) */
.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1) 14px;
    padding: 0 var(--gutter);
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: none;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface);
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--text);
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.chip:active {
    transform: scale(.96);
}

.chip.active {
    background: var(--text);
    color: #fff;
}

/* ==================== SWITCH ==================== */

.switch {
    position: relative;
    flex: none;
    width: 51px;
    height: 31px;
    border-radius: 999px;
    background: #e3e3e8;
    transition: background-color .25s ease;
    cursor: pointer;
}

.switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .06);
    transition: transform .25s var(--ease);
}

.switch.active {
    background: var(--switch-on);
}

.switch.active::after {
    transform: translateX(20px);
}

/* ==================== PROGRESS ==================== */

.meter {
    height: 6px;
    border-radius: 999px;
    background: var(--fill);
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width .6s var(--ease);
}

.meter-fill.ink {
    background: var(--text);
}

.meter-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: var(--fs-meta);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ==================== WELCOME ==================== */

.app-page.welcomepage {
    background: #fff;
    overflow: hidden;
}

.welcome-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.welcome-photo {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--brand-night);   /* behind the photo while it loads: the sheet's own night */
}

.welcome-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: slowDrift 24s ease-in-out infinite alternate;
}

.welcome-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .18);
}

.welcome-caption {
    position: absolute;
    left: 20px;
    bottom: 16px;
    z-index: 1;
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, .86);
}

@keyframes slowDrift {
    from { transform: scale(1.04) translateX(0); }
    to { transform: scale(1.12) translateX(-3%); }
}

.welcome-sheet {
    flex: none;
    padding: 28px 24px 28px;
    background: #fff;
    border-radius: 28px 28px 0 0;
    margin-top: -28px;
    position: relative;
    z-index: 2;
}

.welcome-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.welcome-title {
    font-size: 30px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.025em;
}

.welcome-title .welcome-title-pre {
    display: block;
    color: var(--muted);
    font-weight: 600;
    font-size: var(--fs-head);
    letter-spacing: -.01em;
    margin-bottom: 2px;
}

.welcome-title .bt-wordmark {
    display: table;
    margin-top: 2px;
}

.welcome-subtitle {
    font-size: var(--fs-head);
    line-height: 1.4;
    color: var(--muted);
    margin-bottom: 24px;
    max-width: 30ch;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welcome-divider {
    display: none;
}

.welcome-btn-google .google-icon {
    width: 18px;
    height: 18px;
}

.welcome-lang-row {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

/* ==================== HOME ==================== */

.home-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.homepage-title {
    margin-top: 6px;
}

.home-search {
    margin-top: 16px;
}

.map-btn {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--fill);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, background-color .15s ease;
}

.map-btn:active {
    transform: scale(.94);
    background: var(--fill-press);
}

/* Next up: the countdown card */

/* Map preview */
.map-preview {
    position: relative;
    display: block;
    width: 100%;
    height: 168px;
    border-radius: var(--r-card);
    overflow: hidden;
    background: #f3efe6;
    text-align: left;
    transition: transform .15s var(--ease);
}

.map-preview:active {
    transform: scale(.985);
}

.map-preview .map-svg {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 640px;
    height: 800px;
    transform: translate(-50%, -50%);
}

.map-preview .map-pin {
    transform: translate(-50%, -100%) scale(.85);
}

.map-preview .map-pin-label {
    display: none;
}

.map-preview-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    font-size: var(--fs-meta);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.map-preview-label .ic {
    width: 15px;
    height: 15px;
}

/* Trending: App Store-style cards in a scroller */
.trending-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 4px;
    scroll-padding: 0 var(--gutter);
}

.trending-cards::-webkit-scrollbar {
    display: none;
}

.feature-card {
    flex: none;
    width: 82%;
    max-width: 320px;
    scroll-snap-align: start;
    background: var(--surface);
    border-radius: var(--r-card);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s var(--ease);
}

.feature-card:active {
    transform: scale(.98);
}

.feature-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--fill);
}

.feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-media .pill {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, .94);
    color: var(--text);
}

.feature-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 14px;
}

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

.feature-title {
    font-size: var(--fs-head);
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-meta {
    font-size: var(--fs-meta);
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nearby & list rows of events */
.event-row .row-title {
    font-size: var(--fs-head);
    font-weight: 600;
}

.event-row .row-sub b {
    font-weight: 600;
    color: var(--text);
}

.empty {
    padding: 28px 20px;
    text-align: center;
    color: var(--muted);
    font-size: var(--fs-body);
    line-height: 1.45;
    background: var(--surface);
    border-radius: var(--r-card);
}

.empty .ic {
    width: 28px;
    height: 28px;
    margin: 0 auto 10px;
    display: block;
    color: var(--control);
}

.empty strong {
    display: block;
    color: var(--text);
    font-size: var(--fs-head);
    font-weight: 600;
    margin-bottom: 4px;
}

/* ==================== SEARCH ==================== */

.search-sticky {
    position: sticky;
    top: calc(48px + var(--status));
    z-index: 19;
    background: var(--ground);
    padding: 4px 0 12px;
    margin: 0 calc(var(--gutter) * -1);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.search-results .group+.group {
    margin-top: 16px;
}

.search-count {
    font-size: var(--fs-meta);
    color: var(--muted);
    padding: 4px 16px 8px;
}

mark {
    background: var(--accent-soft);
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}

/* ==================== EVENT DETAIL ==================== */

.app-page.eventpage {
    overflow: hidden;
    background: var(--ground);
}

.ev-scroll {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 120px;
    scrollbar-width: none;
}

.ev-scroll::-webkit-scrollbar {
    display: none;
}

.ev-hero {
    position: relative;
    height: 320px;
    background: #222;
    overflow: hidden;
}

.ev-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ev-hero-bar {
    position: absolute;
    top: calc(var(--status) + 6px);
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.glass-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(0, 0, 0, .1);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease;
}

.glass-btn:active {
    transform: scale(.92);
}

.glass-btn .ic {
    width: 20px;
    height: 20px;
    stroke-width: 2.1;
}

.ev-hero-actions {
    display: flex;
    gap: 10px;
}

.ev-sheet {
    position: relative;
    margin-top: -24px;
    padding: 24px var(--gutter) 0;
    background: var(--ground);
    border-radius: 24px 24px 0 0;
}

.ev-kind {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: var(--fs-meta);
    color: var(--muted);
}

.event-title {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.025em;
}

.ev-org-line {
    margin-top: 6px;
    font-size: var(--fs-body);
    color: var(--muted);
}

.ev-when {
    margin-top: 14px;
    font-size: var(--fs-head);
}

.ev-cap {
    padding: 16px;
}

.ev-cap-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.ev-cap-figure {
    font-size: var(--fs-title);
    font-weight: 600;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.ev-cap-figure span {
    font-size: var(--fs-body);
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0;
}

.ev-cap-left {
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.event-description {
    font-size: var(--fs-head);
    line-height: 1.5;
    color: var(--text);
    padding: 14px 16px;
}

.org-avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
}

.ev-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    padding: 12px var(--gutter) 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(242, 242, 247, .96);
    box-shadow: 0 -.5px 0 rgba(0, 0, 0, .16);
}

@supports (backdrop-filter: blur(1px)) {
    .ev-bar {
        background: rgba(242, 242, 247, .82);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
}

.ev-bar-info {
    flex: 1;
    min-width: 0;
}

.ev-bar-price {
    font-size: var(--fs-head);
    font-weight: 600;
}

.ev-bar-sub {
    font-size: var(--fs-meta);
    color: var(--muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-bar .btn {
    flex: none;
    min-width: 150px;
}

.ev-registered {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--positive);
    font-weight: 600;
}

/* ==================== TICKETS ==================== */

.pass {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .2s var(--ease);
}

.pass+.pass {
    margin-top: 14px;
}

.pass:active {
    transform: scale(.985);
}

.pass-media {
    position: relative;
    height: 128px;
    background: #222;
}

.pass-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pass-media .pill {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, .94);
    color: var(--text);
}

.pass-body {
    padding: 14px 16px 4px;
}

.pass-name {
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.pass-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.pass-field-label {
    font-size: var(--fs-small);
    color: var(--muted);
}

.pass-field-value {
    font-size: var(--fs-body);
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pass-perf {
    position: relative;
    height: 24px;
    margin: 8px 0 0;
}

.pass-perf::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    border-top: 1.5px dashed var(--separator);
}

.pass-perf i {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border-radius: 50%;
    background: var(--ground);
}

.pass-perf i:first-child { left: -11px; }
.pass-perf i:last-child { right: -11px; }

.pass-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 16px 16px;
}

.pass-foot .soon {
    font-size: var(--fs-head);
}

.pass-foot-note {
    font-size: var(--fs-meta);
    color: var(--muted);
}

/* ==================== SHEETS (popup, QR, language) ==================== */

#popup-overlay {
    position: absolute;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .32);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}

#popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

#popup-sheet,
#qr-popup {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    max-height: 88%;
    overflow-y: auto;
    background: var(--ground);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .14);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .45s var(--ease), visibility .45s;
    padding-bottom: 28px;
    scrollbar-width: none;
}

#popup-sheet.active,
#qr-popup.active {
    transform: none;
    visibility: visible;
}

.popup-handle {
    width: 36px;
    height: 5px;
    border-radius: 999px;
    background: var(--control);
    margin: 8px auto 4px;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 12px 12px 20px;
}

.sheet-title {
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.sheet-sub {
    font-size: var(--fs-body);
    color: var(--muted);
    margin-top: 2px;
}

.sheet-body {
    padding: 0 var(--gutter);
}

.sheet-body>*+* {
    margin-top: 16px;
}

.sheet-cover {
    height: 150px;
    border-radius: var(--r-card);
    overflow: hidden;
}

.sheet-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--r-card);
    background: var(--surface);
    font-size: var(--fs-body);
    line-height: 1.4;
}

.notice .ic {
    flex: none;
}

.notice.positive {
    background: var(--pill-positive-bg);
    color: var(--pill-positive-ink);
}

.notice.negative {
    background: var(--pill-negative-bg);
    color: var(--pill-negative-ink);
}

/* QR pass */
.qr-pass {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
}

.qr-pass-name {
    font-size: var(--fs-head);
    font-weight: 600;
}

.qr-pass-meta {
    font-size: var(--fs-meta);
    color: var(--muted);
    margin-top: 2px;
}

.qr-svg {
    width: 220px;
    height: 220px;
    margin: 18px auto 14px;
    display: block;
}

.qr-id {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: var(--fs-meta);
    color: var(--muted);
    letter-spacing: .04em;
}

.qr-success {
    padding: 40px 20px 20px;
    text-align: center;
}

.qr-success .check {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--positive);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn .5s var(--ease);
}

.qr-success .check .ic {
    width: 40px;
    height: 40px;
    stroke-width: 2.6;
}

.qr-success-text {
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: -.02em;
}

.qr-success-sub {
    font-size: var(--fs-body);
    color: var(--muted);
    margin-top: 4px;
}

@keyframes popIn {
    from { transform: scale(.4); opacity: 0; }
    to { transform: none; opacity: 1; }
}

/* ==================== PROFILE ==================== */

.profile-header {
    text-align: center;
    padding: 4px 0 24px;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: .01em;
}

.profile-name {
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: -.02em;
}

.profile-email {
    font-size: var(--fs-body);
    color: var(--muted);
    margin-top: 2px;
}

.profile-badge {
    margin-top: 10px;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--surface);
    border-radius: var(--r-card);
    padding: 14px 0;
}

.stat-strip.four {
    grid-template-columns: repeat(2, 1fr);
    padding: 0;
}

.stat {
    text-align: center;
    position: relative;
    padding: 0 8px;
}

.stat+.stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--separator);
}

.stat-num {
    font-size: var(--fs-title);
    font-weight: 600;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: var(--fs-meta);
    color: var(--muted);
    margin-top: 2px;
}

.stat-strip.four .stat {
    text-align: left;
    padding: 14px 16px;
}

.stat-strip.four .stat::before {
    display: none;
}

.stat-strip.four .stat:nth-child(odd) {
    box-shadow: inset -1px 0 0 var(--separator);
}

.stat-strip.four .stat:nth-child(n+3) {
    box-shadow: inset 0 1px 0 var(--separator);
}

.stat-strip.four .stat:nth-child(3) {
    box-shadow: inset -1px 0 0 var(--separator), inset 0 1px 0 var(--separator);
}

.stat-strip.four .stat-label {
    margin: 0 0 2px;
}

.lang-seg {
    width: 132px;
}

/* ==================== SETTINGS ==================== */

.settings-foot {
    text-align: center;
    font-size: var(--fs-meta);
    color: var(--muted);
    margin-top: 28px;
    line-height: 1.5;
}

.settings-foot .bt-wordmark {
    display: table;
    margin: 0 auto 6px;
}

/* About Bientôt (openAbout) */
.about-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 4px 8px 22px;
}

.about-tagline {
    color: var(--muted);
    font-size: var(--fs-body);
    line-height: 1.45;
    max-width: 300px;
}

.about-version {
    color: var(--muted);
    font-size: var(--fs-meta);
}

.credits-list .row-sub {
    white-space: normal;
}

.lang-check {
    color: var(--text);
}

.lang-check .ic {
    width: 20px;
    height: 20px;
    stroke-width: 2.4;
}

/* ==================== MAP ==================== */

.app-page.mappage {
    overflow: hidden;
    background: #f3efe6;
}

.fullmap-canvas {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.fullmap-canvas:active {
    cursor: grabbing;
}

.fullmap-inner {
    position: absolute;
    left: 0;
    top: 0;
    width: 800px;
    height: 1000px;
    transform-origin: 0 0;
}

.map-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.map-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    transition: transform .25s var(--ease);
}

.map-pin-head {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2.5px #fff, 0 3px 8px rgba(0, 0, 0, .25);
}

.map-pin-head .ic {
    width: 17px;
    height: 17px;
}

.map-pin::after {
    content: "";
    width: 2.5px;
    height: 8px;
    background: var(--text);
    border-radius: 0 0 2px 2px;
}

.map-pin.joined .map-pin-head,
.map-pin.joined::after {
    background: var(--accent);
}

.map-pin.selected {
    transform: translate(-50%, -100%) scale(1.25);
    z-index: 4;
}

.map-pin-label {
    position: absolute;
    top: 100%;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text);
    text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}

.map-me {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-ink);
    box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, .3);
    z-index: 3;
}

.map-me::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: rgba(26, 26, 26, .12);
    animation: meHalo 2.4s ease-out infinite;
}

@keyframes meHalo {
    from { transform: scale(.4); opacity: 1; }
    to { transform: scale(1.3); opacity: 0; }
}

.fullmap-top {
    position: absolute;
    top: calc(var(--status) + 6px);
    left: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
}

.fullmap-bottom-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    background: var(--ground);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .12);
    padding-bottom: 24px;
    max-height: 56%;
    overflow-y: auto;
    scrollbar-width: none;
}

.fullmap-sheet-content {
    padding: 0 16px;
}

.fullmap-sheet-title {
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: -.02em;
    padding: 6px 4px 12px;
}

.fullmap-detail {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--r-card);
    margin-bottom: 12px;
}

.fullmap-detail .thumb {
    width: 72px;
    height: 72px;
}

/* ==================== AUTH ==================== */

.app-page.loginpage,
.app-page.signuppage {
    background: var(--ground);
}

.auth-page {
    min-height: 100%;
    padding: 0 var(--gutter) 40px;
}

.auth-header {
    margin: 8px 0 24px;
}

.auth-title {
    font-size: var(--fs-large);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -.025em;
}

.auth-sub {
    font-size: var(--fs-head);
    color: var(--muted);
    margin-top: 6px;
    line-height: 1.4;
}

.auth-logo {
    margin-bottom: 18px;
}

.field-group {
    background: var(--surface);
    border-radius: var(--r-card);
    overflow: hidden;
}

.auth-field {
    position: relative;
    padding: 10px 16px 8px;
}

.auth-field+.auth-field::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 0;
    height: 1px;
    background: var(--separator);
    transform: scaleY(.6);
}

.auth-label {
    display: block;
    font-size: var(--fs-meta);
    font-weight: 500;
    color: var(--muted);
}

.auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
}

.auth-input {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: var(--fs-head);
    color: var(--text);
}

.auth-input::placeholder {
    color: #8e8e93;
}

.auth-eye {
    width: 44px;
    height: 34px;
    margin-right: -12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-radius: 8px;
}

.auth-forgot {
    display: inline-block;
    margin: 12px 0 0 16px;
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--text);
    padding: 6px 0;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.auth-or {
    text-align: center;
    font-size: var(--fs-meta);
    color: var(--muted);
    margin: 6px 0;
}

.auth-switch {
    text-align: center;
    font-size: var(--fs-body);
    color: var(--muted);
    margin-top: 24px;
}

.auth-switch button {
    color: var(--text);
    font-weight: 600;
    padding: 8px 4px;
}

.auth-skip {
    display: block;
    margin: 4px auto 0;
    padding: 10px 16px;
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--muted);
}

.signup-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 4px 0 6px;
}

.signup-progress span {
    height: 4px;
    border-radius: 999px;
    background: var(--control);
    opacity: .5;
    transition: background-color .3s ease, opacity .3s ease;
}

.signup-progress span.done {
    background: var(--text);
    opacity: 1;
}

.signup-step-label {
    font-size: var(--fs-meta);
    color: var(--muted);
    margin-bottom: 18px;
}

.signup-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.signup-btn-row .btn {
    flex: 1;
}

.signup-btn-row .btn-grey {
    flex: 0 0 auto;
}

.shake {
    animation: shake .4s ease;
    box-shadow: inset 0 0 0 1.5px var(--negative);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.google-icon {
    width: 18px;
    height: 18px;
    flex: none;
}

/* ==================== BOTTOM TAB BAR ==================== */

.bottom-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    height: var(--tabbar);
    padding: 6px 8px 10px;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    background: rgba(249, 249, 251, .96);
    box-shadow: 0 -.5px 0 rgba(0, 0, 0, .18);
    transition: transform .35s var(--ease), visibility .35s;
}

@supports (backdrop-filter: blur(1px)) {
    .bottom-nav {
        background: rgba(249, 249, 251, .84);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
}

.bottom-nav.hidden {
    transform: translateY(110%);
    visibility: hidden;
    pointer-events: none;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-height: 48px;
    padding-top: 2px;
    color: #8e8e93;
    cursor: pointer;
    transition: color .2s ease;
    -webkit-tap-highlight-color: transparent;
    border-radius: 10px;
}

.bottom-nav-item .ic {
    width: 25px;
    height: 25px;
    stroke-width: 1.8;
    transition: transform .2s var(--ease);
}

.bottom-nav-item:active .ic {
    transform: scale(.88);
}

.bottom-nav-item span {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .01em;
}

.bottom-nav-item.active {
    color: var(--text);
}

.bottom-nav-item.active .ic {
    stroke-width: 2.3;
}

/* ==================== ORGANIZER ==================== */

.org-mark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}


.live-card {
    background: var(--surface);
    border-radius: var(--r-card);
    overflow: hidden;
}

.live-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 0;
    cursor: pointer;
}

.live-card-figure {
    padding: 16px 16px 0;
}

.live-big {
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.live-big span {
    font-size: var(--fs-head);
    font-weight: 400;
    color: var(--muted);
    letter-spacing: -.01em;
}

.live-card .meter {
    margin-top: 12px;
}

.live-card-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
}

.live-card-actions .btn-primary {
    flex: 1;
}

.status-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: none;
}

.status-row-right .num {
    font-size: var(--fs-meta);
    color: var(--muted);
}

.org-ev-card {
    background: var(--surface);
    border-radius: var(--r-card);
    overflow: hidden;
}

.org-ev-card+.org-ev-card {
    margin-top: 12px;
}

.org-ev-card .row {
    background: transparent;
}

.org-ev-figs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 4px 16px 14px;
    gap: 8px;
}

.org-ev-fig {
    font-size: var(--fs-meta);
    color: var(--muted);
}

.org-ev-fig b {
    display: block;
    font-size: var(--fs-head);
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.org-ev-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.org-ev-actions .btn {
    flex: 1;
}

.person {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.ticket-id {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
}

.more-row {
    font-size: var(--fs-body);
    color: var(--muted);
}

/* Org event detail */
.oev-hero {
    position: relative;
    height: 240px;
    background: #222;
    overflow: hidden;
}

.oev-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oev-sheet {
    position: relative;
    margin-top: -24px;
    padding: 22px var(--gutter) calc(var(--tabbar) + 40px);
    background: var(--ground);
    border-radius: 24px 24px 0 0;
}

/* Forms (create / edit) */
.form-group {
    background: var(--surface);
    border-radius: var(--r-card);
    overflow: hidden;
}

.form-field {
    position: relative;
    display: block;
    padding: 10px 16px 8px;
}

.form-field+.form-field::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 0;
    height: 1px;
    background: var(--separator);
    transform: scaleY(.6);
}

.form-label {
    display: block;
    font-size: var(--fs-meta);
    font-weight: 500;
    color: var(--muted);
}

.form-input {
    width: 100%;
    height: 34px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: var(--fs-head);
    color: var(--text);
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder {
    color: #8e8e93;
}

textarea.form-input {
    height: auto;
    min-height: 92px;
    padding: 6px 0;
    line-height: 1.45;
    resize: vertical;
}

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c6c70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 20px;
}

.form-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.form-pair .form-field+.form-field::before {
    top: 10px;
    bottom: 10px;
    left: 0;
    right: auto;
    width: 1px;
    height: auto;
    transform: scaleX(.6);
}

.form-pair+.form-field::before,
.form-field+.form-pair .form-field:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 0;
    height: 1px;
    background: var(--separator);
    transform: scaleY(.6);
}

.form-pair {
    position: relative;
}

.form-field+.form-pair::before,
.form-pair+.form-pair::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 0;
    height: 1px;
    background: var(--separator);
    transform: scaleY(.6);
}

.cover-picker {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 4px;
}

.cover-picker::-webkit-scrollbar {
    display: none;
}

.cover-opt {
    position: relative;
    flex: none;
    width: 104px;
    height: 72px;
    border-radius: var(--r-media);
    overflow: hidden;
    cursor: pointer;
    transition: transform .15s var(--ease), box-shadow .15s ease;
}

.cover-opt img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-opt.selected {
    box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--text);
}

.cover-opt.selected::after {
    content: "";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center no-repeat;
}

.cover-preview {
    position: relative;
    height: 180px;
    border-radius: var(--r-card);
    overflow: hidden;
    background: #222;
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sched-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sched-time {
    flex: none;
    width: 64px;
    font-size: var(--fs-head);
    font-variant-numeric: tabular-nums;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.sched-label {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: var(--fs-head);
    color: var(--text);
}

.sched-del {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--negative);
    margin-right: -8px;
}

.sched-del .ic {
    width: 18px;
    height: 18px;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.org-status-picker {
    width: 100%;
}

/* Scanner (camera — dark by nature) */
.app-page.org-scanner {
    background: #000;
    color: #fff;
    overflow: hidden;
}

.org-scanner-page {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: var(--status) var(--gutter) 28px;
    background: #000;
}

.scan-top {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
    height: 52px;
    margin: 0 -8px;
}

.scan-top .icon-btn {
    color: #fff;
}

.scan-top .icon-btn:active {
    background: #222;
}

.scan-head-text {
    text-align: center;
    min-width: 0;
}

.org-scanner-title {
    font-size: var(--fs-head);
    font-weight: 600;
}

.org-scanner-sub {
    font-size: var(--fs-meta);
    color: #b4b4b4;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-scanner-viewport {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px calc(var(--gutter) * -1) 0;
    background: #141414;
    overflow: hidden;
}

.org-scanner-viewport img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .35;
    filter: grayscale(.4);
}

.org-scanner-frame {
    position: relative;
    width: 230px;
    height: 230px;
    z-index: 1;
}

.org-scanner-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: #fff;
    border-style: solid;
    border-width: 0;
}

.org-scanner-corner.tl { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 22px; }
.org-scanner-corner.tr { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 22px; }
.org-scanner-corner.bl { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 22px; }
.org-scanner-corner.br { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 22px; }

.org-scanner-line {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0;
}

.org-scanner-frame.scanning-active .org-scanner-line {
    opacity: 1;
    animation: scanLine 1.2s ease-in-out infinite alternate;
}

.org-scanner-frame.scanning-active .org-scanner-corner {
    border-color: var(--accent);
}

@keyframes scanLine {
    from { transform: translateY(0); }
    to { transform: translateY(204px); }
}

.org-scanner-hint {
    text-align: center;
    font-size: var(--fs-body);
    color: #d0d0d0;
    margin: 16px 0;
}

.org-scanner-result {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 100px;
    z-index: 4;
}

.org-scan-scanning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    width: max-content;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(40, 40, 40, .92);
    font-size: var(--fs-body);
    color: #fff;
}

.org-scan-scanning .spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    animation: spin .8s linear infinite;
}

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

.org-scan-card {
    background: var(--surface);
    color: var(--text);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
    animation: sheetUp .4s var(--ease);
}

@keyframes sheetUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.org-scan-card-info {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 12px 0 16px;
}

.org-scan-card-actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
}

.org-scanner-simulate {
    background: #fff;
    color: #000;
}

.org-scanner-simulate .spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .2);
    border-top-color: #000;
    animation: spin .8s linear infinite;
}

.org-checkin-success {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .78);
    animation: fadeIn .25s ease;
}

.org-checkin-success-inner {
    text-align: center;
}

.org-checkin-success-inner .check {
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--switch-on);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn .5s var(--ease);
}

.org-checkin-success-inner .check .ic {
    width: 44px;
    height: 44px;
    stroke-width: 2.6;
}

.org-checkin-success-inner .t {
    font-size: var(--fs-title);
    font-weight: 700;
}

.org-checkin-success-inner .s {
    font-size: var(--fs-body);
    color: #d0d0d0;
    margin-top: 4px;
}

/* ==================== PAGE TRANSITIONS ==================== */

.app-page.t-fade-enter { animation: fadeIn .4s ease forwards; }
.app-page.t-fade-exit { animation: fadeOut .4s ease forwards; }

.app-page.t-fade-left-enter { animation: inFromRightShort .4s var(--ease) forwards; }
.app-page.t-fade-left-exit { animation: outToLeftShort .4s var(--ease) forwards; }
.app-page.t-fade-right-enter { animation: inFromLeftShort .4s var(--ease) forwards; }
.app-page.t-fade-right-exit { animation: outToRightShort .4s var(--ease) forwards; }
.app-page.t-fade-up-enter { animation: inFromBottomShort .4s var(--ease) forwards; }
.app-page.t-fade-up-exit { animation: fadeOut .3s ease forwards; }
.app-page.t-fade-down-enter { animation: inFromTopShort .4s var(--ease) forwards; }
.app-page.t-fade-down-exit { animation: fadeOut .3s ease forwards; }

/* iOS push: the new page slides over, the old one drifts back 30% */
.app-page.t-slide-left-enter { animation: pushIn .4s var(--ease) forwards; z-index: 3; box-shadow: -10px 0 30px rgba(0, 0, 0, .08); }
.app-page.t-slide-left-exit { animation: pushOut .4s var(--ease) forwards; }
.app-page.t-slide-right-enter { animation: popIn2 .4s var(--ease) forwards; }
.app-page.t-slide-right-exit { animation: popOut .4s var(--ease) forwards; z-index: 3; }
.app-page.t-slide-up-enter { animation: inFromBottom .4s var(--ease) forwards; z-index: 3; }
.app-page.t-slide-up-exit { animation: fadeOut .4s ease forwards; }
.app-page.t-slide-down-enter { animation: inFromTop .4s var(--ease) forwards; z-index: 3; }
.app-page.t-slide-down-exit { animation: fadeOut .4s ease forwards; }
.app-page.t-zoom-in-enter { animation: zoomIn .4s var(--ease) forwards; }
.app-page.t-zoom-in-exit { animation: fadeOut .3s ease forwards; }
.app-page.t-zoom-out-enter { animation: fadeIn .4s ease forwards; }
.app-page.t-zoom-out-exit { animation: zoomOut .4s var(--ease) forwards; z-index: 3; }
.app-page.t-flip-enter { animation: fadeIn .4s ease forwards; }
.app-page.t-flip-exit { animation: fadeOut .4s ease forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes inFromRightShort { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes outToLeftShort { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-24px); } }
@keyframes inFromLeftShort { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes outToRightShort { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(24px); } }
@keyframes inFromBottomShort { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes inFromTopShort { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes pushIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pushOut { from { transform: none; opacity: 1; } to { transform: translateX(-30%); opacity: .6; } }
@keyframes popIn2 { from { transform: translateX(-30%); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes popOut { from { transform: none; } to { transform: translateX(100%); } }
@keyframes inFromBottom { from { transform: translateY(100%); } to { transform: none; } }
@keyframes inFromTop { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes zoomOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.96); } }

/* Content arrives: rows rise once when a page renders */
.rise {
    animation: rise .5s var(--ease) both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

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

    .welcome-photo img {
        animation: none;
    }
}

/* ==================== ADDITIONS ==================== */

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, .18);
    border-top-color: currentColor;
    animation: spin .8s linear infinite;
}

.spinner.light {
    border-color: rgba(255, 255, 255, .3);
    border-top-color: #fff;
}

.nav-left .bt-wordmark {
    display: block;
    margin-left: 8px;
}

/* Map preview layer: the same map, scaled, centred on the user */
.map-preview .map-layer {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 800px;
    height: 1000px;
    transform: translate(-50%, -50%) scale(.72);
    pointer-events: none;
}

.map-preview .map-layer .map-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
    left: 0;
    top: 0;
}

.map-preview .map-pin {
    transform: translate(-50%, -100%) scale(1.2);
}

/* Compact bar that replaces a photo hero once it scrolls away */
.ev-compact {
    position: sticky;
    top: 0;
    margin: 0 0 calc(-48px - var(--status));
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.ev-compact .nav-title {
    opacity: 1;
    transform: none;
}

.scrolled-far .ev-compact {
    opacity: 1;
    pointer-events: auto;
    background: rgba(242, 242, 247, .82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 .5px 0 rgba(0, 0, 0, .16);
}

.scrolled-far .ev-hero-bar {
    opacity: 0;
    pointer-events: none;
}

.ev-hero-bar {
    transition: opacity .2s ease;
}

.org-event-detail .ev-compact {
    position: sticky;
}

.org-event-detail .ev-hero-bar {
    position: absolute;
}

.welcome-title {
    margin-bottom: 12px;
}

.welcome-caption {
    bottom: 44px;
}

.feature-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
}

.notice.stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.soon {
    white-space: nowrap;
}

.org-scanner-page:has(.org-scan-card) .org-scanner-hint {
    visibility: hidden;
}

.map-preview .map-layer {
    transform: translate(-50%, -54%) scale(.72);
}

.map-preview-label {
    top: 12px;
    bottom: auto;
}

/* ==================== ONE SEARCH FIELD ==================== */

.search-sticky {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-cancel {
    display: none;
    flex: none;
    height: 40px;
    padding: 0 2px;
    font-size: var(--fs-head);
    font-weight: 500;
    color: var(--text);
}

/* Active search (iOS): the title gives way, the field rises under the status bar, Cancel arrives */
.searchpage.search-active .large-title {
    display: none;
}

.searchpage.search-active .nav-bar {
    height: var(--status);
    overflow: hidden;
}

.searchpage.search-active .search-sticky {
    top: var(--status);
    padding-top: 8px;
}

.searchpage.search-active .search-cancel {
    display: block;
    animation: cancelIn .42s var(--ease) both;
}

@keyframes cancelIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

/* The stand-in that glides between the two field positions */
.search-ghost {
    position: absolute;
    z-index: 45;
    margin: 0;
    pointer-events: none;
    will-change: transform, width;
}

/* Page change behind the gliding field: a plain cross-fade, nothing slides */
.app-page.t-search-enter { animation: fadeIn .32s ease forwards; z-index: 3; }
.app-page.t-search-exit { animation: fadeOut .24s ease forwards; }

/* ==================== DEMO STATUS BAR TOGGLE ==================== */

html.no-statusbar .mobile-statusbar {
    display: none;
}

/* Without the demo bar, keep clear of a real notch, or of the frame's rounded corners on desktop */
html.no-statusbar {
    --status: max(env(safe-area-inset-top, 0px), 12px);
}

@media screen and (min-width: 561px) {
    html.no-statusbar {
        --status: 20px;
    }
}

/* =====================================================================
   v3 BLEND LAYER — v1's colour and attitude on v2's structure
   ===================================================================== */

/* ---------- Type: a display face for titles and figures ---------- */
.large-title,
.auth-title,
.section-title,
.event-title,
.sheet-title,
.pass-name,
.profile-name,
.fullmap-sheet-title,
.qr-success-text,
.org-checkin-success-inner .t,
.live-big,
.stat-num,
.ev-cap-figure {
    font-family: var(--display);
    font-optical-sizing: auto;
}

.large-title,
.auth-title {
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.04;
}

.section-title {
    font-weight: 700;
    letter-spacing: -.025em;
}

.event-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.06;
}

.nav-title {
    font-weight: 700;
}

:focus-visible {
    outline-color: var(--primary);
}

/* ---------- Chrome: solid bars, no frosted glass ---------- */
.scrolled .nav-bar,
.nav-bar.solid,
.scrolled-far .ev-compact {
    background: rgba(243, 243, 247, .97);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 0 var(--separator);
}

.ev-bar {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 0 var(--separator) inset;
}

/* ---------- Buttons ---------- */
.btn {
    font-weight: 700;
    letter-spacing: -.005em;
}

.btn-accent {
    background: var(--accent-ink);
    color: #fff;
}

@media (hover: hover) {
    .btn-primary:hover {
        background: var(--primary-hover);
    }

    .btn-accent:hover {
        background: #ad3f18;
    }
}

.get-btn {
    background: var(--primary);
    color: #fff;
}

@media (hover: hover) {
    .get-btn:not(.joined):not(.ended):hover {
        background: var(--primary-hover);
    }
}

.get-btn.joined {
    background: var(--pill-positive-bg);
    color: var(--pill-positive-ink);
    border: 0;
}

.avatar-btn,
.profile-avatar {
    background: var(--primary);
}

.profile-avatar {
    box-shadow: 0 0 0 4px var(--ground), 0 0 0 6px var(--accent);
}

.chip.active {
    background: var(--primary);
}

.search-field:focus-within {
    box-shadow: inset 0 0 0 1.5px var(--primary);
}

.signup-progress span.done {
    background: var(--primary);
}

.cover-opt.selected {
    box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--primary);
}

/* ---------- Category pills (v1 colour-coding) ---------- */
.pill.cat {
    gap: 6px;
    background: var(--pill-neutral-bg);
    color: var(--pill-neutral-ink);
}

.cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.pill.cat-hackathon { background: var(--cat-hackathon-bg); color: var(--cat-hackathon-ink); }
.pill.cat-conference { background: var(--cat-conference-bg); color: var(--cat-conference-ink); }
.pill.cat-meetup { background: var(--cat-meetup-bg); color: var(--cat-meetup-ink); }
.pill.cat-fair { background: var(--cat-fair-bg); color: var(--cat-fair-ink); }

.pill.cat-hackathon .cat-dot { background: var(--cat-hackathon); }
.pill.cat-conference .cat-dot { background: var(--cat-conference); }
.pill.cat-meetup .cat-dot { background: var(--cat-meetup); }
.pill.cat-fair .cat-dot { background: var(--cat-fair); }

/* on a photograph the pill goes white so the dot carries the colour */
.pill.cat.on-media {
    position: absolute;
    top: 12px;
    left: 12px;
    height: 26px;
    padding: 0 11px;
    background: #fff;
    color: var(--text);
}

.ev-kind {
    margin-bottom: 12px;
}

.ev-kind .pill.cat {
    height: 26px;
    padding: 0 11px;
    font-size: var(--fs-meta);
}

/* ---------- Home: Next up as colour blocks ---------- */

.soon {
    color: var(--accent-ink);
    font-weight: 700;
}

/* Trending cards */
.feature-card {
    border-radius: 22px;
}

.feature-media {
    aspect-ratio: 4 / 3;
}

.feature-title {
    font-weight: 700;
}

/* ---------- Event detail: v1's fact tiles ---------- */
.ev-hero {
    height: 340px;
}

.ev-sheet {
    margin-top: -28px;
    padding-top: 26px;
    border-radius: 28px 28px 0 0;
}

.ev-when {
    margin-top: 12px;
}

.ev-when .soon {
    font-size: 19px;
}

.ev-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.ev-fact {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--surface);
    text-align: left;
}

.ev-fact-wide {
    grid-column: 1 / -1;
    padding-right: 44px;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s var(--ease);
}

.ev-fact-wide:active {
    transform: scale(.985);
    background: var(--fill-press);
}

@media (hover: hover) {
    .ev-fact-wide:hover {
        background: var(--raised);
    }
}

.ev-fact-wide .row-chev {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.ev-fact-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-meta);
    color: var(--muted);
    margin-bottom: 4px;
}

.ev-fact-label .ic {
    width: 15px;
    height: 15px;
}

.ev-fact-value {
    font-size: var(--fs-head);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-fact-sub {
    font-size: var(--fs-meta);
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-fact-sub::first-letter {
    text-transform: uppercase;
}

.ev-cap-left {
    color: var(--accent-ink);
}

.meter {
    height: 8px;
}

/* ---------- Tickets ---------- */
.pass {
    border-radius: 24px;
}

.pass-media {
    height: 140px;
}

.pass-name {
    font-weight: 800;
    letter-spacing: -.03em;
}

.pass-field-value {
    font-weight: 700;
}

/* ---------- Stat tiles (v1's colour blocks, flat) ---------- */
.stat-strip,
.stat-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.stat-strip .stat,
.stat-tile {
    text-align: left;
    padding: 14px 14px 12px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: none !important;
}

.stat-strip .stat::before {
    display: none;
}

.stat-strip .stat-num,
.stat-tile .stat-num {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.05;
}

.stat-strip .stat-label,
.stat-tile .stat-label {
    margin: 4px 0 0;
    line-height: 1.25;
    color: #4d5166;
}

.stat-strip.four {
    grid-template-columns: repeat(2, 1fr);
}

.stat-strip.four .stat-label {
    margin: 0 0 4px;
}

.tone-blue,
.stat-strip .stat:nth-child(1) { background: var(--cat-conference-bg); }
.tone-blue .stat-num,
.stat-strip .stat:nth-child(1) .stat-num { color: var(--cat-conference-ink); }

.tone-green,
.stat-strip .stat:nth-child(2) { background: var(--cat-meetup-bg); }
.tone-green .stat-num,
.stat-strip .stat:nth-child(2) .stat-num { color: var(--cat-meetup-ink); }

.tone-orange,
.stat-strip .stat:nth-child(3) { background: var(--accent-soft); }
.tone-orange .stat-num,
.stat-strip .stat:nth-child(3) .stat-num { color: var(--accent-ink); }

.stat-strip .stat:nth-child(4) { background: var(--cat-fair-bg); }
.stat-strip .stat:nth-child(4) .stat-num { color: var(--cat-fair-ink); }

/* ---------- Organizer: the live card goes night ---------- */
.live-card.is-night {
    background: var(--night);
    color: #fff;
}

.live-card.is-night .row-sub,
.live-card.is-night .row-chev,
.live-card.is-night .meter-ends,
.live-card.is-night .live-big span {
    color: var(--on-night-muted);
}

.live-card.is-night .live-big {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.live-card.is-night .meter {
    background: rgba(255, 255, 255, .14);
}

.live-card.is-night .btn-primary {
    background: var(--accent-ink);
}

.live-card.is-night .btn-grey {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

@media (hover: hover) {
    .live-card.is-night .btn-primary:hover {
        background: #ad3f18;
    }

    .live-card.is-night .btn-grey:hover {
        background: rgba(255, 255, 255, .2);
    }
}

/* ---------- Tab bar: solid, with an active capsule ---------- */
.bottom-nav {
    height: var(--tabbar);
    padding: 6px 8px 10px;
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 -1px 0 var(--separator);
}

.bottom-nav-item {
    gap: 2px;
    color: #80849a;
}

.bottom-nav-item .ic {
    box-sizing: content-box;
    width: 23px;
    height: 23px;
    padding: 3px 16px;
    border-radius: 999px;
    transition: background-color .25s var(--ease), transform .2s var(--ease);
}

.bottom-nav-item span {
    font-weight: 600;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active .ic {
    background: #e4e7f6;
}

/* Organizer: v1's raised "+" in the middle, now in the brand orange */
.bottom-nav-create .ic {
    stroke-width: 2.4;
    width: 26px;
    height: 26px;
    padding: 13px;
    margin-top: -22px;
    border-radius: 50%;
    background: var(--accent-ink);
    color: #fff;
    box-shadow: 0 0 0 5px var(--surface);
}

.bottom-nav-create.active .ic {
    background: var(--primary);
}

/* ---------- Map: pins coloured by category ---------- */
.map-pin.cat-hackathon .map-pin-head,
.map-pin.cat-hackathon::after { background: var(--cat-hackathon); }
.map-pin.cat-conference .map-pin-head,
.map-pin.cat-conference::after { background: var(--cat-conference); }
.map-pin.cat-meetup .map-pin-head,
.map-pin.cat-meetup::after { background: var(--cat-meetup); }
.map-pin.cat-fair .map-pin-head,
.map-pin.cat-fair::after { background: var(--cat-fair); }

.map-pin.joined .map-pin-head {
    box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px var(--accent), 0 3px 8px rgba(0, 0, 0, .25);
}

.map-me {
    background: var(--primary);
}

.map-me::before {
    background: rgba(37, 45, 99, .16);
}

/* ---------- Welcome: v2's photograph, v1's night ---------- */
.app-page.welcomepage {
    background: var(--night);
}

.welcome-photo::after {
    background: rgba(21, 26, 56, .22);
}

.welcome-sheet {
    background: var(--night);
    color: #fff;
}

.welcome-title .welcome-title-pre {
    color: var(--on-night-muted);
}

.welcome-subtitle {
    color: var(--on-night-muted);
}

.welcome-btn-secondary {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.welcome-btn-google {
    background: #fff;
    border: 0;
    color: var(--text);
}

@media (hover: hover) {
    .welcome-btn-secondary:hover {
        background: rgba(255, 255, 255, .2);
    }
}

.welcome-lang-row .segmented {
    background: rgba(255, 255, 255, .1);
}

.welcome-lang-row .segmented button {
    color: #fff;
}

.welcome-lang-row .segmented button.active {
    background: #fff;
    color: var(--text);
}

/* ---------- Motion: feedback on the new pieces ---------- */
.feature-card,
.pass {
    transition: transform .2s var(--ease), background-color .2s ease;
}

@media (hover: hover) {
    .feature-card:hover,
    .pass:hover {
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .feature-card:hover,
    .pass:hover {
        transform: none;
    }
}

/* In the small map preview the pins shrink to category dots; the full map keeps their icons */
.map-preview .map-pin {
    transform: translate(-50%, -50%);
}

.map-preview .map-pin::after {
    display: none;
}

.map-preview .map-pin-head {
    width: 18px;
    height: 18px;
    box-shadow: 0 0 0 3px #fff;
}

.map-preview .map-pin-head .ic {
    display: none;
}

/* =====================================================================
   TYPE & SPACING PASS
   One scale, six steps:  32 · 24 · 20 · 16 · 14 · 12  (+ display figures)
   Display (Bricolage) at 700 for titles only; DM Sans 400/500/600 for the rest.
   Spacing on a 4px grid: 4 · 8 · 12 · 16 · 20 · 24 · 32 · 40
   ===================================================================== */

:root {
    --fs-large: 32px;
    --fs-title: 20px;
    --fs-head: 16px;
    --fs-body: 15px;
    --fs-meta: 13px;
    --fs-small: 12px;

    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
}

body {
    line-height: 1.4;
    letter-spacing: -.006em;
    text-rendering: optimizeLegibility;
}

/* ---------- Titles ---------- */
.large-title,
.auth-title {
    font-size: var(--fs-large);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.08;
    padding-top: 0;
}

.title-sub {
    margin-top: var(--sp-2);
    font-size: var(--fs-body);
    line-height: 1.45;
}

.homepage-title {
    margin-top: var(--sp-2);
}

.home-search {
    margin-top: var(--sp-6);
}

.section {
    margin-top: var(--sp-10);
}

.section-header {
    align-items: center;
    margin-bottom: var(--sp-4);
}

.section-title {
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.section-see-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.section-see-all:hover {
    color: var(--primary-hover);
}

.group-label {
    font-size: var(--fs-meta);
    font-weight: 600;
    color: var(--muted);
    padding: 0 var(--sp-4) var(--sp-2);
    margin-top: var(--sp-8);
}

.nav-title {
    font-size: var(--fs-head);
    font-weight: 600;
    letter-spacing: -.01em;
}

/* ---------- Lists ---------- */
.row {
    min-height: 52px;
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-3);
    font-size: var(--fs-head);
}

.row-title {
    font-size: var(--fs-head);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.event-row .row-title {
    font-size: var(--fs-head);
    font-weight: 600;
}

.row-sub {
    font-size: var(--fs-meta);
    line-height: 1.4;
    margin-top: 2px;
}

.row-value {
    font-size: var(--fs-body);
}

/* ---------- Controls ---------- */
.btn {
    height: 48px;
    padding: 0 var(--sp-6);
    font-size: var(--fs-head);
    font-weight: 600;
    letter-spacing: -.01em;
}

.btn-sm {
    height: 36px;
    padding: 0 var(--sp-4);
    font-size: 14px;
}

.get-btn {
    min-width: 68px;
    height: 32px;
    padding: 0 var(--sp-4);
    font-size: 14px;
    font-weight: 600;
}

.chip {
    height: 36px;
    padding: 0 var(--sp-4);
    font-size: 14px;
    font-weight: 500;
}

.chips {
    gap: var(--sp-2);
}

.pill {
    height: 24px;
    padding: 0 10px;
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 0;
}

.search-field {
    height: 44px;
    padding: 0 var(--sp-4);
    border-radius: 14px;
}

.search-field input {
    font-size: var(--fs-head);
}

.map-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.segmented button {
    font-size: var(--fs-meta);
}

/* ---------- Home: Next up — both cards share one rhythm ---------- */

/* Trending */
.trending-cards {
    gap: var(--sp-3);
}

.feature-body {
    gap: var(--sp-3);
    padding: var(--sp-4);
}

.feature-title {
    font-size: var(--fs-head);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.feature-meta {
    font-size: var(--fs-meta);
    margin-top: var(--sp-1);
    line-height: 1.35;
}

.feature-meta+.feature-meta {
    margin-top: 2px;
}

/* ---------- Event detail ---------- */
.ev-sheet {
    padding-top: var(--sp-6);
}

.ev-kind {
    margin-bottom: var(--sp-3);
}

.ev-kind .pill.cat {
    height: 26px;
    font-size: var(--fs-small);
}

.event-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.ev-org-line {
    margin-top: var(--sp-2);
    font-size: var(--fs-body);
}

.ev-when {
    margin-top: var(--sp-4);
    font-size: var(--fs-head);
}

.ev-when .soon {
    font-size: var(--fs-head);
}

.ev-facts {
    gap: var(--sp-3);
    margin-top: var(--sp-6);
}

.ev-fact {
    padding: var(--sp-4);
    gap: 2px;
}

.ev-fact-label {
    margin-bottom: var(--sp-1);
    font-size: var(--fs-meta);
}

.ev-fact-value {
    font-size: var(--fs-head);
    font-weight: 600;
    letter-spacing: -.01em;
}

.ev-cap {
    padding: var(--sp-4);
}

.ev-cap-figure {
    font-size: var(--fs-title);
    font-weight: 700;
}

.ev-cap-left {
    font-size: 14px;
}

.event-description {
    font-size: var(--fs-body);
    line-height: 1.6;
    padding: var(--sp-4);
}

.ev-bar {
    padding: var(--sp-3) var(--sp-5) var(--sp-6);
}

.ev-bar-price {
    font-size: var(--fs-head);
    font-weight: 600;
}

.ev-bar .btn {
    min-width: 140px;
}

/* ---------- Tickets ---------- */
.pass+.pass {
    margin-top: var(--sp-4);
}

.pass-body {
    padding: var(--sp-4) var(--sp-5) var(--sp-1);
}

.pass-name {
    font-size: var(--fs-title);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.pass-fields {
    gap: var(--sp-3) var(--sp-4);
    margin-top: var(--sp-4);
}

.pass-field-label {
    font-size: var(--fs-small);
}

.pass-field-value {
    font-size: var(--fs-body);
    font-weight: 600;
}

.pass-foot {
    padding: var(--sp-1) var(--sp-5) var(--sp-5);
}

.pass-foot .soon {
    font-size: var(--fs-body);
}

/* ---------- Figures ---------- */
.stat-tiles,
.stat-strip {
    gap: var(--sp-3);
}

.stat-strip .stat,
.stat-tile {
    padding: var(--sp-4) 14px 14px;
}

.stat-strip .stat-num,
.stat-tile .stat-num {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.03em;
}

.stat-strip .stat-label,
.stat-tile .stat-label {
    font-size: var(--fs-meta);
    margin-top: var(--sp-1);
}

.live-card-head {
    padding: var(--sp-4) var(--sp-4) 0;
}

.live-card-figure {
    padding: var(--sp-5) var(--sp-4) 0;
}

.live-card.is-night .live-big {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.live-big span {
    font-size: var(--fs-body);
}

.live-card .meter {
    margin-top: var(--sp-3);
}

.live-card-actions {
    gap: var(--sp-2);
    padding: var(--sp-5) var(--sp-4) var(--sp-4);
}

/* ---------- Profile ---------- */
.profile-header {
    padding: var(--sp-2) 0 var(--sp-8);
}

.profile-avatar {
    width: 84px;
    height: 84px;
    margin-bottom: var(--sp-4);
    font-family: var(--display);
    font-size: 30px;
    font-weight: 700;
}

.profile-name {
    font-size: var(--fs-title);
    font-weight: 700;
}

.profile-email {
    margin-top: var(--sp-1);
    font-size: var(--fs-body);
}

/* ---------- Sheets ---------- */
.sheet-head {
    padding: var(--sp-2) var(--sp-3) var(--sp-4) var(--sp-5);
}

.sheet-title {
    font-size: var(--fs-title);
    font-weight: 700;
}

.sheet-sub {
    margin-top: var(--sp-1);
}

.sheet-body>*+* {
    margin-top: var(--sp-4);
}

.qr-success-text {
    font-size: 24px;
    font-weight: 700;
}

/* ---------- Welcome & auth ---------- */
.welcome-sheet {
    padding: var(--sp-8) var(--sp-6) var(--sp-6);
}

.welcome-mark {
    margin-bottom: var(--sp-5);
}

.welcome-title {
    margin-bottom: var(--sp-3);
}

.welcome-title .welcome-title-pre {
    font-size: var(--fs-body);
    font-weight: 500;
    margin-bottom: var(--sp-1);
}

.welcome-subtitle {
    font-size: var(--fs-head);
    line-height: 1.5;
    margin-bottom: var(--sp-6);
}

.welcome-actions {
    gap: var(--sp-3);
}

.welcome-lang-row {
    margin-top: var(--sp-5);
}

.auth-header {
    margin: var(--sp-2) 0 var(--sp-8);
}

.auth-sub {
    margin-top: var(--sp-2);
    font-size: var(--fs-head);
    line-height: 1.45;
}

.auth-label {
    font-size: var(--fs-small);
    font-weight: 600;
}

.auth-actions,
.form-actions {
    gap: var(--sp-3);
    margin-top: var(--sp-6);
}

/* ---------- Tab bar ---------- */
.bottom-nav-item span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
}

/* Line breaks: balanced titles, no stranded last words */
.large-title,
.auth-title,
.section-title,
.event-title,
.sheet-title,
.pass-name,
.feature-title {
    text-wrap: balance;
}

.title-sub,
.welcome-subtitle,
.auth-sub,
.event-description,
.row-sub.wrap,
.notice {
    text-wrap: pretty;
}

.section-see-all {
    font-weight: 500;
}

/* =====================================================================
   NEXT UP — one list, two sizes (16 / 13), two weights (600 / 400),
   three colours (ink, grey, and orange for the time only)
   ===================================================================== */

.next-group .next-row {
    min-height: 76px;
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-3);
}

.next-group .thumb {
    width: 56px;
    height: 56px;
}

.next-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.next-name,
.next-value {
    font-size: var(--fs-head);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--text);
}

.next-sub {
    margin-top: 2px;
    font-size: var(--fs-meta);
    font-weight: 400;
    line-height: 1.35;
    color: var(--muted);
}

.next-time {
    flex: none;
    max-width: 46%;
    text-align: right;
}

.next-value {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    color: var(--accent-ink);
    font-variant-numeric: tabular-nums;
}

.next-value .live-dot {
    background: var(--accent-ink);
}

/* Time-until: plain text, same weight as the rest of the app */
.soon {
    gap: 0;
    font-weight: 600;
}

/* the ticket pass: two equal columns that never grow past the card (long values end with "…") */
.pass-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
/* event facts: a time that spans two days wraps instead of being cut */
.ev-fact-value {
    white-space: normal;
}
