[hidden] { display: none !important; }
/* ==========================================================================
   APEX MOTO — Design system (light, warm, premium)
   "Hər kəs sürə bilər. Hər kəs APEX ola bilməz."
   ========================================================================== */
:root {
  --bg: #F7F5F1;
  --bg-2: #EFECE6;
  --card: #FFFFFF;
  --card-2: #F8F6F2;
  --text: #15171C;
  --text-2: #565C67;
  --text-3: #8B909A;
  --accent: #E52535;
  --accent-ink: #fff;
  --accent-soft: rgba(229,37,53,.08);
  --border: #E7E3DB;
  --border-2: #D7D2C8;
  --ink: #15171C;
  --ok: #16A34A;
  --warn: #D97706;
  --danger: #DC2626;
  --info: #2563EB;
  --gold: #B8892E;
  --hover: rgba(21,23,28,.05);
  --text-1: #33363E;
  --surface: #FFFFFF;
  --glass: rgba(255,255,255,.92);
  --dark: #15171C;
  --on-ink: #FFFFFF;
  --map-bg: #E9E5DC;
  --info-bg: #EEF4FF; --info-bd: #C9D9FB; --info-fg: #1E3A8A;
  --warn-bg: #FFF7E8; --warn-bd: #F5D9A8; --warn-fg: #7A4B00;
  --danger-bg: #FDF0F0; --danger-bd: #F3C4C4; --danger-fg: #8A1C1C;
  --ok-bg: #EEF9F1; --ok-bd: #BFE6CB; --ok-fg: #14532D;
  color-scheme: light;

  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(21,23,28,.05), 0 2px 8px rgba(21,23,28,.04);
  --shadow: 0 12px 34px -14px rgba(21,23,28,.22);
  --shadow-lg: 0 28px 60px -24px rgba(21,23,28,.32);
  --ease: cubic-bezier(.2,.7,.2,1);
  --container: 1240px;
  --gutter: 16px;
  --header-h: 68px;
  --bottom-nav-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
  padding-bottom: var(--bottom-nav-h);
}
main { flex: 1; }
img, video, svg, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; font-weight: 600; color: var(--text); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 820px; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 28px; } .mb-3 { margin-bottom: 24px; }
.inline { display: inline; }
.lead { font-size: 1.125rem; color: var(--text-2); }
.icon { flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .2s;
  background: transparent; color: var(--text);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -10px var(--accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); color: #fff; box-shadow: 0 12px 26px -10px var(--accent); }
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-dark:hover { background: #2a2d35; }
.btn-ghost { border-color: var(--border-2); background: var(--card); }
.btn-ghost:hover { border-color: #b9b3a7; background: var(--card-2); }
.btn-danger { background: var(--surface); border-color: rgba(220,38,38,.35); color: var(--danger); }
.btn-danger:hover { background: rgba(220,38,38,.07); }
.btn-sm { --h: 38px; padding: 0 14px; font-size: .875rem; }
.btn-lg { --h: 54px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: .95rem; transition: color .2s, gap .2s; }
.link-arrow:hover { color: var(--accent); gap: 10px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--text); transition: background .2s; }
.icon-btn:hover { background: var(--hover); }
.badge-dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--card); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 24px -18px rgba(21,23,28,.35); }
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; background: #0b0b0d; }
.brand-word { font-family: var(--font-head); font-weight: 700; letter-spacing: .16em; font-size: 1rem; white-space: nowrap; }
.main-nav { display: none; margin-left: auto; }
.main-nav > ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 9px 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: .95rem; transition: color .2s, background .2s; }
.main-nav a:hover { color: var(--text); background: var(--hover); }
.main-nav a.active { color: var(--text); background: var(--card); box-shadow: var(--shadow-sm); }
.main-nav .sub { position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 6px 0 0; padding: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease); }
.main-nav .has-sub:hover .sub, .main-nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub a { border-radius: var(--r-sm); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-menu { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-weight: 600; font-size: .92rem; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease); z-index: 10; }
.user-menu.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text-2); background: none; border: 0; text-align: left; font-size: .95rem; }
.dropdown a:hover, .dropdown button:hover { background: var(--hover); color: var(--text); }
.dropdown form { margin: 4px 0 0; border-top: 1px solid var(--border); padding-top: 4px; }
.mobile-nav { position: fixed; inset: 0; z-index: 99; background: color-mix(in srgb, var(--bg) 98%, transparent); backdrop-filter: blur(10px); padding: calc(var(--header-h) + 8px) var(--gutter) 110px; overflow-y: auto; animation: fadeIn .25s var(--ease); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav > .mobile-nav-inner > nav > ul > li > a { display: block; padding: 14px 4px; font-family: var(--font-head); font-size: 1.6rem; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-nav a.active { color: var(--accent); }
.mobile-nav ul ul a { display: block; padding: 10px 16px; color: var(--text-2); }
.mobile-nav-actions { display: grid; gap: 10px; margin-top: 28px; }
body.nav-open { overflow: hidden; }
.hide-sm, .hide-xs { display: none !important; }

/* ---------- Bottom nav (mobile app feel) ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 98; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -16px rgba(21,23,28,.25); }
.bottom-nav a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: var(--text-3); font-size: .68rem; font-weight: 600; letter-spacing: .01em; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a.bn-cta { color: #fff; }
.bottom-nav a.bn-cta .bn-ic { background: var(--accent); width: 44px; height: 44px; margin-top: -20px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 10px 20px -8px var(--accent); border: 3px solid #fff; }
.bottom-nav a.bn-cta span:last-child { color: var(--accent); }
.bn-ic { display: grid; place-items: center; height: 26px; position: relative; }
.bn-ic .badge-dot { top: -4px; right: -10px; }

/* ---------- Hero (bright, mystic seal) ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 48px 0 64px; min-height: calc(100svh - var(--header-h) - var(--bottom-nav-h)); display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #FFF7EE 0%, #FFE7D6 38%, #FFD3C2 64%, #F7B4A3 100%); }
.hero.has-media .hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,247,238,.94) 0%, rgba(255,247,238,.78) 42%, rgba(255,247,238,.1) 100%); }
.hero-img img, .hero-video, .hero-bg picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero.has-media .hero-scene { display: none; }
.hero-scene .sun { fill: #FFB38A; opacity: .75; }
.hero-scene .m1 { fill: #F3A08E; } .hero-scene .m2 { fill: #E77F70; } .hero-scene .m3 { fill: #C9584F; }
.hero-scene .road { fill: #3B2A2E; } .hero-scene .road-line { fill: none; stroke: #FFE7D6; stroke-width: 3; stroke-dasharray: 18 16; }
.hero-scene .racing { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1800; stroke-dashoffset: 1800; animation: draw 3s .4s var(--ease) forwards; }
.seal { position: absolute; right: -140px; top: 50%; width: 560px; height: 560px; transform: translateY(-50%); color: rgba(21,23,28,.13); pointer-events: none; }
.seal-rot { transform-origin: 50% 50%; animation: spin 80s linear infinite; }
.seal text { font: 600 13px var(--font-head); letter-spacing: .42em; fill: rgba(21,23,28,.38); text-transform: uppercase; }
.hero-content { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 600 .78rem var(--font-head); letter-spacing: .28em; text-transform: uppercase; color: var(--text-2); }
.eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.hero-title { font-size: clamp(3rem, 15vw, 9.5rem); line-height: .88; font-weight: 700; letter-spacing: -.045em; margin: 0 0 22px; color: var(--ink); }
.hero-title span { display: block; color: var(--accent); }
.hero-text { max-width: 520px; font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--text-1); margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { display: inline-flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }
.hero-proof .avatars { display: flex; }
.hero-proof .avatars > * { margin-left: -10px; border: 3px solid #FFEBDD; }
.hero-proof .avatars > *:first-child { margin-left: 0; }
.hero-proof small { color: var(--text-1); font-size: .9rem; line-height: 1.3; }
.hero-proof b { color: var(--ink); }
.hero-scroll { display: none; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-tight { padding: 28px 0 52px; }
.section-white { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.section-head .eyebrow { margin-bottom: 8px; }
.section-title { font-size: clamp(1.7rem, 4.5vw, 2.7rem); margin: 0; letter-spacing: -.025em; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: 1fr; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.card-danger { border-color: rgba(220,38,38,.3); }

.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); font-size: .75rem; font-weight: 600; letter-spacing: .03em; color: var(--text-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-open { color: #15803D; background: rgba(22,163,74,.1); }
.pill-full, .pill-cancelled { color: #B91C1C; background: rgba(220,38,38,.09); }
.pill-closed { color: #B45309; background: rgba(217,119,6,.1); }
.pill-not_open { color: #1D4ED8; background: rgba(37,99,235,.09); }
.pill-completed { color: var(--text-2); background: var(--bg-2); }
.role-badge { --rc: #6B7280; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: var(--rc); background: color-mix(in srgb, var(--rc) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--rc) 25%, var(--surface)); white-space: nowrap; }
.role-badge::before { content: ''; width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); background: var(--rc); }

/* ---------- Event cards ---------- */
.event-card, .news-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .3s; }
.event-card:hover, .news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-card-media, .news-card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2); }
.event-card-media img, .news-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.event-card:hover .event-card-media img, .news-card:hover .news-card-media img { transform: scale(1.05); }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); background: linear-gradient(160deg, #FFF3EA, #FFD9C9 60%, #F7B4A3); }
.cover-fallback svg { width: 100%; height: 100%; opacity: .9; }
.cover-fallback.big { min-height: 240px; }
.date-chip { position: absolute; top: 12px; left: 12px; display: grid; place-items: center; width: 56px; padding: 6px 0; border-radius: var(--r); background: var(--glass); box-shadow: var(--shadow-sm); font: 700 .7rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); line-height: 1.2; }
.date-chip b { display: block; font-size: 1.35rem; color: var(--ink); letter-spacing: 0; }
.date-chip.sm { position: static; width: 50px; flex-shrink: 0; background: var(--bg-2); box-shadow: none; }
.event-card-body, .news-card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.event-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.event-card-title, .news-card h3 { font-size: 1.2rem; margin: 0; }
.event-card-title a:hover, .news-card h3 a:hover { color: var(--accent); }
.meta-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--text-2); font-size: .9rem; }
.meta-list li { display: flex; align-items: center; gap: 8px; }
.meta-list a { color: var(--accent); }
.seats { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.seats-bar { flex: 1; height: 5px; border-radius: 5px; background: var(--bg-2); overflow: hidden; }
.seats-bar span { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width 1s var(--ease); }
.seats-text { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.seats.lg { margin: 14px 0; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-2); font-size: .85rem; margin-bottom: 4px; }
.news-card p { margin: 0; font-size: .95rem; }

/* ---------- Next event ---------- */
.next-event { display: grid; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); }
.next-media { position: relative; min-height: 220px; background: var(--bg-2); }
.next-media img, .next-media picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.next-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.next-title { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 0; }
.next-body .muted { margin: 0; }
.meta-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.meta-grid li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.meta-grid .icon { color: var(--accent); margin-top: 2px; }
.meta-grid small { display: block; color: var(--text-3); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.meta-grid b { font-weight: 600; font-size: .95rem; word-break: break-word; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown div { text-align: center; padding: 10px 4px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--border); }
.countdown b { display: block; font: 700 1.6rem/1 var(--font-head); font-variant-numeric: tabular-nums; }
.countdown small { color: var(--text-3); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.countdown.sm b { font-size: 1.3rem; }

/* ---------- About / stats / CTA ---------- */
.about-grid { display: grid; gap: 22px; }
.values { list-style: none; padding: 0; margin: 20px 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.values li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: .9rem; font-weight: 500; }
.values .icon { color: var(--accent); }
.section-stats { padding: 36px 0; background: var(--dark); color: #fff; }
.section-stats .stat span { color: #A7ABB4; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.stat b { display: block; font: 700 clamp(2.1rem, 7vw, 3.4rem)/1 var(--font-head); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text-2); font-size: .9rem; }
.stat-card { display: grid; gap: 18px; }
.stat-card .stat b { font-size: 2.2rem; }
.cta-box { position: relative; overflow: hidden; text-align: center; padding: 52px 20px; border-radius: var(--r-xl); background: var(--dark); color: #fff; box-shadow: var(--shadow-lg); }
.cta-box::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 0%, rgba(229,37,53,.35), transparent 70%); }
.cta-line { position: absolute; inset: 0; width: 100%; height: 100%; }
.cta-line path { fill: none; stroke: var(--accent); stroke-width: 2; opacity: .55; }
.cta-title { position: relative; font-size: clamp(2.2rem, 9vw, 4.8rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: 10px; color: #fff; }
.cta-box p { position: relative; color: #C9CCD3; font-size: 1.08rem; margin: 0 auto 24px; max-width: 520px; }
.cta-box .btn { position: relative; }

/* ---------- Leaders ---------- */
.leader-row { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.leader-chip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.leader-chip .rank { font: 700 1rem var(--font-head); color: var(--text-3); width: 30px; }
.leader-chip strong { display: block; font-size: .95rem; }
.tier-text { font-weight: 700; font-size: .8rem; letter-spacing: .03em; display: block; }
.tier-text.big { font-size: 1.05rem; margin-bottom: 16px; }
.tier-rookie { color: #6B7280; } .tier-rider { color: #334155; } .tier-captain { color: #DC2626; } .tier-elite, .tier-founder { color: var(--gold); }

/* ---------- Media ---------- */
.media-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.media-tile, .masonry-item { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: var(--bg-2); }
.media-tile { aspect-ratio: 1; }
.media-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.media-tile:hover img, .masonry-item:hover img { transform: scale(1.06); }
.play { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); color: var(--accent); box-shadow: var(--shadow); }
.masonry { columns: 2 160px; column-gap: 10px; }
.masonry-item { margin-bottom: 10px; break-inside: avoid; }
.masonry-item img { width: 100%; transition: transform .6s var(--ease); }
.album-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .3s; }
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.album-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.album-media img, .album-media picture { width: 100%; height: 100%; object-fit: cover; }
.album-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--glass); font-size: .8rem; font-weight: 600; }
.album-body { padding: 14px 16px; display: grid; gap: 2px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(12,13,16,.95); color: #fff; display: grid; place-items: center; padding: 56px 12px; animation: fadeIn .2s; }
.lightbox img, .lightbox iframe { max-width: min(1400px, 100%); max-height: calc(100svh - 120px); border-radius: var(--r); object-fit: contain; }
.lightbox iframe { width: min(1100px, 100%); aspect-ratio: 16/9; height: auto; border: 0; }
.lightbox-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #bbb; font-size: .9rem; padding: 0 60px; }
.lightbox button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; font-size: 1.3rem; }
.lb-close { top: 12px; right: 12px; } .lb-prev { left: 12px; top: 50%; } .lb-next { right: 12px; top: 50%; }
.lb-count { position: absolute; top: 24px; left: 20px; color: #bbb; font-size: .85rem; }

/* ---------- Page hero / prose ---------- */
.page-hero { padding: 36px 0 22px; background: radial-gradient(70% 140% at 100% 0%, rgba(255,190,160,.35), transparent 60%); }
.page-hero.compact { padding: 24px 0 6px; }
.page-title { font-size: clamp(2rem, 6.5vw, 3.4rem); font-weight: 700; letter-spacing: -.03em; margin: 6px 0 12px; }
.page-lead { color: var(--text-2); font-size: 1.08rem; max-width: 680px; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--text-3); margin-bottom: 10px; }
.crumbs a { color: var(--text-2); } .crumbs a:hover { color: var(--accent); }
.page-cover { border-radius: var(--r-xl); overflow: hidden; margin: 8px 0; aspect-ratio: 21/9; box-shadow: var(--shadow); }
.page-cover img, .page-cover picture { width: 100%; height: 100%; object-fit: cover; }
.prose { color: var(--text-1); font-size: 1.05rem; line-height: 1.75; }
.prose h2 { font-size: 1.6rem; margin: 1.6em 0 .6em; }
.prose h3 { font-size: 1.25rem; margin: 1.4em 0 .5em; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin: .35em 0; } .prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text); font-size: 1.15rem; }
.prose img { border-radius: var(--r); margin: 1.5em 0; }
.prose iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: var(--r); }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; } .prose td, .prose th { border: 1px solid var(--border); padding: 8px 10px; }
.updated { margin-top: 32px; }
.about-layout { display: grid; gap: 26px; }

