/* ===========================================================================
   Gidilir — Modern Mobile-First UI
   Dual theme: Light (cream + emerald) / Dark (black + neon green)
   =========================================================================== */

/* ---------- THEME TOKENS ---------- */
:root, [data-theme="light"] {
    /* Surfaces */
    --bg:           #f4f9f4;
    --bg-2:         #eaf3ea;
    --surface:      #ffffff;
    --surface-2:    #f6fbf6;
    --surface-3:    #edf5ed;
    --surface-glass: rgba(255,255,255,.78);
    --line:         #dceadc;
    --line-2:       #bcd6bc;

    /* Text */
    --text:         #0c1f14;
    --text-dim:     #4a6b54;
    --text-mute:    #809988;
    --text-on-primary: #ffffff;

    /* Brand greens */
    --primary:      #16a34a;
    --primary-2:    #15803d;
    --primary-3:    #4ade80;
    --primary-soft: rgba(22,163,74,.10);
    --primary-glow: rgba(52,211,153,.30);

    --accent:       #10b981;
    --accent-2:     #34d399;
    --accent-soft:  rgba(16,185,129,.13);

    --info:         #2563eb;
    --danger:       #dc2626;
    --danger-soft:  rgba(220,38,38,.12);
    --warn:         #d97706;
    --ok:           #10b981;
    --gold:         #ca8a04;
    --silver:       #94a3b8;
    --bronze:       #b45309;

    /* Effects */
    --shadow-xs: 0 1px 2px rgba(10,30,18,.05);
    --shadow-sm: 0 2px 10px rgba(10,30,18,.06);
    --shadow:    0 10px 30px rgba(10,30,18,.10);
    --shadow-lg: 0 24px 60px rgba(10,30,18,.16);
    --shadow-glow: 0 0 28px var(--primary-glow);
    --ring:      0 0 0 3px rgba(52,211,153,.30);

    --grad-primary: linear-gradient(135deg, #15803d 0%, #22c55e 55%, #4ade80 100%);
    --grad-accent:  linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    --grad-warm:    linear-gradient(135deg, #15803d 0%, #16a34a 50%, #84cc16 100%);
    --grad-cool:    linear-gradient(135deg, #0891b2 0%, #10b981 100%);
    --grad-gold:    linear-gradient(135deg, #facc15 0%, #ca8a04 100%);

    --bg-noise:
        radial-gradient(900px 600px at 8% -10%,  rgba(52,211,153,.10),  transparent 60%),
        radial-gradient(700px 500px at 95% 5%,   rgba(16,185,129,.08), transparent 60%),
        radial-gradient(800px 600px at 50% 110%, rgba(132,204,22,.07), transparent 60%);

    --topbar-h: 60px;
    --bottom-h: 68px;
}

[data-theme="dark"] {
    /* Refined dark — warmer, less harsh, sophisticated emerald not neon */
    --bg:           #0b1410;
    --bg-2:         #101a15;
    --surface:      #15211b;
    --surface-2:    #1a2922;
    --surface-3:    #213429;
    --surface-glass: rgba(21,33,27,.78);
    --line:         rgba(110,231,183,.10);
    --line-2:       rgba(110,231,183,.18);

    --text:         #e2efe7;
    --text-dim:     #9bb7a5;
    --text-mute:    #6a8576;
    --text-on-primary: #08251a;

    /* Sage/mint emerald — much softer than #22c55e */
    --primary:      #34d399;
    --primary-2:    #10b981;
    --primary-3:    #6ee7b7;
    --primary-soft: rgba(52,211,153,.10);
    --primary-glow: rgba(52,211,153,.22);

    --accent:       #5eead4;
    --accent-2:     #99f6e4;
    --accent-soft:  rgba(94,234,212,.12);

    --info:         #60a5fa;
    --danger:       #f87171;
    --danger-soft:  rgba(248,113,113,.13);
    --warn:         #fbbf24;
    --ok:           #34d399;
    --gold:         #fbbf24;
    --silver:       #cbd5e1;
    --bronze:       #f97316;

    /* Shadows toned way down — no more neon halos everywhere */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
    --shadow-sm: 0 3px 12px rgba(0,0,0,.35);
    --shadow:    0 10px 28px rgba(0,0,0,.4);
    --shadow-lg: 0 22px 56px rgba(0,0,0,.5);
    --shadow-glow: 0 4px 18px rgba(52,211,153,.18);
    --ring:      0 0 0 3px rgba(52,211,153,.28);

    /* Gradients: softer endpoints, less light at the top */
    --grad-primary: linear-gradient(135deg, #047857 0%, #10b981 50%, #34d399 100%);
    --grad-accent:  linear-gradient(135deg, #0f766e 0%, #14b8a6 50%, #5eead4 100%);
    --grad-warm:    linear-gradient(135deg, #065f46 0%, #10b981 50%, #6ee7b7 100%);
    --grad-cool:    linear-gradient(135deg, #0e7490 0%, #06b6d4 100%);
    --grad-gold:    linear-gradient(135deg, #d97706 0%, #f59e0b 100%);

    /* Background ambient — much lower opacity, no harsh greens */
    --bg-noise:
        radial-gradient(900px 600px at 0% -10%,  rgba(52,211,153,.06),  transparent 60%),
        radial-gradient(700px 500px at 100% 5%,  rgba(94,234,212,.04),  transparent 60%),
        radial-gradient(800px 600px at 50% 110%, rgba(110,231,183,.04), transparent 60%);
}

/* Dark mode: reduce button glow shadows drastically (apply to all primary buttons) */
[data-theme="dark"] .btn-primary { box-shadow: 0 4px 14px rgba(0,0,0,.35); }
[data-theme="dark"] .btn-primary:hover { box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 16px rgba(52,211,153,.18); }
[data-theme="dark"] .btn-accent { box-shadow: 0 4px 14px rgba(0,0,0,.35); }
[data-theme="dark"] .chat-form button,
[data-theme="dark"] .hs-num,
[data-theme="dark"] .grup-card-icon,
[data-theme="dark"] .auth-icon,
[data-theme="dark"] .rh-icon,
[data-theme="dark"] .ph-icon { box-shadow: 0 4px 14px rgba(0,0,0,.35); }
[data-theme="dark"] .topbar .topnav a.active { box-shadow: 0 3px 12px rgba(0,0,0,.4); }
[data-theme="dark"] .welcome-strip,
[data-theme="dark"] .profile-hero,
[data-theme="dark"] .rewards-hero { box-shadow: 0 14px 36px rgba(0,0,0,.45); }
[data-theme="dark"] .notif-icon.active,
[data-theme="dark"] .mood-chip.active,
[data-theme="dark"] .filter-trigger-count,
[data-theme="dark"] .badge-count,
[data-theme="dark"] .inline-badge { box-shadow: 0 2px 8px rgba(0,0,0,.3); }

/* Bottom-nav: kill the heavy glow on active state */
[data-theme="dark"] .bn-item.active .bn-icon { filter: drop-shadow(0 0 4px rgba(52,211,153,.4)); }

/* Map zone in dark theme — same softening */
[data-theme="dark"] body::before { opacity: .15; }

/* Radius scale */
:root {
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius:    16px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --max:       1280px;
    --ease:      cubic-bezier(.32,.72,.24,1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
*::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    background-image: var(--bg-noise);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding-bottom: env(safe-area-inset-bottom);
    transition: background-color .35s var(--ease), color .25s var(--ease);
}
body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    background:
        radial-gradient(2px 2px at 12% 18%, var(--primary-glow), transparent 60%),
        radial-gradient(2px 2px at 78% 12%, var(--primary-glow), transparent 60%),
        radial-gradient(1px 1px at 30% 80%, var(--primary-glow), transparent 60%),
        radial-gradient(1px 1px at 88% 70%, var(--primary-glow), transparent 60%);
    opacity: .35;
    z-index: -1;
    animation: floatDots 18s linear infinite;
}
@keyframes floatDots {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-2); }

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .6rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 3.6vw, 1.6rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; font-weight: 600; }
p  { margin: 0 0 .8rem; }

/* Display serif for editorial headlines */
.display-serif,
.hero h1,
.landing-cta h2,
.page-hero h1 {
    font-family: 'Instrument Serif', 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.02;
}
.display-serif em,
.hero h1 em,
.landing-cta h2 em {
    font-style: italic;
    font-weight: 400;
}

/* Subtle grain texture overlay for premium depth */
.grain {
    position: relative;
}
.grain::after {
    content: '';
    position: absolute; inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: .035;
    mix-blend-mode: overlay;
    border-radius: inherit;
}
[data-theme="dark"] .grain::after { opacity: .07; mix-blend-mode: screen; }

/* Scroll-reveal animation utility — only hides when JS is ready */
html.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}
html.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* 3D tilt utility — applied via JS for magnetic card hover */
.tilt {
    transform-style: preserve-3d;
    transition: transform .35s var(--ease);
    will-change: transform;
}

.muted, .link-muted { color: var(--text-dim); }
::selection { background: var(--primary); color: var(--text-on-primary); }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===========================================================================
   TOPBAR
   =========================================================================== */
.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "brand nav actions";
    align-items: center;
    gap: 1rem;
    padding: .65rem 1rem;
    padding-top: max(.65rem, env(safe-area-inset-top));
    background: var(--surface-glass);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 1000;
    min-height: var(--topbar-h);
}
.topbar > .brand          { grid-area: brand;   justify-self: start; }
.topbar > .topnav         { grid-area: nav;     justify-self: center; }
.topbar > .topbar-actions {
    grid-area: actions; justify-self: end;
    display: flex; align-items: center; gap: .5rem;
}
.topbar .brand {
    font-weight: 800; font-size: 1.25rem; color: var(--text);
    display: inline-flex; align-items: center; gap: .55rem;
    letter-spacing: -0.03em;
    transition: transform .25s var(--ease);
}
.topbar .brand:hover { transform: scale(1.03); text-decoration: none; }
.topbar .brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--grad-primary);
    color: #fff; font-size: 1.1rem;
    box-shadow: 0 6px 18px var(--primary-glow);
}

.brand-logo {
    display: block; height: 34px; width: auto; object-fit: contain;
    transition: transform .25s var(--ease), filter .25s var(--ease);
}
.topbar .brand:hover .brand-logo { transform: scale(1.05); }
[data-theme="dark"] .brand-logo { filter: drop-shadow(0 0 14px var(--primary-glow)); }

.drawer-logo {
    display: block; height: 32px; width: auto; object-fit: contain;
}
[data-theme="dark"] .drawer-logo { filter: drop-shadow(0 0 10px var(--primary-glow)); }

.auth-logo {
    display: block; height: 72px; width: auto; object-fit: contain;
    margin: 0 auto 1.2rem;
    position: relative; z-index: 1;
}
[data-theme="dark"] .auth-logo { filter: drop-shadow(0 0 18px var(--primary-glow)); }

.landing-logo {
    display: block;
    height: clamp(80px, 14vw, 140px);
    width: auto; object-fit: contain;
    margin: 0 auto 1.4rem;
    position: relative; z-index: 2;
    filter: drop-shadow(0 8px 28px var(--primary-glow));
    animation: floatLogo 4s ease-in-out infinite;
}
@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@media (max-width: 768px) {
    .brand-logo  { height: 30px; }
    .auth-logo   { height: 58px; margin-bottom: 1rem; }
    .landing-logo { height: clamp(68px, 20vw, 120px); }
}

.topbar .topnav {
    display: flex; gap: .15rem; align-items: center; flex-wrap: wrap;
}
.topbar .topnav a {
    color: var(--text-dim); padding: .55rem .95rem; border-radius: 999px;
    font-weight: 500; font-size: .92rem;
    transition: all .2s var(--ease);
    position: relative;
}
.topbar .topnav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.topbar .topnav a.active {
    color: var(--text-on-primary);
    background: var(--grad-primary);
    box-shadow: 0 6px 16px var(--primary-glow);
}

/* Notification bell + theme toggle */
.notif-icon, .theme-toggle {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all .2s var(--ease);
    text-decoration: none;
}
.notif-icon:hover, .theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 6px 18px var(--primary-glow);
    color: var(--primary);
}
.notif-icon.active {
    background: var(--grad-primary); color: #fff; border-color: transparent;
    box-shadow: 0 6px 18px var(--primary-glow);
}
.notif-icon .badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: #fff;
    font-size: .65rem; font-weight: 700;
    border-radius: 999px;
    min-width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--surface);
    box-shadow: 0 2px 8px rgba(220,38,38,.4);
}

.theme-toggle .ti {
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .4s var(--ease), opacity .25s;
}
.theme-toggle .ti svg { width: 20px; height: 20px; }
.theme-toggle .ti-sun { display: none; }
.theme-toggle .ti-moon { display: inline-flex; }
[data-theme="dark"] .theme-toggle .ti-sun { display: inline-flex; color: #fbbf24; }
[data-theme="dark"] .theme-toggle .ti-moon { display: none; }
.theme-toggle:hover .ti { transform: rotate(30deg) scale(1.1); }
.notif-icon svg { width: 20px; height: 20px; }

/* ===========================================================================
   FOOTER
   =========================================================================== */
.footer {
    text-align: center;
    padding: 2rem 1rem calc(var(--bottom-h) + 1.5rem);
    color: var(--text-mute);
    font-size: .85rem;
    border-top: 1px solid var(--line);
    margin-top: 3rem;
    background: var(--bg-2);
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: .35rem;
}
.footer a    { color: var(--text-dim); margin: 0 .15rem; }
.footer .sep { margin: 0 .15rem; opacity: .5; }
@media (min-width: 901px) {
    .footer { padding-bottom: 1.5rem; }
}

/* ===========================================================================
   DOC PAGES (gizlilik, vb.)
   =========================================================================== */
.doc {
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem 1rem calc(var(--bottom-h) + 2rem);
}
.doc-body {
    display: flex; flex-direction: column;
    gap: 1rem;
}
.doc-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.4rem;
    box-shadow: var(--shadow-xs);
    transition: all .25s var(--ease);
}
.doc-section:hover { border-color: var(--primary); }
.doc-section h2 {
    display: inline-flex; align-items: center; gap: .55rem;
    margin: 0 0 .8rem;
    font-size: 1.05rem;
}
.doc-section h2 svg {
    width: 20px; height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}
.doc-section p {
    color: var(--text);
    line-height: 1.65;
    margin: 0 0 .5rem;
}
.doc-section p:last-child { margin-bottom: 0; }
.doc-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text);
}
.doc-list li {
    line-height: 1.65;
    margin-bottom: .55rem;
    padding-left: .2rem;
}
.doc-list li::marker { color: var(--primary); }
.doc-list li:last-child { margin-bottom: 0; }
.doc-list strong { color: var(--primary-2); font-weight: 700; }
[data-theme="dark"] .doc-list strong { color: var(--primary-3); }

/* ===========================================================================
   BUTTONS
   =========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .72rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 600; font-size: .94rem;
    cursor: pointer;
    transition: all .2s var(--ease);
    text-decoration: none;
    min-height: 44px;
    user-select: none;
    line-height: 1.2;
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--primary); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; min-height: 36px; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1rem; min-height: 52px; }

/* GLOBAL: SVG icons inside any button never expand to fill parent */
.btn > svg,
.btn > span > svg {
    width: 18px; height: 18px;
    flex: 0 0 auto;
    fill: none;
}
.btn-lg > svg,
.btn-lg > span > svg { width: 20px; height: 20px; }
.btn-sm > svg,
.btn-sm > span > svg { width: 15px; height: 15px; }
/* Ensure all inline SVGs default to a sensible size if not constrained by parent rules */
svg:not([width]):not([height]) { max-width: 100%; }

.btn-primary {
    background: var(--grad-primary);
    color: var(--text-on-primary);
    border: none;
    box-shadow: 0 8px 22px var(--primary-glow);
}
.btn-primary:hover { box-shadow: 0 12px 28px var(--primary-glow); filter: brightness(1.07); }

.btn-accent  {
    background: var(--grad-accent);
    color: var(--text-on-primary);
    border: none;
    box-shadow: 0 8px 22px var(--accent-soft);
}
.btn-accent:hover { filter: brightness(1.07); }

.btn-danger  { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { filter: brightness(1.08); }

.btn-ghost   {
    background: transparent;
    border: 1px solid var(--line-2);
    color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-block   { width: 100%; }

.btn-icon {
    width: 44px; height: 44px; padding: 0;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    cursor: pointer;
    transition: all .2s var(--ease);
}
.btn-icon:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ===========================================================================
   FORMS
   =========================================================================== */
.form-group { margin-bottom: 1rem; }
.form-label, .form label {
    display: block; font-size: .85rem; font-weight: 600;
    color: var(--text-dim); margin-bottom: .4rem;
}
.form input, .form select, .form textarea,
.form-input, .form-select, .form-textarea,
input.form-control, select.form-control, textarea.form-control {
    width: 100%;
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: .95rem;
    font-family: inherit;
    transition: all .2s var(--ease);
    min-height: 46px;
}
.form input:focus, .form select:focus, .form textarea:focus,
.form-input:focus, .form-select:focus, .form-textarea:focus,
input.form-control:focus, select.form-control:focus, textarea.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
    background: var(--surface);
}
.form textarea { min-height: 100px; resize: vertical; }

.alert {
    padding: .9rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    margin-bottom: 1rem;
    font-size: .92rem;
}
.alert-success { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-2); }
.alert-danger,
.alert-error   { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.alert-warning { background: rgba(217,119,6,.12); border-color: var(--warn); color: var(--warn); }
.alert-info    { background: rgba(37,99,235,.12); border-color: var(--info); color: var(--info); }

.row-end     { display: flex; justify-content: flex-end; gap: .6rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }

/* ===========================================================================
   AUTH PAGES — full-screen, modern form fields, no footer/bottom-nav conflict
   =========================================================================== */
body.auth-page-body { padding-bottom: 0; }
body.auth-page-body .bottom-nav { display: none !important; }
body.auth-page-body .footer { display: none !important; }
body.auth-page-body { background: var(--bg); }

.auth-page {
    min-height: calc(100vh - var(--topbar-h));
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem 1rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    position: relative;
    overflow-x: hidden;
}

/* Decorative animated background blobs */
.auth-bg {
    position: absolute; inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .35;
    animation: blobFloat 18s ease-in-out infinite;
}
.auth-blob-1 {
    top: -10%; left: -15%;
    width: 380px; height: 380px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}
.auth-blob-2 {
    bottom: -15%; right: -10%;
    width: 420px; height: 420px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    animation-delay: -6s;
}
.auth-blob-3 {
    top: 40%; right: 30%;
    width: 260px; height: 260px;
    background: radial-gradient(circle, var(--primary-3) 0%, transparent 70%);
    animation-delay: -12s;
}
[data-theme="dark"] .auth-blob { opacity: .12; }
[data-theme="dark"] .hero-blob { opacity: .14; }
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.05); }
    66%      { transform: translate(-30px, 40px) scale(.95); }
}

.auth-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 2.2rem 1.8rem 1.8rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}
.auth-card-wide { max-width: 520px; }
[data-theme="dark"] .auth-card {
    box-shadow: var(--shadow-lg), 0 0 24px rgba(52,211,153,.08);
    background: rgba(14,23,18,.85);
}

.auth-card-head {
    text-align: center;
    margin-bottom: 1.6rem;
}
.auth-logo {
    display: block;
    height: 56px; width: auto; object-fit: contain;
    margin: 0 auto 1rem;
}
[data-theme="dark"] .auth-logo { filter: drop-shadow(0 0 16px var(--primary-glow)); }

.auth-icon {
    width: 64px; height: 64px;
    border-radius: 20px;
    background: var(--grad-primary);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 12px 28px var(--primary-glow);
}
.auth-icon svg { width: 28px; height: 28px; }

.auth-card-head h1 {
    font-size: 1.6rem;
    margin-bottom: .3rem;
    line-height: 1.2;
}
.auth-card-head p {
    color: var(--text-dim);
    font-size: .92rem;
    margin: 0;
}

.auth-form {
    display: flex; flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.field {
    display: flex; flex-direction: column;
    gap: .4rem;
}
.field > label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-left: .2rem;
}
.field-label-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-right: .2rem;
}
.field-label-row label { font-size: .8rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; padding-left: .2rem; }
.field-link {
    font-size: .78rem;
    color: var(--primary);
    font-weight: 600;
}
.field-link:hover { color: var(--primary-2); text-decoration: underline; }

.field-input {
    position: relative;
    display: flex; align-items: center;
    background: var(--surface-2);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 0 .9rem;
    transition: all .2s var(--ease);
    min-height: 52px;
}
.field-input:focus-within {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(52,211,153,.15);
}
.field-input > svg:first-child {
    width: 18px; height: 18px;
    color: var(--text-mute);
    flex-shrink: 0;
    transition: color .2s var(--ease);
}
.field-input:focus-within > svg:first-child { color: var(--primary); }

.field-input input,
.field-input input[type="text"],
.field-input input[type="email"],
.field-input input[type="password"] {
    flex: 1;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: .95rem;
    font-family: inherit;
    padding: .85rem .7rem;
    min-height: 50px;
    outline: none;
}
.field-input input::placeholder { color: var(--text-mute); }

.field-prefix {
    color: var(--text-mute);
    font-weight: 700;
    margin-left: .25rem;
}

.field-toggle {
    background: transparent;
    border: none;
    color: var(--text-mute);
    cursor: pointer;
    padding: .35rem;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color .2s var(--ease);
}
.field-toggle:hover { color: var(--primary); }
.field-toggle svg { width: 18px; height: 18px; }
.field-toggle .t-eye-on  { display: inline-block; }
.field-toggle .t-eye-off { display: none; }
.field-toggle.is-shown .t-eye-on  { display: none; }
.field-toggle.is-shown .t-eye-off { display: inline-block; }

.field-hint {
    font-size: .76rem;
    color: var(--text-mute);
    padding-left: .2rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
}

/* Custom checkbox */
.field-check {
    display: flex; align-items: flex-start;
    gap: .65rem;
    cursor: pointer;
    user-select: none;
    padding: .3rem 0;
}
.field-check input[type="checkbox"] {
    position: absolute;
    opacity: 0; pointer-events: none;
}
.field-check-box {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 6px;
    border: 2px solid var(--line-2);
    background: var(--surface);
    display: inline-flex; align-items: center; justify-content: center;
    color: transparent;
    transition: all .2s var(--ease);
    margin-top: 1px;
}
.field-check-box svg { width: 14px; height: 14px; }
.field-check:hover .field-check-box { border-color: var(--primary); }
.field-check input:checked + .field-check-box {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px var(--primary-glow);
}
.field-check-text {
    font-size: .82rem;
    color: var(--text);
    line-height: 1.5;
}
.field-check-text a { color: var(--primary); font-weight: 600; }
.field-check-text a:hover { text-decoration: underline; }

/* Alerts (auth) */
.alert {
    display: flex; align-items: flex-start;
    gap: .55rem;
    padding: .85rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    margin-bottom: 1rem;
    font-size: .88rem;
    animation: slideDown .3s var(--ease);
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert span { line-height: 1.45; }

/* Divider with text */
.auth-divider {
    display: flex; align-items: center; gap: .8rem;
    margin: 1.2rem 0;
    color: var(--text-mute);
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1; height: 1px;
    background: var(--line);
}

/* Google button */
.btn-google {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--line);
    font-weight: 600;
    padding: .85rem 1.2rem;
}
.btn-google:hover { border-color: var(--text-dim); background: var(--surface-2); }
.btn-google svg { width: 22px; height: 22px; flex-shrink: 0; }

.auth-foot {
    text-align: center;
    color: var(--text-dim);
    font-size: .9rem;
    margin: 1.5rem 0 0;
}
.auth-foot a {
    color: var(--primary);
    font-weight: 700;
    margin-left: .25rem;
}
.auth-foot a:hover { text-decoration: underline; }