/* ---------- Event page ---------- */
.event-hero { position: relative; padding: 32px 0 26px; overflow: hidden; isolation: isolate; background: radial-gradient(70% 140% at 100% 0%, rgba(255,190,160,.35), transparent 60%); }
.event-hero.has-cover { padding: 140px 0 30px; min-height: 420px; display: flex; align-items: flex-end; color: #fff; }
.event-hero.has-cover .event-title, .event-hero.has-cover .page-lead, .event-hero.has-cover .crumbs, .event-hero.has-cover .crumbs a { color: #fff; }
.event-hero-bg { position: absolute; inset: 0; z-index: -1; }
.event-hero-bg img, .event-hero-bg picture { width: 100%; height: 100%; object-fit: cover; }
.event-hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,.05), rgba(10,10,12,.72)); }
.event-hero-inner { width: 100%; }
.event-title { font-size: clamp(2rem, 6.5vw, 3.6rem); font-weight: 700; letter-spacing: -.03em; margin: 14px 0 10px; }
.event-layout { display: grid; gap: 22px; }
.event-main > * + * { margin-top: 22px; }
.meta-grid.card { padding: 20px; }
.route-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; position: relative; }
.route-steps li { position: relative; padding: 0 0 16px 34px; counter-increment: s; }
.route-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.route-steps li:not(:last-child)::after { content: ''; position: absolute; left: 10.5px; top: 24px; bottom: 2px; width: 1px; background: repeating-linear-gradient(var(--border-2) 0 4px, transparent 4px 8px); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; color: var(--text-2); }
.check-list .icon { color: var(--ok); margin-top: 4px; }
.map-box { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/9; background: var(--bg-2); }
.map-box iframe { width: 100%; height: 100%; border: 0; }
.avatar-wall { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 14px; }
.avatar-wall a, .avatar-wall .more { display: grid; justify-items: center; gap: 6px; font-size: .8rem; color: var(--text-2); text-align: center; }
.avatar-wall a:hover { color: var(--accent); }
.album-link { display: flex; align-items: center; gap: 12px; }
.join-card { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 12px; }
.joined { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--r); background: rgba(22,163,74,.1); color: #15803D; font-weight: 600; text-align: center; }
.joined.wait { background: rgba(37,99,235,.08); color: #1D4ED8; }
.joined.closed { background: var(--bg-2); color: var(--text-2); }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-row .btn { padding: 0 10px; }
.share-icons, .share-bar { display: flex; justify-content: center; gap: 8px; align-items: center; }
.share-icons a, .share-icons button, .share-bar a, .share-bar button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); color: var(--text-2); transition: .2s; }
.share-icons a:hover, .share-icons button:hover, .share-bar a:hover, .share-bar button:hover { color: var(--accent); border-color: var(--accent); }
.share-bar { justify-content: flex-start; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.diff-easy { color: #15803D; } .diff-medium { color: #B45309; } .diff-hard { color: #B91C1C; }

/* ---------- Filters / chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; }
.seg a { padding: 8px 16px; border-radius: 999px; font-size: .9rem; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.seg a.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: .875rem; color: var(--text-2); font-weight: 500; transition: .2s; }
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.active { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip small { opacity: .6; }
.select-wrap select, .search input { height: 42px; }
.search { position: relative; display: flex; align-items: center; width: 100%; max-width: 360px; }
.search .icon { position: absolute; left: 14px; color: var(--text-3); }
.search input { padding-left: 42px !important; border-radius: 999px !important; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 34px; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-variant-numeric: tabular-nums; }
.pagination .current { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 700; }
.pagination .dots { border: 0; background: none; color: var(--text-3); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form h2 { margin: 0 0 4px; }
.form-row { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .fieldset legend { font-size: .875rem; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt { color: var(--text-3); font-weight: 400; font-size: .8rem; }
.req { color: var(--accent); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23565C67' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input:disabled { opacity: .6; background: var(--bg); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type=file] { font-size: .9rem; color: var(--text-2); max-width: 100%; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--card); color: var(--text); cursor: pointer; font-weight: 600; }
.field-error { color: var(--danger); font-size: .85rem; margin: 0; font-weight: 500; }
.fieldset { border: 1px dashed var(--border-2); border-radius: var(--r); padding: 14px; margin: 0; }
.fieldset legend { padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 3px; width: 19px; height: 19px; accent-color: var(--accent); flex-shrink: 0; }
.check a { color: var(--accent); text-decoration: underline; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px !important; }
.pass-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: none; color: var(--text-3); display: grid; place-items: center; }
.strength { height: 4px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-2); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--bg); color: var(--text-2); white-space: nowrap; font-size: .9rem; }
.input-prefix input { border-radius: 0 var(--r) var(--r) 0 !important; min-width: 0; }
.form-between { display: flex; justify-content: space-between; font-size: .9rem; }
.form-between a { color: var(--text-2); } .form-between a:hover { color: var(--accent); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.switch-row small { display: block; font-size: .85rem; font-weight: 400; }
.switch { position: relative; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch i { display: block; width: 46px; height: 26px; border-radius: 99px; background: var(--border-2); position: relative; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-top: 8px; }

/* ---------- Auth ---------- */
.auth { padding: 32px var(--gutter) 56px; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px 20px; box-shadow: var(--shadow); }
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head.left { text-align: left; }
.auth-head img { margin: 0 auto 12px; width: 64px; height: 64px; border-radius: 50%; background: #0b0b0d; }
.auth-head h1 { font-size: 1.75rem; margin-bottom: 6px; }
.auth-head .empty-icon { margin: 0 auto 14px; }
.auth-foot { text-align: center; margin: 20px 0 0; font-size: .95rem; }
.auth-foot a { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Initiation (join) ---------- */
.initiation { padding: 22px 0 60px; }
.init-head { text-align: center; max-width: 640px; margin: 0 auto 22px; }
.init-head .seal-mini { width: 76px; height: 76px; margin: 0 auto 12px; color: var(--accent); }
.init-head h1 { font-size: clamp(1.9rem, 6vw, 3rem); letter-spacing: -.03em; margin-bottom: 8px; }
.init-head p { color: var(--text-2); margin: 0; }
.init-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 640px; margin: 0 auto 18px; counter-reset: st; }
.init-progress li { list-style: none; display: grid; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.init-progress li::before { content: ''; height: 5px; border-radius: 5px; background: var(--border); transition: background .3s; }
.init-progress li.done::before, .init-progress li.current::before { background: var(--accent); }
.init-progress li.current { color: var(--text); }
.init-card { max-width: 720px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 22px 18px; box-shadow: var(--shadow); }
.init-step { display: grid; gap: 16px; animation: stepIn .45s var(--ease); }
[data-initiation].is-stepped .init-step:not(.active) { display: none; }
.init-step-head { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.init-step-head .num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font: 700 1rem var(--font-head); flex-shrink: 0; }
.init-step-head h2 { margin: 0; font-size: 1.35rem; }
.init-step-head p { margin: 0; color: var(--text-2); font-size: .9rem; }
.init-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.init-nav .btn { flex: 1; max-width: 220px; }
.init-nav .btn:only-child { margin-left: auto; }
.q-list { display: grid; gap: 14px; }
.q-card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; background: var(--card-2); transition: border-color .2s, background .2s; }
.q-card.answered { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--surface); }
.q-card h3 { font-size: 1.02rem; margin: 0 0 12px; display: flex; gap: 10px; line-height: 1.35; }
.q-card h3 span { color: var(--accent); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.q-opts { display: grid; gap: 8px; }
.q-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: .95rem; line-height: 1.35; transition: border-color .15s, background .15s, transform .15s; }
.q-opt:hover { border-color: var(--border-2); }
.q-opt input { position: absolute; opacity: 0; }
.q-opt i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); flex-shrink: 0; display: grid; place-items: center; transition: .15s; }
.q-opt input:checked + i { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }
.q-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.q-opt input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.q-counter { position: static; margin: 0 auto; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: .85rem; font-weight: 600; width: fit-content; }
.q-counter .bar { width: 90px; height: 5px; border-radius: 5px; background: var(--bg-2); overflow: hidden; }
.q-counter .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.oath { position: relative; padding: 22px 18px; border-radius: var(--r-lg); background: var(--dark); color: #E9EAEE; overflow: hidden; }
.oath::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 90% at 100% 0%, rgba(229,37,53,.35), transparent 70%); }
.oath > * { position: relative; }
.oath h3 { color: #fff; font-size: 1.1rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.oath ol { margin: 0 0 14px; padding-left: 1.2em; display: grid; gap: 6px; font-size: .95rem; }
.oath .check { color: #fff; font-weight: 600; }
.oath .check input { accent-color: var(--accent); }
.init-side { max-width: 720px; margin: 18px auto 0; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.init-side div { padding: 14px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); font-size: .85rem; color: var(--text-2); }
.init-side b { display: block; font: 700 1.4rem var(--font-head); color: var(--text); }

/* ---------- Application status / archetype reveal ---------- */
.apply { padding: 26px 0 60px; }
.arch-card { --ac: var(--accent); position: relative; overflow: hidden; max-width: 760px; margin: 0 auto; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lg); text-align: center; padding: 34px 20px 28px; }
.arch-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 240px; background: radial-gradient(60% 100% at 50% 0%, color-mix(in srgb, var(--ac) 22%, transparent), transparent 75%); }
.arch-card > * { position: relative; }
.arch-card .sigil { margin: 0 auto 12px; animation: sigilIn 1.4s var(--ease) both; }
.arch-card .sigil .ring { animation: spin 40s linear infinite; transform-origin: 60px 60px; }
.arch-card .sigil .dot { fill: currentColor; }
.arch-card .sigil .thin { stroke-width: 1.4; }
.arch-kicker { font: 700 .75rem var(--font-head); letter-spacing: .3em; text-transform: uppercase; color: var(--text-3); }
.arch-name { font-size: clamp(2.2rem, 8vw, 3.6rem); letter-spacing: -.03em; margin: 6px 0 4px; color: var(--ac); }
.arch-motto { font: italic 500 1.1rem var(--font-body); color: var(--text-2); margin-bottom: 14px; }
.arch-text { max-width: 520px; margin: 0 auto 20px; color: var(--text-1); }
.arch-bars { max-width: 460px; margin: 0 auto; display: grid; gap: 8px; text-align: left; }
.arch-bar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: .85rem; font-weight: 600; }
.arch-bar .track { height: 7px; border-radius: 7px; background: var(--bg-2); overflow: hidden; }
.arch-bar .track span { display: block; height: 100%; border-radius: 7px; background: var(--c); animation: grow 1.2s var(--ease) both; }
.arch-bar b { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.status-steps { list-style: none; padding: 0; margin: 26px auto 0; max-width: 560px; display: grid; gap: 0; text-align: left; }
.status-steps li { position: relative; display: flex; gap: 14px; padding: 0 0 20px; }
.status-steps li::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.status-steps li:last-child::before { display: none; }
.status-steps .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--text-3); flex-shrink: 0; border: 2px solid var(--border); }
.status-steps li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.status-steps li.now .dot { background: var(--surface); border-color: var(--accent); color: var(--accent); animation: pulseRing 2s infinite; }
.status-steps b { display: block; }
.status-steps small { color: var(--text-2); }
.verdict { max-width: 760px; margin: 0 auto 18px; padding: 16px 18px; border-radius: var(--r-lg); display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.verdict.wait { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-fg); }
.verdict.no { background: var(--danger-bg); border: 1px solid var(--danger-bd); color: var(--danger-fg); }
.verdict.yes { background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--ok-fg); }