/* ===========================================================================
   LANDING
   =========================================================================== */
.landing {
    max-width: var(--max);
    margin: 0 auto;
    padding: 1.5rem 1.2rem calc(var(--bottom-h) + 3rem);
    display: flex; flex-direction: column;
    gap: 3rem;
}

/* ===========================================================================
   LANDING V3 — MAGAZINE EDITORIAL
   =========================================================================== */
.landing-v3 .landing { padding: 1.5rem 1.2rem calc(var(--bottom-h) + 3rem); gap: 5rem; }
@media (min-width: 900px) { .landing-v3 .landing { gap: 7rem; padding-top: 2rem; } }

/* ─── HERO ─────────────────────────────────────────────────────────────── */
.hero-mag {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 1rem calc(50vw - 50%) 0;
}

.hero-mag-grid {
    display: grid;
    grid-template-columns: 1.15fr .95fr;
    gap: 3rem;
    align-items: center;
    min-height: clamp(440px, 70vh, 720px);
}
@media (max-width: 900px) {
    .hero-mag-grid { grid-template-columns: 1fr; gap: 2.5rem; min-height: auto; }
}

/* Editorial eyebrow */
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .7rem;
    margin-bottom: 1.5rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-dim);
}
.he-line { width: 36px; height: 1px; background: currentColor; opacity: .55; }

/* Massive editorial headline */
.hero-mag-title {
    font-family: 'Instrument Serif', 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(2.6rem, 7vw, 5.4rem);
    line-height: .98;
    letter-spacing: -0.035em;
    margin: 0 0 1.3rem;
    color: var(--text);
    text-wrap: balance;
}
.hero-mag-title em {
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Word rotator — grid stack so container auto-sizes to widest word, no clipping */
.hmt-rotator {
    display: inline-grid;
    grid-template-areas: "stack";
    vertical-align: baseline;
    text-align: left;
    line-height: inherit;
    padding-right: .15em; /* buffer for italic letter overflow on right */
}
.hmt-spacer,
.hmt-word {
    grid-area: stack;
    white-space: nowrap;
    font-style: italic;
}
.hmt-spacer {
    visibility: hidden;
    pointer-events: none;
}
.hmt-word {
    font-weight: 400;
    color: var(--primary);
    opacity: 0;
    transform: translateY(.4em) rotate(-2deg);
    transition: opacity .5s var(--ease), transform .55s var(--ease);
    will-change: opacity, transform;
}
.hmt-word.on {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.hero-mag-lead {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-dim);
    line-height: 1.55;
    max-width: 480px;
    margin: 0 0 1rem;
    font-weight: 500;
}

/* Big mega buttons */
.hero-mag-cta {
    display: flex; gap: .7rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}
@media (max-width: 600px) {
    .hero-mag-cta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .55rem;
    }
    .hero-mag-cta .btn-mega {
        padding: .75rem 1rem;
        font-size: .92rem;
        min-height: 48px;
        gap: .5rem;
        justify-content: center;
    }
    .hero-mag-cta .btn-mega-arrow {
        width: 26px; height: 26px;
    }
    .hero-mag-cta .btn-mega-arrow svg { width: 13px; height: 13px; }
    .hero-mag-cta .btn-mega-play {
        width: 24px; height: 24px;
    }
    .hero-mag-cta .btn-mega-play svg { width: 9px; height: 9px; }
}
.btn-mega {
    display: inline-flex; align-items: center;
    gap: .8rem;
    padding: 1rem 1.5rem 1rem 1.8rem;
    border-radius: 999px;
    font-size: 1rem; font-weight: 700;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: all .25s var(--ease);
    cursor: pointer;
    min-height: 56px;
    position: relative; overflow: hidden;
}
.btn-mega-primary {
    background: var(--text);
    color: var(--surface);
}
.btn-mega-primary:hover { background: var(--primary-2); color: #fff; transform: translateY(-2px); }
[data-theme="dark"] .btn-mega-primary { background: #fff; color: #0b1410; }
[data-theme="dark"] .btn-mega-primary:hover { background: var(--primary-3); color: #062012; }
/* Arrow inside primary mega: dark on light circle (was white-on-white) */
.btn-mega-primary .btn-mega-arrow {
    background: var(--surface);
    color: var(--text);
}
[data-theme="dark"] .btn-mega-primary .btn-mega-arrow {
    background: #0b1410;
    color: #fff;
}
.btn-mega-primary:hover .btn-mega-arrow { background: rgba(255,255,255,.22); color: #fff; }
[data-theme="dark"] .btn-mega-primary:hover .btn-mega-arrow { background: rgba(0,0,0,.2); color: #062012; }

.btn-mega-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line-2);
}
.btn-mega-ghost:hover { border-color: var(--text); }

.btn-mega-light {
    background: #fff;
    color: var(--text);
}
.btn-mega-light:hover { transform: translateY(-2px); }

.btn-mega-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    transition: transform .25s var(--ease);
}
.btn-mega-primary .btn-mega-arrow { background: var(--surface); }
[data-theme="dark"] .btn-mega-primary .btn-mega-arrow { background: rgba(0,0,0,.15); }
.btn-mega:hover .btn-mega-arrow { transform: translateX(3px); }
.btn-mega-arrow svg { width: 16px; height: 16px; }
.btn-mega-play {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px var(--primary-glow);
}
[data-theme="dark"] .btn-mega-play { background: var(--primary); color: var(--text-on-primary); }
.btn-mega-play svg { width: 11px; height: 11px; margin-left: 2px; }
.btn-mega-ghost:hover .btn-mega-play { transform: scale(1.08); }

/* Live ticker */
.hero-live {
    display: inline-flex; align-items: center;
    gap: .5rem;
    padding: .5rem .9rem .5rem .7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .82rem;
    color: var(--text-dim);
    box-shadow: var(--shadow-xs);
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
}
@media (max-width: 600px) {
    .hero-live { font-size: .76rem; gap: .35rem; padding: .45rem .8rem .45rem .65rem; }
    .hero-live .live-sep { display: none; }
}
.hero-live strong { color: var(--text); font-weight: 800; }
.hero-live .live-sep { color: var(--text-mute); }
.live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.25);
    animation: pulseLive 1.6s ease-in-out infinite;
}
@keyframes pulseLive {
    0%, 100% { box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
    50%      { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ─── DECK (fanned cafe cards) ─────────────────────────────────────────── */
.hero-mag-deck {
    position: relative;
    width: 100%;
    height: clamp(440px, 60vh, 560px);
    perspective: 1400px;
}
@media (max-width: 600px) {
    .hero-mag-deck { height: 360px; }
}
.deck-card {
    position: absolute;
    width: clamp(180px, 32%, 230px);
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-xl);
    background-size: cover;
    background-position: center;
    box-shadow: 0 30px 60px -10px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.05) inset;
    overflow: hidden;
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
    will-change: transform;
}
.deck-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.75) 100%);
}
.deck-card-0 {
    left: 4%;
    top: 10%;
    transform: rotate(-9deg);
    z-index: 1;
}
.deck-card-1 {
    left: 50%;
    top: 0;
    transform: translateX(-50%) rotate(2deg);
    z-index: 3;
    width: clamp(200px, 36%, 260px);
}
.deck-card-2 {
    right: 4%;
    top: 14%;
    transform: rotate(8deg);
    z-index: 2;
}
.hero-mag-deck:hover .deck-card-0 { transform: rotate(-12deg) translateX(-8px) translateY(-6px); }
.hero-mag-deck:hover .deck-card-1 { transform: translateX(-50%) rotate(0) translateY(-12px); }
.hero-mag-deck:hover .deck-card-2 { transform: rotate(11deg) translateX(8px) translateY(-6px); }

.deck-occ {
    position: absolute;
    top: .8rem; left: .8rem;
    background: rgba(255,255,255,.95);
    color: var(--text);
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    z-index: 2;
    backdrop-filter: blur(8px);
}
.deck-occ.occ-low  { background: var(--ok); color: #fff; }
.deck-occ.occ-mid  { background: var(--warn); color: #fff; }
.deck-occ.occ-high { background: var(--danger); color: #fff; }
.deck-foot {
    position: absolute;
    left: 1rem; right: 1rem; bottom: 1rem;
    color: #fff;
    z-index: 2;
}
.deck-foot strong {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1.1;
    display: block;
    margin-bottom: .15rem;
}
.deck-foot span {
    font-size: .72rem;
    opacity: .85;
    font-weight: 600;
}

/* Decorative floating orbits */
.deck-orbit {
    position: absolute;
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: var(--primary);
    z-index: 4;
    animation: orbitFloat 6s ease-in-out infinite;
}
.deck-orbit svg { width: 24px; height: 24px; }
.deck-orbit-1 { top: 5%; right: 8%; animation-delay: -1s; }
.deck-orbit-2 { bottom: 8%; left: -2%; width: 46px; height: 46px; animation-delay: -3s; color: var(--accent); }
.deck-orbit-2 svg { width: 22px; height: 22px; }
@keyframes orbitFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50%      { transform: translateY(-10px) rotate(8deg); }
}

/* ─── MARQUEE mood ticker — pill-shaped, no harsh edges ────────────────── */
.hero-marquee {
    margin: 3.5rem auto 0;
    padding: 1.3rem 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    max-width: 100%;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    position: relative;
}
.hero-marquee::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 200%; height: 300%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, var(--primary-soft) 0%, transparent 50%);
    pointer-events: none;
    opacity: .7;
}
@media (max-width: 700px) {
    .hero-marquee {
        margin-left: -1.2rem; margin-right: -1.2rem;
        border-radius: 0;
        border-left: none; border-right: none;
    }
}
.marquee-track {
    display: inline-flex;
    gap: 1.5rem;
    white-space: nowrap;
    animation: marqueeScroll 40s linear infinite;
    will-change: transform;
}
.marquee-item {
    display: inline-flex; align-items: center; gap: .65rem;
    font-family: 'Instrument Serif', serif;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text);
    flex-shrink: 0;
}
.marquee-item em {
    font-style: italic;
    color: var(--primary);
}
.mi-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    flex-shrink: 0;
}
.mi-ico svg { width: 16px; height: 16px; }
[data-theme="dark"] .mi-ico { background: rgba(52,211,153,.12); color: var(--primary-3); }

.marquee-star {
    display: inline-flex; align-items: center;
    width: 14px; height: 14px;
    color: var(--primary);
    opacity: .6;
    flex-shrink: 0;
}
.marquee-star svg { width: 14px; height: 14px; }

/* Rail mood icon */
.rail-mood {
    display: inline-flex !important; align-items: center; gap: .35rem;
}
.rm-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    color: #fff;
}
.rm-ico svg { width: 14px; height: 14px; }
@keyframes marqueeScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
}

/* ─── STAT BAR — pill-shaped, organic, offset cards ────────────────────── */
.stat-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 1.4rem 2rem;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}
.stat-bar::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 140%; height: 240%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, var(--primary-soft) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}
@media (max-width: 700px) {
    .stat-bar {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 1.6rem 1.4rem;
        border-radius: var(--radius-xl);
    }
    .stat-bar-divider { display: none; }
}

.stat-bar-item {
    text-align: center;
    position: relative;
    z-index: 1;
    transition: transform .3s var(--ease);
}
.stat-bar-item:nth-child(1) { transform: translateY(-4px); }
.stat-bar-item:nth-child(3) { transform: translateY(4px); }
.stat-bar-item:nth-child(5) { transform: translateY(-4px); }
.stat-bar-item:nth-child(7) { transform: translateY(4px); }
@media (max-width: 700px) {
    .stat-bar-item:nth-child(n) { transform: none; }
}
.stat-bar-item:hover .sbi-num {
    color: var(--primary);
}

.sbi-num {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: .35rem;
    font-variant-numeric: tabular-nums;
    transition: color .3s var(--ease);
    position: relative;
    display: inline-block;
}
.sbi-num::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: -8%; right: -8%;
    height: .15em;
    background: var(--primary);
    border-radius: 999px;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.stat-bar-item:hover .sbi-num::after {
    opacity: .25;
    transform: scaleX(1);
}
.sbi-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-mute);
}
.stat-bar-divider {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: .35;
    justify-self: center;
    position: relative;
    z-index: 1;
}
.stat-bar-divider:nth-of-type(2) { transform: translateY(-8px); }
.stat-bar-divider:nth-of-type(3) { transform: translateY(6px); }
.stat-bar-divider:nth-of-type(4) { transform: translateY(-4px); }

/* ─── RAIL — horizontal scroll cafe cards ──────────────────────────────── */
.rail-section { width: 100%; }
.rail-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.rail-head h2 {
    font-family: 'Instrument Serif', serif !important;
    font-weight: 400 !important;
    font-size: clamp(2rem, 4.5vw, 3rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.025em !important;
    margin: .25rem 0 0;
    color: var(--text);
}
.rail-head h2 em {
    font-style: italic;
    color: var(--primary);
}
.rail-eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--text-mute);
}

.rail-more {
    display: inline-flex; align-items: center; gap: .55rem;
    color: var(--text);
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    transition: gap .25s var(--ease);
}
.rail-more:hover { gap: .8rem; color: var(--primary); }
.rail-more-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    transition: all .25s var(--ease);
}
.rail-more:hover .rail-more-arrow { background: var(--primary); color: #fff; border-color: transparent; }
.rail-more-arrow svg { width: 14px; height: 14px; }

/* Rail wrapper hosts the rail + nav arrows */
.rail-wrap {
    position: relative;
}
.rail {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    padding: .5rem .3rem 1.5rem;
    margin: 0 -1.2rem;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1.2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    cursor: grab;
}
.rail.is-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; scroll-snap-type: none; }
.rail.is-dragging * { pointer-events: none; }
.rail::-webkit-scrollbar { display: none; }

/* Desktop nav buttons floating over rail edges */
.rail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 5;
    transition: all .25s var(--ease), opacity .25s ease;
}
.rail-nav:hover { background: var(--primary); color: #fff; border-color: transparent; transform: translateY(-50%) scale(1.08); }
.rail-nav svg { width: 18px; height: 18px; }
.rail-nav-prev { left: -8px; }
.rail-nav-next { right: -8px; }
.rail-nav[hidden] { display: none; }
@media (max-width: 900px) {
    .rail-nav { display: none !important; }
    .rail { cursor: auto; }
}
.rail-card {
    flex: 0 0 clamp(220px, 28%, 280px);
    scroll-snap-align: start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: all .3s var(--ease);
    display: flex; flex-direction: column;
}
.rail-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px -10px rgba(0,0,0,.18);
    border-color: var(--primary);
    color: inherit;
    text-decoration: none;
}
.rail-card-cover {
    width: 100%;
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center;
    position: relative;
}
.rail-card-cover::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5) 100%);
}
.rail-occ {
    position: absolute;
    top: .8rem; left: .8rem;
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(8px);
    color: var(--text);
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    z-index: 2;
}
.rail-occ .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-mute); }
.rail-occ.occ-low  .dot { background: var(--ok); box-shadow: 0 0 0 2px rgba(16,185,129,.3); }
.rail-occ.occ-mid  .dot { background: var(--warn); }
.rail-occ.occ-high .dot { background: var(--danger); }
.rail-mood {
    position: absolute;
    bottom: .8rem; left: .8rem;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.rail-card-body {
    padding: 1.1rem 1.2rem 1.2rem;
    flex: 1;
}
.rail-card-body h3 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1.1;
    letter-spacing: -0.015em;
    margin: 0 0 .3rem;
}
.rail-card-meta {
    font-size: .82rem;
    color: var(--text-dim);
    margin: 0;
    display: flex; gap: .4rem;
    align-items: center;
    font-weight: 500;
}
.rail-dot { color: var(--text-mute); }

/* ─── FEATURE BENTO — asymmetric magazine layout ───────────────────────── */
.feat-bento { width: 100%; }
.bento-head {
    margin-bottom: 2.5rem;
    max-width: 700px;
}
.bento-head .rail-eyebrow { display: block; margin-bottom: .6rem; }
.bento-head h2 {
    font-family: 'Instrument Serif', serif !important;
    font-weight: 400 !important;
    font-size: clamp(2.4rem, 5vw, 3.6rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.03em !important;
    margin: 0;
    color: var(--text);
    text-wrap: balance;
}
.bento-head h2 em {
    font-style: italic;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 1rem;
}
@media (max-width: 768px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
.bento {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 1.4rem 1.3rem;
    position: relative; overflow: hidden;
    transition: border-color .3s var(--ease), transform .3s var(--ease);
    display: flex; flex-direction: column;
    justify-content: flex-start;
    box-shadow: var(--shadow-xs);
}
/* Asymmetric corners — feels less boxy */
.bento-2 { border-radius: 28px 28px 28px 60px; }
.bento-3 { border-radius: 28px 60px 28px 28px; }
.bento-4 { border-radius: 60px 28px 28px 28px; }
.bento-5 { border-radius: 28px 28px 60px 28px; }
/* Decorative blob inside each small bento */
.bento-2::before, .bento-3::before, .bento-4::before, .bento-5::before {
    content: '';
    position: absolute;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: var(--primary-soft);
    opacity: .55;
    pointer-events: none;
    z-index: 0;
    filter: blur(20px);
    transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.bento-2::before { top: -50px; right: -40px; }
.bento-3::before { top: -50px; left: -40px; background: var(--accent-soft); }
.bento-4::before { bottom: -50px; left: -40px; background: var(--accent-soft); }
.bento-5::before { bottom: -50px; right: -40px; }
.bento:hover::before { opacity: .9; transform: scale(1.15); }
.bento:hover { border-color: var(--primary); }
.bento-content { position: relative; z-index: 2; }
.bento h3 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 1.1;
    letter-spacing: -0.015em;
    margin: 0 0 .4rem;
    color: var(--text);
}
.bento p {
    margin: 0;
    color: var(--text-dim);
    font-size: .9rem;
    line-height: 1.55;
}

/* Big hero feature card */
.bento-1 {
    grid-column: 1 / span 4;
    grid-row: 1 / span 2;
    background: var(--grad-primary);
    color: #fff;
    border: none;
    min-height: 320px;
    padding: 2rem 1.8rem;
    overflow: hidden;
}
.bento-1 h3, .bento-1 .bento-num { color: #fff; }
.bento-1 p { color: rgba(255,255,255,.92); max-width: 320px; }
.bento-1 .bento-num {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1rem;
    opacity: .7;
    margin-bottom: .8rem;
    display: block;
}
.bento-1 h3 { font-size: 2.2rem; }
.bento-1-illo {
    position: absolute;
    right: -8%;
    top: 50%; transform: translateY(-50%);
    width: 360px; height: 360px;
    color: rgba(255,255,255,.4);
    opacity: .85;
    pointer-events: none;
}
.bento-1-illo svg { width: 100%; height: 100%; }
.bento-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bento-bg svg { width: 100%; height: 100%; }
@media (max-width: 768px) {
    .bento-1 {
        grid-column: 1 / -1; grid-row: auto;
        min-height: 0;
        padding: 1.4rem 1.3rem;
    }
    .bento-1 h3 { font-size: 1.5rem; }
    .bento-1 .bento-num { margin-bottom: .35rem; font-size: .85rem; }
    .bento-1 p { font-size: .9rem; }
    .bento-1-illo {
        width: 110px; height: 110px;
        right: -10px; top: 50%;
    }
    .bento-1 .bento-content { max-width: calc(100% - 90px); }
}

.bento-2 { grid-column: 5 / span 2; grid-row: 1; }
.bento-3 { grid-column: 5 / span 2; grid-row: 2; }
.bento-4 { grid-column: 1 / span 3; grid-row: 3; }
.bento-5 { grid-column: 4 / span 3; grid-row: 3; }
@media (max-width: 768px) {
    .bento-grid { grid-auto-rows: 1fr; }
    .bento-1 { grid-row: 1; }
    .bento-2, .bento-3, .bento-4, .bento-5 { grid-column: span 1; grid-row: auto; }
    .bento-icon-chip { width: 38px; height: 38px; margin-bottom: .7rem; }
    .bento h3 { font-size: 1.25rem; }
    .bento p { font-size: .85rem; line-height: 1.5; }
}

.bento-icon-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: 1rem;
    transition: all .25s var(--ease);
}
.bento-icon-chip svg { width: 22px; height: 22px; }
.bento:hover .bento-icon-chip { transform: scale(1.08); }
.bic-warm {
    background: rgba(245,158,11,.14);
    color: var(--warn);
}
[data-theme="dark"] .bento-icon-chip { background: rgba(52,211,153,.12); color: var(--primary-3); }
[data-theme="dark"] .bic-warm { background: rgba(251,191,36,.14); color: var(--gold); }

/* ─── JOURNEY — 3 connected steps ──────────────────────────────────────── */
.journey { width: 100%; }
.journey-path {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 2rem 0;
}
@media (max-width: 800px) {
    .journey-path { grid-template-columns: 1fr; gap: 1.2rem; padding: 1rem 0; }
    .journey-line { display: none; }
}
.journey-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}
.journey-step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 2rem 1.6rem;
    text-align: center;
    box-shadow: var(--shadow-xs);
    position: relative; z-index: 1;
    transition: border-color .3s var(--ease);
}
.journey-step:hover { border-color: var(--primary); }
.js-num {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 3.5rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .4rem;
}
.journey-step h3 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 1.5rem;
    margin: 0 0 .4rem;
}
.journey-step p {
    color: var(--text-dim);
    font-size: .9rem;
    margin: 0;
}

/* ─── CTA — full-bleed editorial ───────────────────────────────────────── */
.cta-mag {
    position: relative;
    overflow: hidden;
    background: var(--grad-primary);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 4rem 2.5rem;
    min-height: 320px;
    display: flex; align-items: center;
    isolation: isolate;
}
@media (max-width: 700px) { .cta-mag { padding: 3rem 1.5rem; } }
.cta-mag-bg { position: absolute; inset: 0; z-index: -1; }
.ctab {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}
.ctab-1 { top: -30%; right: 10%; width: 320px; height: 320px; background: rgba(255,255,255,.25); }
.ctab-2 { bottom: -20%; left: 5%; width: 280px; height: 280px; background: rgba(255,255,255,.15); }

.cta-mag-cup {
    position: absolute;
    right: 3%;
    top: 50%;
    transform: translateY(-50%);
    width: 240px; height: 240px;
    opacity: .9;
    pointer-events: none;
    animation: cupFloat 6s ease-in-out infinite;
}
.cta-mag-cup svg { width: 100%; height: 100%; }
@keyframes cupFloat {
    0%, 100% { transform: translateY(-50%) rotate(0); }
    50%      { transform: translateY(-54%) rotate(-2deg); }
}
@media (max-width: 700px) { .cta-mag-cup { display: none; } }

.cta-mag-content {
    max-width: 600px;
    position: relative; z-index: 1;
}
.cta-eyebrow { color: rgba(255,255,255,.9); margin-bottom: 1rem; display: inline-block; }
.cta-mag h2 {
    font-family: 'Instrument Serif', serif !important;
    font-weight: 400 !important;
    font-size: clamp(2.4rem, 6vw, 4rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.03em !important;
    margin: 0 0 1rem;
    color: #fff;
    text-wrap: balance;
}
.cta-mag h2 em { font-style: italic; color: rgba(255,255,255,.7); }
.cta-mag p {
    color: rgba(255,255,255,.9);
    font-size: 1.05rem;
    margin: 0 0 1.8rem;
    max-width: 460px;
    line-height: 1.55;
}

/* ===========================================================================
   HERO BENTO — editorial landing v2 (LEGACY, kept for compat)
   =========================================================================== */
.hero-bento {
    position: relative;
    padding: .5rem 0 0;
    overflow: hidden;
    isolation: isolate;
}

/* Animated mesh gradient background */
.hero-mesh {
    position: absolute;
    inset: -10% -10% 0 -10%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}
.mesh-blob.mb-1 {
    top: -20%; left: 5%;
    width: 480px; height: 480px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: .26;
    animation: meshFloat 24s ease-in-out infinite;
}
.mesh-blob.mb-2 {
    top: -5%; right: -5%;
    width: 420px; height: 420px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: .20;
    animation: meshFloat 28s ease-in-out -6s infinite;
}
.mesh-blob.mb-3 {
    top: 30%; left: 40%;
    width: 380px; height: 380px;
    background: radial-gradient(circle, var(--primary-3) 0%, transparent 70%);
    opacity: .16;
    animation: meshFloat 32s ease-in-out -12s infinite;
}
[data-theme="dark"] .mesh-blob.mb-1 { opacity: .13; }
[data-theme="dark"] .mesh-blob.mb-2 { opacity: .10; }
[data-theme="dark"] .mesh-blob.mb-3 { opacity: .08; }
@keyframes meshFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(60px,-40px) scale(1.08); }
    66%      { transform: translate(-40px,60px) scale(.94); }
}

/* Bento grid */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(80px, auto);
    gap: 1rem;
    padding: 1.2rem 0 2.5rem;
}
@media (max-width: 768px) {
    .hero-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; padding: .5rem 0 1.5rem; }
}

.hero-head {
    grid-column: 1 / span 4;
    grid-row: 1 / span 3;
    background: transparent;
    border: none;
    padding: 1.5rem .5rem 1rem 0;
    display: flex; flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: none;
}
@media (max-width: 768px) {
    .hero-head { grid-column: 1 / -1; grid-row: auto; padding: 1rem 0 0; }
}

.hero-head h1 {
    font-family: 'Instrument Serif', 'Times New Roman', serif !important;
    font-weight: 400 !important;
    font-size: clamp(2.3rem, 6.5vw, 4.5rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.025em !important;
    margin: 0 0 1.1rem !important;
    color: var(--text) !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
}
.hero-head h1 em {
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding-right: .12em;
}
.hero-h1-accent {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}
.hero-h1-accent::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: .12em;
    height: .25em;
    background: var(--primary-soft);
    border-radius: 999px;
    z-index: -1;
}
.hero-head .lead {
    color: var(--text-dim);
    font-size: clamp(.95rem, 1.6vw, 1.1rem);
    font-weight: 500;
    line-height: 1.55;
    margin: 0 0 1.6rem;
    max-width: 540px;
}
.hero-head .hero-cta {
    display: flex; gap: .55rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0;
}

/* Stat bento cards */
.hero-stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 1.3rem 1.2rem;
    display: flex; flex-direction: column;
    justify-content: space-between;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-xs);
    min-height: 130px;
    transition: border-color .3s var(--ease);
}
.hero-stat-card:hover { border-color: var(--primary); }
.hero-stat-card-1 { grid-column: 5 / span 2; grid-row: 1; background: var(--grad-primary); color: #fff; border: none; }
.hero-stat-card-2 { grid-column: 5 / span 1; grid-row: 2; }
.hero-stat-card-3 { grid-column: 6 / span 1; grid-row: 2; }
@media (max-width: 768px) {
    .hero-stat-card-1 { grid-column: 1 / -1; grid-row: auto; min-height: 110px; }
    .hero-stat-card-2 { grid-column: 1; grid-row: auto; }
    .hero-stat-card-3 { grid-column: 2; grid-row: auto; }
}
.hsc-num {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.02em;
}
.hsc-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .8;
    margin-top: .3rem;
}
.hero-stat-card-1 .hsc-label { opacity: .92; }
.hsc-ico {
    position: absolute;
    top: 1rem; right: 1rem;
    color: var(--primary);
    opacity: .55;
}
.hero-stat-card-1 .hsc-ico { color: rgba(255,255,255,.35); opacity: 1; }
.hsc-ico svg { width: 22px; height: 22px; }

/* Floating chip */
.hero-float-chip {
    grid-column: 1 / span 4;
    grid-row: 4;
    display: inline-flex;
    align-items: center; gap: .55rem;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    padding: .55rem 1rem .55rem .8rem;
    border-radius: 999px;
    font-size: .85rem; font-weight: 500;
    box-shadow: var(--shadow-xs);
    justify-self: start;
    align-self: center;
    width: fit-content;
}
.hero-float-chip strong { color: var(--primary); font-weight: 800; }
.hfc-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px rgba(52,211,153,.2);
    animation: pulseDot 2.2s ease-in-out infinite;
}
@media (max-width: 768px) {
    .hero-float-chip { grid-column: 1 / -1; }
}

/* Section title with serif em */
.section-title em.display-serif,
.ls-head h2 em.display-serif,
.landing-cta h2 em.display-serif {
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===========================================================================
   LEGACY HERO (kept for compat)
   =========================================================================== */
.hero {
    text-align: center;
    padding: 2rem 0 1rem;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: -10% -20%;
    z-index: -1;
    pointer-events: none;
}
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
    animation: blobFloat 22s ease-in-out infinite;
}
.hero-blob-1 {
    top: -10%; left: 10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}
.hero-blob-2 {
    top: 20%; right: 5%;
    width: 350px; height: 350px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    animation-delay: -8s;
}
[data-theme="dark"] .hero-blob { opacity: .25; }
.hero-h1-em {
    background: var(--grad-warm);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}
.hero-h1-em::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 8px;
    background: var(--grad-primary);
    opacity: .2;
    border-radius: 999px;
    z-index: -1;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--primary-soft);
    color: var(--primary-2);
    padding: .45rem 1rem;
    border-radius: 999px;
    font-size: .82rem; font-weight: 600;
    border: 1px solid rgba(22,163,74,.25);
    margin-bottom: 1.2rem;
}
.hb-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(52,211,153,.2);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(52,211,153,.2); }
    50%      { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
}
[data-theme="dark"] .hero-badge { color: var(--primary-3); border-color: rgba(110,231,183,.4); }

.hero h1 {
    font-size: clamp(2rem, 7vw, 3.4rem);
    font-weight: 800;
    margin: 0 auto .8rem;
    line-height: 1.1;
    max-width: 720px;
    background: var(--grad-primary);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero .lead {
    color: var(--text);
    font-size: clamp(1.05rem, 2.6vw, 1.25rem);
    font-weight: 500;
    max-width: 640px;
    margin: 0 auto 1rem;
}
.hero p {
    color: var(--text-dim);
    font-size: clamp(.92rem, 2vw, 1rem);
    max-width: 620px;
    margin: 0 auto 1.6rem;
    line-height: 1.65;
}
.hero-cta {
    display: flex; gap: .6rem; justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.2rem;
}
.hero-counters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .8rem;
    max-width: 520px;
    margin: 0 auto;
}
.hc {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem .8rem;
    text-align: center;
    box-shadow: var(--shadow-xs);
    transition: all .2s var(--ease);
}
.hc:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.hc strong { display: block; font-size: clamp(1.3rem, 4vw, 1.7rem); color: var(--primary); font-weight: 800; }
.hc span   { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* Generic landing section */
.landing-section { width: 100%; }
.ls-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}
.ls-head h2 { margin: 0; }
.section-title {
    text-align: center;
    margin: 0 auto 2rem;
    font-family: 'Instrument Serif', 'Times New Roman', serif !important;
    font-weight: 400 !important;
    font-size: clamp(1.8rem, 4.5vw, 2.6rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.025em !important;
    color: var(--text);
}
.ls-head h2 {
    font-family: 'Instrument Serif', 'Times New Roman', serif !important;
    font-weight: 400 !important;
    font-size: clamp(1.5rem, 3.6vw, 2rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
    margin: 0;
}

.features3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    width: 100%;
}
.f3 {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.3rem;
    text-align: left;
    transition: all .25s var(--ease);
    position: relative;
    overflow: hidden;
}
.f3::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-primary);
    transform: scaleX(0); transform-origin: left;
    transition: transform .35s var(--ease);
}
.f3:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.f3:hover::before { transform: scaleX(1); }
.f3-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: .8rem;
}
[data-theme="dark"] .f3-icon { background: rgba(52,211,153,.18); color: var(--primary-3); box-shadow: 0 0 16px rgba(52,211,153,.25); }
.f3 h3 { margin: 0 0 .4rem; color: var(--text); font-size: 1.05rem; }
.f3 p  { color: var(--text-dim); margin: 0; font-size: .9rem; line-height: 1.6; }

/* Popular cafe cards on landing */
.landing-cafes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.landing-cafe-card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: inherit; text-decoration: none;
    transition: all .25s var(--ease);
}
.landing-cafe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
    text-decoration: none; color: inherit;
}
.lcc-cover {
    position: relative;
    width: 100%; aspect-ratio: 16/9;
    background: var(--surface-3) center/cover no-repeat;
    overflow: hidden;
}
.lcc-cover::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.45) 100%);
}
.lcc-cover-empty {
    background: var(--grad-primary);
    display: flex; align-items: center; justify-content: center;
}
.lcc-emoji {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.25));
    color: #fff;
    position: relative; z-index: 1;
}
.lcc-cover .occ-pill {
    position: absolute;
    top: .6rem; right: .6rem;
    z-index: 2;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,.92);
    color: var(--text);
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.lcc-cover .occ-pill.occ-low  { background: rgba(16,185,129,.95);  color: #fff; }
.lcc-cover .occ-pill.occ-mid  { background: rgba(217,119,6,.95);   color: #fff; }
.lcc-cover .occ-pill.occ-high { background: rgba(220,38,38,.95);   color: #fff; }
.lcc-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; }
.lcc-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: .6rem;
}
.lcc-head h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.lcc-price   { color: var(--primary); font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.lcc-meta    {
    display: flex; gap: .6rem; flex-wrap: wrap;
    font-size: .78rem; color: var(--text-dim);
    align-items: center;
}
.lcc-checkins { display: inline-flex; align-items: center; gap: .25rem; }
.lcc-checkins::before { content: '☕'; font-size: .8rem; }
.lcc-mood     {
    display: inline-flex; align-items: center; gap: .25rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: .15rem .55rem;
    border-radius: 999px;
    font-weight: 500;
}

/* How it works (3 steps) */
.how-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.how-step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.3rem;
    text-align: center;
    position: relative;
    transition: all .25s var(--ease);
}
.how-step:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.hs-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    font-size: 1.3rem; font-weight: 800;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 18px var(--primary-glow);
}
.how-step h3 { margin-bottom: .4rem; }
.how-step p  { color: var(--text-dim); font-size: .9rem; margin: 0; line-height: 1.6; }