/* ---------- Members wall ---------- */
.members-hero { position: relative; overflow: hidden; padding: 40px 0 28px; background: var(--dark); color: #fff; }
.members-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(50% 120% at 85% 10%, rgba(229,37,53,.35), transparent 70%), radial-gradient(40% 90% at 0% 100%, rgba(184,137,46,.22), transparent 70%); }
.members-hero > * { position: relative; }
.members-hero .page-title { color: #fff; }
.members-hero .page-lead { color: #C9CCD3; }
.members-hero .crumbs, .members-hero .crumbs a { color: #9DA1AA; }
.members-hero .eyebrow { color: #C9CCD3; }
.wall-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.wall-stats div { padding: 10px 16px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.wall-stats b { display: block; font: 700 1.5rem/1.1 var(--font-head); }
.wall-stats small { color: #A7ABB4; font-size: .78rem; }
.council { margin-bottom: 30px; }
.council-title { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 .78rem var(--font-head); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.council-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(184,137,46,.5), transparent); }
.wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wcard { --rc: #8B909A; position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s; isolation: isolate; }
.wcard:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.wcard-top { position: relative; aspect-ratio: 4/4.4; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 22%, var(--surface)), color-mix(in srgb, var(--rc) 55%, #15171C)); display: grid; place-items: center; }
.wcard-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.wcard:hover .wcard-top img { transform: scale(1.06); }
.wcard-top .initials { font: 700 clamp(2.2rem, 10vw, 3.4rem) var(--font-head); color: rgba(255,255,255,.92); letter-spacing: -.02em; }
.wcard-top::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(180deg, transparent, rgba(10,10,12,.55)); }
.wcard-no { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.92); font: 700 .68rem var(--font-head); letter-spacing: .1em; color: #15171C; }
.wcard-arch { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; }
.wcard-arch .sigil { width: 26px; height: 26px; }
.wcard-arch .sigil .ring { display: none; }
.wcard-body { padding: 12px 12px 14px; display: grid; gap: 6px; }
.wcard-body b { font-family: var(--font-head); font-size: 1rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcard-body small { color: var(--text-3); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcard-body .role-badge { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wcard.lead { border-color: rgba(184,137,46,.5); box-shadow: 0 0 0 1px rgba(184,137,46,.25), var(--shadow); }
.wcard.lead .wcard-no { background: var(--gold); color: #fff; }
.wcard.locked { pointer-events: none; }
.wcard.locked .wcard-top { background: repeating-linear-gradient(135deg, #EFECE6 0 10px, #E7E3DB 10px 20px); }
.wcard.locked .wcard-top .initials { color: var(--text-3); font-size: 2.6rem; }
.wcard.locked .wcard-body b { color: var(--text-3); }
.wall-cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-radius: 20px; border: 1.5px dashed var(--border-2); background: var(--card-2); }
.wall-cta b { font-family: var(--font-head); font-size: 1.1rem; }
.wall-preview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

/* ---------- Avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-2); }
.avatar-sm { width: 32px; height: 32px; } .avatar-md { width: 48px; height: 48px; } .avatar-lg { width: 72px; height: 72px; } .avatar-xl { width: 96px; height: 96px; }
.avatar-initials { display: inline-grid; place-items: center; font: 700 .8rem var(--font-head); color: #fff; background: linear-gradient(135deg, #2b2f38, #15171C); }
.avatar-md.avatar-initials { font-size: 1rem; } .avatar-lg.avatar-initials { font-size: 1.4rem; } .avatar-xl.avatar-initials { font-size: 1.8rem; }
.verified { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; vertical-align: middle; }

/* ---------- Membership card (stays metallic — it's an object) ---------- */
.mcard-wrap { perspective: 1200px; max-width: 440px; }
.mcard { --c1: #2a2f3a; --c2: #12151c; --hl: #C9CDD4;
  position: relative; aspect-ratio: 1.586; border-radius: 20px; padding: 18px; overflow: hidden; color: #fff;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,.16), transparent 50%), linear-gradient(135deg, var(--c1), var(--c2));
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 60px -25px rgba(21,23,28,.55), inset 0 1px 0 rgba(255,255,255,.14);
  display: flex; flex-direction: column; justify-content: space-between;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s var(--ease); transform-style: preserve-3d; }
.mcard-rider { --c1: #3b4250; --c2: #171a21; --hl: #E5E7EB; }
.mcard-captain { --c1: #7a1620; --c2: #1d0a0d; --hl: #FCA5A5; }
.mcard-elite, .mcard-founder { --c1: #3a2f18; --c2: #0e0c08; --hl: #E2C27A; border-color: rgba(226,194,122,.5); }
.mcard.is-pending { filter: grayscale(.7); }
.mcard-shine { position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.2), transparent 40%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.mcard-wrap:hover .mcard-shine { opacity: 1; }
.mcard-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mcard-line path { fill: none; stroke: var(--hl); stroke-width: 1.5; opacity: .3; }
.mcard-top, .mcard-mid, .mcard-bottom { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; }
.mcard-top { justify-content: space-between; }
.mcard-brand { display: flex; align-items: center; gap: 8px; font: 700 .76rem var(--font-head); letter-spacing: .2em; }
.mcard-brand img { border-radius: 50%; }
.mcard-tier { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--hl) 50%, transparent); color: var(--hl); font: 600 .66rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; background: rgba(0,0,0,.25); white-space: nowrap; }
.mcard-avatar .avatar { border: 2px solid color-mix(in srgb, var(--hl) 60%, transparent); width: 54px; height: 54px; }
.mcard-name { display: grid; line-height: 1.25; min-width: 0; }
.mcard-name strong { font: 600 1.1rem var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.mcard-name span { color: rgba(255,255,255,.65); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard-name .mcard-bike { color: var(--hl); }
.mcard-bottom { justify-content: space-between; align-items: flex-end; }
.mcard-fields { display: flex; gap: 14px; min-width: 0; }
.mcard-fields small { display: block; font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.mcard-fields b { font: 600 .85rem var(--font-head); letter-spacing: .05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mcard-qr { width: 54px; height: 54px; padding: 4px; background: #fff; border-radius: 8px; flex-shrink: 0; }
.mcard-qr svg, .mcard-qr img { width: 100%; height: 100%; }

/* ---------- Account ---------- */
.account-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); overflow-x: auto; max-width: 100%; }
.tabs a { padding: 8px 16px; border-radius: 999px; color: var(--text-2); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.tabs a.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.account-grid { display: grid; gap: 22px; margin-top: 8px; }
.account-card-col { display: grid; gap: 16px; align-content: start; }
.tier-card .tier-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.tier-card b.tier-text { font-size: 1.3rem; font-family: var(--font-head); }
.tier-stats { display: flex; gap: 18px; text-align: right; }
.tier-stats b { display: block; font: 700 1.4rem var(--font-head); }
.tier-stats small { color: var(--text-3); font-size: .75rem; }
.progress { height: 7px; border-radius: 7px; background: var(--bg-2); overflow: hidden; margin-bottom: 8px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #FF7A59); border-radius: 7px; }
.identity { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.row-list { list-style: none; padding: 0; margin: 0; display: grid; }
.row-list li + li { border-top: 1px solid var(--border); }
.row-list a { display: flex; align-items: center; gap: 12px; padding: 12px 4px; color: var(--text); }
.row-list a:hover b { color: var(--accent); }
.row-list b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-list small { display: block; font-size: .85rem; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notif-list li { display: flex; justify-content: space-between; gap: 12px; padding-left: 14px; position: relative; font-size: .95rem; }
.notif-list li.unread::before, .notif-feed li.unread::before { content: ''; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.notif-feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.notif-feed li { position: relative; display: flex; gap: 14px; align-items: flex-start; }
.notif-feed li.unread { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.notif-feed li.unread::before { left: 8px; top: 8px; }
.notif-feed p { margin: 4px 0; font-size: .95rem; }
.notif-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.toolbar-end { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--info-bg); border: 1px solid var(--info-bd); margin-bottom: 16px; font-size: .95rem; color: var(--info-fg); }
.notice .icon { margin-top: 2px; }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.notice-danger { background: var(--danger-bg); border-color: var(--danger-bd); color: var(--danger-fg); }
.notice a { color: inherit; text-decoration: underline; font-weight: 600; }
.settings-layout { display: grid; gap: 18px; }
.settings-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.settings-nav a { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: .875rem; color: var(--text-2); }
.settings-nav a:hover { color: var(--accent); }
.avatar-edit { display: flex; gap: 18px; align-items: center; }
.file-btn { cursor: pointer; }

/* ---------- Community ---------- */
.principles { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.principle { margin: 0 !important; }
.principle .icon { color: var(--accent); margin-bottom: 12px; }
.principle h3 { font-size: 1.05rem; margin-bottom: 6px; }
.principle p { margin: 0; font-size: .88rem; }
.community-grid { display: grid; gap: 16px; }
.community-grid .card { margin: 0; }
.leaderboard { list-style: none; padding: 0; margin: 0; }
.leaderboard li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.leaderboard li:last-child { border-bottom: 0; }
.leaderboard .rank { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font: 700 .85rem var(--font-head); color: var(--text-2); background: var(--bg-2); }
.leaderboard .top-1 .rank { background: var(--gold); color: #fff; }
.leaderboard .top-2 .rank { background: #94A3B8; color: #fff; }
.leaderboard .top-3 .rank { background: #B87333; color: #fff; }
.leader-who { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.leader-who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.leader-num { text-align: right; min-width: 48px; }
.leader-num b { display: block; font: 700 1.05rem var(--font-head); font-variant-numeric: tabular-nums; }
.leader-num small { color: var(--text-3); font-size: .7rem; }
.tier-ladder { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; }
.tier-ladder li { display: flex; gap: 12px; align-items: center; }
.tier-ladder b { display: block; color: var(--text); }
.tier-dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.members-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.member-tile { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 20px 10px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); transition: .3s var(--ease); height: 100%; }
.member-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.member-tile .avatar { margin-bottom: 8px; }
.member-tile b { font-size: .95rem; }
.member-tile small { font-size: .8rem; }
.member-tile .bike { color: var(--text-2); }
.rider-layout { display: grid; gap: 26px; }
.rider-stats { list-style: none; padding: 0; margin: 20px 0; display: flex; gap: 26px; flex-wrap: wrap; }
.rider-stats b { display: block; font: 700 2rem var(--font-head); }
.rider-stats small { color: var(--text-2); }
.progress-block { max-width: 420px; margin: 18px 0; }
.arch-inline { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); margin: 16px 0; }
.arch-inline .sigil { width: 52px; height: 52px; flex-shrink: 0; }
.arch-inline .sigil .dot { fill: currentColor; }
.arch-inline b { display: block; font-family: var(--font-head); }
.arch-inline small { color: var(--text-2); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 20px; }
.contact-info { display: grid; gap: 12px; align-content: start; }
.contact-item { display: flex; gap: 14px; align-items: center; margin: 0 !important; }
.contact-item .icon { color: var(--accent); }
.contact-item small { display: block; color: var(--text-3); font-size: .8rem; }
.contact-item b { word-break: break-all; }

/* ---------- Empty / error ---------- */
.empty-state { text-align: center; padding: 44px 20px; border: 1.5px dashed var(--border-2); border-radius: var(--r-xl); background: var(--card-2); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p { max-width: 460px; margin: 0 auto 18px; }
.error-page { padding: 90px 0 70px; text-align: center; }
.error-line { width: 100%; max-width: 600px; margin: 0 auto; }
.error-line path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2s var(--ease) forwards; }
.error-code { font: 700 clamp(4rem, 18vw, 8rem)/1 var(--font-head); letter-spacing: -.04em; margin: -40px 0 0; color: rgba(21,23,28,.08); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 78px; right: 12px; left: 12px; z-index: 250; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; max-width: 440px; width: 100%; padding: 14px 14px 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); animation: toastIn .4s var(--ease); border-left: 4px solid var(--info); font-size: .95rem; color: var(--text); }
.toast-success { border-left-color: var(--ok); } .toast-error { border-left-color: var(--danger); } .toast-info { border-left-color: var(--info); }
.toast span { flex: 1; }
.toast-close { background: none; border: 0; color: var(--text-3); padding: 2px; }
.toast.hide { opacity: 0; transform: translateX(20px); transition: .3s; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #C9CCD3; margin-top: 40px; padding-top: 46px; }
.site-footer .brand-word { color: #fff; }
.site-footer .muted { color: #9DA1AA; }
.footer-grid { display: grid; gap: 30px; padding-bottom: 34px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand .brand img { width: 52px; height: 52px; }
.footer-brand p { max-width: 340px; font-size: .95rem; }
.footer-title { font: 700 .76rem var(--font-head); text-transform: uppercase; letter-spacing: .2em; color: #fff; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.footer-links a { color: #C9CCD3; } .footer-links a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: center; word-break: break-word; }
.footer-contact .icon { color: var(--accent); }
.footer-cta p { font-size: .95rem; }
.site-footer .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.site-footer .btn-ghost:hover { background: rgba(255,255,255,.08); }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); color: #C9CCD3; transition: .2s; }
.socials a:hover { color: #fff; border-color: var(--accent); background: rgba(229,37,53,.2); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px var(--gutter) 28px; border-top: 1px solid rgba(255,255,255,.1); color: #868B95; font-size: .85rem; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a:hover { color: #fff; }

/* ---------- Motion ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.js-reveal .reveal.now { transition: none; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scroll { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes sigilIn { from { opacity: 0; transform: scale(.6) rotate(-30deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes grow { from { width: 0; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(229,37,53,.35); } 100% { box-shadow: 0 0 0 12px rgba(229,37,53,0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-scene .racing { stroke-dashoffset: 0; }
}

/* ---------- Mobile-first breakpoints ---------- */
@media (max-width: 1023px) {
  :root { --bottom-nav-h: 64px; }
  .toasts { top: 74px; }
}
@media (min-width: 400px) {
  .init-card { padding: 26px 22px; }
}
@media (min-width: 480px) {
  .hide-xs { display: inline-flex !important; }
  .members-grid { grid-template-columns: repeat(3, 1fr); }
  .media-strip { grid-template-columns: repeat(3, 1fr); }
  .wall { grid-template-columns: repeat(3, 1fr); }
  .wall-preview { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .hide-sm { display: inline-flex !important; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .leader-row { grid-template-columns: repeat(2, 1fr); }
  .toasts { left: auto; }
  .auth-card { padding: 34px 30px; }
  .mcard { padding: 22px; }
  .mcard-avatar .avatar { width: 66px; height: 66px; }
  .mcard-qr { width: 64px; height: 64px; }
  .init-card { padding: 32px 30px; }
  .q-opts { grid-template-columns: 1fr 1fr; }
  .arch-card { padding: 44px 34px 34px; }
  .init-side { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .members-grid { grid-template-columns: repeat(4, 1fr); }
  .principles { grid-template-columns: repeat(4, 1fr); }
  .next-event { grid-template-columns: 1.1fr 1fr; }
  .next-media { min-height: 100%; }
  .next-body { padding: 34px; }
  .about-grid { grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
  .contact-grid { grid-template-columns: 1.4fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .community-grid { grid-template-columns: 1.6fr 1fr; }
  .section { padding: 80px 0; }
  .masonry { columns: 3 220px; }
  .rider-layout { grid-template-columns: minmax(320px, 440px) 1fr; gap: 48px; }
  .hide-desktop { display: none !important; }
  .wall { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .hero { padding: 64px 0 80px; }
  .members-hero { padding: 56px 0 40px; }
}
@media (min-width: 1024px) {
  .main-nav { display: block; }
  .nav-toggle, .bottom-nav { display: none; }
  .header-actions { margin-left: 8px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .event-layout { grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
  .about-layout { grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
  .account-grid { grid-template-columns: 420px 1fr; gap: 32px; align-items: start; }
  .account-card-col { position: sticky; top: calc(var(--header-h) + 16px); }
  .settings-layout { grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
  .settings-nav { flex-direction: column; position: sticky; top: calc(var(--header-h) + 16px); }
  .settings-nav a { border: 0; background: none; border-radius: var(--r-sm); }
  .settings-nav a:hover { background: var(--hover); }
  .leader-row { grid-template-columns: repeat(5, 1fr); }
  .leader-chip { flex-direction: column; text-align: center; padding: 20px 12px; }
  .leader-chip .rank { width: auto; }
  .media-strip { grid-template-columns: repeat(4, 1fr); }
  .masonry { columns: 4 220px; }
  .wall { grid-template-columns: repeat(5, 1fr); }
  .wall-preview { grid-template-columns: repeat(8, 1fr); }
  .hero-scroll { display: block; position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); width: 24px; height: 40px; border: 1.5px solid rgba(21,23,28,.3); border-radius: 14px; }
  .hero-scroll span { position: absolute; top: 8px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; animation: scroll 1.8s infinite; }
  .seal { right: 2%; width: 620px; height: 620px; }
}
@media (min-width: 1440px) { :root { --container: 1320px; } }
@media (min-width: 1920px) { :root { --container: 1480px; } html { font-size: 17px; } }
.is-bad { border-color: var(--danger) !important; box-shadow: 0 0 0 4px rgba(220,38,38,.1) !important; }
.file-hide { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-btn { position: relative; overflow: hidden; }

/* ---------- Wallet (full-screen membership card) ---------- */
.mcard-wrap[data-tilt] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mcard-wrap[data-tilt]:active .mcard { transform: scale(.98); }
.wallet { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 20px 16px; background: rgba(12,13,16,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn .25s var(--ease); overflow-y: auto; }
.wallet-inner { width: 100%; max-width: 460px; display: grid; gap: 18px; justify-items: center; animation: walletIn .45s var(--ease); }
.wallet-inner .mcard { width: 100%; }
.wallet-qr { width: 200px; height: 200px; padding: 14px; background: #fff; border-radius: 20px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.wallet-qr svg { width: 100%; height: 100%; }
.wallet-note { color: #C9CCD3; font-size: .9rem; margin: 0; text-align: center; }
.wallet-close { position: fixed; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font-size: 1.2rem; }
@keyframes walletIn { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- Touch devices: no sticky hover states, instant taps ---------- */
html { touch-action: manipulation; }
a, button, label, .q-opt { -webkit-tap-highlight-color: rgba(229,37,53,.12); }
@media (hover: none) {
  .event-card:hover, .news-card:hover, .album-card:hover, .member-tile:hover, .wcard:hover { transform: none; box-shadow: var(--shadow-sm); }
  .event-card:hover .event-card-media img, .news-card:hover .news-card-media img, .wcard:hover .wcard-top img, .media-tile:hover img, .masonry-item:hover img { transform: none; }
  .event-card:active, .news-card:active, .album-card:active, .wcard:active, .member-tile:active { transform: scale(.98); }
}

@media (max-width: 480px) {
  .init-progress { gap: 4px; }
  .init-progress li { font-size: 0; gap: 0; }
  .init-progress li::before { height: 6px; }
  .init-progress { margin-bottom: 12px; }
  .init-step-head h2 { font-size: 1.2rem; }
  .q-card { padding: 14px 12px; }
  .q-card h3 { font-size: .98rem; }
  .init-nav .btn { padding: 0 14px; }
}

.mcard-role { color: var(--hl) !important; font: 600 .7rem var(--font-head) !important; letter-spacing: .14em; text-transform: uppercase; }

/* small-phone fixes */
.account-grid > *, .account-card-col > *, .rider-layout > *, .event-layout > *, .settings-layout > * { min-width: 0; }
.mcard-wrap { width: 100%; }
.brand { min-width: 0; }
.brand-word { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1023px) {
  /* zəng telefonda da başlıqda görünür (çat ikonunun yanında) */
  .user-btn { padding: 3px; }
}
@media (max-width: 400px) {
  .brand-word { font-size: .9rem; letter-spacing: .12em; }
  .brand img { width: 38px; height: 38px; }
  .init-step-head { align-items: flex-start; }
  .init-step-head .num { width: 34px; height: 34px; border-radius: 10px; }
  .mcard { padding: 14px; }
  .mcard-fields { gap: 10px; }
  .mcard-fields b { font-size: .78rem; }
  .mcard-avatar .avatar { width: 46px; height: 46px; }
  .mcard-qr { width: 46px; height: 46px; }
  .mcard-name strong { font-size: 1rem; }
}

/* v1.8 — header fits 8 menu items on small laptops */
.main-nav a { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .main-nav a { padding: 8px 9px; font-size: .88rem; }
}
@media (min-width: 1024px) and (max-width: 1199px) { .brand-word { display: none; } }

/* v1.9 — Home: route planner teaser (right under the hero) */
.section-route { padding-top: clamp(26px, 5vw, 56px); padding-bottom: clamp(18px, 3vw, 30px); position: relative; z-index: 2; }
.hroute { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: clamp(20px, 4vw, 40px); border-radius: 30px; overflow: hidden; color: #fff;
  background: radial-gradient(90% 120% at 0% 0%, rgba(229,37,53,.28), transparent 55%), radial-gradient(70% 90% at 100% 100%, rgba(37,99,235,.18), transparent 60%), #15171C;
  box-shadow: 0 30px 70px -34px rgba(21,23,28,.75); isolation: isolate; }
.hroute::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .07; background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hroute-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: #fff; }
.hroute-live { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: hrLive 1.8s infinite; }
@keyframes hrLive { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.hroute h2 { margin: 0; font-size: clamp(1.75rem, 5.2vw, 2.9rem); line-height: 1.05; letter-spacing: -.03em; color: #fff; }
.hroute h2 span { color: transparent; background: linear-gradient(90deg, #FF6B76, #FFB86B); -webkit-background-clip: text; background-clip: text; }
.hroute-lead { margin: 12px 0 18px; color: rgba(255,255,255,.72); font-size: clamp(.93rem, 2.4vw, 1.05rem); max-width: 54ch; }
.hroute > * { min-width: 0; }
.hroute-form { display: grid; gap: 8px; }
.hroute-in { position: relative; display: flex; align-items: center; min-width: 0; }
.hroute-in span { position: absolute; left: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 .78rem var(--font-head); color: #fff; background: #16A34A; border: 2px solid rgba(255,255,255,.9); pointer-events: none; }
.hroute-in.b span { background: var(--accent); }
.hroute .hroute-in input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]) { width: 100%; height: 52px; min-height: 52px; padding: 0 14px 0 48px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); color: #fff; font: 600 1rem var(--font-body); box-shadow: none; }
.hroute .hroute-in input::placeholder { color: rgba(255,255,255,.45); font-weight: 500; }
.hroute .hroute-in input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]):focus { outline: 0; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.12); }
.hroute-go { height: 52px; border-radius: 16px; font-size: 1rem; justify-content: center; box-shadow: 0 14px 30px -14px var(--accent); }
.hroute-pop { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 14px calc(-1 * clamp(20px, 4vw, 40px)) 0; padding: 2px clamp(20px, 4vw, 40px) 4px; }
.hroute-pop::-webkit-scrollbar { display: none; }
.hroute-pop a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; font-weight: 600; font-size: .86rem; white-space: nowrap; transition: .18s var(--ease); }
.hroute-pop a:hover { background: #fff; color: #15171C; transform: translateY(-1px); }

.hroute-art { position: relative; display: block; border-radius: 24px; overflow: hidden; color: #fff; min-height: 240px; transition: transform .3s var(--ease); }
.hroute-art:hover { transform: translateY(-3px); }
.hroute-art svg { display: block; width: 100%; height: 100%; }
.hr-road-bg { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round; opacity: .14; }
.hr-road { fill: none; stroke: #22C55E; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: hrDraw 2.4s .3s var(--ease) forwards; }
.hroute.has-wx .hr-road { stroke: #22C55E; }
@keyframes hrDraw { to { stroke-dashoffset: 0; } }
.hr-moto { fill: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.8)); }
.hr-pin text { fill: #fff; font: 800 13px var(--font-head); }
.hr-chip { position: absolute; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px 6px 8px; border-radius: 99px; background: #fff; color: #15171C; font-size: .78rem; box-shadow: 0 10px 22px -10px rgba(0,0,0,.7); border: 2px solid #fff; animation: hrPop .5s var(--ease) both; white-space: nowrap; }
.hr-chip b { font-weight: 700; } .hr-chip i { font-style: normal; } .hr-chip em { font-style: normal; font-weight: 800; font-family: var(--font-head); }
.hr-chip.ok { border-color: #22C55E; } .hr-chip.caution { border-color: #F59E0B; } .hr-chip.danger { border-color: #EF4444; }
.hr-chip.c1 { right: 6%; bottom: 25%; animation-delay: .9s; }
.hr-chip.c2 { left: 44%; top: 47%; animation-delay: 1.5s; }
.hr-chip.c3 { left: 5%; top: 7%; animation-delay: 2.1s; }
@keyframes hrPop { from { opacity: 0; transform: translateY(8px) scale(.9); } }
.hr-stats { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; }
.hr-stats > span { padding: 6px 10px; border-radius: 12px; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12); line-height: 1.15; }
.hr-stats small { display: block; font-size: .62rem; color: rgba(255,255,255,.6); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.hr-stats b { font: 700 .9rem var(--font-head); }
.hr-score.ok b { color: #4ADE80; } .hr-score.caution b { color: #FBBF24; } .hr-score.danger b { color: #F87171; }
.hr-cta { position: absolute; right: 12px; top: 12px; padding: 6px 12px; border-radius: 99px; background: var(--accent); font-size: .78rem; font-weight: 700; box-shadow: 0 8px 18px -8px var(--accent); }
@media (min-width: 640px) {
  .hroute-form { grid-template-columns: 1fr 1fr auto; }
}
@media (min-width: 1024px) {
  .hroute { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 36px; }
  .hroute-form { grid-template-columns: 1fr 1fr; }
  .hroute-go { grid-column: 1 / -1; }
  .hroute-pop { flex-wrap: wrap; overflow: visible; margin: 14px 0 0; padding: 0; }
  .hroute-art { min-height: 340px; }
}
.hero-route-btn { backdrop-filter: blur(6px); }
@media (prefers-reduced-motion: reduce) { .hr-road { animation: none; stroke-dashoffset: 0; } .hr-chip, .hroute-live { animation: none; } .hr-moto { display: none; } }

/* ==========================================================================
   Ad günləri (v1.9)
   ========================================================================== */
.section-bday { padding: 28px 0 0; }
.bday { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px 22px; padding: 22px 26px; border-radius: var(--r-xl); background: linear-gradient(120deg, #15171C 0%, #2A1418 60%, #4A1219 100%); color: #fff; box-shadow: var(--shadow); }
.bday-cake { font-size: 3rem; line-height: 1; filter: drop-shadow(0 6px 14px rgba(229,37,53,.45)); animation: bdayBob 2.6s var(--ease) infinite; }
.bday-body { min-width: 0; position: relative; z-index: 1; }
.bday-kicker { margin: 0 0 4px; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #FF8A94; }
.bday-title { margin: 0; font-family: var(--font-head); font-size: clamp(1.3rem, 3.6vw, 2rem); line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.bday-title a { color: #fff; text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 3px; background-position: 0 100%; background-repeat: no-repeat; }
.bday-title a:hover { color: #FFD1D5; }
.bday-text { margin: 6px 0 0; color: #C9CCD3; font-size: .95rem; }
.bday-people { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.bday-person { display: grid; justify-items: center; gap: 4px; color: #fff; text-decoration: none; font-size: .78rem; }
.bday-person .avatar { box-shadow: 0 0 0 3px var(--accent), 0 0 0 5px rgba(255,255,255,.15); }
.bday-person span { color: #C9CCD3; } .bday-person b { color: #fff; }
.bday-confetti { position: absolute; inset: 0; pointer-events: none; }
.bday-confetti i { position: absolute; top: -12px; left: calc(var(--i) * 7.2% + 2%); width: 7px; height: 12px; border-radius: 2px; background: hsl(calc(var(--i) * 47), 85%, 62%); opacity: .75; animation: bdayFall calc(5s + var(--i) * .35s) linear infinite; animation-delay: calc(var(--i) * -.7s); }
@keyframes bdayFall { to { transform: translateY(260px) rotate(540deg); } }
@keyframes bdayBob { 50% { transform: translateY(-5px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .bday-cake, .bday-confetti i { animation: none; } .bday-confetti { display: none; } }
@media (max-width: 720px) {
  .bday { grid-template-columns: auto 1fr; padding: 18px; gap: 12px 14px; }
  .bday-cake { font-size: 2.3rem; }
  .bday-people { grid-column: 1 / -1; }
}
.bday-badge { display: inline-block; margin: 6px 0 10px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .9rem; }
.notice-bday { background: linear-gradient(120deg, #FFF1F2, var(--warn-bg)); border-color: #F7C8CD; color: #7A1420; }
.notice-bday > span { font-size: 1.5rem; line-height: 1; }
.wcard-age { color: var(--accent) !important; font-weight: 600; }

/* ---------- v1.10: ad günü kartı, geri sayım, paylaşım ---------- */
.bday.is-link { cursor: pointer; }
.bday-cover { position: absolute; inset: 0; z-index: 1; }
.bday-body .bday-title a, .bday-people, .bday-actions { position: relative; z-index: 2; }
.bday-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bday-act { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.bday-actions em { font-style: normal; background: rgba(255,255,255,.22); border-radius: 999px; padding: 1px 8px; font-size: .8rem; margin-left: 2px; }
.btn-ghost-dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.btn-ghost-dark:hover { background: rgba(255,255,255,.16); color: #fff; }
.bday .bday-person .avatar { width: 64px; height: 64px; }

.bsoon { margin-top: 18px; padding: 18px 20px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.bsoon-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 14px; }
.bsoon-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.01em; }
.bsoon-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: thin; }
.bsoon-card { position: relative; scroll-snap-align: start; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card-2); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; min-width: 0; }
.bsoon-card:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.bsoon-card.is-near { background: linear-gradient(120deg, #FFF1F2, #FFF8EC); border-color: #F7C8CD; }
.bsoon-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.bsoon-ring { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--border) 0); }
.bsoon-ring .avatar { width: 50px; height: 50px; box-shadow: 0 0 0 3px var(--card-2); }
.bsoon-card.is-near .bsoon-ring .avatar { box-shadow: 0 0 0 3px #FFF4F0; }
.bsoon-info { display: grid; gap: 1px; min-width: 0; flex: 1; }
.bsoon-info b { font-family: var(--font-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsoon-when { color: var(--accent); font-weight: 700; font-size: .92rem; }
.bsoon-info small { color: var(--text-3); }
.bsoon-share { position: relative; z-index: 2; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--card); color: var(--text); cursor: pointer; }
.bsoon-share:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* birthday page */
.bdp-hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #15171C 0%, #2A1418 60%, #56101B 100%); color: #fff; padding: 34px 0 44px; }
.bdp-hero .crumbs, .bdp-hero .crumbs a { color: #A7ABB4; }
.bdp-hero .bday-confetti i { animation-duration: calc(7s + var(--i) * .4s); }
@keyframes bdayFallTall { to { transform: translateY(720px) rotate(720deg); } }
.bdp-hero .bday-confetti i { animation-name: bdayFallTall; left: calc(var(--i) * 5.5% + 1%); }
.bdp-hero.is-soon .bday-confetti { opacity: .45; }
.bdp-grid { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; gap: 26px 44px; align-items: center; }
.bdp-avatar { position: relative; display: grid; place-items: center; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, rgba(229,37,53,.45), rgba(229,37,53,0) 70%); }
.bdp-avatar .avatar { width: 200px; height: 200px; font-size: 3.4rem; box-shadow: 0 0 0 6px #15171C, 0 0 0 11px var(--accent), 0 24px 60px -10px rgba(229,37,53,.6); }
.bdp-pill { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 7px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .95rem; box-shadow: 0 8px 20px -6px rgba(0,0,0,.5); }
.is-today .bdp-avatar { animation: bdayBob 3s var(--ease) infinite; }
.bdp-name { color: #fff; margin: 2px 0 8px; font-family: var(--font-head); font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; }
.bdp-age { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.bdp-age > b { font-family: var(--font-head); font-size: clamp(3rem, 9vw, 4.6rem); line-height: .9; color: var(--accent); }
.bdp-age span { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
.bdp-age small { font-family: var(--font-body); font-weight: 400; color: #C9CCD3; font-size: .95rem; }
.bdp-countdown { margin: 0 0 18px; max-width: 380px; }
.bdp-countdown > div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); color: #fff; }
.bdp-countdown small { color: #A7ABB4; }
.bdp-wish-big { margin: 0 0 18px; font-size: 1.1rem; color: #E6E7EA; }
.bdp-wish-big a { color: #FF8A94; font-weight: 600; }
.bdp-share { display: flex; flex-wrap: wrap; gap: 8px; }
.bdp-wa { background: #25D366; color: #08341A; border-color: #25D366; font-weight: 600; }
.bdp-wa:hover { background: #1FBE5B; color: #08341A; }
.bdp-tg { background: #2AABEE; color: #fff; border-color: #2AABEE; font-weight: 600; }
.bdp-tg:hover { background: #1E96D6; color: #fff; }
.bdp-downloads { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: .9rem; }
.bdp-downloads a { display: inline-flex; align-items: center; gap: 6px; color: #C9CCD3; }
.bdp-downloads a:hover { color: #fff; }
.bdp-count { display: inline-grid; place-items: center; min-width: 1.6em; padding: 0 .35em; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .55em; vertical-align: middle; }
.bdp-form { display: grid; gap: 12px; margin-bottom: 22px; }
.bdp-form-head { display: flex; align-items: center; gap: 10px; }
.bdp-form textarea { width: 100%; }
.bdp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bdp-chips button { border: 1px solid var(--border-2); background: var(--card-2); border-radius: 999px; padding: 6px 12px; font-size: .85rem; cursor: pointer; color: var(--text); }
.bdp-chips button:hover { border-color: var(--accent); color: var(--accent); }
.bdp-form .btn { justify-self: start; }
.bdp-wishes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.bdp-wish { display: flex; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.bdp-wish > div { min-width: 0; flex: 1; }
.bdp-wish-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.bdp-wish-head a { color: var(--text); }
.bdp-wish-head form { margin-left: auto; }
.bdp-wish p { margin: 4px 0 0; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .bdp-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .bdp-body { width: 100%; }
  .bdp-hero .crumbs { justify-content: center; }
  .bdp-age, .bdp-share, .bdp-downloads { justify-content: center; }
  .bdp-countdown { margin: 0 auto 18px; }
  .bdp-avatar { width: 210px; height: 210px; }
  .bdp-avatar .avatar { width: 168px; height: 168px; }
  .bsoon { padding: 14px; }
  .bsoon-row { grid-auto-columns: 82%; }
}

/* ==========================================================================
   GECƏ REJİMİ (v1.11) — html[data-theme="dark"]
   ========================================================================== */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1115;
  --bg-2: #15181E;
  --card: #171A20;
  --card-2: #1C2027;
  --surface: #1C2027;
  --glass: rgba(26,29,36,.9);
  --text: #ECEDF0;
  --text-1: #D5D8DE;
  --text-2: #A6ABB5;
  --text-3: #7C818C;
  --border: #272B33;
  --border-2: #363B45;
  --ink: #ECEDF0;
  --on-ink: #15171C;
  --dark: #181B21;
  --hover: rgba(255,255,255,.06);
  --accent-soft: rgba(229,37,53,.16);
  --gold: #D6AE58;
  --map-bg: #1A1D22;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.25);
  --shadow: 0 12px 34px -14px rgba(0,0,0,.7);
  --shadow-lg: 0 28px 60px -24px rgba(0,0,0,.8);
  --info-bg: rgba(59,130,246,.13); --info-bd: rgba(96,140,250,.32); --info-fg: #AFC8FF;
  --warn-bg: rgba(217,119,6,.14); --warn-bd: rgba(245,180,80,.32); --warn-fg: #F6CB86;
  --danger-bg: rgba(220,38,38,.15); --danger-bd: rgba(248,113,113,.32); --danger-fg: #FCA5A5;
  --ok-bg: rgba(22,163,74,.15); --ok-bd: rgba(74,222,128,.28); --ok-fg: #86EFAC;
}
html[data-theme="dark"] img.avatar, html[data-theme="dark"] .pcard-img img, html[data-theme="dark"] .ecard-media img { filter: brightness(.94); }

/* buttons */
html[data-theme="dark"] .btn-dark:hover { background: #fff; }
html[data-theme="dark"] .btn-ghost:hover { border-color: #4A505C; }
html[data-theme="dark"] .btn-danger { border-color: rgba(248,113,113,.35); color: #FCA5A5; }

/* hero: a night ride — moon, dark mountains */
html[data-theme="dark"] .hero-bg { background: linear-gradient(180deg, #0B0D12 0%, #121521 40%, #1D1626 70%, #2A1620 100%); }
html[data-theme="dark"] .hero-scene .sun { fill: #F1E7D0; opacity: .9; filter: drop-shadow(0 0 40px rgba(241,231,208,.35)); }
html[data-theme="dark"] .hero-scene .m1 { fill: #241C2A; } html[data-theme="dark"] .hero-scene .m2 { fill: #1B1620; } html[data-theme="dark"] .hero-scene .m3 { fill: #131017; }
html[data-theme="dark"] .hero-scene .road { fill: #07080B; } html[data-theme="dark"] .hero-scene .road-line { stroke: #F5C77E; opacity: .7; }
html[data-theme="dark"] .hero.has-media .hero-bg::after { background: linear-gradient(90deg, rgba(12,13,17,.92) 0%, rgba(12,13,17,.74) 42%, rgba(12,13,17,.12) 100%); }
html[data-theme="dark"] .seal { color: rgba(255,255,255,.1); } html[data-theme="dark"] .seal text { fill: rgba(255,255,255,.3); }
html[data-theme="dark"] .hero-proof .avatars > * { border-color: #1B1E25; }
html[data-theme="dark"] .hero-scroll { border-color: rgba(255,255,255,.3); }
html[data-theme="dark"] .page-hero, html[data-theme="dark"] .event-hero { background: radial-gradient(70% 140% at 100% 0%, rgba(229,37,53,.14), transparent 60%); }
html[data-theme="dark"] .cover-fallback { background: linear-gradient(160deg, #1E1A22, #2A1B21 60%, #3A1A20); }
html[data-theme="dark"] .error-code { color: rgba(255,255,255,.06); }

/* dark sections stay dark but get an edge so they don't melt into the page */
html[data-theme="dark"] .section-stats, html[data-theme="dark"] .members-hero { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
html[data-theme="dark"] .cta-box, html[data-theme="dark"] .oath, html[data-theme="dark"] .hroute, html[data-theme="dark"] .home-map, html[data-theme="dark"] .bday, html[data-theme="dark"] .rp-sum { box-shadow: 0 0 0 1px var(--border), var(--shadow-lg); }
html[data-theme="dark"] .site-footer { background: #0B0C10; border-top: 1px solid var(--border); }
html[data-theme="dark"] .section-white { background: var(--bg-2); }
html[data-theme="dark"] .bdp-hero { border-bottom: 1px solid var(--border); }

/* status colours with enough contrast on dark */
html[data-theme="dark"] .pill-open, html[data-theme="dark"] .joined, html[data-theme="dark"] .diff-easy, html[data-theme="dark"] .badge-ok, html[data-theme="dark"] .status-published { color: #86EFAC !important; }
html[data-theme="dark"] .pill-full, html[data-theme="dark"] .pill-cancelled, html[data-theme="dark"] .diff-hard, html[data-theme="dark"] .badge-bad, html[data-theme="dark"] .flag, html[data-theme="dark"] .status-cancelled { color: #FCA5A5 !important; }
html[data-theme="dark"] .pill-closed, html[data-theme="dark"] .diff-medium, html[data-theme="dark"] .badge-warn, html[data-theme="dark"] .plist-rate, html[data-theme="dark"] .pcard-rate, html[data-theme="dark"] .pv-rate, html[data-theme="dark"] .star-input .star-hint.on { color: #FBBF24 !important; }
html[data-theme="dark"] .pill-not_open, html[data-theme="dark"] .joined.wait { color: #93C5FD !important; }
html[data-theme="dark"] .tier-rider { color: #CBD5E1; } html[data-theme="dark"] .tier-rookie { color: #9CA3AF; } html[data-theme="dark"] .tier-captain { color: #F87171; }
html[data-theme="dark"] .role-badge { filter: brightness(1.25); }

/* member wall */
html[data-theme="dark"] .wcard-top { background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 30%, #262A33), color-mix(in srgb, var(--rc) 40%, #0E1014)); }
html[data-theme="dark"] .wcard.locked .wcard-top { background: repeating-linear-gradient(135deg, #1A1D23 0 10px, #20242B 10px 20px); }

/* birthdays */
html[data-theme="dark"] .notice-bday, html[data-theme="dark"] .bsoon-card.is-near { background: linear-gradient(120deg, rgba(229,37,53,.16), rgba(245,180,80,.1)); border-color: rgba(229,37,53,.35); color: #FFD1D5; }
html[data-theme="dark"] .bsoon-card.is-near .bsoon-ring .avatar { box-shadow: 0 0 0 3px #261A1F; }
html[data-theme="dark"] .bday-badge { color: #FF8A94; }

/* places & route planner */
html[data-theme="dark"] .leaflet-container { background: var(--map-bg); }
html[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); }
html[data-theme="dark"] .leaflet-control-attribution { background: rgba(23,26,32,.85) !important; color: #9DA1AA; }
html[data-theme="dark"] .leaflet-control-attribution a { color: #C9CCD3; }
html[data-theme="dark"] .leaflet-bar a, html[data-theme="dark"] .leaflet-control-zoom a { background: var(--surface); color: var(--text); border-color: var(--border); }
html[data-theme="dark"] .leaflet-popup-content-wrapper, html[data-theme="dark"] .leaflet-popup-tip { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .rp-prof-area { fill: #2A2E37; }
html[data-theme="dark"] .stars { background: linear-gradient(90deg, #F59E0B var(--p), #3A3F4A var(--p)); }
html[data-theme="dark"] .star-input svg { fill: #3A3F4A; }
html[data-theme="dark"] .rp-legend .rp-k-e::before { background: #4A4F5A; }
html[data-theme="dark"] .serp { box-shadow: 0 0 0 1px var(--border); }

/* smooth switch between modes (only while switching) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .35s ease, border-color .35s ease, color .25s ease, fill .35s ease !important; }

/* ---------- theme switcher ---------- */
.theme-menu { position: relative; }
.theme-btn .icon { transition: transform .4s var(--ease); }
.theme-btn:hover .icon { transform: rotate(-20deg); }
.theme-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 120; width: 250px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; gap: 2px; animation: fadeIn .18s var(--ease); }
.theme-pop[hidden] { display: none; }
.theme-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; font-size: .93rem; }
.theme-opt:hover { background: var(--hover); }
.theme-opt .ti { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); font-size: 1.05rem; }
.theme-opt small { display: block; color: var(--text-3); font-size: .76rem; line-height: 1.3; }
.theme-opt[aria-checked="true"] { background: var(--accent-soft); }
.theme-opt[aria-checked="true"] .ti { background: var(--accent); }
.theme-opt[aria-checked="true"] b::after { content: ' ✓'; color: var(--accent); }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-card { position: relative; display: grid; gap: 8px; padding: 10px; border-radius: 16px; border: 2px solid var(--border); background: var(--card-2); cursor: pointer; text-align: center; font-size: .9rem; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-card small { color: var(--text-3); font-size: .74rem; line-height: 1.25; }
.theme-prev { height: 64px; border-radius: 10px; overflow: hidden; display: grid; grid-template-rows: 14px 1fr; border: 1px solid rgba(127,127,127,.25); }
.theme-prev i { display: block; } .theme-prev b { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px; }
.theme-prev b span { border-radius: 4px; }
.theme-prev.l { background: #F7F5F1; } .theme-prev.l i { background: #fff; border-bottom: 1px solid #E7E3DB; } .theme-prev.l b span { background: #fff; border: 1px solid #E7E3DB; } .theme-prev.l b span:first-child { background: #E52535; border: 0; }
.theme-prev.d { background: #0F1115; } .theme-prev.d i { background: #171A20; border-bottom: 1px solid #272B33; } .theme-prev.d b span { background: #1C2027; border: 1px solid #272B33; } .theme-prev.d b span:first-child { background: #E52535; border: 0; }
.theme-prev.a { background: linear-gradient(135deg, #F7F5F1 50%, #0F1115 50%); } .theme-prev.a i { background: linear-gradient(135deg, #fff 50%, #171A20 50%); } .theme-prev.a b span { background: rgba(127,127,127,.35); } .theme-prev.a b span:first-child { background: #E52535; }
.theme-now { margin: 10px 0 0; font-size: .85rem; color: var(--text-3); }
@media (max-width: 520px) { .theme-cards { gap: 6px; } .theme-card { padding: 8px 6px; } }

/* APEX Sprint — profil bloku */
/* profile block */
.rider-game { margin-top: 22px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); }
.rider-game h2 { margin: 0 0 10px; font-size: 1.15rem; }
.rider-game-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.rider-game-stats span { display: grid; font-size: .74rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.rider-game-stats b { font: 700 1.15rem var(--font-head); color: var(--text); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }

.rider-game-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rider-game-list li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.rider-game-list .res { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; font: 700 .75rem var(--font-head); background: var(--text-3); }
.rider-game-list .win .res { background: var(--ok); } .rider-game-list .loss .res { background: var(--accent); }
.rider-game-list small { margin-left: auto; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

.rider-game-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 8px; }
.rider-game-head h2 { margin: 0; }
.rider-lvl { font-size: .85rem; color: var(--text-2); } .rider-lvl b { color: var(--accent); }
.rider-bests { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rider-bests span { padding: 5px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); font-size: .82rem; }
.rider-psy { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rider-psy span { display: grid; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--gc) 14%, var(--card-2)); border: 1px solid color-mix(in srgb, var(--gc) 35%, var(--border)); font-weight: 700; font-size: .9rem; }
.rider-psy small { font-weight: 400; font-size: .7rem; color: var(--text-3); }
.rider-duel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rider-duel select { width: auto; min-height: 38px; }

/* Mobil tətbiq (Android/iOS): status bar altında başlıq, tətbiqdə «yüklə» düymələri gizli */
html[data-native-app] .site-header { padding-top: env(safe-area-inset-top); }
html[data-native-app] [data-install-wrap], html[data-native-app] [data-install-app] { display: none !important; }

/* ===================== Bildirişlər (siyahı + tam görünüş) ===================== */
.nf-count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 1rem; vertical-align: middle; }
.nf-bar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.nf-clear { color: var(--accent); }
.nf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nf-item { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 18px; transition: background .2s; }
.nf-item.unread { background: color-mix(in srgb, var(--accent) 6%, var(--card)); border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.nf-item.unread::after { content: ''; position: absolute; top: 18px; right: 46px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.nf-link { display: flex; gap: 12px; align-items: flex-start; padding: 14px 52px 14px 14px; color: inherit; text-decoration: none; }
.nf-link:active { background: var(--hover); border-radius: 18px; }
.nf-avatar { position: relative; flex-shrink: 0; width: 44px; height: 44px; }
.nf-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--border); }
.nf-avatar.lg { width: 56px; height: 56px; }
.nf-type { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; border: 2px solid var(--card); }
.nf-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.nf-src { font-size: .78rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-src b { color: var(--text-2); }
.nf-title { font-weight: 700; font-size: .98rem; line-height: 1.3; }
.nf-item:not(.unread) .nf-title { font-weight: 600; }
.nf-body { color: var(--text-2); font-size: .9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nf-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.nf-del { position: absolute; top: 8px; right: 8px; margin: 0; }
.nf-del button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; }
.nf-del button:hover, .nf-del button:active { background: var(--hover); color: var(--accent); }
.nf-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--text-2); font-weight: 600; }
.nf-full { padding: 20px; }
.nf-full-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.nf-full-head > div { display: grid; }
.nf-full-title { font-size: 1.45rem; margin: 0 0 12px; }
.nf-full-img { display: block; width: 100%; border-radius: 16px; margin: 0 0 14px; }
.nf-full-body { font-size: 1.02rem; line-height: 1.6; color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.nf-full-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.nf-full-actions form { margin: 0; }

/* ===================== Mobil cilalama (telefon / tətbiq) ===================== */
/* iPhone «home bar» olan cihazlarda alt menyu səhifənin sonunu örtməsin */
body { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
@media (max-width: 639px) {
  /* bölmələr arası boşluq telefonda daha yığcam */
  .section { padding: 40px 0; }
  .section-head { margin-bottom: 18px; }
  /* hero düymələri: eyni enli, barmaqla rahat basılan */
  .hero { padding: 32px 0 48px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .next-media { min-height: 180px; }
}
@media (max-width: 400px) {
  /* «APEX MOTO» adı kiçik ekranda «APEX M…» kimi kəsilməsin */
  .brand-word { letter-spacing: .06em; font-size: .88rem; }
  .header-actions { gap: 4px; }
}

/* ==========================================================================
   Profil: oyun nişanları və kubok
   ========================================================================== */
.rider-ach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rider-ach span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--border); font-size: .8rem; font-weight: 600; }
.rider-ach .tr { background: rgba(245,185,66,.18); border-color: rgba(245,185,66,.6); }
.badge-dot.dot-only { min-width: 10px; width: 10px; height: 10px; padding: 0; }


/* ==========================================================================
   Səhifələr arası rəvan keçid (Ana · Tədbirlər · Xəritə …)
   • Çrome/Android WebView 126+ və Safari/iOS 18.2+: səhifələr bir-birinə yumşaq keçir,
     başlıq və alt menyu yerində qalır (yanıb-sönmür).
   • Köhnə cihazlarda: ağ «yanıb-sönmə» olmasın deyə fon rəngi html-də də verilir + yüklənmə xətti.
   ========================================================================== */
html { background: var(--bg); }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
.site-header { view-transition-name: apex-header; }
.bottom-nav { view-transition-name: apex-bottom-nav; }
::view-transition-group(apex-header), ::view-transition-group(apex-bottom-nav),
::view-transition-old(apex-header), ::view-transition-new(apex-header),
::view-transition-old(apex-bottom-nav), ::view-transition-new(apex-bottom-nav) { animation: none; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
html::before { content: ''; position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 10000; background: var(--accent); pointer-events: none; opacity: 0; }
html.is-leaving::before { opacity: 1; animation: apexload 2.2s cubic-bezier(.1,.6,.2,1) forwards; }
@keyframes apexload { 0% { width: 0; } 30% { width: 45%; } 100% { width: 88%; } }
.bottom-nav a { -webkit-tap-highlight-color: transparent; }
.bottom-nav a:active .bn-ic { transform: scale(.9); }

/* ===== Qeydiyyat: istifadəçi adı göstərişi ===== */
.uname-hint { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; min-height: 1px; }
.uname-hint.is-free { color: #059669; }
.uname-hint.is-taken, .uname-hint.is-bad { color: #DC2626; }
html[data-theme="dark"] .uname-hint.is-free { color: #34D399; }
html[data-theme="dark"] .uname-hint.is-taken, html[data-theme="dark"] .uname-hint.is-bad { color: #F87171; }

/* ===== Təcili məlumat kartı ===== */
.em-card { border-color: rgba(229,37,53,.35) !important; }
.em-lead { margin-top: -6px; }

/* ===== Şərhlər ===== */
.comments-wrap { max-width: 820px; }
.comments-title { font-size: 24px; margin-bottom: 14px; }
.comments { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; }
.comment { display: flex; gap: 12px; align-items: flex-start; }
.comment-av { flex: none; }
.comment-b { flex: 1; min-width: 0; background: var(--card, #fff); border: 1px solid var(--border, rgba(0,0,0,.08)); border-radius: 16px; padding: 10px 14px; }
.comment-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-h a { color: inherit; text-decoration: none; }
.comment-b p { margin: 4px 0 0; white-space: normal; word-break: break-word; }
.comment-del { margin-left: auto; }
.comment-del button { border: 0; background: none; color: var(--text-2, #888); cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 8px; }
.comment-del button:hover { background: rgba(220,38,38,.1); color: #DC2626; }
.comment-form { display: flex; gap: 10px; align-items: flex-start; }
.comment-form textarea { flex: 1; min-height: 46px; resize: vertical; }
@media (max-width: 560px) { .comment-form { flex-wrap: wrap; } .comment-form .btn { margin-left: auto; } }

/* ===== Tətbiqi yüklə ===== */
.appbar-dl { position: fixed; left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 9000; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px; border-radius: 18px; background: var(--card, #fff); color: var(--text, #15171c); border: 1px solid var(--border, rgba(0,0,0,.08)); box-shadow: 0 14px 40px rgba(0,0,0,.22); transform: translateY(140%); opacity: 0; transition: transform .35s cubic-bezier(.2,.9,.3,1.2), opacity .25s; max-width: 520px; margin: 0 auto; }
.appbar-dl.is-on { transform: none; opacity: 1; }
.appbar-dl img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.appbar-t { flex: 1; min-width: 0; }
.appbar-t b { display: block; font-size: 15px; }
.appbar-t small { display: block; font-size: 12.5px; color: var(--text-2, #5d6470); line-height: 1.3; }
.appbar-go { flex: none; background: var(--accent, #E52535); color: #fff !important; font-weight: 800; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.appbar-x { position: absolute; top: -8px; left: -6px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border, rgba(0,0,0,.1)); background: var(--card, #fff); color: var(--text-2, #5d6470); font-size: 12px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.app-dl { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.app-dl a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: #111; color: #fff !important; text-decoration: none; line-height: 1.1; border: 1px solid rgba(255,255,255,.15); }
.app-dl a small { display: block; font-size: 10.5px; opacity: .75; }
.app-dl a b { display: block; font-size: 15px; }
html[data-native-app] .app-dl, html[data-native-app] .appbar-dl { display: none !important; }
/* ===== Alt menyu: Mesajlar (mərkəz) + oxunmamış sayı ===== */
.bottom-nav .bn-chat .bn-ic { position: relative; }
.bottom-nav .bn-chat .badge-dot { position: absolute; top: -5px; right: -9px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #fff; color: #E52535; font-size: 11.5px; font-weight: 800; line-height: 20px; text-align: center; border: 2px solid #E52535; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.bottom-nav .bn-chat .badge-dot.dot-only { min-width: 12px; width: 12px; height: 12px; padding: 0; top: -2px; right: -4px; }
.bottom-nav .bn-chat .badge-dot[hidden] { display: none; }
/* ===== Mobil: 2 sətirə düşən «hap» (pill) blokları oval olub mətni kənara sıxmasın ===== */
@media (max-width: 640px) {
  .hero-proof { display: flex; flex-wrap: nowrap; gap: 12px; border-radius: 20px; padding: 10px 16px 10px 10px; max-width: 100%; }
  .hero-proof .avatars { flex: none; }
  .hero-proof .avatars > * { width: 40px; height: 40px; font-size: .8rem; margin-left: -12px; border-width: 2px; }
  .hero-proof .avatars > *:first-child { margin-left: 0; }
  .hero-proof .avatars > *:nth-child(n+5) { display: none; }
  .hero-proof small { font-size: .86rem; line-height: 1.35; min-width: 0; }
  html .values li, html .ah-streak, html .bday-badge, html .hroute-kicker, html .lsheet-spot, html .lmap-chip { border-radius: 16px; }
  html .live-map-empty, html .live-pick-tip { border-radius: 16px; max-width: calc(100% - 24px); text-align: center; }
}
/* Tətbiqin aşağı menyusu: Mesajlar üstündə oxunmamış sayı */
html.apx .apx-nav .ic { position: relative; }
html.apx .apx-nav .badge-dot { position: absolute; top: -4px; right: -9px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #E52535; color: #fff; font: 800 10.5px/18px Inter, system-ui, sans-serif; text-align: center; border: 2px solid var(--card, #fff); }
html.apx .apx-nav a.cta .badge-dot { top: -3px; right: -5px; background: #fff; color: #E52535; border-color: #E52535; }
html.apx .apx-nav .badge-dot.dot-only { min-width: 11px; width: 11px; height: 11px; padding: 0; }
html.apx .apx-nav .badge-dot[hidden] { display: none; }
html.apx .apx-nav .ic svg { width: 22px; height: 22px; }
/* ===== Qeydiyyat: xəta xülasəsi ===== */
.init-errsum { margin: 0 0 18px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(220,38,38,.45); background: rgba(220,38,38,.07); color: var(--text, #15171c); }
.init-errsum > b { display: block; margin-bottom: 6px; color: #B91C1C; }
html[data-theme="dark"] .init-errsum > b { color: #F87171; }
.init-errsum ul { margin: 0 0 8px; padding-left: 18px; }
.init-errsum li { margin: 3px 0; }
.init-errsum button { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.init-errsum small { display: block; color: var(--text-2, #5d6470); }
/* ===== Admin: uğursuz qeydiyyatlar ===== */
.rf-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rf-fields { margin-bottom: 16px; }
.rf-bars { display: grid; gap: 8px; }
.rf-bar { display: grid; grid-template-columns: 140px 1fr 36px; align-items: center; gap: 10px; font-size: .9rem; }
.rf-bar i { height: 10px; border-radius: 99px; background: var(--bg-2, #eee); overflow: hidden; }
.rf-bar u { display: block; height: 100%; background: #F59E0B; border-radius: inherit; }
.rf-bar b { text-align: right; }
.rf-errs { margin: 6px 0 0; padding-left: 16px; font-size: .85rem; }
.rf-errs li { margin: 2px 0; }
/* ===== Şura səsverməsi ===== */
.cv-council { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cv-mem { display: grid; justify-items: center; gap: 2px; font-size: 12px; }
.cv-wrap { max-width: 860px; display: grid; gap: 18px; }
.cv-empty { padding: 22px; text-align: center; }
.cv-cand { padding: 18px; scroll-margin-top: 90px; }
.cv-head { display: flex; gap: 14px; align-items: center; }
.cv-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cv-who h2 { margin: 0; font-size: 20px; }
.cv-fit { text-align: center; padding: 8px 12px; border-radius: 14px; background: var(--accent-soft, rgba(229,37,53,.1)); color: var(--accent, #E52535); }
.cv-fit b { display: block; font-size: 22px; line-height: 1; } .cv-fit small { font-size: 11px; }
.cv-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.cv-facts > div { padding: 10px 12px; border-radius: 12px; background: var(--bg-2, #f3f1ec); }
.cv-facts small { display: block; font-size: 11.5px; color: var(--text-2, #5d6470); } .cv-facts b { font-size: 14.5px; }
.cv-flags { padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.45); font-size: 14px; margin-bottom: 12px; }
.cv-text { margin: 0 0 12px; } .cv-text small { display: block; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2, #5d6470); } .cv-text p { margin: 4px 0 0; line-height: 1.5; }
.cv-tally { margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--border, rgba(0,0,0,.08)); }
.cv-bar { position: relative; display: flex; height: 12px; border-radius: 99px; background: var(--bg-2, #eee); overflow: visible; }
.cv-bar i { display: block; height: 100%; } .cv-bar i.y { background: #10B981; border-radius: 99px 0 0 99px; } .cv-bar i.n { background: #EF4444; margin-left: auto; border-radius: 0 99px 99px 0; }
.cv-bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text, #111); }
.cv-tally p { margin: 8px 0 0; font-size: 14px; }
.cv-y { color: #059669; } .cv-n { color: #DC2626; }
html[data-theme="dark"] .cv-y { color: #34D399; } html[data-theme="dark"] .cv-n { color: #F87171; }
.cv-votes, .cv-recent { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.cv-votes li, .cv-recent li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.cv-form { display: grid; gap: 10px; }
.cv-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cv-btns .btn { min-height: 48px; font-weight: 800; }
.cv-rt { margin-top: 12px; }
@media (max-width: 560px) { .cv-facts { grid-template-columns: 1fr 1fr; } .cv-head { flex-wrap: wrap; } }
.mot-count { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text-2, #5d6470); }
.mot-count.is-ok { color: #059669; }
html[data-theme="dark"] .mot-count.is-ok { color: #34D399; }
/* ===== Şura səsverməsi bildirişləri — fərqli rəng ===== */
.nf-item.nf-t-council { position: relative; background: rgba(124,58,237,.07); box-shadow: inset 4px 0 0 #7C3AED; }
.nf-item.nf-t-council .nf-type { background: #7C3AED !important; color: #fff !important; }
.nf-item.nf-t-council .nf-src b, .nf-item.nf-t-council .nf-title { color: #6D28D9; }
html[data-theme="dark"] .nf-item.nf-t-council { background: rgba(139,92,246,.14); }
html[data-theme="dark"] .nf-item.nf-t-council .nf-src b, html[data-theme="dark"] .nf-item.nf-t-council .nf-title { color: #C4B5FD; }
/* ===== Şura: mənim səsim — rənglə seçilsin ===== */
.cv-summary { padding: 12px 16px; border-radius: 14px; background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.35); font-size: 15px; }
.cv-summary.is-done { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.4); }
.cv-mybadge { display: inline-block; margin: -4px 0 12px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.cv-cand.cv-mine-none { box-shadow: 0 0 0 2px #7C3AED, var(--shadow, 0 6px 20px rgba(0,0,0,.08)); }
.cv-cand.cv-mine-none .cv-mybadge { background: #7C3AED; color: #fff; }
.cv-cand.cv-mine-yes { box-shadow: inset 6px 0 0 #10B981, var(--shadow, 0 6px 20px rgba(0,0,0,.08)); background: color-mix(in srgb, #10B981 6%, var(--card, #fff)); }
.cv-cand.cv-mine-yes .cv-mybadge { background: rgba(16,185,129,.15); color: #047857; border: 1px solid rgba(16,185,129,.5); }
.cv-cand.cv-mine-no { box-shadow: inset 6px 0 0 #EF4444, var(--shadow, 0 6px 20px rgba(0,0,0,.08)); background: color-mix(in srgb, #EF4444 6%, var(--card, #fff)); }
.cv-cand.cv-mine-no .cv-mybadge { background: rgba(239,68,68,.12); color: #B91C1C; border: 1px solid rgba(239,68,68,.5); }
html[data-theme="dark"] .cv-cand.cv-mine-yes .cv-mybadge { color: #6EE7B7; }
html[data-theme="dark"] .cv-cand.cv-mine-no .cv-mybadge { color: #FCA5A5; }
/* ===== Şura: səs verdiklərin — aşağıda, açılan sətirlər ===== */
.cv-rt-sub { margin: -6px 0 4px; }
.cv-done { display: grid; gap: 8px; }
.cv-ditem { border-radius: 16px; background: var(--card, #fff); border: 1px solid var(--border, rgba(0,0,0,.08)); overflow: hidden; scroll-margin-top: 90px; }
.cv-ditem.cv-mine-yes { box-shadow: inset 5px 0 0 #10B981; }
.cv-ditem.cv-mine-no { box-shadow: inset 5px 0 0 #EF4444; }
.cv-ditem > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cv-ditem > summary::-webkit-details-marker { display: none; }
.cv-dname { flex: 1; min-width: 0; display: grid; } .cv-dname b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cv-dname small { color: var(--text-2, #5d6470); font-size: 12.5px; }
.cv-dvote { font-weight: 800; font-size: 13px; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.cv-mine-yes .cv-dvote { background: rgba(16,185,129,.14); color: #047857; } .cv-mine-no .cv-dvote { background: rgba(239,68,68,.12); color: #B91C1C; }
html[data-theme="dark"] .cv-mine-yes .cv-dvote { color: #6EE7B7; } html[data-theme="dark"] .cv-mine-no .cv-dvote { color: #FCA5A5; }
.cv-chev { font-size: 18px; color: var(--text-2, #5d6470); transition: transform .2s; } .cv-ditem[open] .cv-chev { transform: rotate(180deg); }
.cv-dbody { padding: 4px 16px 16px; border-top: 1px solid var(--border, rgba(0,0,0,.08)); }
.cv-undo { border: 0; background: none; padding: 6px 0; color: var(--text-2, #5d6470); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; justify-self: start; }
.cv-undo:hover { color: #DC2626; }
/* ===== Bildirişlər: Şura — mənim səsim ===== */
.nf-cvlbl { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.nf-item.nf-cv-wait .nf-cvlbl { background: #7C3AED; color: #fff; }
.nf-item.nf-t-council.nf-cv-yes { background: rgba(16,185,129,.08); box-shadow: inset 4px 0 0 #10B981; }
.nf-item.nf-t-council.nf-cv-yes .nf-type { background: #10B981 !important; }
.nf-item.nf-t-council.nf-cv-yes .nf-title, .nf-item.nf-t-council.nf-cv-yes .nf-src b { color: #047857; }
.nf-item.nf-cv-yes .nf-cvlbl { background: rgba(16,185,129,.16); color: #047857; }
.nf-item.nf-t-council.nf-cv-no { background: rgba(239,68,68,.07); box-shadow: inset 4px 0 0 #EF4444; }
.nf-item.nf-t-council.nf-cv-no .nf-type { background: #EF4444 !important; }
.nf-item.nf-t-council.nf-cv-no .nf-title, .nf-item.nf-t-council.nf-cv-no .nf-src b { color: #B91C1C; }
.nf-item.nf-cv-no .nf-cvlbl { background: rgba(239,68,68,.14); color: #B91C1C; }
.nf-item.nf-t-council.nf-cv-closed { background: var(--card, #fff); box-shadow: inset 4px 0 0 #9CA3AF; opacity: .75; }
.nf-item.nf-t-council.nf-cv-closed .nf-type { background: #9CA3AF !important; }
.nf-item.nf-t-council.nf-cv-closed .nf-title, .nf-item.nf-t-council.nf-cv-closed .nf-src b { color: inherit; }
.nf-item.nf-cv-closed .nf-cvlbl { background: rgba(156,163,175,.2); color: var(--text-2, #5d6470); }
html[data-theme="dark"] .nf-item.nf-t-council.nf-cv-yes .nf-title, html[data-theme="dark"] .nf-item.nf-cv-yes .nf-cvlbl { color: #6EE7B7; }
html[data-theme="dark"] .nf-item.nf-t-council.nf-cv-no .nf-title, html[data-theme="dark"] .nf-item.nf-cv-no .nf-cvlbl { color: #FCA5A5; }
/* ===== Üzvlərin tədbir yaratması ===== */
.mev-new { margin-top: 14px; }
.mev-wrap { max-width: 760px; }
.mev-form { display: grid; gap: 4px; }
.mev-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.mev-actions .btn-primary { min-width: 160px; }
.mev-cancel { margin: 8px 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(220,38,38,.5); }
.mev-edit { margin: 10px 0; }
/* ===== Qaraj: ictimai profil bloku ===== */
/* ictimai profildə qaraj bloku (saytın öz mövzusunda) */
.spd-prof{margin-top:18px;padding:16px;border-radius:18px;background:linear-gradient(135deg,#0F1218,#1A1F29);color:#F3F4F6;border:1px solid rgba(255,255,255,.06)}
.spd-prof-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.spd-prof-head h2{margin:0;font-size:17px;color:#fff}
.spd-prof-head a{color:#FCA5A5;font-weight:700;font-size:13.5px;text-decoration:none}
.spd-prof-top{display:flex;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.spd-prof-top div{flex:1 1 90px;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.05)}
.spd-prof-top small{display:block;font-size:11px;color:#9CA3AF;text-transform:uppercase;letter-spacing:.04em;font-weight:600}
.spd-prof-top b{font-size:24px;font-weight:900;font-style:italic;font-variant-numeric:tabular-nums}
.spd-prof-top div:first-child b{color:#FCA5A5}
.spd-prof-top i{font-size:11px;font-style:normal;color:#9CA3AF;margin-left:3px;font-weight:600}
.spd-prof-bikes{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.spd-prof-bikes li{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:12px;background:rgba(255,255,255,.04);border-left:4px solid var(--bc)}
.spd-prof-bikes .nm{flex:1;min-width:0}
.spd-prof-bikes .nm b{display:block;font-size:14px}
.spd-prof-bikes .nm small{display:block;font-size:11.5px;color:#9CA3AF}
.spd-prof-bikes .v{font-weight:900;font-style:italic;white-space:nowrap}
.spd-prof-bikes .v i{font-size:10.5px;font-style:normal;color:#9CA3AF}
.spd-prof-bikes .dot{display:none}

/* ===== Telefon çərçivəsi: çentik / saat zolağı / home xətti — bütün tam ekran pəncərələr (iPhone, Android, planşet, yan çevrilmiş ekran) ===== */
:root{--sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px);--sal:env(safe-area-inset-left,0px);--sar:env(safe-area-inset-right,0px)}
/* APEX Sprint tam ekran */
html body.game-running .sp-game{padding-left:var(--sal);padding-right:var(--sar);height:100vh;height:100dvh}
html body.game-running .sp-hud{padding-top:calc(8px + var(--sat))}
html body.game-running .sp-controls{bottom:calc(12px + var(--sab))}
html body.game-running .sp-canvas-wrap{overflow:hidden}
html body.game-running .sp-overlay{padding-bottom:var(--sab)}
/* şəkil baxışı, rəqəmsal kart, menyu, bildirişlər */
html .lightbox{padding:calc(56px + var(--sat)) calc(12px + var(--sar)) calc(56px + var(--sab)) calc(12px + var(--sal))}
html .lightbox img,html .lightbox iframe{max-height:calc(100svh - 120px - var(--sat) - var(--sab))}
html .lb-close{top:calc(12px + var(--sat))}
html .lightbox-cap{bottom:calc(14px + var(--sab))}
html .wallet{padding:calc(20px + var(--sat)) calc(16px + var(--sar)) calc(20px + var(--sab)) calc(16px + var(--sal))}
html .wallet-close{top:calc(14px + var(--sat));right:calc(14px + var(--sar))}
html[data-native-app] .mobile-nav{padding-top:calc(var(--header-h) + 8px + var(--sat))}
html .mobile-nav{padding-bottom:calc(110px + var(--sab))}
html[data-native-app] .toasts{top:calc(74px + var(--sat))}
html::before{top:var(--sat)}
html .chat-sheet{padding:var(--sat) var(--sar) 0 var(--sal)}
html .install-sheet{padding:calc(12px + var(--sat)) calc(12px + var(--sar)) 12px calc(12px + var(--sal))}
html .lsheet-box{max-height:calc(92vh - var(--sat))}
/* Qaraj */
html .spd.is-hud{padding:calc(20px + var(--sat)) calc(20px + var(--sar)) calc(20px + var(--sab)) calc(20px + var(--sal))}
html .spd-modal{padding:calc(16px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal))}
/* yan çevrilmiş telefon: məzmun çentiyin altına girməsin */
@media (orientation:landscape){html[data-native-app] body{padding-left:var(--sal);padding-right:var(--sar)}}
/* planşet: oyun və qaraj mərkəzdə, rahat eni */
@media (min-width:768px){html body.game-running .sp-canvas-wrap{align-items:center}}