/* Landing final CTA */
.landing-cta {
    background: var(--grad-primary);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 3.5rem 2rem;
    text-align: center;
    box-shadow: 0 18px 48px var(--primary-glow);
    position: relative; overflow: hidden;
}
.landing-cta::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.22), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,.15), transparent 50%);
    pointer-events: none;
}
.landing-cta h2 {
    color: #fff;
    font-family: 'Instrument Serif', 'Times New Roman', serif !important;
    font-weight: 400 !important;
    font-size: clamp(2rem, 5vw, 3.2rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.02em !important;
    margin: 0 auto .8rem;
    max-width: 600px;
    position: relative;
}
.landing-cta h2 em {
    font-style: italic;
    color: rgba(255,255,255,.85);
}
.landing-cta p  {
    color: rgba(255,255,255,.92);
    margin-bottom: 2rem;
    font-size: 1rem;
    position: relative;
    max-width: 500px; margin-left: auto; margin-right: auto;
}
.landing-cta .btn-primary {
    background: #fff;
    color: var(--primary-2);
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    border: none;
}
.landing-cta .btn-primary:hover { background: #fff; filter: brightness(.96); transform: translateY(-2px); }
.landing-cta .btn-primary > svg { color: var(--primary-2); }

/* ===========================================================================
   KESFET (Discover) — V2 layout: map hero + bottom sheet + fab + filter dialog
   =========================================================================== */
.kesfet { max-width: var(--max); margin: 0 auto; padding: 1rem; }

/* --- KESFET V2 ------------------------------------------------------------ */
.kesfet-v2 {
    padding: .8rem .8rem 0;
    max-width: var(--max);
    margin: 0 auto;
    display: flex; flex-direction: column;
    gap: .7rem;
}
@media (max-width: 900px) {
    .kesfet-v2 { padding: .6rem .6rem 0; gap: .5rem; }
    body.kesfet-page { padding-bottom: 0; }
}

/* Compact greeting strip */
.quick-greet {
    display: flex; align-items: center; justify-content: space-between;
    gap: .7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .5rem .9rem .5rem 1rem;
    box-shadow: var(--shadow-xs);
}
.quick-greet .qg-text {
    display: inline-flex; align-items: center; gap: .5rem;
    flex: 1; min-width: 0;
    font-size: .92rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-greet .qg-wave { font-size: 1.1rem; flex-shrink: 0; }
.quick-greet .qg-name strong { color: var(--primary); font-weight: 700; }

.quick-greet .qg-stats {
    display: inline-flex; gap: .35rem;
    flex-shrink: 0;
    align-items: center;
}
.quick-greet .qg-pill {
    display: inline-flex; align-items: center; gap: .25rem;
    background: var(--primary-soft);
    color: var(--primary-2);
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    border: 1px solid rgba(22,163,74,.18);
    line-height: 1;
}
[data-theme="dark"] .quick-greet .qg-pill { color: var(--primary-3); border-color: rgba(110,231,183,.25); background: rgba(52,211,153,.15); }
.quick-greet .qg-pill svg { width: 13px; height: 13px; }
.quick-greet .qg-pill strong { font-weight: 800; }

.quick-greet-guest .qg-name strong { color: var(--primary); }

@media (max-width: 480px) {
    .quick-greet .qg-pill:nth-child(n+3) { display: none; }
    .quick-greet .qg-text { font-size: .85rem; }
}

/* Quests fold (collapsible) */
.quests-fold {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.quests-fold-head {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: "icon title progress chev" "bar bar bar bar";
    align-items: center;
    gap: .5rem;
    padding: .7rem .9rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.quests-fold-head::-webkit-details-marker { display: none; }
.qf-icon {
    grid-area: icon;
    width: 32px; height: 32px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
}
.qf-icon svg { width: 18px; height: 18px; }
.qf-title    { grid-area: title; font-weight: 700; font-size: .92rem; color: var(--text); }
.qf-progress { grid-area: progress; font-size: .78rem; color: var(--primary); font-weight: 700; }
.qf-bar {
    grid-area: bar;
    height: 4px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.qf-bar > span {
    display: block; height: 100%;
    background: var(--grad-primary);
    box-shadow: 0 0 8px var(--primary-glow);
    border-radius: 999px;
    transition: width .5s var(--ease);
}
.qf-chev {
    grid-area: chev;
    color: var(--text-mute); font-size: .85rem;
    transition: transform .25s var(--ease);
}
.quests-fold[open] .qf-chev { transform: rotate(180deg); }
.quests-fold .quests-list {
    padding: .2rem 1rem 1rem;
    margin: 0;
    border-top: 1px dashed var(--line);
}

/* Mood + filter strip — sticky leading filter button + horizontal mood chips */
.mood-strip-wrap {
    position: sticky;
    top: var(--topbar-h);
    z-index: 50;
    margin: 0 -.6rem;
    padding: .35rem .6rem;
    background: var(--bg);
    background-image:
        linear-gradient(var(--bg), var(--bg)),
        var(--bg-noise);
    background-attachment: scroll, fixed;
    display: flex;
    align-items: center;
    gap: .5rem;
}
@media (min-width: 901px) {
    .mood-strip-wrap { position: static; padding: 0; margin: 0; background: transparent; }
}

/* Leading filter trigger button (sits to the LEFT of mood chips, sticky) */
.filter-trigger {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: .35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    padding: .45rem .85rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s var(--ease);
    height: 38px;
    line-height: 1;
    box-shadow: var(--shadow-xs);
    position: relative;
}
.filter-trigger:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.filter-trigger svg { width: 16px; height: 16px; flex-shrink: 0; }
.filter-trigger-label { white-space: nowrap; }
@media (max-width: 380px) {
    .filter-trigger-label { display: none; }
    .filter-trigger { padding: .45rem .55rem; }
}
.filter-trigger-count {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--grad-primary);
    color: #fff;
    border-radius: 999px;
    padding: 1px 6px;
    font-size: .65rem;
    font-weight: 800;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 6px var(--primary-glow);
}

.mood-strip {
    display: flex; gap: .4rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: center;
    padding: .25rem .1rem;
    scroll-snap-type: x proximity;
    flex: 1; min-width: 0;
}
.mood-strip::-webkit-scrollbar { display: none; }
.mood-strip .mood-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .45rem .8rem .45rem .55rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
    cursor: pointer;
    transition: all .2s var(--ease);
    display: inline-flex; align-items: center; gap: .35rem;
    height: 38px;
    line-height: 1;
}
.mood-strip .mood-chip .mc-emoji {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    background: var(--surface-2);
    border-radius: 50%;
    font-size: .95rem;
    flex-shrink: 0;
    color: var(--text-dim);
}
.mood-strip .mood-chip .mc-emoji svg { width: 14px; height: 14px; }
.mood-strip .mood-chip.active .mc-emoji { color: #fff; }
.mood-strip .mood-chip .mc-label { line-height: 1; }
.mood-strip .mood-chip:hover { color: var(--primary); border-color: var(--primary); }
.mood-strip .mood-chip.active {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.mood-strip .mood-chip.active .mc-emoji { background: rgba(255,255,255,.25); }

/* Discover stage */
.discover-stage {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 901px) {
    .discover-stage {
        grid-template-columns: 1.4fr 1fr;
        gap: 1rem;
        align-items: start;
    }
}

/* Map sizing in discover-stage */
.discover-stage .map {
    width: 100%;
    height: calc(100vh - var(--topbar-h) - 200px);
    min-height: 440px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
@media (max-width: 900px) {
    .discover-stage {
        margin: 0 -.6rem;
    }
    .discover-stage .map {
        border-radius: 0;
        border-left: none; border-right: none;
        height: calc(100vh - var(--topbar-h) - var(--bottom-h) - 130px);
        min-height: 380px;
    }
}
@media (min-width: 901px) {
    .discover-stage .map { height: calc(100vh - var(--topbar-h) - 180px); min-height: 520px; }
}

/* FABs — floating action buttons over the map */
.fab {
    position: absolute;
    min-width: 48px; height: 48px;
    padding: 0 .8rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--primary);
    box-shadow: var(--shadow);
    display: inline-flex; align-items: center; justify-content: center;
    gap: .35rem;
    cursor: pointer;
    z-index: 600;
    transition: all .2s var(--ease);
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
}
.fab:hover { transform: scale(1.05); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.fab-top-right { top: 1rem; right: 1rem; }
.fab.loading { opacity: .7; pointer-events: none; }

/* fab-pill kept for backward compat but no longer used on map */
@media (max-width: 900px) {
    .fab-top-right { top: .9rem; right: .9rem; }
}

/* Cafe sheet (re-tune for v2) */
.cafe-sheet {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.cafe-sheet-handle {
    display: flex; align-items: center; justify-content: center;
    padding: .6rem 0 .45rem;
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
}
.cafe-sheet-handle:active { cursor: grabbing; }
.cafe-sheet-grabber {
    width: 44px; height: 5px;
    background: var(--line-2);
    border-radius: 999px;
    display: block;
    transition: background .2s var(--ease);
}
.cafe-sheet-handle:hover .cafe-sheet-grabber { background: var(--primary); }
.cafe-sheet-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: .35rem 1rem .7rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.cafe-sheet-header h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.cafe-sheet-header small { color: var(--text-dim); font-size: .78rem; }

.cafe-sheet > #cafe-list,
.cafe-sheet > .cafe-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .7rem .7rem 1rem;
    margin: 0;
    list-style: none;
    display: flex; flex-direction: column;
    gap: .7rem;
}
/* Cards inside the sheet need a distinct background from the sheet itself */
.cafe-sheet .cafe-card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    min-height: 100px;
}
.cafe-sheet .cafe-card:hover {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
[data-theme="dark"] .cafe-sheet .cafe-card {
    background: var(--surface-2);
}
.cafe-sheet .cafe-card .cafe-card-link {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: .7rem;
    align-items: stretch;
}
.cafe-sheet .cafe-card .cafe-card-cover {
    aspect-ratio: 1 / 1;
    width: 96px; height: 96px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background-size: cover; background-position: center;
}
.cafe-sheet .cafe-card .cafe-card-cover .occ-pill {
    position: absolute;
    top: .4rem; left: .4rem;
    font-size: .65rem !important;
    padding: .2rem .5rem !important;
    color: #fff !important;
    border: none !important;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    letter-spacing: .02em;
    line-height: 1;
}
/* When JS sets occ-pill via inline color too (in route-info card) — force readable */
.cafe-card-meta .occ-pill,
.cafe-popup .occ-pill,
.route-info .occ-pill { color: #fff !important; border: none !important; font-weight: 700; }
.cafe-sheet .cafe-card .cafe-card-cover .mood-pct {
    position: absolute;
    bottom: .35rem; left: .35rem;
    background: rgba(255,255,255,.92);
    color: var(--text);
    padding: .12rem .4rem;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 700;
}
.cafe-sheet .cafe-card .cafe-card-body {
    padding: .7rem .8rem .7rem 0;
    display: flex; flex-direction: column;
    gap: .25rem;
    min-width: 0;
}
.cafe-sheet .cafe-card .cafe-card-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: .4rem;
    margin: 0;
}
.cafe-sheet .cafe-card .cafe-card-head h3 {
    font-size: .92rem;
    line-height: 1.25;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cafe-sheet .cafe-card .cafe-card-head .price {
    color: var(--primary);
    font-weight: 700;
    font-size: .8rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.cafe-sheet .cafe-card .cafe-card-meta {
    display: flex; gap: .4rem; flex-wrap: wrap;
    font-size: .72rem;
    color: var(--text-dim);
    align-items: center;
    margin: 0;
}
.cafe-sheet .cafe-card .cafe-card-foot {
    font-size: .72rem;
    color: var(--text-mute);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}
.cafe-sheet .cafe-card .cafe-card-route {
    position: absolute;
    top: .35rem; right: .35rem;
    width: 30px; height: 30px;
    font-size: .85rem;
}
.cafe-list-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 2rem 1rem;
    font-size: .9rem;
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.loading-spinner {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 3px solid var(--line);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Desktop: cafe-sheet as side panel, no drag */
@media (min-width: 901px) {
    .cafe-sheet {
        position: relative;
        max-height: calc(100vh - var(--topbar-h) - 180px);
        min-height: 520px;
        transform: none !important;  /* override BottomSheet JS inline transform */
    }
    .cafe-sheet-handle { display: none; }
    .cafe-sheet-header { padding-top: 1rem; }
}

/* Mobile: cafe-sheet as draggable bottom sheet */
@media (max-width: 900px) {
    .cafe-sheet {
        position: fixed;
        left: 0; right: 0;
        top: 0;
        height: 100vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        border: none;
        border-top: 1px solid var(--line);
        box-shadow: 0 -10px 32px rgba(10,30,18,.18);
        z-index: 950;
        transform: translateY(50vh);
        transition: transform .35s var(--ease);
        padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom));
    }
    .cafe-sheet.dragging { transition: none; }
    [data-theme="dark"] .cafe-sheet {
        box-shadow: 0 -10px 36px rgba(0,0,0,.6), 0 -1px 0 rgba(110,231,183,.2);
    }
}

/* Filter sheet (dialog) */
.filter-sheet {
    border: none;
    padding: 0;
    background: transparent;
    color: var(--text);
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    inset: 0;
    overflow: hidden;
}
.filter-sheet::backdrop {
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(8px);
}
.filter-sheet[open] {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    background: transparent;
    box-shadow: none;
}
.filter-sheet-panel {
    width: min(560px, 100%);
    max-height: 90dvh;
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: slideUp .35s var(--ease);
}
@media (min-width: 720px) {
    .filter-sheet[open] { justify-content: center; padding: 2rem; }
    .filter-sheet-panel {
        border-radius: var(--radius-lg);
        max-height: 86vh;
        animation: popIn .3s var(--ease);
    }
}
[data-theme="dark"] .filter-sheet-panel {
    box-shadow: var(--shadow-lg), 0 0 20px rgba(52,211,153,.07);
}

/* Bottom-sheet sürükleme tutamacı (yalnızca mobilde anlamlı) */
.filter-sheet-grabber {
    display: block;
    width: 42px; height: 4px;
    border-radius: 999px;
    background: var(--line-2);
    margin: .55rem auto 0;
    flex-shrink: 0;
}
@media (min-width: 720px) { .filter-sheet-grabber { display: none; } }

.filter-sheet-close-form {
    position: absolute;
    top: .85rem; right: .85rem;
    margin: 0;
    z-index: 2;
}
.filter-sheet-close-form .modal-close-btn svg { width: 16px; height: 16px; }

.filter-sheet-head {
    padding: 1.3rem 1.3rem .6rem;
    border-bottom: 1px solid var(--line);
}
.filter-sheet-head h2 { margin: 0 0 .15rem; font-size: 1.2rem; }
.filter-sheet-head p  { margin: 0; font-size: .85rem; }

.filter-sheet-body {
    padding: 1rem 1.3rem;
    overflow-y: auto;
    flex: 1;
    display: flex; flex-direction: column;
    gap: 1.2rem;
}

.filter-sheet-foot {
    padding: .9rem 1.3rem calc(.9rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
    display: flex; gap: .6rem;
    flex-shrink: 0;
}
.filter-sheet-foot .btn { flex: 1; }
.btn-block-flex { flex: 2 !important; }

.filter-group { display: flex; flex-direction: column; gap: .55rem; }
.filter-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Hide the shadow native selects (they exist for JS compatibility) */
.seg-shadow {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Segmented control */
.seg-control {
    display: flex;
    gap: .25rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .3rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.seg-control::-webkit-scrollbar { display: none; }
.seg-control > button {
    flex: 1 0 auto;
    background: transparent;
    border: none;
    padding: .5rem .9rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    transition: all .2s var(--ease);
    white-space: nowrap;
    min-height: 36px;
    line-height: 1;
}
.seg-control > button:hover:not(.active) { color: var(--text); }
.seg-control > button.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}
[data-theme="dark"] .seg-control > button.active {
    background: var(--grad-primary);
    color: var(--text-on-primary);
    box-shadow: 0 4px 14px var(--primary-glow);
}

/* Switch (iOS-style toggle) */
.filter-switch {
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    user-select: none;
}
.filter-switch .fs-text {
    display: inline-flex; align-items: center; gap: .55rem;
    font-weight: 600; font-size: .92rem;
    color: var(--text);
}
.filter-switch .fs-text svg { width: 18px; height: 18px; color: var(--text-dim); }
.switch { position: relative; display: inline-flex; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
    width: 46px; height: 26px;
    background: var(--line-2);
    border-radius: 999px;
    position: relative;
    transition: background .25s var(--ease);
}
.switch-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    transition: transform .25s var(--ease);
}
.switch input:checked + .switch-track { background: var(--grad-primary); box-shadow: 0 4px 12px var(--primary-glow); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }

/* Search input with icon */
.search-input {
    position: relative;
    display: flex; align-items: center;
}
.search-input svg {
    position: absolute;
    left: .85rem;
    width: 18px; height: 18px;
    color: var(--text-mute);
    pointer-events: none;
}
.search-input input[type="search"] {
    width: 100%;
    padding: .75rem 1rem .75rem 2.5rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: .92rem;
    min-height: 44px;
    transition: all .2s var(--ease);
}
.search-input input[type="search"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
    background: var(--surface);
}

/* Feature chips with checkbox */
.chips-feature {
    display: flex; flex-wrap: wrap;
    gap: .4rem;
}
.chips-feature .chip {
    display: inline-flex; align-items: center;
    padding: .45rem .85rem;
    cursor: pointer;
    user-select: none;
    position: relative;
}
.chips-feature .chip input[type="checkbox"] {
    position: absolute;
    opacity: 0; pointer-events: none;
}
.chips-feature .chip:has(input:checked) {
    background: var(--grad-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--primary-glow);
    font-weight: 700;
}
.chips-feature .chip:has(input:checked) span::before {
    content: '✓ ';
    font-weight: 800;
}



.welcome-strip {
    background: var(--grad-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 12px 30px var(--primary-glow);
    position: relative; overflow: hidden;
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 1rem;
}
.welcome-strip::before {
    content: ''; position: absolute; top: -30%; right: -10%;
    width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255,255,255,.12); filter: blur(40px);
    pointer-events: none;
}
.welcome-strip .welcome-text { flex: 1 1 220px; min-width: 0; position: relative; z-index: 1; }
.welcome-strip h2 { color: #fff; font-size: 1.25rem; margin-bottom: .2rem; }
.welcome-strip p  { color: rgba(255,255,255,.9); margin: 0; font-size: .9rem; }
.welcome-strip .muted { color: rgba(255,255,255,.85); }
.welcome-strip > .btn,
.welcome-strip > .btn-primary {
    background: rgba(255,255,255,.95);
    color: var(--primary-2);
    border: none;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    position: relative; z-index: 1;
    flex-shrink: 0;
}
.welcome-strip > .btn:hover { background: #fff; color: var(--primary-2); }
.welcome-strip-guest { /* Same base; just a marker for variants */ }

.welcome-stats {
    display: flex; gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    margin-top: .2rem;
    position: relative; z-index: 1;
}
.ws-pill {
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: .45rem .9rem;
    border-radius: 999px;
    font-size: .78rem; font-weight: 500;
    border: 1px solid rgba(255,255,255,.28);
    display: inline-flex; align-items: center; gap: .35rem;
    flex: 0 0 auto;
    height: 34px;
    line-height: 1;
}
.ws-pill strong { font-weight: 800; font-size: .92rem; }
.ws-pill span   { opacity: .9; }

.filters {
    display: flex; flex-direction: column;
    gap: .25rem;
    padding: 0;
    margin-bottom: 1rem;
}

.quests-strip {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xs);
    list-style: none;
}
.quests-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .8rem;
    font-weight: 700;
    color: var(--text);
    font-size: .95rem;
}
.quests-head small { font-weight: 500; color: var(--text-dim); font-size: .8rem; }
.quests-list {
    display: flex; flex-direction: column;
    gap: .8rem;
    list-style: none; padding: 0; margin: 0;
}
.quest-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .35rem .6rem;
    align-items: center;
}
.quest-item .quest-text {
    grid-column: 1 / -1;
    font-size: .88rem;
    color: var(--text);
    display: flex; justify-content: space-between; align-items: center;
    gap: .5rem;
}
.quest-item .quest-text strong { color: var(--primary); font-weight: 700; }
.quest-item .quest-bar {
    grid-column: 1 / 2;
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.quest-item .quest-bar > span {
    display: block; height: 100%;
    background: var(--grad-primary);
    border-radius: 999px;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width .5s var(--ease);
}
.quest-item small {
    grid-column: 2 / 3;
    font-weight: 700;
    color: var(--text-dim);
    font-size: .78rem;
    white-space: nowrap;
}
.quest-item.done .quest-text { opacity: .6; text-decoration: line-through; text-decoration-color: var(--text-mute); }
.quest-item.done .quest-bar > span { background: var(--ok); }

/* Hoş geldin (onboarding) rehberi — günlük görev kartının bir varyantı */
.onboarding-fold { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.onboarding-fold .qf-icon { display: grid; place-items: center; font-size: 17px; }
a.quest-text { text-decoration: none; color: inherit; }
a.quest-text:hover span { color: var(--primary); }
.onboarding-final {
    list-style: none;
    margin-top: .4rem;
    padding-top: .7rem;
    border-top: 1px dashed var(--line);
    font-size: .84rem;
    color: var(--text-dim);
}
.onboarding-final strong { color: var(--primary); }

/* Görev şerit (kategori) rozeti + haftalık kart vurgusu */
.quest-serit { font-size: .9em; margin-right: .1rem; }
.weekly-fold { border-color: color-mix(in srgb, var(--primary) 28%, var(--line)); }

/* Dijital ödül kartı + teslim edilen kod */
.reward-card.reward-digital { border-color: color-mix(in srgb, var(--primary) 32%, var(--line)); }
.redemption-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .82rem; font-weight: 700;
    padding: .3rem .6rem; border-radius: 8px; cursor: pointer;
    background: var(--surface-3, rgba(0,0,0,.06)); color: var(--text);
    border: 1px dashed var(--line); white-space: nowrap;
}
.redemption-code:hover { border-color: var(--primary); color: var(--primary); }

.moodbar {
    display: flex; gap: .4rem; overflow-x: auto;
    padding: .4rem 0 .8rem;
    scrollbar-width: none;
    align-items: center;
}
.moodbar::-webkit-scrollbar { display: none; }
.mood-chip {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .5rem .9rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
    cursor: pointer;
    transition: all .2s var(--ease);
    display: inline-flex; align-items: center; gap: .3rem;
    flex-shrink: 0;
    flex-grow: 0;
    height: 38px;
    line-height: 1;
}
.mood-chip:hover { color: var(--primary); border-color: var(--primary); }
.mood-chip.active {
    background: var(--grad-primary);
    border-color: transparent; color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.filterbar {
    display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
    margin-bottom: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .75rem .8rem;
}
.filterbar label {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .8rem; color: var(--text-dim); font-weight: 600;
    margin: 0;
}
.filterbar label.check { gap: .35rem; }
.filterbar label.check input[type="checkbox"] {
    width: 16px; height: 16px; min-height: 0; accent-color: var(--primary);
}
.filterbar input[type="search"],
.filterbar input[type="text"],
.filterbar select {
    padding: .45rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: .85rem;
    font-weight: 500;
    min-height: 36px;
    width: auto;
    max-width: 100%;
    appearance: none;
    -webkit-appearance: none;
}
.filterbar input[type="search"] { min-width: 160px; flex: 1; }
.filterbar select {
    padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
                      linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
    background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}
.filterbar input:focus, .filterbar select:focus {
    outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
.filterbar .btn { flex-shrink: 0; }
@media (max-width: 640px) {
    .filterbar { flex-direction: column; align-items: stretch; }
    .filterbar label { justify-content: space-between; }
    .filterbar input[type="search"] { min-width: 0; width: 100%; }
    .filterbar .featuresfold { width: 100%; }
}

.featuresfold {
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: .9rem 1rem;
    border: 1px solid var(--line);
    margin-bottom: 1rem;
}
.featuresfold summary { font-weight: 600; cursor: pointer; padding: .2rem 0; }
.featuresfold[open]   { background: var(--surface); box-shadow: var(--shadow-xs); }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text-dim);
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s var(--ease);
    user-select: none;
}
.chip:hover  { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-2); font-weight: 600; }

/* Kesfet body grid */
.kesfet-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 980px) {
    .kesfet-body {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===========================================================================
   MAP & LEAFLET overrides
   =========================================================================== */
.map {
    width: 100%; height: 520px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    position: relative;
}
@media (max-width: 640px) {
    .map { height: 60vh; min-height: 380px; }
}

.leaflet-container { background: var(--bg-2); font-family: inherit; }
.leaflet-pane,
.leaflet-top,
.leaflet-bottom,
.leaflet-control { z-index: 400; }
.leaflet-tooltip-pane,
.leaflet-popup-pane { z-index: 700; }
.leaflet-tooltip {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .25rem .5rem;
    font-size: .8rem;
    box-shadow: var(--shadow-sm);
}
.leaflet-tooltip::before { display: none; }
.leaflet-control-zoom a {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--line) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface-2) !important; }
.leaflet-control-attribution {
    background: var(--surface-glass) !important;
    color: var(--text-dim) !important;
    font-size: .68rem;
}
.leaflet-control-attribution a { color: var(--primary) !important; }

/* User pulsing dot */
.user-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--info);
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,.3), 0 0 18px rgba(37,99,235,.6);
    animation: pulseUser 2s ease-in-out infinite;
}
@keyframes pulseUser {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37,99,235,.3), 0 0 18px rgba(37,99,235,.6); }
    50%      { box-shadow: 0 0 0 10px rgba(37,99,235,0),   0 0 22px rgba(37,99,235,.9); }
}

/* Cafe pins */
.cafe-pin-wrap { position: relative; display: inline-block; }
.cafe-pin {
    --ring: var(--primary);
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--ring);
    border: 3px solid #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 14px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.04);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
    position: relative;
}
.cafe-pin:hover { transform: scale(1.14); box-shadow: 0 9px 22px rgba(0,0,0,.32); z-index: 2; }
.cafe-pin-body {
    width: 100%; height: 100%;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
}
.cafe-pin-occ {
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,.28);
}
.cafe-pin.is-nodata { --ring: #9aa0a6; }
.cafe-pin.is-closed { filter: grayscale(.65) opacity(.72); }
.cafe-pin.is-closed .cafe-pin-occ { font-size: .62rem; }
.cafe-pin-tip   {
    position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
    width: 12px; height: 12px;
    background: var(--ring);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.cafe-pin-rating {
    position: absolute; top: -6px; left: -6px;
    background: var(--gold); color: #fff;
    font-size: .65rem; font-weight: 800;
    border-radius: 999px;
    padding: 1px 5px;
    border: 2px solid var(--surface);
}
.cafe-pin-fav {
    position: absolute; top: -6px; right: -6px;
    color: var(--danger); font-size: .85rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}
.cafe-pin-halo {
    position: absolute; inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--ring, var(--primary));
    opacity: .5;
    animation: haloPulse 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes haloPulse {
    0%   { transform: scale(.9); opacity: .55; }
    100% { transform: scale(1.6); opacity: 0; }
}
.cafe-pin.featured { box-shadow: 0 0 0 4px rgba(52,211,153,.35), 0 8px 22px var(--primary-glow); }

.cafe-cluster-wrap { position: relative; display: inline-block; }
.cafe-cluster {
    background: var(--grad-primary);
    color: #fff;
    border-radius: 50%;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .95rem;
    border: 3px solid var(--surface);
    box-shadow: 0 6px 20px var(--primary-glow);
    transition: transform .25s var(--ease);
}
.cafe-cluster:hover { transform: scale(1.1); }
.cafe-cluster.large { width: 56px; height: 56px; font-size: 1.05rem; }

.leaflet-marker-icon { transition: filter .15s; }

/* ===========================================================================
   CAFE LIST + CARDS
   =========================================================================== */
.cafe-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 720px) {
    .cafe-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* Mobile cafe sheet (bottom sheet) */
.cafe-sheet {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: .8rem 1rem 1.2rem;
}
.cafe-sheet-handle {
    display: flex; align-items: center; justify-content: center;
    padding: .3rem 0 .6rem;
    cursor: grab;
}
.cafe-sheet-grabber {
    width: 44px; height: 5px;
    background: var(--line-2);
    border-radius: 999px;
    display: block;
}
.cafe-sheet-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .8rem;
    padding: 0 .2rem;
}
.cafe-sheet-header h3 { margin: 0; font-size: 1rem; }
.cafe-sheet-header small { color: var(--text-dim); font-size: .8rem; }

/* Mobile-only: turn cafe-sheet into a bottom drag sheet */
@media (max-width: 979px) {
    .cafe-sheet {
        position: fixed;
        left: 0; right: 0; bottom: var(--bottom-h);
        bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom));
        z-index: 950;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        border: none;
        border-top: 1px solid var(--line);
        box-shadow: 0 -10px 32px rgba(10,30,18,.2);
        max-height: 70vh;
        overflow-y: auto;
        transform: translateY(calc(100% - 130px));
        transition: transform .35s var(--ease);
    }
    .cafe-sheet[data-state="full"]  { transform: translateY(0); }
    .cafe-sheet[data-state="half"]  { transform: translateY(40%); }
    .cafe-sheet[data-state="peek"]  { transform: translateY(calc(100% - 70px)); }
    body:has(.cafe-sheet) main.kesfet .map { height: calc(100vh - var(--topbar-h) - var(--bottom-h) - 140px); }
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: skel 1.4s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
@keyframes skel {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.cafe-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .25s var(--ease);
    position: relative;
}
.cafe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.cafe-card-link { color: inherit; display: block; text-decoration: none; }
.cafe-card-link:hover { text-decoration: none; }
.cafe-card-cover {
    width: 100%; aspect-ratio: 16 / 9;
    background: var(--surface-3) center/cover no-repeat;
    position: relative;
}
.cafe-card-cover::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.35) 100%);
}
.cafe-card-cover .badge-corner {
    position: absolute; top: .6rem; left: .6rem; z-index: 1;
    background: var(--grad-primary); color: #fff;
    padding: .25rem .6rem; border-radius: 999px;
    font-size: .72rem; font-weight: 700;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.cafe-card-body { padding: 1rem 1.1rem; }
.cafe-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .35rem; gap: .6rem; }
.cafe-card-head h3 { margin: 0; font-size: 1.05rem; }
.cafe-card-head .star { color: var(--gold); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.cafe-card-meta { color: var(--text-dim); font-size: .82rem; margin-bottom: .55rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cafe-card-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.cafe-card-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }

.occ-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .25rem .65rem;
    font-size: .76rem; font-weight: 600;
    color: var(--text-dim);
}
.occ-pill.low,
.occ-pill.occ-low  { background: rgba(16,185,129,.14); color: var(--ok);     border-color: rgba(16,185,129,.35); }
.occ-pill.mid,
.occ-pill.occ-mid  { background: rgba(217,119,6,.14);  color: var(--warn);   border-color: rgba(217,119,6,.35); }
.occ-pill.high,
.occ-pill.occ-high { background: rgba(220,38,38,.14);  color: var(--danger); border-color: rgba(220,38,38,.35); }

.mood-pct {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .76rem; font-weight: 600;
    color: var(--text-dim);
}

.tag {
    display: inline-flex; align-items: center;
    font-weight: 700; font-size: .76rem;
    padding: .15rem .5rem;
    border-radius: 999px;
}
.tag-open   { color: var(--ok); background: rgba(16,185,129,.13); border: 1px solid rgba(16,185,129,.3); }
.tag-closed { color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger); }
.cafe-card-meta .dot { color: var(--text-dim); font-size: .76rem; display: inline-flex; align-items: center; gap: .2rem; }
.cafe-card-head .price { color: var(--primary); font-weight: 700; font-size: .85rem; flex-shrink: 0; }

/* Card with a floating route button (kesfet list) */
.cafe-card { position: relative; }
.cafe-card > .cafe-card-route {
    position: absolute;
    top: .6rem; right: .6rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--primary);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
    z-index: 2;
    transition: all .2s var(--ease);
}
.cafe-card > .cafe-card-route:hover { transform: scale(1.1); box-shadow: var(--shadow); }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim);
    display: flex; flex-direction: column; align-items: center;
}
.empty-state .ico,
.empty-state .empty-icon {
    font-size: 3.2rem;
    margin-bottom: .8rem;
    display: inline-flex; align-items: center; justify-content: center;
    opacity: .7;
}
.empty-state .empty-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-mute);
}
.empty-state .empty-icon svg { width: 36px; height: 36px; }
.empty-state h3   { color: var(--text); margin-bottom: .35rem; }
.empty-state p    { margin-bottom: 1rem; max-width: 360px; }

/* ===========================================================================
   CAFE DETAIL V2 — full cover hero, overlapping card, sticky action bar
   =========================================================================== */
.cafe-detail-v2 {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 0 calc(var(--bottom-h) + 90px);
}
@media (min-width: 901px) {
    .cafe-detail-v2 { padding-bottom: 2rem; }
}
.cafe-detail-v2 .cafe-cover {
    position: relative;
    width: 100%;
    height: clamp(240px, 38vw, 380px);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.cafe-detail-v2 .cafe-cover::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, transparent 25%, rgba(0,0,0,.5) 100%);
}
.cafe-back, .cafe-share {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    color: var(--text);
    border: none;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    text-decoration: none;
    transition: all .2s var(--ease);
}
.cafe-back { left: 1rem; }
.cafe-share { right: 1rem; }
.cafe-back:hover, .cafe-share:hover { transform: scale(1.05); }
.cafe-back svg, .cafe-share svg { width: 20px; height: 20px; }
@media (min-width: 901px) {
    .cafe-back, .cafe-share { display: none; }
}

/* Hero card */
.cafe-detail-v2 .cafe-hero {
    position: relative;
    margin: -50px 1rem 0;
    padding: 1.3rem 1.3rem 1rem;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    z-index: 2;
    border: 1px solid var(--line);
}
@media (max-width: 480px) {
    .cafe-detail-v2 .cafe-hero { margin: -40px .8rem 0; padding: 1.1rem 1.1rem .9rem; }
}
[data-theme="dark"] .cafe-detail-v2 .cafe-hero {
    box-shadow: var(--shadow), 0 0 18px rgba(52,211,153,.05);
}

.cafe-title-row {
    display: flex; align-items: flex-start;
    gap: .7rem;
    margin-bottom: .8rem;
}
.cafe-title-text { flex: 1; min-width: 0; }
.cafe-title-text h1 {
    margin: 0 0 .3rem;
    font-family: 'Instrument Serif', 'Times New Roman', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}
.cafe-address {
    margin: 0;
    color: var(--text-dim);
    font-size: .85rem;
    display: flex; align-items: flex-start; gap: .35rem;
    line-height: 1.4;
}
.cafe-address svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--text-mute); }

.cafe-fav {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--line-2);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all .2s var(--ease);
}
.cafe-fav:hover { transform: scale(1.05); color: var(--danger); border-color: var(--danger); }
.cafe-fav.active {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: var(--danger);
    animation: heartPulse .5s var(--ease);
}
.cafe-fav svg { width: 22px; height: 22px; }
@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}

.cafe-chips {
    display: flex; flex-wrap: wrap; gap: .4rem;
    margin-bottom: .8rem;
}
.cafe-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: .8rem;
    color: var(--text-dim);
    font-weight: 500;
    line-height: 1.2;
}
.cafe-chip strong { color: var(--text); font-weight: 700; }
.cafe-chip small  { color: var(--text-mute); font-size: .72rem; }
.cafe-chip svg    { width: 13px; height: 13px; }

.cafe-chip-price { color: var(--primary); font-weight: 800; background: var(--primary-soft); border-color: rgba(22,163,74,.2); }
.cafe-chip-rating { color: var(--gold); }
.cafe-chip-rating svg { color: var(--gold); }
.cafe-chip-mood { background: var(--accent-soft); border-color: rgba(16,185,129,.25); color: var(--accent); }

.cafe-chip-occ .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-mute);
}
.cafe-chip-occ.occ-low  { color: var(--ok); background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); }
.cafe-chip-occ.occ-low .dot { background: var(--ok); box-shadow: 0 0 8px rgba(16,185,129,.5); }
.cafe-chip-occ.occ-mid  { color: var(--warn); background: rgba(217,119,6,.12); border-color: rgba(217,119,6,.3); }
.cafe-chip-occ.occ-mid .dot { background: var(--warn); box-shadow: 0 0 8px rgba(217,119,6,.5); }
.cafe-chip-occ.occ-high { color: var(--danger); background: var(--danger-soft); border-color: rgba(220,38,38,.3); }
.cafe-chip-occ.occ-high .dot { background: var(--danger); box-shadow: 0 0 8px rgba(220,38,38,.5); }

.cafe-desc {
    margin: .4rem 0 .8rem;
    color: var(--text);
    font-size: .92rem;
    line-height: 1.6;
}

/* Quick actions inside hero */
.cafe-detail-v2 .cafe-quick-actions {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    margin: 0;
    padding-top: .9rem;
    border-top: 1px solid var(--line);
}
.cafe-detail-v2 .quick-act {
    padding: .55rem .4rem;
    gap: .3rem;
    border: none;
    background: transparent;
}
.cafe-detail-v2 .quick-act:hover {
    background: var(--primary-soft);
    color: var(--primary);
    transform: none;
}
.cafe-detail-v2 .quick-act .qa-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .2s var(--ease);
}
.cafe-detail-v2 .quick-act .qa-icon svg { width: 18px; height: 18px; }
.cafe-detail-v2 .quick-act:hover .qa-icon { background: var(--grad-primary); color: #fff; box-shadow: 0 4px 12px var(--primary-glow); }
.cafe-detail-v2 .quick-act .qa-label { font-size: .72rem; }

/* Sections */
.cafe-detail-v2 .cafe-section {
    margin: 1.4rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.2rem;
    box-shadow: var(--shadow-xs);
}
.cafe-detail-v2 .cafe-section h2 {
    margin-bottom: .8rem;
    font-size: 1.05rem;
    display: inline-flex; align-items: center; gap: .55rem;
}
.cafe-detail-v2 .cafe-section h2 svg { width: 18px; height: 18px; color: var(--primary); }

/* Feature tags */
.feature-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-feature {
    background: var(--primary-soft);
    color: var(--primary-2);
    border: 1px solid rgba(22,163,74,.2);
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
}
[data-theme="dark"] .tag-feature { color: var(--primary-3); border-color: rgba(110,231,183,.3); background: rgba(52,211,153,.12); }

/* Menu category */
.cafe-detail-v2 .menu-cat {
    padding: 0;
    background: transparent;
    border: none;
    margin: 0 0 1rem;
}
.cafe-detail-v2 .menu-cat:last-child { margin-bottom: 0; }
.cafe-detail-v2 .menu-cat h3 {
    margin-bottom: .5rem;
    color: var(--primary);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}
.cafe-detail-v2 .menu li {
    padding: .5rem .2rem;
}
.cafe-detail-v2 .menu li strong { color: var(--primary); }

/* Star rating */
.rating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.rating-item label {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: .3rem;
}
.rating-ico {
    width: 22px; height: 22px;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.rating-ico svg { width: 13px; height: 13px; }
[data-theme="dark"] .rating-ico { background: rgba(52,211,153,.15); color: var(--primary-3); }
.star-rate {
    display: inline-flex;
    gap: .15rem;
}
.star-rate button {
    background: transparent;
    border: none;
    color: var(--line-2);
    cursor: pointer;
    padding: .2rem;
    transition: all .15s var(--ease);
}
.star-rate button svg { width: 22px; height: 22px; }
.star-rate button:hover { transform: scale(1.15); color: var(--gold); }
.star-rate button.on { color: var(--gold); filter: drop-shadow(0 1px 4px rgba(202,138,4,.4)); }

.review-form {
    display: flex; flex-direction: column;
    gap: 1rem;
}
.review-form .field label { font-weight: 600; font-size: .85rem; color: var(--text-dim); margin-bottom: .3rem; display: block; }
.review-form textarea {
    width: 100%;
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: .95rem;
    font-family: inherit;
    min-height: 80px;
    transition: all .2s var(--ease);
}
.review-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); background: var(--surface); }

/* Reviews list */
.cafe-detail-v2 .reviews > li {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}
.cafe-detail-v2 .reviews .rev-head {
    display: flex; align-items: center;
    gap: .6rem;
    margin-bottom: .5rem;
}
.cafe-detail-v2 .reviews .rev-head .user-avatar {
    width: 36px; height: 36px;
    flex-shrink: 0;
}
.cafe-detail-v2 .reviews .rev-head .rev-meta {
    flex: 1;
    display: flex; flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}
.cafe-detail-v2 .reviews .rev-head .rev-meta strong { font-size: .9rem; color: var(--text); }
.cafe-detail-v2 .reviews .rev-head .rev-meta small  { font-size: .72rem; color: var(--text-dim); }
.cafe-detail-v2 .reviews .rating {
    display: inline-flex; align-items: center; gap: .25rem;
    color: var(--gold);
    font-weight: 700;
    background: rgba(202,138,4,.12);
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .82rem;
}
.cafe-detail-v2 .reviews .rating svg { width: 13px; height: 13px; }
.cafe-detail-v2 .reviews .rev-body { margin: 0; line-height: 1.55; font-size: .92rem; }

/* Empty state inline */
.empty-state.empty-inline { padding: 1rem; }
.empty-state.empty-inline p { margin: 0; }

/* Sticky bottom action bar (mobile) */
.cafe-bottom-bar {
    position: fixed;
    left: 0; right: 0;
    bottom: var(--bottom-h);
    bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom));
    z-index: 800;
    display: flex; gap: .5rem;
    padding: .7rem 1rem;
    background: var(--surface-glass);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-top: 1px solid var(--line);
}
[data-theme="dark"] .cafe-bottom-bar {
    box-shadow: 0 -10px 28px rgba(0,0,0,.5);
}
.cafe-bottom-bar .btn { min-height: 48px; }
.cafe-bottom-bar .btn-block-flex { flex: 1; }
@media (min-width: 901px) {
    .cafe-bottom-bar { display: none; }
}

/* Report dialog */
.report-dialog {
    border: none;
    padding: 0;
    background: transparent;
    color: var(--text);
    width: min(420px, 100%);
    margin: auto;
}
.report-dialog::backdrop {
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(8px);
}
.report-dialog[open] {
    display: block;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    margin: auto auto 0;
    padding: 1.4rem 1.3rem calc(1.4rem + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-lg);
    animation: slideUp .35s var(--ease);
    position: relative;
}
@media (min-width: 720px) {
    .report-dialog[open] {
        border-radius: var(--radius-lg);
        margin: auto;
        animation: popIn .3s var(--ease);
    }
}
.report-dialog h3 { margin: 0 0 .3rem; padding-right: 2.5rem; }
.report-dialog p  { margin: 0 0 1rem; font-size: .9rem; }
.report-close {
    position: absolute;
    top: .8rem; right: .8rem;
}

.occ-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: .5rem;
}
.occ-buttons .occ-btn {
    display: flex; flex-direction: column; align-items: center;
    gap: .25rem;
    padding: .85rem .4rem;
    border-radius: var(--radius);
    border: 2px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: all .2s var(--ease);
}
.occ-buttons .occ-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
.occ-buttons .occ-btn-emoji { font-size: 1.5rem; }
.occ-buttons .occ-btn-label { font-size: .78rem; font-weight: 600; }
.occ-btn-0:hover, .occ-btn-1:hover { border-color: var(--ok); }
.occ-btn-2:hover { border-color: var(--warn); }
.occ-btn-3:hover, .occ-btn-4:hover { border-color: var(--danger); }

/* ===========================================================================
   LEGACY CAFE DETAIL (kept for compatibility)
   =========================================================================== */
.cafe-detail { max-width: var(--max); margin: 0 auto; padding: 0 0 calc(var(--bottom-h) + 2rem); }
.cafe-cover {
    width: 100%;
    height: clamp(220px, 35vw, 360px);
    background: var(--surface-3) center/cover no-repeat;
    position: relative;
    overflow: hidden;
}
.cafe-cover::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.55) 100%);
}
.cafe-hero {
    padding: 1rem 1rem 1.4rem;
    margin-top: -3rem;
    position: relative; z-index: 1;
    background: var(--surface);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    box-shadow: 0 -8px 24px rgba(10,30,18,.06);
}
.cafe-hero h1 { margin-bottom: .3rem; }
.cafe-hero .muted { font-size: .9rem; }

.cafe-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: .6rem;
    margin: 1rem 0;
}
.cafe-stats > div {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .8rem .6rem;
    text-align: center;
}
.cafe-stats strong { display: block; font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.cafe-stats span   { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }

.cafe-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }

.cafe-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: .55rem;
    margin: 1rem 0 1.4rem;
}
.quick-act {
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: .8rem .5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .2s var(--ease);
    text-decoration: none;
    color: var(--text);
}
.quick-act:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.quick-act .ico  { font-size: 1.4rem; }
.quick-act .label{ font-size: .72rem; color: var(--text-dim); font-weight: 600; text-align: center; }

.cafe-section {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}
.cafe-section h2 { margin-bottom: .8rem; }

.feature-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.feature-tags .chip { background: var(--primary-soft); border-color: rgba(22,163,74,.3); color: var(--primary-2); }

.menu-cat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: .8rem;
}
.menu-cat h3 { margin-bottom: .6rem; color: var(--primary); }
.menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.menu li {
    display: flex; justify-content: space-between; align-items: center;
    padding: .35rem 0;
    border-bottom: 1px dashed var(--line);
}
.menu li:last-child { border-bottom: none; }
.menu li strong { color: var(--primary); font-weight: 700; }

.reviews { display: flex; flex-direction: column; gap: .8rem; }
.reviews > article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}
.rev-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .5rem;
    font-size: .85rem; color: var(--text-dim);
}
.rev-head strong { color: var(--text); }

/* ===========================================================================
   PROFILE
   =========================================================================== */
.profile { max-width: var(--max); margin: 0 auto; padding: 1rem 1rem calc(var(--bottom-h) + 2rem); }

.profile-hero {
    background: var(--grad-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.4rem 1.4rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 14px 36px var(--primary-glow);
    position: relative; overflow: hidden;
}

/* Profile hero v2 — banner + overlapping avatar + grid layout */
.profile-hero-v2 {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    padding: 0;
    box-shadow: var(--shadow-xs);
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "banner banner banner"
        "avatar id      actions"
        "bio    bio     bio"
        "soc    soc     soc"
        "stats  stats   stats";
    gap: .6rem 1rem;
    padding-bottom: 1.2rem;
    border-radius: var(--radius-xl);
}
@media (max-width: 560px) {
    .profile-hero-v2 {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "banner  banner"
            "avatar  id"
            "actions actions"
            "bio     bio"
            "soc     soc"
            "stats   stats";
    }
}
.ph-banner {
    grid-area: banner;
    height: 110px;
    background: var(--grad-primary);
    background-image: var(--grad-primary),
        radial-gradient(circle at 30% 70%, rgba(255,255,255,.25), transparent 60%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
    overflow: hidden;
}
.ph-banner::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(120px 100px at 20% 30%, rgba(255,255,255,.25), transparent 70%),
        radial-gradient(160px 100px at 80% 70%, rgba(255,255,255,.15), transparent 70%);
}

.profile-hero-v2 .profile-avatar-wrap {
    grid-area: avatar;
    margin-top: -52px;
    margin-left: 1.4rem;
}
.profile-hero-v2 .profile-avatar {
    width: 96px; height: 96px;
    border: 4px solid var(--surface);
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    background: var(--surface-2);
    color: var(--text);
}
[data-theme="dark"] .profile-hero-v2 .profile-avatar { box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 0 4px var(--surface); }
.profile-avatar-initial {
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-primary);
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
}

.profile-hero-v2 .avatar-badges {
    bottom: 2px; right: 2px;
}
.profile-hero-v2 .avatar-badge {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--surface);
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.profile-hero-v2 .profile-id {
    grid-area: id;
    align-self: end;
    padding: .8rem 1rem .2rem 0;
    min-width: 0;
}
@media (max-width: 560px) {
    .profile-hero-v2 .profile-id { padding-top: 0; align-self: center; }
    .profile-hero-v2 .profile-avatar-wrap { margin-bottom: .4rem; }
}
.profile-hero-v2 h1 {
    margin: 0;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    line-height: 1.15;
}
.profile-handle {
    margin: .15rem 0 0;
    display: flex; align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    font-size: .85rem;
    color: var(--text-dim);
}
.profile-handle .profile-loc {
    display: inline-flex; align-items: center; gap: .25rem;
    color: var(--text-mute);
    font-size: .8rem;
}
.profile-handle svg { width: 12px; height: 12px; }

.profile-hero-v2 .profile-actions {
    grid-area: actions;
    align-self: end;
    padding-right: 1.2rem;
    padding-top: .8rem;
    display: flex; gap: .4rem;
    flex-wrap: wrap;
}
@media (max-width: 560px) {
    .profile-hero-v2 .profile-actions {
        padding: 0 1.2rem;
        width: 100%;
    }
    .profile-hero-v2 .profile-actions .btn { flex: 1; min-width: 0; }
    .profile-hero-v2 .profile-actions .btn-icon-only { flex: 0 0 auto; }
}
.btn-icon-only {
    width: 44px; height: 44px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon-only svg { width: 18px; height: 18px; }

.profile-hero-v2 .profile-bio {
    grid-area: bio;
    margin: .6rem 1.2rem 0;
    background: var(--surface-2);
    border-left: 3px solid var(--primary);
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: .9rem;
    line-height: 1.55;
    font-style: italic;
}
.profile-hero-v2 .profile-socials {
    grid-area: soc;
    margin: .4rem 1.2rem 0;
    display: flex; flex-wrap: wrap; gap: .4rem;
}
.profile-hero-v2 .profile-socials .social-chip svg { width: 14px; height: 14px; }

/* Stats v2 — horizontal scroll on mobile, grid on desktop */
.profile-stats-v2 {
    grid-area: stats;
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: .9rem 1.2rem 0;
    margin: .4rem 0 0;
}
.profile-stats-v2::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
    .profile-stats-v2 {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
}
.profile-stats-v2 .stat {
    flex: 0 0 110px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .8rem .55rem;
    text-align: center;
    color: var(--text);
    backdrop-filter: none;
    transition: all .2s var(--ease);
}
.profile-stats-v2 .stat:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.profile-stats-v2 .stat strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.15;
}
.profile-stats-v2 .stat span {
    font-size: .68rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
    opacity: 1;
}

/* Section head — small chip showing count */
.badge-count-chip {
    background: var(--primary-soft);
    color: var(--primary-2);
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    border: 1px solid rgba(22,163,74,.2);
}
[data-theme="dark"] .badge-count-chip { color: var(--primary-3); background: rgba(52,211,153,.15); border-color: rgba(110,231,183,.3); }

/* Fav card foot */
.fav-card-foot {
    display: flex; align-items: center; gap: .4rem;
    margin-top: .4rem;
}
.fav-price { color: var(--text-dim); font-size: .82rem; font-weight: 700; }

/* Visit list — extra polish */
.visits > li {
    transition: all .2s var(--ease);
}
.visits > li small {
    display: flex; gap: .35rem; flex-wrap: wrap; align-items: center;
    margin-top: .15rem;
}
.visits .visit-pts {
    color: var(--primary);
    font-weight: 700;
    margin-left: auto;
    background: var(--primary-soft);
    padding: .12rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
}
[data-theme="dark"] .visits .visit-pts { background: rgba(52,211,153,.15); color: var(--primary-3); }
.profile-hero::before {
    content: ''; position: absolute; top: -40%; right: -10%;
    width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255,255,255,.15); filter: blur(50px);
}
.profile-hero::after {
    content: ''; position: absolute; bottom: -50%; left: -10%;
    width: 280px; height: 280px; border-radius: 50%;
    background: rgba(255,255,255,.1); filter: blur(40px);
}
.profile-hero h1 { color: #fff; font-size: 1.5rem; margin-bottom: .2rem; }
.profile-hero .muted { color: rgba(255,255,255,.85); }

.profile-hero-row {
    display: flex; align-items: center; gap: 1rem;
    position: relative; z-index: 1;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.profile-hero-row > div:nth-child(2) {
    flex: 1 1 200px;
    min-width: 0;
}
.profile-hero-row .profile-actions {
    flex-shrink: 0;
    width: auto;
}
@media (max-width: 560px) {
    .profile-hero-row .profile-actions { width: 100%; }
    .profile-hero-row .profile-actions .btn { flex: 1; }
}

.profile-avatar {
    width: 84px; height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.95);
    box-shadow: 0 6px 18px rgba(0,0,0,.2);
    background: var(--surface-2);
    flex-shrink: 0;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
.profile-avatar-wrap .profile-avatar { display: block; }

.avatar-badges {
    position: absolute;
    bottom: -4px; right: -4px;
    display: flex; gap: 2px;
}
.avatar-badge {
    background: var(--surface);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 999px;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.avatar-badge.gold   { border-color: var(--gold); color: var(--gold); }
.avatar-badge.silver { border-color: var(--silver); color: var(--silver); }
.avatar-badge.bronze { border-color: var(--bronze); color: var(--bronze); }
.avatar-badges + .profile-avatar { /* no-op for selector chain */ }
.profile-avatar-wrap + h1 { margin: 0; }
.profile-avatar-wrap .change-photo {
    position: absolute; bottom: -4px; left: -4px;
    background: var(--surface); border: 2px solid var(--line);
    border-radius: 999px; padding: .25rem .5rem; font-size: .7rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: .6rem;
    position: relative; z-index: 1;
}
.profile-stats > .stat,
.profile-stats > div {
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: var(--radius);
    padding: .8rem .5rem;
    text-align: center;
    color: #fff;
    transition: transform .2s var(--ease);
}
.profile-stats > .stat:hover,
.profile-stats > div:hover { transform: translateY(-2px); }
.profile-stats strong { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.15; }
.profile-stats span   { font-size: .68rem; opacity: .92; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.profile-stats > div a { color: #fff; text-decoration: none; }

.profile-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xs);
}
.profile-section h2 { margin-bottom: .8rem; font-size: 1.05rem; }

.visits {
    display: flex; flex-direction: column; gap: .5rem;
    list-style: none; padding: 0; margin: 0;
}
.visits > li, .visits > div {
    display: flex; flex-direction: column; gap: .15rem;
    padding: .7rem .9rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    transition: all .2s var(--ease);
}
.visits > li:hover { border-color: var(--primary); transform: translateX(3px); }
.visits a { color: var(--text); text-decoration: none; }
.visits a:hover { color: var(--primary); }
.visits strong { font-size: .95rem; }
.visits small { font-size: .76rem; }

.ptx {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: .35rem;
    font-size: .88rem;
}
.ptx > li {
    display: flex; align-items: center; gap: .8rem;
    padding: .55rem .8rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}
.ptx > li > span:first-child {
    font-weight: 800;
    min-width: 50px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.ptx .pos { color: var(--ok); }
.ptx .neg { color: var(--danger); }
.ptx .reason { flex: 1; color: var(--text); font-weight: 500; }
.ptx small { color: var(--text-mute); font-size: .72rem; flex-shrink: 0; }

.hours-editor { display: flex; flex-direction: column; gap: .4rem; }
.hour-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: .6rem;
    align-items: center;
}
.hour-day  { font-weight: 600; color: var(--text-dim); font-size: .85rem; }
.hour-time {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .5rem .7rem;
    color: var(--text);
}

.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .7rem;
    list-style: none; padding: 0; margin: 0;
}

/* Müdavim olunan kafeler — profil özeti */
.mudavim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .7rem;
    list-style: none; padding: 0; margin: 0;
}
.mudavim-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: all .2s var(--ease);
}
.mudavim-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--primary); }
.mudavim-card a { display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; }
.mudavim-emoji { font-size: 1.6rem; line-height: 1; }
.mudavim-info { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.mudavim-info strong { font-size: .9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mudavim-info small { font-size: .76rem; }
.fav-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .2s var(--ease);
    list-style: none;
}
.fav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--primary); }
.fav-card a {
    display: flex; flex-direction: column;
    gap: .25rem;
    padding: .85rem .9rem;
    color: var(--text);
    text-decoration: none;
}
.fav-card a:hover { color: var(--primary); text-decoration: none; }
.fav-card strong { font-size: .95rem; line-height: 1.3; }
.fav-card small { font-size: .76rem; color: var(--text-dim); }
.fav-card .pill { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-2); font-size: .65rem !important; }
.fav-card .cover {
    width: 100%; aspect-ratio: 1 / 1;
    background: var(--surface-3) center/cover no-repeat;
}

.badges-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .7rem;
}
.badge-tile {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .9rem .55rem .8rem;
    text-align: center;
    transition: all .25s var(--ease);
    position: relative;
}
.badge-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--primary); }
.badge-tile .badge-icon,
.badge-tile .ico {
    font-size: 2rem; display: block; margin-bottom: .35rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.12));
}
.badge-tile .badge-name,
.badge-tile .name {
    font-size: .78rem; font-weight: 700; color: var(--text);
    line-height: 1.25;
}
.badge-tile .badge-desc,
.badge-tile .desc {
    font-size: .68rem; color: var(--text-dim); margin-top: .25rem;
    line-height: 1.4;
}
.badge-tile.locked   { opacity: .45; filter: grayscale(.7); }
.badge-tile.unlocked,
.badge-tile.earned   {
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: 0 4px 14px var(--primary-glow);
}
[data-theme="dark"] .badge-tile.unlocked,
[data-theme="dark"] .badge-tile.earned {
    background: rgba(52,211,153,.14);
    box-shadow: 0 0 18px rgba(52,211,153,.25);
}
.badge-tile.showcase {
    background: var(--grad-primary);
    border: none;
    color: #fff;
    box-shadow: 0 8px 22px var(--primary-glow);
}
.badge-tile.showcase .badge-name { color: #fff; }
.badge-tile.showcase .badge-icon { filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }

/* ===========================================================================
   PAGE HERO — generic header used on leaderboard, rewards, etc.
   =========================================================================== */
.page-hero {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.4rem;
    padding: 1.2rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: var(--primary-soft);
    filter: blur(60px);
    pointer-events: none;
}
[data-theme="dark"] .page-hero::before { background: rgba(52,211,153,.18); }

.page-hero .ph-icon {
    width: 56px; height: 56px;
    border-radius: 18px;
    background: var(--grad-primary);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 24px var(--primary-glow);
    position: relative; z-index: 1;
}
.page-hero .ph-icon svg { width: 28px; height: 28px; }
.page-hero .ph-text { position: relative; z-index: 1; min-width: 0; }
.page-hero h1 {
    margin: 0 0 .15rem;
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
    font-family: 'Instrument Serif', 'Times New Roman', serif !important;
    font-weight: 400 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.05 !important;
    color: var(--text) !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
}
.page-hero h1 em {
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-hero p  { margin: 0; color: var(--text-dim); font-size: .92rem; }

/* ===========================================================================
   NOTIFICATIONS
   =========================================================================== */
.notif { max-width: var(--max); margin: 0 auto; padding: 1rem 1rem calc(var(--bottom-h) + 2rem); }
.page-hero-action { margin-left: auto; position: relative; z-index: 1; flex-shrink: 0; }

.notif-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column;
    gap: .6rem;
}
.notif-item {
    display: flex; gap: .8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    transition: all .25s var(--ease);
    position: relative;
}
.notif-item:hover { transform: translateX(3px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.notif-item.is-read { opacity: .65; }
.notif-item.is-unread { border-left: 3px solid var(--primary); }

.notif-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.notif-checkin .notif-icon   { background: rgba(22,163,74,.14); }
.notif-streak .notif-icon    { background: rgba(217,119,6,.14); }
.notif-occupancy .notif-icon { background: rgba(37,99,235,.14); }
.notif-reward .notif-icon    { background: var(--primary-soft); }
.notif-badge .notif-icon     { background: rgba(202,138,4,.14); }
.notif-admin .notif-icon     { background: var(--surface-3); }
[data-theme="dark"] .notif-checkin .notif-icon { background: rgba(52,211,153,.18); }

.notif-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    gap: .2rem;
}
.notif-head {
    display: flex; align-items: center; gap: .4rem;
}
.notif-head strong { font-size: .95rem; line-height: 1.3; }
.notif-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    flex-shrink: 0;
}
.notif-body {
    color: var(--text-dim);
    font-size: .88rem;
    margin: 0;
    line-height: 1.5;
}
.notif-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem;
    margin-top: .25rem;
}
.notif-foot small { color: var(--text-mute); font-size: .72rem; }
.notif-action {
    display: inline-flex; align-items: center; gap: .2rem;
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    transition: gap .15s var(--ease);
}
.notif-action svg { width: 14px; height: 14px; }
.notif-action:hover { gap: .4rem; }

/* ===========================================================================
   LEADERBOARD
   =========================================================================== */
.leader { max-width: var(--max); margin: 0 auto; padding: 1rem 1rem calc(var(--bottom-h) + 2rem); }
.leader h1 { margin-bottom: 1rem; }
.leader .user-search { margin-bottom: 1.2rem; }

/* Scrollable tabs row */
.tabs.tabs-scroll {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    margin: 0 -.5rem 1.2rem;
    padding: .3rem .5rem;
}
.tabs.tabs-scroll::-webkit-scrollbar { display: none; }
.tabs.tabs-scroll .tab svg { width: 16px; height: 16px; }

.tabs {
    display: flex; gap: .25rem;
    background: var(--surface-2);
    padding: .3rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    overflow-x: auto;
}
.tab {
    flex: 0 0 auto;
    padding: .55rem 1rem;
    border-radius: 999px;
    text-align: center;
    cursor: pointer;
    font-weight: 600; font-size: .85rem;
    color: var(--text-dim);
    transition: all .2s var(--ease);
    background: transparent;
    border: none;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: .35rem;
    line-height: 1;
    min-height: 36px;
}
.tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
    text-decoration: none;
}
.tab:hover:not(.active) { color: var(--text); text-decoration: none; }
.tab .badge-count { margin-left: .25rem; }

/* ===========================================================================
   ÜYELER / LİDERLİK — editorial leaderboard
   =========================================================================== */
.members {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1rem calc(var(--bottom-h) + 2.5rem);
}

/* ---------- Editorial hero ---------- */
.mb-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 6vw, 3.4rem) clamp(1.2rem, 5vw, 2.6rem);
    margin: 1rem 0 1.6rem;
    background:
        radial-gradient(ellipse at 12% 8%, var(--primary-soft), transparent 55%),
        radial-gradient(ellipse at 92% 0%, var(--accent-soft), transparent 50%),
        var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.mb-hero-mesh { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.mb-blob {
    position: absolute; border-radius: 50%;
    filter: blur(80px); will-change: transform;
}
.mb-blob-1 {
    width: 320px; height: 320px; top: -90px; left: -70px;
    background: var(--primary-glow); opacity: .85;
    animation: mb-drift-1 20s ease-in-out infinite alternate;
}
.mb-blob-2 {
    width: 260px; height: 260px; bottom: -110px; right: -60px;
    background: var(--accent-soft); opacity: .9;
    animation: mb-drift-2 24s ease-in-out infinite alternate;
}
@keyframes mb-drift-1 { from { transform: translate(0,0); } to { transform: translate(34px,30px); } }
@keyframes mb-drift-2 { from { transform: translate(0,0); } to { transform: translate(-40px,-26px); } }
@media (prefers-reduced-motion: reduce) { .mb-blob { animation: none; } }

.mb-hero-inner { position: relative; z-index: 1; }

.mb-eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .4rem .85rem .4rem .65rem;
    margin-bottom: 1.1rem;
    font-size: .68rem; font-weight: 800; letter-spacing: .14em;
    text-transform: uppercase; color: var(--text-dim);
    background: var(--surface-glass);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-xs);
}
.mb-eyebrow-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 0 var(--primary-glow);
    animation: mb-pulse 2.2s ease-in-out infinite;
}
@keyframes mb-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
    50%      { box-shadow: 0 0 0 7px transparent; }
}
@media (prefers-reduced-motion: reduce) { .mb-eyebrow-dot { animation: none; } }

.mb-title {
    font-size: clamp(1.9rem, 6.5vw, 3.1rem);
    line-height: 1.1; letter-spacing: -.015em;
    font-weight: 800; color: var(--text);
    margin: 0 0 .7rem;
    text-wrap: balance;
}
.mb-title em {
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic; font-weight: 400;
    background: var(--grad-primary);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-right: .04em;
}
.mb-lead {
    font-size: clamp(.95rem, 2.4vw, 1.12rem);
    line-height: 1.55;
    color: var(--text-dim);
    margin: 0;
    max-width: 46ch;
    text-wrap: pretty;
}

/* Community stat strip */
.mb-stats {
    display: flex; align-items: center;
    gap: clamp(.8rem, 4vw, 1.8rem);
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.mb-stat { display: flex; flex-direction: column; line-height: 1.1; }
.mb-stat strong {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    font-weight: 800; color: var(--text);
    font-variant-numeric: tabular-nums;
}
.mb-stat span {
    font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-mute);
    margin-top: .2rem;
}
.mb-stat-sep {
    width: 1px; height: 30px;
    background: var(--line-2);
    flex-shrink: 0;
}

/* ---------- Search inside members ---------- */
.members .user-search { margin: 0 0 1.2rem; }

/* ---------- Segmented tabs ---------- */
.mb-tabs {
    display: flex; gap: .3rem;
    margin: 0 -1rem 1.6rem;
    padding: .35rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.mb-tabs::-webkit-scrollbar { display: none; }
.mb-tab {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .55rem .95rem;
    border-radius: 999px;
    font-size: .85rem; font-weight: 600; line-height: 1;
    color: var(--text-dim);
    background: var(--surface-2);
    border: 1px solid var(--line);
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s var(--ease);
    scroll-snap-align: start;
}
.mb-tab svg { width: 16px; height: 16px; opacity: .8; }
.mb-tab:hover {
    color: var(--text); border-color: var(--line-2);
    text-decoration: none; transform: translateY(-1px);
}
.mb-tab.active {
    color: var(--text-on-primary);
    background: var(--grad-primary);
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 6px 18px var(--primary-glow);
}
.mb-tab.active svg { opacity: 1; }
.mb-tab .badge-count {
    background: rgba(255,255,255,.25);
    color: inherit;
}
.mb-tab:not(.active) .badge-count { background: var(--danger); color: #fff; }

/* ---------- Podium ---------- */
.podium {
    display: grid;
    grid-template-columns: 1fr 1.18fr 1fr;
    gap: clamp(.4rem, 2vw, .8rem);
    align-items: end;
    margin: .5rem 0 2rem;
}
.pod-spot {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    padding: 1.2rem .6rem 0;
    text-decoration: none; color: var(--text);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: transform .25s var(--ease);
}
.pod-spot:hover { transform: translateY(-5px); text-decoration: none; color: var(--text); }
.pod-empty { pointer-events: none; }
.pod-1 { order: 0; padding-top: 0; }

/* Crown over #1 */
.pod-crown {
    color: var(--gold);
    margin-bottom: .25rem;
    filter: drop-shadow(0 3px 8px rgba(202,138,4,.45));
    animation: mb-crown 3.5s ease-in-out infinite;
}
.pod-crown svg { width: 30px; height: 30px; }
@keyframes mb-crown {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-4px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) { .pod-crown { animation: none; } }

.pod-medal {
    font-size: .72rem; font-weight: 800;
    color: var(--text-mute);
    margin-bottom: .5rem;
    letter-spacing: .03em;
}

/* Avatar with gradient ring */
.pod-avatar-ring {
    position: relative;
    border-radius: 50%;
    padding: 3px;
    background: var(--line-2);
}
.pod-avatar {
    display: block;
    width: 64px; height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--surface);
    background: var(--surface);
}
.pod-avatar .user-avatar {
    width: 100%; height: 100%;
    border-radius: 50%;
    font-size: 1.5rem;
}
.pod-1 .pod-avatar { width: 82px; height: 82px; }
.pod-1 .pod-avatar-ring { background: var(--grad-gold); box-shadow: 0 8px 24px rgba(202,138,4,.35); }
.pod-2 .pod-avatar-ring { background: linear-gradient(135deg, #cbd5e1, var(--silver)); }
.pod-3 .pod-avatar-ring { background: linear-gradient(135deg, #f0b27a, var(--bronze)); }

.pod-name {
    font-weight: 700; font-size: .92rem;
    margin-top: .55rem;
    max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pod-handle {
    font-size: .72rem; color: var(--text-mute);
    max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pod-pts {
    font-weight: 800; font-size: 1.25rem;
    color: var(--primary);
    margin-top: .35rem;
    font-variant-numeric: tabular-nums;
}
.pod-pts span { font-size: .72rem; font-weight: 600; color: var(--text-mute); }
.pod-1 .pod-pts { font-size: 1.5rem; }
.pod-trust {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .72rem; font-weight: 700;
    color: var(--text-dim);
    margin: .4rem 0 .9rem;
}
.pod-trust svg { width: 13px; height: 13px; color: var(--primary); }

/* Pedestal base */
.pod-base {
    width: 100%;
    margin-top: auto;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900;
    color: var(--text-on-primary);
    border-radius: var(--radius) var(--radius) 0 0;
}
.pod-1 .pod-base { height: 64px; font-size: 1.8rem; background: var(--grad-gold); }
.pod-2 .pod-base { height: 48px; font-size: 1.4rem; background: linear-gradient(135deg, #cbd5e1, var(--silver)); color: #1f2937; }
.pod-3 .pod-base { height: 38px; font-size: 1.3rem; background: linear-gradient(135deg, #f0b27a, var(--bronze)); }
.pod-spot.me .pod-name::after {
    content: 'sen';
    display: inline-block;
    margin-left: .35rem;
    font-size: .6rem; font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    padding: .1rem .4rem; border-radius: 999px;
    vertical-align: middle;
}

/* ---------- Ranked list (4+) ---------- */
.lb-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column;
    gap: .5rem;
}
.lb-row {
    display: flex; align-items: center; gap: .85rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .65rem .9rem;
    transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.lb-row:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.lb-rank {
    flex-shrink: 0;
    min-width: 28px; text-align: center;
    font-weight: 800; font-size: .95rem;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
}
.lb-link {
    display: flex; align-items: center; gap: .7rem;
    flex: 1; min-width: 0;
    color: inherit; text-decoration: none;
}
.lb-link:hover { color: inherit; text-decoration: none; }
.lb-link .user-avatar { width: 44px; height: 44px; }
.lb-name {
    display: flex; flex-direction: column;
    min-width: 0; line-height: 1.25;
    font-weight: 700; color: var(--text);
}
.lb-name small {
    font-weight: 400; font-size: .75rem;
    color: var(--text-dim);
    margin-top: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-you {
    font-size: .62rem; font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    padding: .1rem .4rem; border-radius: 999px;
}
.lb-trust {
    display: inline-flex; align-items: center; gap: .25rem;
    flex-shrink: 0;
    font-size: .72rem; font-weight: 700;
    color: var(--text-dim);
    padding: .25rem .55rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
}
.lb-trust svg { width: 12px; height: 12px; color: var(--primary); }
.lb-pts {
    flex-shrink: 0;
    font-weight: 800; font-size: 1.15rem;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.lb-pts small { font-size: .72rem; font-weight: 600; color: var(--text-mute); }
.lb-row.me {
    border-color: var(--primary);
    background: var(--primary-soft);
}

@media (max-width: 520px) {
    .lb-trust { display: none; }
    .pod-handle { display: none; }
    .mb-stat-sep { height: 24px; }
}

/* User search wrapper (input fixed inline-styled in PHP) */
.user-search {
    position: relative;
}
.user-search input[type="search"] {
    transition: all .2s var(--ease);
}
.user-search input[type="search"]:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: var(--ring);
}

/* ===========================================================================
   REWARDS
   =========================================================================== */
.rewards { max-width: var(--max); margin: 0 auto; padding: 1rem 1rem calc(var(--bottom-h) + 2rem); }
.rewards-hero {
    background: var(--grad-warm);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.4rem;
    margin-bottom: 1.4rem;
    box-shadow: 0 14px 36px var(--primary-glow);
    position: relative; overflow: hidden;
    display: flex; flex-wrap: wrap; gap: 1rem;
    align-items: center; justify-content: space-between;
}
.rewards-hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 80% 0%, rgba(255,255,255,.22), transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(255,255,255,.12), transparent 60%);
    pointer-events: none;
}
.rewards-hero > div { position: relative; z-index: 1; }
.rewards-hero h1 { color: #fff; font-size: 1.4rem; margin-bottom: .3rem; }
.rewards-hero .muted { color: rgba(255,255,255,.9); font-size: .9rem; }
.my-points {
    font-size: 2.6rem; font-weight: 900; line-height: 1;
    text-shadow: 0 4px 16px rgba(0,0,0,.25);
    background: linear-gradient(180deg, #fff 0%, #e7f9ef 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.my-points-lab {
    font-size: .75rem;
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    margin-top: .25rem;
}

.reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0; margin: 0;
}
.reward-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.1rem .9rem;
    transition: all .25s var(--ease);
    display: flex; flex-direction: column;
    gap: .35rem;
    position: relative; overflow: hidden;
}
.reward-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-primary);
    transform: scaleX(0); transform-origin: left;
    transition: transform .35s var(--ease);
}
.reward-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.reward-card:hover::before { transform: scaleX(1); }
.reward-card h3 { margin: 0; font-size: 1.05rem; }
.reward-card p  { color: var(--text-dim); font-size: .88rem; margin: .2rem 0 0; line-height: 1.55; }
.reward-card small { display: block; margin-top: .2rem; font-size: .76rem; }

.reward-foot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto;
    padding-top: .9rem;
    border-top: 1px dashed var(--line);
    gap: .6rem;
}
.reward-foot strong {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 800;
    display: inline-flex; align-items: center; gap: .2rem;
}
.reward-foot strong::before { content: '⭐'; font-size: .95rem; }
.reward-card .btn-redeem:disabled {
    opacity: .55;
    cursor: not-allowed;
    background: var(--surface-3);
    color: var(--text-mute);
    box-shadow: none;
}

.redemptions {
    display: flex; flex-direction: column; gap: .55rem;
    list-style: none;
    padding: 0; margin: 0;
}
.redemptions > li {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .8rem 1rem;
    display: flex; align-items: center;
    gap: .8rem;
    transition: all .2s var(--ease);
}
.redemptions > li:hover { border-color: var(--primary); transform: translateX(3px); }
.redemptions > li small { color: var(--text-dim); font-size: .78rem; }

.redemption-row .redemption-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-mute);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.redemption-row .redemption-icon svg { width: 18px; height: 18px; }
.redemption-row.redemption-active .redemption-icon  { background: var(--primary-soft); color: var(--primary); }
.redemption-row.redemption-redeemed .redemption-icon { background: rgba(37,99,235,.15); color: var(--info); }
.redemption-row.redemption-expired .redemption-icon  { background: var(--surface-3); color: var(--text-mute); }
.redemption-row .redemption-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: .15rem;
}
.redemption-row .redemption-info strong {
    font-size: .92rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.redemption-row .pill { flex-shrink: 0; }
.redemption-row .btn { flex-shrink: 0; }
.redemption-row .btn svg { width: 14px; height: 14px; }

@media (max-width: 480px) {
    .redemption-row { flex-wrap: wrap; }
    .redemption-row .pill { font-size: .65rem !important; }
}

/* Rewards hero — totally new */
.rewards-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "icon text stats";
    gap: 1.2rem;
    align-items: center;
    background: var(--grad-warm);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 1.6rem 1.5rem;
    margin-bottom: 1.4rem;
    box-shadow: 0 18px 48px var(--primary-glow);
    overflow: hidden;
}
@media (max-width: 600px) {
    .rewards-hero {
        grid-template-columns: 1fr;
        grid-template-areas: "icon" "text" "stats";
        text-align: center;
        padding: 1.4rem 1.2rem;
        gap: .8rem;
    }
}
.rh-bg {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.rh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .35;
}
.rh-blob-1 { top: -40%; right: -10%; width: 320px; height: 320px; background: rgba(255,255,255,.4); }
.rh-blob-2 { bottom: -50%; left: -10%; width: 280px; height: 280px; background: rgba(255,255,255,.25); }

.rh-icon {
    grid-area: icon;
    width: 64px; height: 64px;
    border-radius: 20px;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.3);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    justify-self: start;
}
.rh-icon svg { width: 30px; height: 30px; }
@media (max-width: 600px) { .rh-icon { justify-self: center; } }

.rh-text { grid-area: text; position: relative; }
.rh-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .85;
    margin: 0 0 .15rem;
    font-weight: 700;
}
.rh-points {
    display: inline-flex; align-items: baseline; gap: .25rem;
    margin: 0;
}
.rh-points strong {
    font-size: clamp(2.4rem, 7vw, 3.2rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.85) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.rh-points span {
    font-size: 1rem;
    font-weight: 800;
    opacity: .9;
}
.rh-sub {
    margin: .3rem 0 0;
    font-size: .85rem;
    opacity: .9;
}

.rh-stats {
    grid-area: stats;
    display: flex; gap: .5rem;
    position: relative;
}
@media (max-width: 600px) { .rh-stats { justify-content: center; } }
.rh-stat {
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius);
    padding: .55rem .8rem;
    text-align: center;
    min-width: 72px;
}
.rh-stat strong { display: block; font-size: 1.15rem; font-weight: 800; }
.rh-stat span   { font-size: .65rem; opacity: .9; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* Section head (used on rewards) */
.rewards-section { margin-bottom: 2rem; }
.section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem;
    gap: .8rem;
}
.section-head h2 {
    display: inline-flex; align-items: center; gap: .55rem;
    margin: 0;
    font-size: 1.1rem;
}
.section-head h2 svg {
    width: 20px; height: 20px;
    color: var(--primary);
}

/* Reward card — fancier */
.reward-card { position: relative; padding-top: 1.3rem; }
.reward-card .reward-flag {
    position: absolute;
    top: .8rem; right: .8rem;
    background: var(--warn);
    color: #fff;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    box-shadow: 0 3px 10px rgba(217,119,6,.4);
    z-index: 2;
}
.reward-card .reward-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: .6rem;
}
.reward-card .reward-icon svg { width: 22px; height: 22px; }
[data-theme="dark"] .reward-card .reward-icon { background: rgba(52,211,153,.18); color: var(--primary-3); }

.reward-card .reward-meta {
    display: flex; flex-direction: column;
    gap: .25rem;
    font-size: .8rem;
    color: var(--text-dim);
    margin: .3rem 0 .4rem;
}
.reward-card .reward-meta > span { display: inline-flex; align-items: center; gap: .35rem; }
.reward-card .reward-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

.reward-card .reward-desc {
    color: var(--text-dim);
    font-size: .85rem;
    margin: .3rem 0;
    line-height: 1.5;
    flex: 1;
}

.reward-card .reward-progress {
    height: 4px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
    margin-top: .6rem;
}
.reward-card .reward-progress-bar {
    height: 100%;
    background: var(--grad-primary);
    border-radius: 999px;
    transition: width .5s var(--ease);
}
.reward-card .reward-progress-text {
    color: var(--text-mute);
    font-size: .72rem;
    margin-top: .25rem;
    display: block;
}

.reward-card .reward-cost {
    display: inline-flex; align-items: center; gap: .3rem;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.1rem;
}
.reward-card .reward-cost svg { width: 18px; height: 18px; color: var(--gold); }

.reward-card.is-affordable { border-color: var(--primary); }
.reward-card.is-affordable .reward-foot { background: var(--primary-soft); margin: auto -1.1rem -.9rem; padding: .9rem 1.1rem; border-top: 1px solid var(--primary); border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
[data-theme="dark"] .reward-card.is-affordable .reward-foot { background: rgba(52,211,153,.12); }

.reward-card .btn-redeem svg { display: none; }
.reward-card .btn-redeem:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* QR modal close button positioned absolutely */
.qr-modal-close {
    position: absolute;
    top: .8rem; right: .8rem;
}
.qr-modal-close svg { width: 16px; height: 16px; }

/* QR modal — uses <dialog> element */
.qr-modal {
    border: none;
    padding: 0;
    background: transparent;
    color: var(--text);
    max-width: 380px; width: 92%;
    margin: auto;
}
.qr-modal::backdrop {
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(8px);
}
.qr-modal[open] {
    display: flex; flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.4rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: popIn .3s var(--ease);
}
[data-theme="dark"] .qr-modal[open] { box-shadow: var(--shadow-lg), 0 0 22px rgba(52,211,153,.08); }
.qr-modal h2,
.qr-modal h3 { margin-bottom: .4rem; color: var(--text); }
.qr-modal p  { color: var(--text-dim); margin-bottom: 1rem; }
.qr-image {
    display: block; margin: 1rem auto;
    max-width: 240px; width: 100%;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: .8rem;
    box-shadow: var(--shadow-sm);
}
.qr-image img { display: block; width: 100%; height: auto; }
.qr-token {
    font-family: monospace; font-size: .95rem;
    background: var(--surface-2); border: 1px solid var(--line);
    padding: .55rem .9rem; border-radius: var(--radius-sm);
    letter-spacing: .15em; color: var(--primary); font-weight: 700;
    display: inline-block; margin: .5rem 0 1rem;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn  { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

/* Pills (status) */
.pill {
    display: inline-flex; align-items: center;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--surface-2); color: var(--text-dim);
    border: 1px solid var(--line);
}
.pill-active   { background: var(--primary-soft); color: var(--primary-2); border-color: var(--primary); }
.pill-pending  { background: rgba(217,119,6,.15); color: var(--warn); border-color: var(--warn); }
.pill-banned   { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.pill-redeemed { background: rgba(37,99,235,.15); color: var(--info); border-color: var(--info); }
.pill-expired  { background: var(--surface-3); color: var(--text-mute); }

/* ===========================================================================
   ADMIN
   =========================================================================== */
.admin { max-width: var(--max); margin: 0 auto; padding: 1rem; }
.admin h1 { margin-bottom: 1rem; }
.admin-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.4rem; }

.data {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.data th, .data td {
    padding: .7rem .9rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    font-size: .9rem;
}
.data th { background: var(--surface-2); font-weight: 700; color: var(--text-dim); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.data tr:last-child td { border-bottom: none; }
.data tr:hover td { background: var(--surface-2); }

/* ===========================================================================
   ARRIVAL TOAST & PHOTOS
   =========================================================================== */
.arrival-toast {
    position: fixed;
    left: 50%; transform: translateX(-50%);
    top: calc(var(--topbar-h) + 14px);
    background: var(--grad-primary);
    color: #fff;
    padding: .8rem 1.2rem;
    border-radius: 999px;
    box-shadow: 0 12px 30px var(--primary-glow);
    z-index: 1500;
    font-weight: 600; font-size: .9rem;
    display: flex; align-items: center; gap: .5rem;
    animation: slideDown .35s var(--ease);
}
@keyframes slideDown {
    from { transform: translate(-50%, -20px); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: .5rem;
}
.photo-tile {
    aspect-ratio: 1/1;
    background: var(--surface-3) center/cover no-repeat;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform .2s var(--ease);
    overflow: hidden;
}
.photo-tile:hover { transform: scale(1.03); }
.photo-tile img   { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===========================================================================
   GROUP & CHAT
   =========================================================================== */
.grup { max-width: var(--max); margin: 0 auto; padding: 1rem 1rem calc(var(--bottom-h) + 2rem); }
.grup h1 { margin-bottom: 1rem; }
.grup .tabs { margin-bottom: 1rem; }

.group-pane {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-xs);
}

/* Mood grid — chip tiles with SVG icons (replaces native <select>) */
.mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: .5rem;
    margin-bottom: .2rem;
}
.mood-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
    gap: .4rem;
}
.mood-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .35rem;
    padding: .9rem .4rem .7rem;
    background: var(--surface-2);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    color: var(--text-dim);
    cursor: pointer;
    transition: all .2s var(--ease);
    text-align: center;
    min-height: 80px;
    font-family: inherit;
}
.mood-grid-compact .mood-tile {
    padding: .7rem .35rem .55rem;
    min-height: 68px;
    gap: .3rem;
}
.mood-tile:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.mood-tile.active {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px var(--primary-glow);
    transform: translateY(-2px);
}
.mood-tile .mt-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 10px;
    background: var(--surface);
    color: var(--primary);
    transition: all .2s var(--ease);
}
.mood-grid-compact .mood-tile .mt-icon { width: 28px; height: 28px; }
[data-theme="dark"] .mood-tile .mt-icon { background: rgba(52,211,153,.12); color: var(--primary-3); }
.mood-tile .mt-icon svg { width: 18px; height: 18px; flex-shrink: 0; }
.mood-grid-compact .mood-tile .mt-icon svg { width: 16px; height: 16px; }
.mood-tile.active .mt-icon {
    background: rgba(255,255,255,.22);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.mood-tile .mt-label {
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.mood-grid-compact .mood-tile .mt-label { font-size: .7rem; }

/* Grup cards (no token state) */
.grup-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.grup-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.4rem;
    box-shadow: var(--shadow-xs);
    transition: all .25s var(--ease);
}
.grup-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.grup-card-icon {
    width: 52px; height: 52px;
    border-radius: 16px;
    background: var(--grad-primary);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: .9rem;
    box-shadow: 0 8px 20px var(--primary-glow);
}
.grup-card-icon svg { width: 24px; height: 24px; }
.grup-card h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
.grup-card p  { margin: 0 0 1.2rem; }

.grup-card .modal-form .field select,
.grup-card .modal-form .field input {
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: .95rem;
    width: 100%;
    min-height: 44px;
}
.grup-card .modal-form .field input:focus,
.grup-card .modal-form .field select:focus {
    outline: none; border-color: var(--primary); box-shadow: var(--ring); background: var(--surface);
}

/* Session pane */
.group-session {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.2rem;
    box-shadow: var(--shadow-xs);
}
.group-session-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap;
    gap: .8rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.gsh-info { display: flex; flex-direction: column; gap: .15rem; }
.gsh-info small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.gsh-token {
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-soft);
    padding: .2rem .55rem;
    border-radius: 6px;
    letter-spacing: .04em;
    display: inline-block;
}
.gsh-actions {
    display: flex; align-items: center; gap: .5rem;
    flex-wrap: wrap;
}
.gsh-actions .btn svg { width: 14px; height: 14px; }
.gsh-controls { display: flex; gap: .4rem; flex-wrap: wrap; }

.join-block {
    background: var(--primary-soft);
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    padding: 1.2rem 1.2rem;
    margin-bottom: 1.5rem;
}
[data-theme="dark"] .join-block { background: rgba(52,211,153,.12); }
.join-block h3 {
    display: inline-flex; align-items: center; gap: .55rem;
    margin: 0 0 .4rem;
    color: var(--primary-2);
    font-size: 1rem;
}
.join-block h3 svg { width: 18px; height: 18px; }
[data-theme="dark"] .join-block h3 { color: var(--primary-3); }
.join-block p { margin: 0 0 .8rem; font-size: .9rem; }
.join-row {
    display: flex; gap: .5rem;
    flex-wrap: wrap;
}
.join-select {
    flex: 1; min-width: 200px;
    padding: .7rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: .92rem;
    min-height: 44px;
}
.join-select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.group-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
}
@media (min-width: 900px) { .group-content { grid-template-columns: 1fr 1.4fr; } }

.group-block-title {
    display: inline-flex; align-items: center; gap: .5rem;
    margin: 0 0 .8rem;
    font-size: 1rem;
    color: var(--text);
}
.group-block-title svg { width: 18px; height: 18px; color: var(--primary); }

.group-suggestions {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column;
    gap: .7rem;
    max-height: 600px;
    overflow-y: auto;
}

/* Group chat */
.group-chat {
    margin-top: 1.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.group-members-list { display: flex; flex-direction: column; gap: .55rem; }
.group-member {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem .8rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: all .2s var(--ease);
}
.group-member:hover { border-color: var(--primary); }
.member-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    object-fit: cover;
    flex-shrink: 0;
}
.member-info     { flex: 1; min-width: 0; }
.member-info strong { display: block; color: var(--text); font-size: .92rem; }
.member-info span   { font-size: .78rem; color: var(--text-dim); }

.suggestion-actions { display: flex; gap: .4rem; align-items: center; }
.vote-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text-dim);
    cursor: pointer;
    transition: all .2s var(--ease);
    display: inline-flex; align-items: center; justify-content: center;
}
.vote-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.vote-btn.active { background: var(--grad-primary); color: #fff; border-color: transparent; }
.vote-score {
    font-weight: 800; color: var(--text); font-size: 1rem;
    min-width: 28px; text-align: center;
}
.vote-score.positive { color: var(--ok); }
.vote-score.negative { color: var(--danger); }

/* Chat */
.chat-messages {
    display: flex; flex-direction: column; gap: .5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: .5rem;
    background: var(--surface-2);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    margin-bottom: .8rem;
}
.chat-msg {
    display: flex; flex-direction: column;
    max-width: 78%;
    align-self: flex-start;
}
.chat-msg.chat-msg-me { align-self: flex-end; align-items: flex-end; }
.chat-author { font-size: .72rem; color: var(--text-dim); margin-bottom: .15rem; padding: 0 .3rem; }
.chat-bubble {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: .55rem .85rem;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    color: var(--text);
    font-size: .92rem;
    box-shadow: var(--shadow-xs);
    word-wrap: break-word;
}
.chat-msg-me .chat-bubble {
    background: var(--grad-primary); color: #fff; border: none;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.chat-form {
    display: flex; gap: .5rem; align-items: center;
}
.chat-form input {
    flex: 1;
    padding: .8rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: .95rem;
    min-height: 46px;
}
.chat-form input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.chat-form button {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px var(--primary-glow);
    transition: all .2s var(--ease);
}
.chat-form button:hover { transform: translateY(-2px); }

.occ-buttons { display: flex; gap: .4rem; flex-wrap: wrap; }
.occ-buttons button {
    flex: 1; min-width: 64px;
    padding: .65rem .5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all .2s var(--ease);
}
.occ-buttons button:hover { border-color: var(--primary); transform: translateY(-2px); }
.occ-buttons button.active { background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: 0 6px 18px var(--primary-glow); }

/* ===========================================================================
   DESKTOP/MOBILE VISIBILITY (high specificity to win over component rules)
   =========================================================================== */
.desktop-only { display: none !important; }
.mobile-only  { display: inline-flex !important; }
@media (min-width: 901px) {
    .desktop-only { display: flex !important; }
    .mobile-only  { display: none !important; }
}

/* ===========================================================================
   HAMBURGER + DRAWER
   =========================================================================== */
.hamburger-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    gap: 4px;
    transition: all .2s var(--ease);
}
.hamburger-btn:hover { border-color: var(--primary); box-shadow: 0 6px 18px var(--primary-glow); }
.hamburger-btn span {
    display: block;
    width: 20px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all .25s var(--ease);
}
.hamburger-btn:hover span { background: var(--primary); }

.drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(6px);
    z-index: 1800;
    opacity: 0;
    transition: opacity .25s var(--ease);
}
.drawer-overlay.open { opacity: 1; }
.drawer-overlay[hidden] { display: none; }

.mobile-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 86vw);
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: -16px 0 48px rgba(0,0,0,.25);
    z-index: 1900;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    display: flex; flex-direction: column;
    padding-top: env(safe-area-inset-top);
}
[data-theme="dark"] .mobile-drawer {
    box-shadow: -16px 0 48px rgba(0,0,0,.6), -1px 0 0 rgba(110,231,183,.2);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer[hidden] { display: none; }

.drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
}
.drawer-close {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all .2s var(--ease);
}
.drawer-close:hover { color: var(--danger); border-color: var(--danger); }

.drawer-nav {
    display: flex; flex-direction: column;
    padding: .8rem .6rem;
    gap: .25rem;
    flex: 1;
    overflow-y: auto;
}
.drawer-nav a {
    display: flex; align-items: center; gap: .8rem;
    padding: .85rem 1rem;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 500; font-size: .95rem;
    transition: all .15s var(--ease);
    text-decoration: none;
}
.drawer-nav a:hover  { background: var(--surface-2); color: var(--primary); }
.drawer-nav a.active { background: var(--primary-soft); color: var(--primary-2); font-weight: 700; }
.drawer-nav a.logout-link { color: var(--danger); margin-top: auto; border-top: 1px solid var(--line); border-radius: 0; padding-top: 1rem; }
.drawer-nav a.logout-link:hover { background: var(--danger-soft); color: var(--danger); }

.inline-badge {
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: .7rem;
    font-weight: 700;
    margin-left: auto;
}

/* ===========================================================================
   BOTTOM NAVIGATION
   =========================================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--surface-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--line);
    z-index: 1000;
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
    min-height: var(--bottom-h);
    box-shadow: 0 -8px 24px rgba(10,30,18,.08);
}
[data-theme="dark"] .bottom-nav {
    border-top: 1px solid rgba(110,231,183,.18);
    box-shadow: 0 -8px 28px rgba(0,0,0,.6), 0 -1px 0 rgba(110,231,183,.2);
}
@media (min-width: 901px) {
    .bottom-nav { display: none; }
    body { padding-bottom: 0; }
}

/* 5+ item olursa kolonları otomatik 5'e çıkar — :has() destekli tarayıcılar */
.bottom-nav:has(> .bn-item:nth-child(5)) {
    grid-template-columns: repeat(5, 1fr);
}
.bottom-nav:has(> .bn-item:nth-child(5)) .bn-item {
    padding: .25rem .1rem;
    font-size: .62rem;
    min-width: 0;
}
.bottom-nav:has(> .bn-item:nth-child(5)) .bn-item .bn-icon {
    width: 32px; height: 26px;
}
.bottom-nav:has(> .bn-item:nth-child(5)) .bn-item .bn-icon svg {
    width: 22px; height: 22px;
}
.bottom-nav:has(> .bn-item:nth-child(5)) .bn-item .bn-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* :has() desteklemeyen tarayıcılar için fallback: dar ekranda da 5 item için flex layout */
@supports not selector(:has(*)) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: stretch;
    }
    .bottom-nav .bn-item {
        flex: 1 1 0;
        min-width: 0;
        padding: .25rem .1rem;
    }
    .bottom-nav .bn-item .bn-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        font-size: .62rem;
    }
}

.bn-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px;
    padding: .25rem .25rem;
    color: var(--text-mute);
    text-decoration: none;
    font-size: .68rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all .2s var(--ease);
    position: relative;
    min-height: 56px;
}
.bn-item .bn-icon {
    font-size: 1.4rem;
    line-height: 1;
    transition: transform .25s var(--ease);
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 28px;
}
.bn-item .bn-icon svg {
    width: 24px; height: 24px;
    stroke: currentColor;
    transition: all .25s var(--ease);
}
.bn-item.active .bn-icon svg {
    stroke-width: 2.4;
    filter: drop-shadow(0 0 6px var(--primary-glow));
}
.bn-item .bn-label { line-height: 1; }
.bn-item:hover { color: var(--primary); }
.bn-item:hover .bn-icon { transform: translateY(-2px) scale(1.05); }
.bn-item.active { color: var(--primary); }
.bn-item.active::before {
    content: '';
    position: absolute;
    top: 6px; left: 50%; transform: translateX(-50%);
    width: 38px; height: 30px;
    background: var(--primary-soft);
    border-radius: 999px;
    z-index: -1;
}
.bn-item.active .bn-icon {
    transform: translateY(-2px) scale(1.1);
    filter: drop-shadow(0 4px 8px var(--primary-glow));
}
[data-theme="dark"] .bn-item.active .bn-icon {
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

/* Guest CTA item — highlight the login button */
.bn-item-cta { color: var(--primary); font-weight: 700; }
.bn-item-cta .bn-icon svg { stroke-width: 2.4; }
.bn-item-cta:hover { color: var(--primary-2); }
.bn-item-cta::before {
    content: '';
    position: absolute;
    top: 6px; left: 50%; transform: translateX(-50%);
    width: 38px; height: 30px;
    background: var(--primary-soft);
    border-radius: 999px;
    z-index: -1;
}

/* ===========================================================================
   LEAFLET POPUP
   =========================================================================== */
.cafe-popup { font-family: inherit; }
.cafe-popup-title {
    display: block;
    font-weight: 800; font-size: 1.05rem;
    letter-spacing: -.01em;
    color: var(--text);
    margin-bottom: .5rem;
    line-height: 1.2;
}

/* Popup başlık satırı: mini logo + başlık/chip'ler */
.cafe-popup-head {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: .55rem;
}
.cafe-popup-logo {
    position: relative;
    flex: 0 0 auto;
    width: 52px; height: 52px;
    border-radius: 12px;
    box-shadow: 0 0 0 2px var(--occ, var(--line));
}
.cafe-popup-logo img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}
.cafe-popup-occ-badge {
    position: absolute;
    bottom: -7px; left: 50%; transform: translateX(-50%);
    font-size: .62rem; font-weight: 800; color: #fff;
    padding: .08rem .34rem; border-radius: 999px;
    line-height: 1.35; white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.cafe-popup-headtext { flex: 1; min-width: 0; }
.cafe-popup-head .cafe-popup-title { margin-bottom: .35rem; }
.cafe-popup-head .cafe-popup-meta { margin-bottom: 0; }
.cafe-popup-meta {
    display: flex; flex-wrap: wrap; gap: .35rem;
    margin-bottom: .55rem;
}
.cpm-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .74rem; font-weight: 700;
    padding: .22rem .5rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-dim);
    white-space: nowrap;
}
.cpm-chip small { font-weight: 500; color: var(--text-mute); }
.cpm-occ { color: var(--text); }
.cpm-occ i {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--occ, var(--text-mute));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--occ, var(--text-mute)) 22%, transparent);
}
.cpm-rate { color: var(--gold); }
.cpm-mood { color: var(--primary); }

.cafe-popup-dist {
    display: flex; align-items: center; gap: .35rem;
    font-size: .8rem; color: var(--text-dim); font-weight: 600;
    margin-bottom: .7rem;
}
.cafe-popup-dist svg { width: 14px; height: 14px; color: var(--primary); flex-shrink: 0; }

.cafe-popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
}
.cpa-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    min-height: 38px; padding: .4rem .6rem;
    border-radius: 12px;
    font-size: .82rem; font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    transition: transform .12s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.cpa-btn svg { width: 15px; height: 15px; }
.cpa-btn:active { transform: scale(.96); }
.cpa-ghost:hover { background: var(--surface-3); border-color: var(--line-2); text-decoration: none; color: var(--text); }
.cpa-primary {
    grid-column: 1 / -1;
    background: var(--grad-primary);
    color: var(--text-on-primary);
    border: none;
    box-shadow: 0 6px 18px var(--primary-glow);
}
.cpa-primary:hover { box-shadow: 0 10px 24px var(--primary-glow); text-decoration: none; color: var(--text-on-primary); }

.leaflet-popup-content-wrapper {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-radius: 18px !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow-lg) !important;
}
.leaflet-popup-content { margin: .9rem 1rem !important; }
.leaflet-popup-tip { background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.cafe-popup-shell .leaflet-popup-close-button {
    width: 26px !important; height: 26px !important;
    top: 8px !important; right: 8px !important;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px !important;
    color: var(--text-mute) !important;
    border-radius: 999px;
    background: var(--surface-2);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.cafe-popup-shell .leaflet-popup-close-button:hover { background: var(--surface-3); color: var(--text) !important; }

.route-line {
    stroke: var(--primary);
    stroke-width: 5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px var(--primary-glow));
}
.route-line-fallback {
    stroke: var(--accent);
    stroke-dasharray: 10 6;
    stroke-width: 4;
}
.route-target-pulse {
    fill: var(--primary);
    fill-opacity: .35;
    animation: targetPulse 1.8s ease-out infinite;
}
@keyframes targetPulse {
    0%   { r: 6;  fill-opacity: .5; }
    100% { r: 26; fill-opacity: 0;  }
}

/* Route info card on map */
.route-info {
    position: absolute;
    top: 1rem; left: 1rem; right: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .8rem 1rem;
    box-shadow: var(--shadow);
    z-index: 500;
    display: flex; align-items: center; gap: .7rem;
    backdrop-filter: blur(14px);
}
.route-info-text { flex: 1; min-width: 0; }
.route-info-icon { font-size: 1.4rem; }
.route-info-stats { font-weight: 700; color: var(--primary); font-size: 1rem; }
.route-info-cafe  { font-size: .8rem; color: var(--text-dim); }
.route-info-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    cursor: pointer;
    color: var(--text);
}
.route-info-close:hover { color: var(--danger); border-color: var(--danger); }

.route-info-modes { display: flex; gap: .3rem; margin-top: .5rem; }
.route-mode-btn {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-dim);
    padding: .4rem .6rem;
    border-radius: 999px;
    font-size: .78rem; font-weight: 600;
    cursor: pointer;
    transition: all .2s var(--ease);
}
.route-mode-btn:hover { color: var(--primary); border-color: var(--primary); }
.route-mode-btn.active { background: var(--grad-primary); color: #fff; border-color: transparent; }

.cafe-card-route {
    display: flex; gap: .8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .8rem;
    align-items: center;
}
.cafe-card-route .cover {
    width: 60px; height: 60px;
    border-radius: var(--radius-sm);
    background: var(--surface-3) center/cover no-repeat;
    flex-shrink: 0;
}
.cafe-card-route .info { flex: 1; min-width: 0; }
.cafe-card-route h4    { margin: 0 0 .2rem; }

/* Map legend / bilgi modalı */
.map-legend {
    position: absolute;
    right: 14px; bottom: 100px;
    z-index: 600;
}
.map-legend-btn {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: var(--primary);
    font-size: 1.3rem; font-weight: 800;
    cursor: pointer;
    transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
    display: inline-flex; align-items: center; justify-content: center;
}
.map-legend-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.map-legend-btn.active,
.map-legend-btn[aria-expanded="true"] {
    background: var(--grad-primary); color: var(--text-on-primary); border-color: transparent;
}

.map-legend-panel {
    position: absolute;
    right: 0; bottom: 58px;
    width: min(300px, calc(100vw - 28px));
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: var(--shadow-lg);
    transform-origin: bottom right;
    animation: legendPop .22s var(--kd-ease-spring, cubic-bezier(.34,1.56,.64,1));
}
@keyframes legendPop {
    from { opacity: 0; transform: translateY(10px) scale(.95); }
    to   { opacity: 1; transform: none; }
}
.map-legend-panel header {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem; margin-bottom: .9rem;
}
.map-legend-panel header strong { font-size: .95rem; font-weight: 800; color: var(--text); }
.map-legend-close {
    width: 26px; height: 26px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--line);
    color: var(--text-mute);
    cursor: pointer; font-size: .78rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.map-legend-close:hover { background: var(--danger-soft); color: var(--danger); }

.map-legend-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: .7rem;
    font-size: .82rem;
}
.map-legend-list > li {
    display: flex; align-items: center; gap: .65rem;
    color: var(--text-dim); line-height: 1.35;
}
.map-legend-list strong { color: var(--text); font-weight: 700; }

.legend-icon {
    flex-shrink: 0;
    min-width: 30px; height: 30px;
    padding: 0 .42rem;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface-2); border: 1px solid var(--line);
    font-size: .72rem; font-weight: 800; color: var(--text);
}
.legend-cluster { background: var(--grad-primary); color: var(--text-on-primary); border: none; }
.legend-pin {
    background: #fb8c00; color: #fff; border: 2px solid #fff;
    box-shadow: 0 2px 7px rgba(0,0,0,.22);
}
.legend-fav  { color: var(--danger); font-size: .95rem; }
.legend-rate { color: var(--gold); white-space: nowrap; }

.legend-occ-scale {
    display: flex; flex-wrap: wrap; gap: .3rem;
    width: 100%;
}
.legend-occ-scale > span {
    flex: 1 1 auto; min-width: 0;
    text-align: center;
    font-size: .67rem; font-weight: 700;
    color: #fff;
    padding: .24rem .3rem;
    border-radius: 7px;
    background: var(--c, var(--text-mute));
    text-shadow: 0 1px 1px rgba(0,0,0,.28);
}

/* ===========================================================================
   WELCOME OVERLAY (onboarding)
   =========================================================================== */
.welcome-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(10px);
    z-index: 2100;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    animation: fadeIn .25s var(--ease);
}
.welcome-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.6rem;
    max-width: 420px; width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: popIn .35s var(--ease);
}
[data-theme="dark"] .welcome-card { box-shadow: var(--shadow-lg), 0 0 22px rgba(52,211,153,.08); }

.welcome-card-emoji { font-size: 3rem; display: block; margin-bottom: .6rem; }
.welcome-card h2    { margin-bottom: .4rem; }
.welcome-card p     { color: var(--text-dim); margin-bottom: 1rem; }
.welcome-card-list  {
    text-align: left;
    list-style: none; padding: 0; margin: 1rem 0;
    display: flex; flex-direction: column; gap: .5rem;
}
.welcome-card-list li {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .7rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: .9rem;
}
.welcome-card-ok {
    width: 100%;
    margin-top: .4rem;
    font-size: 1rem; font-weight: 700;
    padding: .8rem 1rem;
}
.welcome-card-foot {
    margin-top: 1rem;
    text-align: center;
    font-size: .76rem;
    color: var(--text-mute);
}
.welcome-card-foot strong { color: var(--primary); }

/* ===========================================================================
   USER SEARCH
   =========================================================================== */
.user-search-results {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: 320px;
    overflow-y: auto;
    margin-top: .5rem;
}
.user-search-item {
    display: flex; align-items: center; gap: .7rem;
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background .15s var(--ease);
    text-decoration: none;
    color: var(--text);
}
.user-search-item:last-child { border-bottom: none; }
.user-search-item:hover { background: var(--surface-2); text-decoration: none; }
/* Avatar (resim ya da baş harf) — her ikisi de 40px daire */
.user-search-item > img,
.user-search-item .user-avatar-initial {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
}
.user-search-item > span {
    display: flex; flex-direction: column; min-width: 0; gap: 1px;
}
.user-search-item strong {
    font-size: .92rem; font-weight: 700; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-search-item small { font-size: .78rem; color: var(--text-dim); }
.user-search-empty {
    padding: 1.4rem;
    text-align: center;
    color: var(--text-dim);
    font-size: .9rem;
}

.user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-3);
    flex-shrink: 0;
}
.user-avatar-initial {
    background: var(--grad-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .95rem;
}

.badge-count {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: .7rem;
    font-weight: 700;
    min-width: 18px;
}

.lb-row.friend  { border-color: var(--accent); }
.lb-row .actions{ display: flex; gap: .3rem; }

.friend-list { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.friend-row {
    display: flex; align-items: center; justify-content: flex-start; gap: .7rem;
    width: 100%; box-sizing: border-box;
    padding: .6rem .9rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: all .2s var(--ease);
}
.friend-row:hover { border-color: var(--primary); transform: translateX(3px); }
.friend-link {
    display: flex; align-items: center; gap: .7rem;
    color: var(--text); text-decoration: none;
    flex: 1 1 auto; min-width: 0; margin-right: auto; text-align: left;
}
.friend-link .name { align-items: flex-start; text-align: left; }
.friend-link:hover { color: var(--primary); text-decoration: none; }
.friend-link .user-avatar { width: 40px; height: 40px; flex-shrink: 0; }
.friend-link .name {
    display: flex; flex-direction: column;
    min-width: 0;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}
.friend-link .name small {
    color: var(--text-dim);
    font-weight: 400;
    font-size: .75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.friend-row .btn { flex-shrink: 0; }
.friend-link-blocked { opacity: .65; }
.friend-actions-group { display: flex; gap: .35rem; flex-shrink: 0; }
.friend-actions-group .btn {
    width: 38px; height: 38px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 38px;
}
.friend-actions-group .btn svg { width: 16px; height: 16px; }

.profile-bio {
    background: var(--surface-2);
    border-left: 3px solid var(--primary);
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: .92rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.profile-socials { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.social-chip {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
    padding: .4rem .85rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    display: inline-flex; align-items: center; gap: .35rem;
    text-decoration: none;
    transition: all .2s var(--ease);
}
.social-chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.social-chip.social-ig:hover { color: #e1306c; border-color: #e1306c; }
.social-chip.social-x:hover  { color: var(--text); border-color: var(--text); }
.social-chip.social-tt:hover { color: #ff0050; border-color: #ff0050; }

.friend-btn[data-status="accepted"]      { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-2); }
.friend-btn[data-status="outgoing"]      { background: var(--surface-2); color: var(--text-dim); }
.friend-btn[data-status="incoming"]      { background: var(--grad-primary); color: #fff; border: none; }
.friend-btn[data-status="blocked_by_me"] { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.profile-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.badges-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: .6rem;
    margin-bottom: 1rem;
}
.badge-tile.compact { padding: .6rem .4rem; }
.badge-cat-title { font-size: .85rem; color: var(--text-dim); margin: 1.2rem 0 .5rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }

.badge-progress {
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
    margin-top: .35rem;
}
.badge-progress-bar {
    height: 100%;
    background: var(--grad-primary);
    border-radius: 999px;
    transition: width .5s var(--ease);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Profile edit modal — <dialog> element */
.profile-edit-modal {
    border: none;
    padding: 0;
    background: transparent;
    color: var(--text);
    max-width: 560px; width: 100%;
    margin: auto;
}
.profile-edit-modal::backdrop {
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(8px);
}
.profile-edit-modal[open] {
    display: block;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.4rem 1.3rem calc(1.4rem + env(safe-area-inset-bottom));
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    margin: auto auto 0;
    animation: slideUp .35s var(--ease);
}
@media (min-width: 720px) {
    .profile-edit-modal[open] {
        border-radius: var(--radius-lg);
        margin: auto;
        max-height: 86vh;
        animation: popIn .3s var(--ease);
    }
}
[data-theme="dark"] .profile-edit-modal[open] {
    box-shadow: var(--shadow-lg), 0 0 20px rgba(52,211,153,.06);
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.profile-edit-modal h2 {
    margin: 0 0 1rem;
    padding-right: 2.5rem;
}

.modal-close-form {
    position: absolute;
    top: .8rem; right: .8rem;
    margin: 0;
}
.modal-close-btn {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 38px; height: 38px;
    cursor: pointer;
    color: var(--text);
    font-size: 1.1rem;
    transition: all .2s var(--ease);
    display: inline-flex; align-items: center; justify-content: center;
}
.modal-close-btn:hover { color: var(--danger); border-color: var(--danger); transform: rotate(90deg); }
.profile-edit-modal { position: relative; }
.profile-edit-modal[open] { position: relative; }

.modal-tabs {
    display: flex; gap: .25rem;
    background: var(--surface-2);
    padding: .3rem;
    border-radius: 999px;
    margin: 1rem 0;
    overflow-x: auto;
}
.modal-tab {
    flex: 0 0 auto;
    padding: .55rem .9rem;
    border-radius: 999px;
    text-align: center;
    cursor: pointer;
    font-weight: 600; font-size: .82rem;
    color: var(--text-dim);
    background: transparent;
    border: none;
    transition: all .2s var(--ease);
    white-space: nowrap;
}
.modal-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 700; }
.modal-tab:hover:not(.active) { color: var(--text); }

.modal-panel { display: none; animation: fadeIn .2s var(--ease); }
.modal-panel.active { display: block; }
.modal-form { display: flex; flex-direction: column; gap: 1rem; }
.modal-form > .field > label,
.modal-form > .field > .field-label-row label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-left: .2rem;
}
.modal-form > label,
.modal-form > .field > label {
    margin-bottom: 0;
}

/* Textarea field-input variant */
.field-input-textarea {
    align-items: flex-start;
    padding: .7rem .9rem;
    min-height: 0;
}
.field-input-textarea > svg:first-child { margin-top: .4rem; }
.field-input-textarea textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    padding: .25rem .7rem;
    min-height: 80px;
    resize: vertical;
    outline: none;
    line-height: 1.55;
}
.field-input-textarea textarea::placeholder { color: var(--text-mute); }

/* Avatar preview area in modal */
.avatar-preview-wrap {
    display: flex; justify-content: center; align-items: center;
    margin: 0 auto 1rem;
    width: 140px; height: 140px;
    position: relative;
}
.avatar-preview-wrap img,
.avatar-preview-wrap #avatar-preview {
    width: 140px; height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--surface);
    box-shadow: var(--shadow), 0 0 0 1px var(--line);
    background: var(--surface-2);
}
.avatar-preview-placeholder {
    width: 140px; height: 140px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-mute);
    display: flex; align-items: center; justify-content: center;
    border: 2px dashed var(--line-2);
}
.avatar-preview-placeholder svg { width: 56px; height: 56px; }

/* File drop / picker */
.file-drop {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .4rem;
    padding: 1.4rem 1rem;
    border: 2px dashed var(--line-2);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text-dim);
    cursor: pointer;
    transition: all .2s var(--ease);
}
.file-drop:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-2);
}
[data-theme="dark"] .file-drop:hover { background: rgba(52,211,153,.12); color: var(--primary-3); }
.file-drop svg {
    width: 32px; height: 32px;
    color: var(--text-mute);
    transition: color .2s var(--ease);
}
.file-drop:hover svg { color: var(--primary); }
.file-drop span { font-weight: 700; font-size: .9rem; }
.file-drop small { font-size: .72rem; color: var(--text-mute); }
.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-drop input[type="file"]::-webkit-file-upload-button { cursor: pointer; }

.badge-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: .5rem;
}
.badge-pick {
    display: flex; flex-direction: column; align-items: center;
    gap: .25rem;
    background: var(--surface-2);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: .7rem .4rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s var(--ease);
    position: relative;
}
.badge-pick input[type="checkbox"] {
    position: absolute; opacity: 0; pointer-events: none;
}
.badge-pick:hover  { border-color: var(--primary); }
.badge-pick.active,
.badge-pick:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 4px 14px var(--primary-glow);
}
.badge-pick.locked { opacity: .4; filter: grayscale(.7); cursor: not-allowed; }
.badge-pick .badge-icon,
.badge-pick .ico {
    font-size: 1.7rem; display: block;
}
.badge-pick .badge-name,
.badge-pick .name {
    font-size: .72rem; color: var(--text); font-weight: 600;
    line-height: 1.2;
}

/* ===========================================================================
   ANIMATIONS
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===========================================================================
   UTILITY
   =========================================================================== */
.container { max-width: var(--max); margin: 0 auto; padding: 1rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; gap: .5rem; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.hidden { display: none !important; }

/* Bottom-nav-aware spacing for main content on mobile */
@media (max-width: 900px) {
    main, .kesfet, .leader, .rewards, .profile, .grup, .admin {
        padding-bottom: calc(var(--bottom-h) + 1.5rem);
    }
}

/* Dark-mode subtle neon edge on key surfaces */
[data-theme="dark"] .cafe-card:hover,
[data-theme="dark"] .reward-card:hover,
[data-theme="dark"] .f3:hover,
[data-theme="dark"] .lb-row:hover,
[data-theme="dark"] .badge-tile:hover {
    box-shadow: var(--shadow-sm), 0 0 12px rgba(52,211,153,.06);
}
[data-theme="dark"] .topbar { box-shadow: 0 1px 0 rgba(110,231,183,.12); }
[data-theme="dark"] .welcome-strip,
[data-theme="dark"] .profile-hero,
[data-theme="dark"] .rewards-hero {
    box-shadow: 0 14px 36px rgba(0,0,0,.45);
}

/* ════════════════════════════════════════════════════════════════════════
   GLOBAL: yatay scroll engelle + iOS/Android input zoom engelle
   ════════════════════════════════════════════════════════════════════════ */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
body {
    width: 100%;
    overflow-x: clip; /* clip overflow-x:hidden'dan daha güvenli — child scroll'u kırmaz */
}
@supports not (overflow: clip) {
    body { overflow-x: hidden; }
}

/* iOS Safari 16px altı input'a focus olunca zoom yapar — engelle */
input, textarea, select, button {
    font-size: 16px;
}
/* sm boyut varyantı override'larında bile minimum 16px */
@media (max-width: 900px) {
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Genelde geniş image/video/iframe'lerin taşmasını engelle */
img, video, iframe, svg, canvas {
    max-width: 100%;
}

/* ====================== Gruplar (yeniden tasarım) ====================== */
.grup-card .modal-form .field textarea {
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: .95rem;
    width: 100%;
    resize: vertical;
    font-family: inherit;
}
.grup-card .modal-form .field textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: var(--ring); background: var(--surface);
}

/* Sekmeler */
.grup-tabs { margin: 0 0 1.2rem; }

.grup-tab-panel { animation: fadeIn .2s var(--ease); }

/* Grup listesi (modern kartlar) */
.groups-list {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: .9rem;
}
.group-list-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.05);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .2s;
}
.group-list-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 16px 36px rgba(0,0,0,.12); }
.glc-avatar {
    width: 50px; height: 50px; flex: 0 0 50px;
    border-radius: 16px;
    background: var(--grad-primary);
    color: #fff; font-weight: 800; font-size: 1.35rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px var(--primary-glow);
}
.glc-body { min-width: 0; }
.glc-body h3 { margin: 0 0 .25rem; font-size: 1.05rem; font-weight: 700; }
.glc-desc {
    margin: 0 0 .5rem; font-size: .85rem; color: var(--text-dim);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.glc-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.glc-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .78rem; font-weight: 600; color: var(--text-dim);
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: .2rem .55rem; border-radius: 999px;
}
.glc-chip svg { width: 13px; height: 13px; opacity: .85; }
.glc-chip .user-link { font-size: .78rem; }
.glc-chip-lock { color: var(--warn); border-color: rgba(217,119,6,.3); background: rgba(217,119,6,.1); }
.glc-action { display: flex; }
.glc-btn { white-space: nowrap; }
.glc-btn svg { width: 14px; height: 14px; margin-left: .2rem; }
@media (max-width: 560px) {
    .group-list-card { grid-template-columns: auto 1fr; }
    .glc-action { grid-column: 1 / -1; }
    .glc-btn { width: 100%; justify-content: center; }
}

/* Grup başlığı */
.gsh-name { font-size: 1.15rem; font-weight: 800; }
.gsh-token-row { text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; }
.gsh-token-row .gsh-token { font-size: .85rem; padding: .1rem .4rem; }
.group-desc { margin: -.4rem 0 1rem; font-size: .92rem; }

/* Katılma istekleri */
.group-requests-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.group-request {
    display: flex; align-items: center; justify-content: space-between;
    gap: .6rem; flex-wrap: wrap;
    padding: .55rem .8rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.group-request .gr-name { font-weight: 600; }
.group-request .gr-actions { display: flex; gap: .4rem; }
#requests-block { margin-bottom: 1.2rem; }

/* Kafe arama kutusu */
.cafe-search { margin-bottom: .8rem; }
.cafe-search input {
    width: 100%;
    padding: .7rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: .92rem;
    min-height: 44px;
}
.cafe-search input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); background: var(--surface); }

/* Profil linkleri (üye/istek/oluşturan) */
.user-link { color: var(--primary-2); font-weight: 700; text-decoration: none; }
.user-link:hover { text-decoration: underline; }
[data-theme="dark"] .user-link { color: var(--primary-3); }

/* Küçült butonu */
#btn-minimize { text-decoration: none; }
#btn-minimize svg { width: 14px; height: 14px; }

/* Üye sayısı pill (ikonlu) */
#member-count { display: inline-flex; align-items: center; gap: .35rem; }
#member-count svg { width: 14px; height: 14px; }

/* Şık kafe kartları (keşfet görünümü, dikey ızgara) */
.group-cafe-grid {
    list-style: none; margin: 0; padding: 4px;
    display: grid; gap: .8rem;
    grid-template-columns: repeat(2, 1fr);
    max-height: 72vh; overflow-y: auto;
}
@media (min-width: 1100px) { .group-cafe-grid { grid-template-columns: repeat(3, 1fr); } }

.gcafe {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.gcafe:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(0,0,0,.14); border-color: var(--primary); }
.gcafe-cover {
    position: relative; display: block;
    aspect-ratio: 16 / 11;
    background-size: cover; background-position: center;
    background-color: var(--surface-2);
    text-decoration: none;
}
.gcafe-cover::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.72) 100%);
}
.gcafe-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; z-index: 1; }
.gcafe-badge {
    font-size: 11px; font-weight: 700; color: #fff;
    padding: 3px 9px; border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0,0,0,.28);
}
.gcafe-overlay {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
    padding: 9px 11px;
}
.gcafe-overlay h3 { margin: 0; color: #fff; font-size: 14.5px; line-height: 1.25; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.gcafe-price { color: #fff; font-weight: 800; font-size: 12.5px; white-space: nowrap; }
.gcafe-meta {
    display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center;
    padding: 8px 11px 0; font-size: 12px; color: var(--text-dim); min-height: 14px;
}
.gcafe-rating { color: var(--text); font-weight: 700; }
.gcafe-meta .tag { padding: 1px 0; background: none; border: none; font-size: 12px; }
.gcafe-vote {
    margin-top: auto;
    display: flex; align-items: center; gap: 6px;
    padding: 9px 11px;
}
.gcafe-vote .vote-btn { min-height: 34px; padding: 4px 10px; }
.gcafe-score { margin-left: auto; font-weight: 800; font-size: 15px; }
.gcafe-score.pos  { color: var(--ok, #16a34a); }
.gcafe-score.neg  { color: var(--danger, #dc2626); }
.gcafe-score.zero { color: var(--text-mute); }
.vote-btn.voted-up   { background: rgba(16,185,129,.16); border-color: var(--ok, #16a34a); }
.vote-btn.voted-down { background: rgba(220,38,38,.14); border-color: var(--danger, #dc2626); }

/* Üyeden çıkar butonu */
.group-member { position: relative; }
.group-member .member-info { flex: 1; min-width: 0; }
.member-kick {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-mute);
    cursor: pointer;
    transition: all .18s var(--ease);
}
.member-kick svg { width: 15px; height: 15px; }
.member-kick:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* Davet paneli */
.invite-panel {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.2rem;
    animation: fadeIn .2s var(--ease);
}
.invite-tabs { margin-bottom: .9rem; }
.invite-label { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); margin-bottom: .4rem; }
.invite-link-row { display: flex; gap: .5rem; margin-bottom: .8rem; }
.invite-link-row input {
    flex: 1; min-width: 0;
    padding: .6rem .8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: .85rem;
}
.invite-link-row input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.invite-code { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.invite-code code {
    font-family: monospace; font-weight: 800; color: var(--primary);
    background: var(--primary-soft); padding: .25rem .6rem; border-radius: 6px; letter-spacing: .04em;
}
#invite-share svg { width: 16px; height: 16px; }

.invite-friends {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: .5rem;
    max-height: 320px; overflow-y: auto;
}
.invite-friend {
    display: flex; align-items: center; gap: .7rem;
    padding: .5rem .7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.if-avatar {
    width: 40px; height: 40px; flex: 0 0 40px;
    border-radius: 50%; overflow: hidden;
    background: var(--grad-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.if-avatar img { width: 100%; height: 100%; object-fit: cover; }
.if-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.if-info strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.if-info small { font-size: .75rem; }
.invite-friend .btn { flex: 0 0 auto; }

/* ====================== Profil revizyonu ====================== */
/* Hero ek bilgi çipleri */
.profile-handle { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; }
.profile-level {
    display: inline-flex; align-items: center;
    font-size: .72rem; font-weight: 800; letter-spacing: .02em;
    color: #fff; background: var(--grad-primary);
    padding: .12rem .5rem; border-radius: 999px;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.profile-join { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; color: var(--text-mute); }
.profile-join svg { width: 13px; height: 13px; }

/* Profil sekmeleri */
.profile-tabs { margin: 0 0 1.2rem; }
.profile-tabs .ptab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; margin-left: .35rem;
    font-size: .68rem; font-weight: 800; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary-2);
}
.profile-tab-panel { animation: fadeIn .2s var(--ease); }
.profile-tab-panel > .profile-section:first-child { margin-top: 0; }
.ptab-link { cursor: pointer; border: none; font: inherit; }

/* Yorum kartları */
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.review-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .85rem 1rem;
    transition: border-color .2s;
}
.review-card:hover { border-color: var(--primary); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .35rem; }
.review-cafe { font-weight: 700; color: var(--text); text-decoration: none; }
.review-cafe:hover { color: var(--primary-2); text-decoration: underline; }
.review-rating {
    flex: 0 0 auto; font-weight: 800; font-size: .85rem; color: #f59e0b;
    background: rgba(245,158,11,.12); padding: .12rem .5rem; border-radius: 999px;
}
.review-text { margin: 0 0 .35rem; font-size: .9rem; color: var(--text-dim); line-height: 1.45; }

/* ====================== Liderlik filtreleri (2 seviyeli) ====================== */
#lb-view { transition: opacity .15s var(--ease); }
#lb-view.lb-loading { opacity: .5; pointer-events: none; }
.lb-filters { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.4rem; }

/* Ana mod: Sıralama / Arkadaşlar */
.lb-primary { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.lb-primary-tab {
    position: relative;
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .55rem .6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-dim);
    font-weight: 700; font-size: .9rem;
    text-decoration: none;
    transition: all .2s var(--ease);
}
.lb-primary-tab svg { width: 16px; height: 16px; flex-shrink: 0; }
.lb-primary-tab:hover { border-color: var(--primary); color: var(--text); }
.lb-primary-tab.active {
    background: var(--grad-primary);
    color: #fff; border-color: transparent;
    box-shadow: 0 8px 20px var(--primary-glow);
}
.lb-primary-tab .badge-count {
    position: absolute; top: -6px; right: -6px;
    background: var(--danger); color: #fff;
    border: 2px solid var(--bg);
}
.lb-primary-tab.active .badge-count { border-color: #fff; }

/* Alt segment: dönem ya da sosyal — eşit genişlikli pill track */
.lb-sub {
    display: flex; gap: .2rem; flex-wrap: wrap;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .25rem;
}
.lb-sub a {
    flex: 0 1 auto;
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    font-size: .82rem; font-weight: 600;
    color: var(--text-dim); text-decoration: none;
    white-space: nowrap;
    transition: all .18s var(--ease);
}
.lb-sub a svg { width: 14px; height: 14px; flex-shrink: 0; }
.lb-sub a:hover { color: var(--text); }
.lb-sub a.active {
    background: var(--surface);
    color: var(--primary-2);
    box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .lb-sub a.active { color: var(--primary-3); }
.lb-sub a .badge-count { background: var(--danger); color: #fff; }
@media (max-width: 420px) {
    .lb-sub a span { font-size: .8rem; }
    .lb-sub a svg { display: none; }
}

/* --- Banner kapak görseli --- */
.profile-hero-v2 .ph-banner { height: clamp(120px, 22vw, 170px); }
.ph-banner.has-cover {
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--surface-2);
}
.ph-banner.has-cover::before {
    background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.30));
}

/* --- Vitrin rozetleri: avatarın yanında çıkıntı kümesi --- */
.profile-hero-v2 .avatar-badges {
    position: absolute;
    bottom: -6px; right: -10px;
    display: flex; gap: 0;
    padding: 3px;
    background: var(--surface);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.profile-hero-v2 .avatar-badge {
    width: 30px; height: 30px;
    margin-left: -8px;
    border: 2.5px solid var(--surface);
    background: var(--surface-2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .92rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    transition: transform .18s var(--ease);
}
.profile-hero-v2 .avatar-badge:first-child { margin-left: 0; }
.profile-hero-v2 .avatar-badge:hover { transform: translateY(-3px) scale(1.08); z-index: 2; }

/* --- Avatar biraz daha aşağıda (alt öğelerle bütünleşsin) --- */
.profile-hero-v2 .profile-avatar-wrap { margin-top: -34px; }

/* --- Fotoğrafı olmayan kullanıcılar: logo varsayılan avatar --- */
.profile-avatar-logo {
    object-fit: contain !important;
    object-position: center !important;
    background: #fff;
    padding: 0 6px;
}
[data-theme="dark"] .profile-avatar-logo { background: #fff; }

/* --- Aksiyonlar: isim/konum satırının sağında --- */
.profile-hero-v2 .profile-id { align-self: center; }
.profile-hero-v2 .profile-actions {
    grid-area: actions;
    align-self: center;
    justify-self: end;
    width: auto; margin: 0;
    padding: 0 1.2rem 0 0;
    display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end;
}
.profile-hero-v2 .profile-actions .btn { flex: 0 0 auto; }
.profile-edit-btn { white-space: nowrap; }
/* Aksiyon, dar ekranda da isim satırında kalsın (kendi satırını kaplamasın) */
@media (max-width: 560px) {
    .profile-hero-v2 {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "banner banner  banner"
            "avatar id      actions"
            "bio    bio     bio"
            "soc    soc     soc"
            "stats  stats   stats";
    }
    .profile-hero-v2 .profile-actions { padding-right: .9rem; }
    .profile-hero-v2 .profile-actions .profile-edit-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; justify-content: center; }
    .profile-edit-btn .btn-label { display: none; }
}

/* --- Başkasının profili: aksiyonlar (arkadaş ekle/engelle) alt satırda --- */
.profile-hero-v2.is-other {
    grid-template-areas:
        "banner  banner banner"
        "avatar  id     id"
        "actions actions actions"
        "bio     bio    bio"
        "soc     soc    soc"
        "stats   stats  stats";
}
.profile-hero-v2.is-other .profile-actions {
    align-self: auto; justify-self: stretch; justify-content: flex-start;
    padding: .2rem 1.2rem 0 1.4rem;
}
@media (max-width: 560px) {
    .profile-hero-v2.is-other {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "banner  banner"
            "avatar  id"
            "actions actions"
            "bio     bio"
            "soc     soc"
            "stats   stats";
    }
    .profile-hero-v2.is-other .profile-actions { padding: .2rem 1.2rem 0; }
    .profile-hero-v2.is-other .profile-actions .btn:not(.btn-icon-only) { flex: 1; }
}

/* --- Görsel kırpıcı (sürükle-konumla) --- */
.crop-stage {
    position: relative; overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: grab;
    touch-action: none;
    user-select: none; -webkit-user-select: none;
}
.crop-stage.grabbing { cursor: grabbing; }
.crop-stage img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.crop-wide .crop-stage { aspect-ratio: 3 / 1; }
.crop-circle .crop-stage { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto; }
.crop-empty {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; gap: .3rem;
    align-items: center; justify-content: center;
    color: var(--text-mute); pointer-events: none; font-size: .8rem;
}
.crop-empty[hidden] { display: none; }
.crop-empty svg { width: 30px; height: 30px; opacity: .7; }
.crop-tools { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .55rem; flex-wrap: wrap; }
.crop-hint { margin: 0; font-size: .78rem; color: var(--text-mute); }
.file-pick { cursor: pointer; }
.file-pick input { display: none; }
