
    :root {
      --bg: #fff6ee;
      --ink: #1c1410;
      --muted: #6b5344;
      --line: #f0d9c4;
      --accent: #e03e2f;
      --accent-deep: #b91c1c;
      --saffron: #f5a524;
      --herb: #2f6b4f;
      --teal: #2f6b4f;
      --teal-soft: #e8f5ee;
      --shadow: 0 24px 50px rgba(60, 28, 12, 0.14);
      --radius-xl: 28px;
      --radius-lg: 20px;
      --font-display: 'Fraunces', Georgia, serif;
      --font-body: 'Outfit', sans-serif;
    }

    html {
      scroll-behavior: smooth;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: var(--font-body);
      color: var(--ink);
      line-height: 1.55;
      background:
        radial-gradient(ellipse 80% 50% at 0% 0%, rgba(245, 165, 36, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 10%, rgba(224, 62, 47, 0.1), transparent 50%),
        linear-gradient(180deg, #fff8f1 0%, #fff6ee 40%, #fff3e8 100%);
      min-height: 100vh;
    }

    h1, h2, h3, .logo, .brand-mark, .section-title {
      font-family: var(--font-display);
      letter-spacing: -0.03em;
    }

    .btn, .section-label {
      font-family: var(--font-body);
      letter-spacing: -0.01em;
    }

    .container {
      width: min(1140px, 92vw);
      margin: 0 auto;
    }

    /* ── Full-bleed delicious hero ── */
    .site-hero {
      position: relative;
      min-height: min(100vh, 920px);
      display: flex;
      flex-direction: column;
      color: #fffaf5;
      overflow: hidden;
      isolation: isolate;
    }

    .hero-media {
      position: absolute;
      inset: 0;
      z-index: 0;
      background:
        url('https://images.unsplash.com/photo-1601050690597-df0568f70950?auto=format&fit=crop&w=2000&q=80')
        center / cover no-repeat;
      transform: scale(1.04);
      animation: heroDrift 22s ease-in-out infinite alternate;
    }

    .hero-media::after {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(105deg, rgba(18, 8, 4, 0.82) 0%, rgba(18, 8, 4, 0.55) 42%, rgba(18, 8, 4, 0.28) 68%, rgba(18, 8, 4, 0.45) 100%),
        radial-gradient(ellipse at 70% 40%, rgba(245, 165, 36, 0.18), transparent 45%);
    }

    .hero-steam {
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      background:
        radial-gradient(circle at 18% 78%, rgba(255, 248, 240, 0.12), transparent 18%),
        radial-gradient(circle at 28% 85%, rgba(255, 248, 240, 0.08), transparent 14%);
      animation: steamRise 7s ease-in-out infinite;
      opacity: 0.9;
    }

    .site-hero .container {
      position: relative;
      z-index: 2;
      width: min(1140px, 92vw);
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .navbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 22px 0 8px;
      position: relative;
      z-index: 5;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 1.45rem;
      font-weight: 700;
      color: #fff8f0;
      text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
    }

    .logo i {
      color: var(--saffron);
      filter: drop-shadow(0 0 10px rgba(245, 165, 36, 0.45));
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 18px;
      padding: 8px 16px;
      border: 1px solid rgba(255, 248, 240, 0.18);
      background: rgba(20, 10, 6, 0.35);
      border-radius: 999px;
      backdrop-filter: blur(14px);
      font-weight: 500;
      color: rgba(255, 248, 240, 0.9);
    }

    .nav-links a {
      text-decoration: none;
      color: inherit;
      font-size: 0.92rem;
      transition: color 0.2s ease;
    }

    .nav-links a:hover {
      color: var(--saffron);
    }

    .btn {
      border: none;
      border-radius: 999px;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      padding: 13px 24px;
      background: var(--accent);
      color: #fff;
      box-shadow: 0 12px 28px rgba(224, 62, 47, 0.38);
      transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .btn:hover {
      transform: translateY(-2px);
      background: var(--accent-deep);
      box-shadow: 0 16px 32px rgba(185, 28, 28, 0.4);
    }

    .btn-outline {
      background: transparent;
      color: var(--ink);
      border: 1px solid #e0c4ae;
      box-shadow: none;
    }

    .btn-outline:hover {
      color: #fff;
      background: var(--herb);
      border-color: var(--herb);
    }

    .site-hero .btn-outline {
      background: rgba(255, 248, 240, 0.08);
      color: #fff8f0;
      border: 1px solid rgba(255, 248, 240, 0.35);
      backdrop-filter: blur(8px);
    }

    .site-hero .btn-outline:hover {
      color: #1c1410;
      background: #fff8f0;
      border-color: #fff8f0;
    }

    .btn-light {
      background: #ffffff;
      color: #1c1410;
      box-shadow: none;
    }

    .btn-light:hover {
      background: #fff1e4;
      color: #1c1410;
    }

    .auth-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .hero {
      flex: 1;
      display: flex;
      align-items: flex-end;
      padding: 36px 0 72px;
      position: relative;
      z-index: 2;
      max-width: 40rem;
    }

    .brand-mark {
      font-family: var(--font-display);
      font-size: clamp(2.8rem, 7vw, 5.2rem);
      font-weight: 800;
      line-height: 0.95;
      color: #fff8f0;
      margin-bottom: 14px;
      text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
      animation: brandIn 1s ease both;
    }

    .brand-mark span {
      color: var(--saffron);
    }

    .hero h1 {
      font-size: clamp(1.35rem, 2.6vw, 1.85rem);
      font-weight: 500;
      line-height: 1.25;
      margin-bottom: 14px;
      max-width: 22ch;
      color: rgba(255, 248, 240, 0.95);
      font-family: var(--font-body);
      letter-spacing: -0.02em;
    }

    .hero h1 .accent {
      color: var(--saffron);
    }

    .hero-lead {
      font-size: 1.08rem;
      color: rgba(255, 241, 230, 0.82);
      max-width: 38ch;
      margin-bottom: 28px;
    }

    .hero-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 0;
    }

    .hero-actions .btn {
      animation: ctaPop 0.9s ease 0.25s both;
    }

    .hero-actions .btn-outline {
      animation-delay: 0.38s;
    }

    .hero-tags,
    .hero-panel,
    .eyebrow {
      display: none;
    }

    .hero-sizzle {
      position: absolute;
      right: 6%;
      bottom: 14%;
      z-index: 2;
      width: min(280px, 34vw);
      aspect-ratio: 1;
      border-radius: 50%;
      background:
        radial-gradient(circle at 40% 35%, rgba(245, 165, 36, 0.35), transparent 55%),
        radial-gradient(circle at 60% 65%, rgba(224, 62, 47, 0.25), transparent 50%);
      filter: blur(2px);
      animation: sizzlePulse 4.5s ease-in-out infinite;
      pointer-events: none;
    }

    .section {
      padding: 66px 0;
      position: relative;
      z-index: 2;
    }

    .section-label {
      color: #b45309;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      font-size: 0.72rem;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .section-title {
      font-size: clamp(1.8rem, 3.4vw, 2.8rem);
      margin-bottom: 10px;
      color: #1c1410;
    }

    .section-sub {
      color: var(--muted);
      max-width: 64ch;
      margin-bottom: 26px;
      font-size: 1.03rem;
    }

    .nearby-section {
      background:
        radial-gradient(ellipse at top left, rgba(245, 165, 36, 0.12), transparent 40%),
        linear-gradient(180deg, #fff9f3 0%, #fff6ee 100%);
      border-radius: 0;
    }

    .feature-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
    }

    .feature-card {
      background: rgba(255, 252, 248, 0.92);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 18px;
      box-shadow: 0 10px 28px rgba(80, 40, 16, 0.06);
      transition: transform 0.22s ease, border-color 0.22s ease;
    }

    .feature-card:hover {
      transform: translateY(-4px);
      border-color: #f5a524;
    }

    .feature-icon {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      background: linear-gradient(145deg, #fff0e4, #ffe2c8);
      color: var(--accent);
      display: grid;
      place-items: center;
      font-size: 1.1rem;
      margin-bottom: 12px;
    }

    .feature-card h3 {
      margin-bottom: 8px;
      font-size: 1.08rem;
    }

    .feature-card p {
      color: #4d6472;
      font-size: 0.95rem;
    }

    .flow-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 12px;
      margin-top: 26px;
    }

    .flow-step {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 16px;
      min-height: 166px;
      position: relative;
      overflow: hidden;
    }

    .flow-step .num {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: #ffefe5;
      color: #a1441c;
      font-weight: 700;
      margin-bottom: 10px;
      font-size: 0.88rem;
    }

    .flow-step h3 {
      font-size: 1.02rem;
      margin-bottom: 7px;
    }

    .flow-step p {
      color: #55717f;
      font-size: 0.9rem;
    }

    .safety-wrap {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr;
      gap: 18px;
      background: linear-gradient(135deg, #0e3644 0%, #155e63 100%);
      color: #eff8fa;
      border-radius: 26px;
      padding: 24px;
      box-shadow: 0 20px 34px rgba(14, 54, 68, 0.3);
      overflow: hidden;
      position: relative;
    }

    .safety-wrap::before {
      content: "";
      position: absolute;
      top: -60px;
      right: -40px;
      width: 170px;
      height: 170px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
    }

    .safety-title {
      font-size: clamp(1.5rem, 3vw, 2.2rem);
      margin-bottom: 10px;
      max-width: 24ch;
    }

    .safety-text {
      color: #d3ecef;
      max-width: 58ch;
      margin-bottom: 16px;
    }

    .safety-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 9px;
    }

    .safety-tag {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.82rem;
      padding: 7px 11px;
      border: 1px solid rgba(191, 232, 232, 0.55);
      border-radius: 999px;
      color: #ddf2f2;
      background: rgba(255, 255, 255, 0.07);
    }

    .safety-card {
      background: rgba(8, 25, 34, 0.36);
      border: 1px solid rgba(167, 219, 223, 0.28);
      border-radius: 16px;
      padding: 16px;
      backdrop-filter: blur(4px);
      position: relative;
      z-index: 1;
    }

    .safety-card h3 {
      font-size: 1rem;
      margin-bottom: 10px;
    }

    .safety-list {
      list-style: none;
      display: grid;
      gap: 8px;
      margin-bottom: 14px;
      font-size: 0.9rem;
      color: #d9f0f2;
    }

    .safety-list li {
      display: flex;
      gap: 8px;
      align-items: flex-start;
    }

    .safety-list i {
      color: #ffd7e2;
      margin-top: 2px;
    }

    .cta-band {
      background:
        linear-gradient(125deg, rgba(224, 62, 47, 0.92) 0%, rgba(185, 28, 28, 0.95) 48%, rgba(146, 64, 14, 0.95) 100%);
      border: none;
      border-radius: 24px;
      padding: 28px 30px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
      color: #fff8f0;
      box-shadow: 0 20px 40px rgba(185, 28, 28, 0.25);
    }

    .cta-band h2 {
      font-size: clamp(1.4rem, 2.8vw, 2rem);
      margin-bottom: 8px;
      color: #fff8f0;
    }

    .cta-band p {
      color: rgba(255, 248, 240, 0.88);
    }

    .cta-band .btn {
      background: #fff8f0;
      color: #b91c1c;
      box-shadow: none;
    }

    .cta-band .btn:hover {
      background: #fff;
      color: #991b1b;
    }

    .cta-band .btn-outline {
      background: transparent;
      color: #fff8f0;
      border-color: rgba(255, 248, 240, 0.45);
    }

    .cta-band .btn-outline:hover {
      background: #fff8f0;
      color: #b91c1c;
    }

    .cta-band p {
      color: #5b7280;
      max-width: 62ch;
    }

    .api-shell {
      border: 1px solid #d9e4ea;
      border-radius: 24px;
      background: linear-gradient(180deg, #fbfeff 0%, #f4f9fb 100%);
      padding: 22px;
      box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    }

    .api-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 16px;
    }

    .api-header h3 {
      font-size: 1.2rem;
      margin-bottom: 4px;
    }

    .api-header p {
      color: #546c79;
      font-size: 0.9rem;
      max-width: 66ch;
    }

    .api-status {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 7px 12px;
      border-radius: 999px;
      border: 1px solid #d7e4ea;
      background: #f8fbfd;
      color: #57717d;
      font-size: 0.84rem;
      font-weight: 700;
      min-width: 90px;
    }

    .api-status.busy {
      border-color: #f3cead;
      background: #fff4ea;
      color: #9a4116;
    }

    .api-status.ok {
      border-color: #b7e3cd;
      background: #ecfbf3;
      color: #17613e;
    }

    .api-status.error {
      border-color: #f4b9c7;
      background: #fff0f4;
      color: #91223f;
    }

    .api-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .api-card {
      border: 1px solid #d8e6ee;
      border-radius: 16px;
      background: #ffffff;
      padding: 16px;
      box-shadow: 0 7px 16px rgba(15, 23, 42, 0.04);
    }

    .api-card h3 {
      font-size: 1.02rem;
      display: flex;
      gap: 8px;
      align-items: center;
      margin-bottom: 10px;
      color: #15384a;
    }

    .api-form {
      display: grid;
      gap: 10px;
    }

    .field {
      display: grid;
      gap: 5px;
    }

    .field label {
      font-size: 0.84rem;
      font-weight: 700;
      color: #375365;
    }

    .field input,
    .field textarea {
      width: 100%;
      border: 1px solid #c9d7e0;
      border-radius: 10px;
      padding: 10px 11px;
      font-size: 0.92rem;
      font-family: var(--font-body);
      color: #1f3343;
      background: #fcfeff;
    }

    .field textarea {
      min-height: 78px;
      resize: vertical;
    }

    .field input:focus,
    .field textarea:focus {
      outline: none;
      border-color: #0f8b8d;
      box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.16);
    }

    .row-2 {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .api-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 4px;
    }

    .api-actions .btn {
      padding: 10px 14px;
      font-size: 0.86rem;
    }

    .helper-text {
      color: #607887;
      font-size: 0.82rem;
      line-height: 1.4;
      margin-top: 2px;
    }

    .api-output {
      margin-top: 14px;
      border: 1px solid #1f3046;
      border-radius: 14px;
      background: #0f172a;
      color: #dbeafe;
      overflow: hidden;
    }

    .api-output-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      font-size: 0.82rem;
      color: #9db6dc;
      background: #111d35;
      padding: 9px 12px;
      border-bottom: 1px solid #243451;
    }

    .api-output pre {
      margin: 0;
      padding: 12px;
      max-height: 290px;
      overflow: auto;
      font-size: 0.83rem;
      line-height: 1.45;
      white-space: pre-wrap;
      word-break: break-word;
      font-family: Consolas, 'Courier New', monospace;
    }

    footer {
      margin-top: 56px;
      padding: 34px 0 24px;
      border-top: 1px solid #dfd0b8;
      background: rgba(255, 255, 255, 0.42);
      backdrop-filter: blur(2px);
    }

    .footer-grid {
      display: grid;
      grid-template-columns: 1.4fr 1fr 1fr 1fr;
      gap: 16px;
    }

    .footer-brand p,
    .footer-col a,
    .foot-note {
      color: #4f6473;
      font-size: 0.92rem;
    }

    .footer-brand p {
      max-width: 40ch;
      margin-top: 10px;
    }

    .footer-col h4 {
      margin-bottom: 10px;
      font-size: 1rem;
    }

    .footer-col a {
      display: block;
      text-decoration: none;
      margin-bottom: 8px;
    }

    .footer-col a:hover {
      color: var(--accent);
    }

    .foot-note {
      margin-top: 18px;
      text-align: center;
    }

    [data-reveal] {
      opacity: 0;
      transform: translateY(28px);
    }

    [data-reveal].in-view {
      animation: riseUp 0.72s cubic-bezier(0.2, 0.78, 0.2, 1) forwards;
      animation-delay: var(--delay, 0s);
    }

    @keyframes riseUp {
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes heroDrift {
      from { transform: scale(1.04) translate3d(0, 0, 0); }
      to { transform: scale(1.1) translate3d(-1.5%, 1%, 0); }
    }

    @keyframes steamRise {
      0%, 100% { opacity: 0.55; transform: translateY(0); }
      50% { opacity: 0.95; transform: translateY(-12px); }
    }

    @keyframes brandIn {
      from { opacity: 0; transform: translateY(18px) scale(0.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes ctaPop {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes sizzlePulse {
      0%, 100% { opacity: 0.45; transform: scale(1); }
      50% { opacity: 0.8; transform: scale(1.08); }
    }

    @keyframes pulseDot {
      0% {
        box-shadow: 0 0 0 0 rgba(47, 107, 79, 0.7);
      }
      100% {
        box-shadow: 0 0 0 15px rgba(47, 107, 79, 0);
      }
    }

    @keyframes floatCard {
      0%, 100% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-5px);
      }
    }

    @media (max-width: 1020px) {
      .navbar {
        flex-wrap: wrap;
      }

      .hero {
        max-width: 100%;
        padding: 28px 0 56px;
      }

      .hero-sizzle {
        display: none;
      }

      .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .flow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .api-grid {
        grid-template-columns: 1fr;
      }

      .safety-wrap {
        grid-template-columns: 1fr;
      }

      .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 780px) {
      .hamburger {
        display: flex;
      }

      .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 12px 16px;
        border-radius: 18px;
        background: rgba(28, 20, 16, 0.96);
        border: 1px solid rgba(255, 248, 240, 0.15);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
        z-index: 10;
        backdrop-filter: blur(10px);
        color: #fff8f0;
      }

      .nav-links.open {
        display: flex;
      }

      .nav-links a {
        padding: 10px 8px;
        font-size: 1rem;
        width: 100%;
        border-bottom: 1px solid rgba(255, 248, 240, 0.12);
      }

      .nav-links a:last-child {
        border-bottom: none;
      }
    }

    @media (max-width: 680px) {
      .auth-actions {
        margin-left: auto;
      }

      .site-hero {
        min-height: 92vh;
      }

      .brand-mark {
        font-size: clamp(2.4rem, 12vw, 3.4rem);
      }

      .feature-grid,
      .flow-grid,
      .footer-grid {
        grid-template-columns: 1fr;
      }

      .row-2 {
        grid-template-columns: 1fr;
      }

      .cta-band {
        padding: 18px;
      }
    }

    /* ---- Smooth scroll offset ---- */
    section[id] {
      scroll-margin-top: 72px;
    }

    /* ---- Hamburger button ---- */
    .hamburger {
      display: none;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      cursor: pointer;
      padding: 8px;
      background: none;
      border: none;
      border-radius: 8px;
      flex-shrink: 0;
    }

    .hamburger span {
      display: block;
      width: 22px;
      height: 2px;
      background: #fff8f0;
      border-radius: 2px;
      transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .hamburger.open span:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }

    .hamburger.open span:nth-child(2) {
      opacity: 0;
    }

    .hamburger.open span:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }

    /* ---- Scroll-to-top button ---- */
    .scroll-top {
      position: fixed;
      bottom: 28px;
      right: 28px;
      width: 46px;
      height: 46px;
      border-radius: 50%;
      border: none;
      background: var(--accent);
      color: #fff;
      font-size: 1rem;
      cursor: pointer;
      box-shadow: 0 8px 20px rgba(255, 107, 44, 0.38);
      opacity: 0;
      transform: translateY(14px);
      transition: opacity 0.3s ease, transform 0.3s ease;
      z-index: 99;
      display: grid;
      place-items: center;
    }

    .scroll-top.visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* ---- Toast notifications ---- */
    .toast-rail {
      position: fixed;
      bottom: 90px;
      right: 28px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 100;
      pointer-events: none;
    }

    .toast {
      padding: 11px 16px;
      border-radius: 12px;
      font-size: 0.88rem;
      font-weight: 600;
      max-width: 300px;
      pointer-events: auto;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
      animation: toastIn 0.3s ease forwards;
    }

    .toast.success {
      background: #ecfbf3;
      color: #155e39;
      border: 1px solid #b7e3cd;
    }

    .toast.error {
      background: #fff0f4;
      color: #91223f;
      border: 1px solid #f4b9c7;
    }

    .toast.info {
      background: #eff6ff;
      color: #1e40af;
      border: 1px solid #bfdbfe;
    }

    @keyframes toastIn {
      from { opacity: 0; transform: translateX(16px); }
      to   { opacity: 1; transform: translateX(0); }
    }

    @keyframes toastOut {
      from { opacity: 1; transform: translateX(0); }
      to   { opacity: 0; transform: translateX(16px); }
    }

    /* ---- Active nav link ---- */
    .nav-links a.active {
      color: var(--accent);
      font-weight: 700;
    }

    /* ---- Help Me / danger button ---- */
    .btn-danger {
      background: #dc2626;
      color: #fff;
      box-shadow: 0 10px 22px rgba(220, 38, 38, 0.35);
    }

    .btn-danger:hover {
      background: #b91c1c;
      box-shadow: 0 14px 26px rgba(185, 28, 28, 0.4);
      transform: translateY(-2px);
    }

    /* ---- JSON syntax highlighting ---- */
    .json-key  { color: #93c5fd; }
    .json-str  { color: #86efac; }
    .json-num  { color: #fde68a; }
    .json-bool { color: #f9a8d4; }
    .json-null { color: #9ca3af; }

    /* ---- Auth modals ---- */
    .modal-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(15, 20, 30, 0.55);
      backdrop-filter: blur(4px);
      z-index: 200;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }
    .modal-backdrop.open { display: flex; }

    .modal {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius-xl);
      padding: 28px 26px;
      width: min(460px, 100%);
      box-shadow: 0 28px 56px rgba(15, 23, 42, 0.22);
      position: relative;
      animation: modalIn 0.26s cubic-bezier(0.22, 0.78, 0.22, 1) forwards;
    }

    @keyframes modalIn {
      from { opacity: 0; transform: translateY(18px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0)  scale(1); }
    }

    .modal-close {
      position: absolute;
      top: 14px;
      right: 16px;
      background: none;
      border: none;
      font-size: 1.2rem;
      color: var(--muted);
      cursor: pointer;
      line-height: 1;
      padding: 4px 6px;
      border-radius: 6px;
      transition: background 0.15s;
    }
    .modal-close:hover { background: #f1f5f9; }

    .modal-logo {
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: var(--font-body);
      font-weight: 700;
      font-size: 1.1rem;
      color: #1d3342;
      margin-bottom: 18px;
    }
    .modal-logo i { color: var(--accent); }

    .modal h2 {
      font-size: 1.5rem;
      margin-bottom: 6px;
    }
    .modal .modal-sub {
      color: var(--muted);
      font-size: 0.95rem;
      margin-bottom: 20px;
    }

    .modal .field {
      margin-bottom: 12px;
    }

    .modal-footer {
      margin-top: 16px;
      text-align: center;
      font-size: 0.9rem;
      color: var(--muted);
    }
    .modal-footer a {
      color: var(--accent);
      cursor: pointer;
      font-weight: 600;
      text-decoration: none;
    }
    .modal-footer a:hover { text-decoration: underline; }

    .modal-alert {
      border-radius: 10px;
      padding: 10px 13px;
      font-size: 0.88rem;
      margin-bottom: 14px;
      display: none;
    }
    .modal-alert.error   { background: #fff0f4; color: #91223f; border: 1px solid #f4b9c7; display: block; }
    .modal-alert.success { background: #ecfbf3; color: #155e39; border: 1px solid #b7e3cd; display: block; }

    .id-reveal {
      background: #f8f9fa;
      border: 1px dashed #c9d7e0;
      border-radius: 12px;
      padding: 14px;
      margin-bottom: 14px;
      display: none;
    }
    .id-reveal.show { display: block; }
    .id-reveal p { font-size: 0.84rem; color: var(--muted); margin-bottom: 6px; }
    .id-reveal .id-value {
      font-family: Consolas, monospace;
      font-size: 0.92rem;
      font-weight: 700;
      color: var(--ink);
      word-break: break-all;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .copy-btn {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--teal);
      font-size: 0.85rem;
      padding: 2px 6px;
      border-radius: 5px;
      flex-shrink: 0;
    }
    .copy-btn:hover { background: var(--teal-soft); }

    /* navbar logged-in state */
    .user-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 13px;
      border-radius: 999px;
      background: var(--teal-soft);
      border: 1px solid #bfe8e8;
      color: #0f4c5a;
      font-size: 0.88rem;
      font-weight: 600;
    }
    .user-pill i { color: var(--teal); }
    .btn-signout {
      background: none;
      border: 1px solid #e0c8b8;
      color: #8a4f2e;
      border-radius: 999px;
      padding: 7px 14px;
      font-size: 0.86rem;
      font-weight: 600;
      cursor: pointer;
      font-family: var(--font-body);
      transition: background 0.18s;
    }
    .btn-signout:hover { background: #fff3eb; }

    /* ---- Guest / Temp-ID badge ---- */
    .guest-pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 6px 12px;
      border-radius: 999px;
      background: #faf5ff;
      border: 1px solid #e9d5ff;
      color: #6d28d9;
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      font-family: var(--font-body), monospace;
    }
    .guest-pill i { color: #a78bfa; font-size: 0.78rem; }
    .temp-id-tag {
      display: inline-block;
      background: #ede9fe;
      color: #6d28d9;
      font-size: 0.69rem;
      font-weight: 700;
      font-family: monospace;
      padding: 1px 7px;
      border-radius: 99px;
      letter-spacing: 0.04em;
      vertical-align: middle;
    }

    /* ---- Nearby Food Spots section ---- */
    .nearby-section { background: #f8fafc; }

    .nearby-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 18px;
      margin-top: 28px;
    }

    .spot-card {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius-xl);
      padding: 20px 18px 16px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      box-shadow: 0 2px 10px rgba(15,23,42,0.06);
      transition: transform 0.18s, box-shadow 0.18s;
    }
    .spot-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(15,23,42,0.10); }

    .spot-card-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
    }
    .spot-card-name {
      font-weight: 700;
      font-size: 1rem;
      color: var(--ink);
      flex: 1;
    }
    .spot-status {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      padding: 3px 8px;
      border-radius: 99px;
      flex-shrink: 0;
    }
    .spot-status.OPEN     { background: #dcfce7; color: #166534; }
    .spot-status.ACCEPTED { background: #fef3c7; color: #92400e; }

    .spot-meta {
      display: flex;
      flex-direction: column;
      gap: 5px;
      font-size: 0.85rem;
      color: var(--muted);
    }
    .spot-meta span { display: flex; align-items: center; gap: 6px; }
    .spot-meta i { width: 14px; color: var(--teal); flex-shrink: 0; }

    .spot-msg {
      font-size: 0.83rem;
      color: #4b5563;
      font-style: italic;
      border-left: 3px solid var(--teal-soft);
      padding-left: 8px;
    }

    .spot-actions {
      display: flex;
      gap: 8px;
      margin-top: 4px;
      flex-wrap: wrap;
    }
    .spot-actions a, .spot-actions button {
      flex: 1;
      min-width: 100px;
      text-align: center;
      font-size: 0.83rem;
      padding: 7px 10px;
      border-radius: 10px;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      font-family: var(--font-body);
      transition: background 0.15s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
    }
    .btn-map {
      background: var(--teal-soft);
      color: #0f4c5a;
      border: 1px solid #bfe8e8;
    }
    .btn-map:hover { background: #b3dede; }
    .btn-join {
      background: var(--accent);
      color: #fff;
      border: none;
    }
    .btn-join:hover { background: #d46a1f; }

    .nearby-empty, .nearby-loading, .nearby-error {
      text-align: center;
      padding: 36px 20px;
      color: var(--muted);
      font-size: 0.95rem;
    }
    .nearby-empty i, .nearby-loading i, .nearby-error i {
      font-size: 2rem;
      display: block;
      margin-bottom: 10px;
    }
    .nearby-error i { color: #f87171; }

    .nearby-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
    }
    .btn-refresh {
      background: none;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 7px 14px;
      font-size: 0.84rem;
      font-weight: 600;
      cursor: pointer;
      color: var(--muted);
      font-family: var(--font-body);
      display: flex;
      align-items: center;
      gap: 6px;
      transition: background 0.15s, color 0.15s;
    }
    .btn-refresh:hover { background: #f1f5f9; color: var(--ink); }

    /* ---- Live Map section ---- */
    .map-tabs {
      display: flex;
      gap: 6px;
      background: #eef2f7;
      border-radius: 14px;
      padding: 4px;
      width: fit-content;
      margin-bottom: 20px;
    }
    .map-tab {
      padding: 8px 18px;
      border-radius: 10px;
      border: none;
      background: none;
      font-family: var(--font-body);
      font-size: 0.87rem;
      font-weight: 600;
      cursor: pointer;
      color: var(--muted);
      transition: background 0.18s, color 0.18s;
      display: flex;
      align-items: center;
      gap: 7px;
    }
    .map-tab.active {
      background: #ffffff;
      color: var(--ink);
      box-shadow: 0 2px 8px rgba(15,23,42,0.09);
    }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; }

    #liveMapWrap {
      border-radius: 16px;
      overflow: hidden;
      border: 1px solid var(--line);
      box-shadow: 0 4px 20px rgba(15,23,42,0.09);
      position: relative;
      z-index: 0;
      isolation: isolate;
      contain: layout paint;
    }
    #liveMap {
      width: 100%;
      height: 480px;
      z-index: 0;
    }
    /* Contain Leaflet's high z-index panes so the map never covers the sidebar */
    #liveMapWrap .leaflet-container { z-index: 0 !important; }
    .map-column { min-width: 0; position: relative; z-index: 1; }
    .map-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      margin-top: 14px;
      font-size: 0.84rem;
      color: var(--muted);
    }
    .map-legend span { display: flex; align-items: center; gap: 5px; }
    .legend-dot {
      width: 12px; height: 12px;
      border-radius: 50%;
      flex-shrink: 0;
      display: inline-block;
    }
    .legend-dot.restaurant { background: #ef4444; }
    .legend-dot.cafe       { background: #f59e0b; }
    .legend-dot.fastfood   { background: #8b5cf6; }
    .legend-dot.meetup     { background: #e03e2f; }

    .map-status-bar {
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(6px);
      border-top: 1px solid var(--line);
      padding: 9px 14px;
      font-size: 0.82rem;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .map-status-bar i { color: var(--teal); }

    .sidebar-panel {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
      gap: 16px;
      align-items: stretch;
      width: 100%;
      isolation: isolate;
    }
    .map-sidebar {
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: 16px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      max-height: 542px;
      min-height: 320px;
      position: relative;
      z-index: 2;
      isolation: isolate;
    }
    .map-sidebar-header {
      padding: 12px 14px;
      font-weight: 700;
      font-size: 0.9rem;
      border-bottom: 1px solid var(--line);
      background: #f8fafc;
      display: flex;
      align-items: center;
      gap: 7px;
      color: var(--ink);
    }
    .map-sidebar-list {
      overflow-y: auto;
      flex: 1;
    }
    .sidebar-item {
      padding: 11px 14px;
      border-bottom: 1px solid #f1f5f9;
      cursor: pointer;
      transition: background 0.14s;
      display: flex;
      align-items: flex-start;
      gap: 10px;
    }
    .sidebar-item:hover { background: #f8fafc; }
    .sidebar-item:last-child { border-bottom: none; }
    .sidebar-icon {
      width: 32px; height: 32px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.85rem;
      flex-shrink: 0;
      margin-top: 1px;
    }
    .sidebar-icon.restaurant { background: #fee2e2; color: #ef4444; }
    .sidebar-icon.cafe       { background: #fef3c7; color: #d97706; }
    .sidebar-icon.fast_food  { background: #ede9fe; color: #7c3aed; }
    .sidebar-icon.bar        { background: #e0f2fe; color: #0284c7; }
    .sidebar-icon.meetup     { background: #dcfce7; color: #16a34a; }
    .sidebar-icon.foodpal-invite { background: #fff1ee; color: var(--accent-deep, #c2410c); }
    .sidebar-item--foodpal { background: #fffaf8; }
    .sidebar-item--foodpal:hover { background: #fff1ee; }

    .foodpal-explore-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--accent-deep, #c2410c);
      background: #fff1ee;
      padding: 2px 8px;
      border-radius: 99px;
      white-space: nowrap;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .spot-card--foodpal {
      border-color: rgba(224, 62, 47, 0.18);
      background: linear-gradient(180deg, #fffaf8, #fff);
    }
    .spot-msg--foodpal {
      font-style: normal;
      border-left-color: rgba(224, 62, 47, 0.35);
      color: var(--muted);
      font-size: 0.8rem;
    }
    .foodpal-drawer-cta {
      text-align: center;
      margin-top: 8px;
    }

    @media (max-width: 780px) {
      .sidebar-meta {
        word-break: break-word;
        line-height: 1.35;
      }
      .foodpal-explore-tag {
        font-size: 0.68rem;
        padding: 2px 6px;
      }
      .spot-card-header {
        flex-wrap: wrap;
        align-items: flex-start;
      }
    }
    .sidebar-icon.other      { background: #f1f5f9; color: #64748b; }
    .sidebar-info { flex: 1; min-width: 0; }
    .sidebar-name {
      font-weight: 600;
      font-size: 0.87rem;
      color: var(--ink);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .sidebar-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
    .sidebar-count {
      font-size: 0.75rem;
      background: #e0f2fe;
      color: #0369a1;
      border-radius: 99px;
      padding: 2px 8px;
      font-weight: 700;
      white-space: nowrap;
      align-self: center;
    }
    @media (max-width: 880px) {
      .sidebar-panel { grid-template-columns: 1fr; }
      .map-sidebar { max-height: 260px; }
      #liveMap { height: 340px; }
    }

    /* ── Menu Drawer ── */
    .menu-drawer {
      position: absolute;
      top: 0; right: 0;
      width: 100%; height: 100%;
      background: #fff;
      border-radius: 16px;
      display: flex;
      flex-direction: column;
      transform: translateX(110%);
      transition: transform 0.28s cubic-bezier(0.22, 0.78, 0.22, 1);
      z-index: 10;
      box-shadow: -6px 0 24px rgba(15,23,42,0.10);
    }
    .menu-drawer.open { transform: translateX(0); }

    .menu-drawer-header {
      padding: 13px 14px 11px;
      border-bottom: 1px solid var(--line);
      background: #f8fafc;
      flex-shrink: 0;
    }
    .menu-drawer-back {
      display: flex;
      align-items: center;
      gap: 6px;
      background: none;
      border: none;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--teal);
      cursor: pointer;
      padding: 0 0 6px;
      font-family: var(--font-body);
    }
    .menu-drawer-back:hover { color: var(--accent); }
    .menu-drawer-title {
      font-weight: 700;
      font-size: 0.95rem;
      color: var(--ink);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .menu-drawer-sub {
      font-size: 0.76rem;
      color: var(--muted);
      margin-top: 2px;
    }

    .menu-drawer-body {
      overflow-y: auto;
      flex: 1;
      padding: 8px 0;
    }

    /* section heading inside drawer */
    .menu-section-label {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--muted);
      padding: 10px 14px 4px;
    }

    /* individual dish row */
    .dish-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 9px 14px;
      border-bottom: 1px solid #f1f5f9;
      transition: background 0.12s;
    }
    .dish-row:last-child { border-bottom: none; }
    .dish-row:hover { background: #f8fafc; }

    .dish-img {
      width: 44px; height: 44px;
      border-radius: 10px;
      object-fit: cover;
      flex-shrink: 0;
      background: #f1f5f9;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.3rem;
    }
    .dish-info { flex: 1; min-width: 0; }
    .dish-name {
      font-weight: 600;
      font-size: 0.86rem;
      color: var(--ink);
    }
    .dish-desc {
      font-size: 0.76rem;
      color: var(--muted);
      margin-top: 2px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .dish-right {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
      flex-shrink: 0;
    }
    .dish-price {
      font-weight: 700;
      font-size: 0.88rem;
      color: var(--ink);
    }
    .dish-badge {
      font-size: 0.68rem;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 99px;
      letter-spacing: 0.03em;
    }
    .dish-badge.available   { background: #dcfce7; color: #15803d; }
    .dish-badge.unavailable { background: #fee2e2; color: #b91c1c; }
    .dish-badge.limited     { background: #fef3c7; color: #b45309; }

    /* skeleton shimmer for loading state */
    .skeleton-row {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 14px;
      border-bottom: 1px solid #f1f5f9;
    }
    .skeleton-box {
      border-radius: 8px;
      background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
      background-size: 200% 100%;
      animation: shimmer 1.4s infinite;
    }
    @keyframes shimmer {
      0%   { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    /* selected state on sidebar item */
    .sidebar-item.selected {
      background: #f0fdf4;
      border-left: 3px solid var(--teal);
    }

    /* selected marker ring */
    .marker-selected div {
      box-shadow: 0 0 0 4px rgba(15,139,141,0.35), 0 2px 6px rgba(0,0,0,0.35) !important;
      transform: scale(1.35);
    }

    /* emoji icon in dish row */
    .dish-emoji {
      width: 36px; height: 36px;
      border-radius: 8px;
      background: #f1f5f9;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.25rem;
      flex-shrink: 0;
      line-height: 1;
    }

    /* unavailable dish row */
    .dish-unavailable { opacity: 0.45; }

    /* error state inside drawer */
    .menu-error {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 40px 20px;
      color: var(--muted);
      text-align: center;
      font-size: 0.85rem;
    }
    .menu-error i { font-size: 1.8rem; color: #fbbf24; }

    /* ── Age filter bar ── */
    .age-filter-bar {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 10px 16px;
      margin-bottom: 16px;
    }
    .age-filter-label {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--muted);
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .age-pills { display: flex; flex-wrap: wrap; gap: 6px; }
    .age-pill {
      padding: 5px 14px;
      border-radius: 99px;
      border: 1.5px solid var(--line);
      background: #f8fafc;
      font-family: var(--font-body);
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--muted);
      cursor: pointer;
      transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .age-pill:hover { border-color: var(--teal); color: var(--teal); }
    .age-pill.active {
      background: var(--teal);
      border-color: var(--teal);
      color: #fff;
      box-shadow: 0 2px 8px rgba(15,139,141,0.25);
    }
    .sidebar-age-tag {
      display: inline-block;
      background: #ede9fe;
      color: #6d28d9;
      font-size: 0.7rem;
      font-weight: 700;
      padding: 1px 7px;
      border-radius: 99px;
      margin-left: 4px;
      vertical-align: middle;
    }
    .age-filter-note {
      font-size: 0.75rem;
      color: var(--muted);
      background: #f0fdf4;
      border: 1px solid #bbf7d0;
      border-radius: 10px;
      padding: 6px 12px;
      text-align: center;
    }
    .api-health-banner {
      margin: 0 0 14px;
      padding: 10px 14px;
      border-radius: 12px;
      font-size: 0.88rem;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .api-health-banner.ok {
      background: #ecfdf5;
      color: #047857;
      border: 1px solid #a7f3d0;
    }
    .api-health-banner.err {
      background: #fff1f2;
      color: #be123c;
      border: 1px solid #fecdd3;
    }
    .invites-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }
    .invites-hint {
      color: var(--muted);
      font-size: 0.88rem;
    }
    .invites-list {
      display: grid;
      gap: 12px;
    }
    .invite-card {
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 16px;
      padding: 16px 18px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
    }
    .invite-card h4 {
      margin: 0 0 4px;
      font-size: 1.05rem;
    }
    .invite-card p {
      margin: 0;
      color: var(--muted);
      font-size: 0.88rem;
    }
    .invite-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .btn-im-going {
      width: 100%;
      margin-top: 12px;
      border: none;
      border-radius: 12px;
      padding: 12px 14px;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      cursor: pointer;
      font-size: 0.95rem;
    }
    .btn-im-going:hover { filter: brightness(0.95); }
    .btn-im-going:disabled { opacity: 0.6; cursor: not-allowed; }
    .foodtag-box {
      margin-top: 14px;
      padding: 16px;
      border-radius: 14px;
      background: linear-gradient(135deg, #fff7ed, #ffedd5);
      border: 1px solid #fdba74;
      text-align: center;
    }
    .foodtag-box .tag {
      font-family: Consolas, ui-monospace, monospace;
      font-size: 1.45rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      color: #9a3412;
      margin: 8px 0;
    }
    .session-panel {
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 18px;
      padding: 18px 20px;
      display: grid;
      gap: 12px;
    }
    .session-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .session-actions .btn { font-size: 0.88rem; padding: 8px 12px; }

    /* ── UX: chips, steps, bottom nav ── */
    .ux-chips {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 6px;
    }
    .ux-chip {
      border: 1.5px solid var(--line);
      background: #fff;
      color: var(--ink);
      border-radius: 14px;
      padding: 14px 12px;
      font: 600 0.95rem var(--font-body);
      cursor: pointer;
      min-height: 48px;
      transition: border-color .15s, background .15s, color .15s;
    }
    .ux-chip:hover, .ux-chip:focus-visible {
      border-color: var(--accent);
      outline: 2px solid rgba(224,62,47,.25);
      outline-offset: 2px;
    }
    .ux-chip.active {
      background: #fff1ee;
      border-color: var(--accent);
      color: var(--accent-deep);
    }
    .ux-step-dots {
      display: flex;
      gap: 6px;
      justify-content: center;
      margin: 0 0 14px;
    }
    .ux-step-dots span {
      width: 8px; height: 8px; border-radius: 50%;
      background: #e8d5c8;
    }
    .ux-step-dots span.on { background: var(--accent); }
    .ux-confirm-card {
      background: #fff8f3;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 14px 16px;
      margin: 8px 0 16px;
      font-size: 0.95rem;
    }
    .ux-confirm-card dt {
      color: var(--muted);
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: .04em;
      margin-top: 8px;
    }
    .ux-confirm-card dt:first-child { margin-top: 0; }
    .ux-confirm-card dd { font-weight: 700; margin: 2px 0 0; }
    .place-cta-card {
      background: linear-gradient(180deg, #fff 0%, #fff8f3 100%);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 14px;
      margin-bottom: 14px;
    }
    .place-cta-card .place-meta {
      color: var(--muted);
      font-size: 0.88rem;
      margin: 4px 0 12px;
    }
    .loc-prompt {
      display: none;
      align-items: flex-start;
      gap: 12px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 14px 16px;
      margin-bottom: 14px;
      box-shadow: 0 8px 24px rgba(60,28,12,.06);
    }
    .loc-prompt.show { display: flex; }
    .loc-prompt p { margin: 0; color: var(--muted); font-size: 0.92rem; }
    .loc-prompt strong { color: var(--ink); display: block; margin-bottom: 4px; }
    .bottom-nav {
      display: none;
      position: fixed;
      left: 0; right: 0; bottom: 0;
      z-index: 1200;
      background: rgba(255,252,248,.96);
      backdrop-filter: blur(12px);
      border-top: 1px solid var(--line);
      padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
      justify-content: space-around;
    }
    .bottom-nav a {
      flex: 1;
      text-decoration: none;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      font-size: 0.7rem;
      font-weight: 600;
      padding: 8px 4px;
      min-height: 52px;
      border-radius: 12px;
    }
    .bottom-nav a i { font-size: 1.15rem; }
    .bottom-nav a.active, .bottom-nav a:hover {
      color: var(--accent-deep);
      background: #fff1ee;
    }
    .btn:focus-visible, .btn-im-going:focus-visible, .btn-outline:focus-visible {
      outline: 3px solid rgba(224,62,47,.35);
      outline-offset: 2px;
    }
    .btn, .btn-im-going { min-height: 48px; }
    .invite-actions .btn, .invite-actions .btn-join, .invite-actions .btn-outline {
      min-height: 44px;
    }
    @media (max-width: 780px) {
      .bottom-nav { display: flex; }
      body { padding-bottom: 72px; }
      .site-hero { min-height: auto; padding-bottom: 28px; }
      .hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
      .hero-lead { font-size: 1rem; max-width: 28ch; }
      .hamburger { display: none !important; }
      .nav-links { display: none !important; }
      .auth-actions .btn { padding: 8px 12px; font-size: 0.85rem; }
      #features, #flow, #safety, #contact { display: none; }
    }

  

/* ── Multi-page / app shell ── */
.public-nav, .app-topnav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
}
.public-nav .logo, .app-topnav .logo { font-size: 1.25rem; font-weight: 800; text-decoration: none; color: inherit; display:flex; align-items:center; gap:8px; }
.public-nav .links, .app-topnav .links { display:flex; gap: 8px 18px; flex-wrap: wrap; align-items:center; }
.public-nav a, .app-topnav a { text-decoration:none; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.public-nav a:hover, .app-topnav a:hover, .public-nav a.active, .app-topnav a.active { color: var(--accent-deep); }
.app-shell { min-height: 100vh; display:flex; flex-direction:column; background: linear-gradient(180deg,#fff8f1,#fff6ee); }
.app-shell .app-main { flex:1; padding: 18px 0 88px; }
.app-view { display: none !important; }
.app-view.active { display: block !important; }
.app-page-title { margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2rem); }
.app-page-sub { color: var(--muted); margin: 0 0 18px; }

/* Locked: only auth gate — no chrome, no dashboard FOUC */
body.app-locked .app-chrome,
body.app-locked #appMain,
body.app-locked #bottomNav { display: none !important; }
body.app-locked #authGate { display: flex !important; }
body:not(.app-locked) #authGate { display: none !important; }
body:not(.app-locked) #appMain { display: block; }

.auth-gate-page {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  min-height: 100vh;
}
.auth-gate {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(60, 28, 12, 0.08);
}
.auth-gate-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--ink, #1a120e);
}
.auth-gate-brand i { color: var(--accent); margin-right: 6px; }
.auth-gate h1 {
  font-size: 1.45rem;
  margin: 0 0 8px;
  font-family: var(--font-display);
}
.auth-gate p { color: var(--muted); margin: 0 0 16px; }
.auth-gate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.auth-gate-actions .btn { min-height: 48px; min-width: 140px; }
.auth-gate-back { margin-top: 16px !important; margin-bottom: 0 !important; }
.auth-gate-back a { color: var(--muted); font-weight: 600; text-decoration: none; }
.auth-gate-back a:hover { color: var(--accent-deep); }

.app-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.app-tab {
  border: none;
  background: transparent;
  font: 650 0.95rem var(--font-body, inherit);
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}
.app-tab.active {
  background: #fff1ee;
  color: var(--accent-deep);
}
.app-tab-panel { display: none; }
.app-tab-panel.active { display: block; }

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  margin-left: 0.28rem;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

/* Unread count on Profile nav only — small, non-intrusive */
.profile-unread-badge {
  display: inline-block;
  margin-left: 0.12rem;
  font-size: 0.82em;
  font-weight: 600;
  color: #c2410c;
  line-height: 1;
  vertical-align: super;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.app-topnav a[data-nav="profile"] {
  position: relative;
}
.bottom-nav a[data-nav="profile"] {
  position: relative;
  overflow: visible;
}
.bottom-nav-profile-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.bottom-nav a[data-nav="profile"] .profile-unread-badge {
  position: absolute;
  top: -5px;
  right: -11px;
  margin-left: 0;
  font-size: 0.58rem;
  vertical-align: baseline;
  min-width: 0.95rem;
  text-align: center;
}
.auth-profile-link {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
  overflow: visible;
}
.auth-profile-link .profile-unread-badge {
  margin-left: 0.08rem;
  font-size: 0.78em;
  vertical-align: super;
}
.bottom-nav .nav-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  margin-left: 0;
}
.notif-card.notif-unread {
  border-color: rgba(194, 65, 12, 0.35);
  background: rgba(254, 243, 199, 0.35);
}
.notif-card h4 { margin: 0 0 4px; }
.app-home-summary {
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}
.marketing-hero {
  position: relative; min-height: min(88vh, 820px); color: #fffaf5;
  display:flex; flex-direction:column; overflow:hidden; isolation:isolate;
}
.marketing-hero .hero-media { position:absolute; inset:0; z-index:0;
  background: url('https://images.unsplash.com/photo-1601050690597-df0568f70950?auto=format&fit=crop&w=2000&q=80') center/cover no-repeat;
}
.marketing-hero .hero-media::after { content:""; position:absolute; inset:0;
  background: linear-gradient(105deg, rgba(18,8,4,.82) 0%, rgba(18,8,4,.5) 50%, rgba(18,8,4,.4) 100%);
}
.marketing-hero .container { position:relative; z-index:2; flex:1; display:flex; flex-direction:column; }
.marketing-hero .hero { margin-top: auto; padding: 48px 0 64px; max-width: 640px; }
.marketing-hero .brand-mark { font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; }
.marketing-hero .brand-mark span { color: var(--saffron); }
.marketing-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height:1.15; margin: 10px 0 12px; }
.marketing-hero .hero-lead { font-size: 1.1rem; opacity: .92; margin-bottom: 22px; }
.simple-section { padding: 56px 0; }
.simple-card-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin-top: 22px; }
.simple-card { background:#fff; border:1px solid var(--line); border-radius:18px; padding:18px; }
.simple-card h3 { margin: 0 0 8px; font-size:1.05rem; }
.simple-card p { margin:0; color:var(--muted); font-size:0.92rem; }
.app-home-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap:14px; }
.app-home-tile {
  display:block; text-decoration:none; color:inherit; background:#fff;
  border:1px solid var(--line); border-radius:18px; padding:20px; min-height:120px;
  box-shadow: 0 10px 28px rgba(60,28,12,.06);
}
.app-home-tile i { color: var(--accent); font-size:1.4rem; margin-bottom:10px; display:block; }
.app-home-tile strong { display:block; font-size:1.1rem; margin-bottom:6px; }
.app-home-tile span { color:var(--muted); font-size:0.9rem; }
.site-footer-mini { padding: 28px 0; color: var(--muted); font-size: 0.85rem; border-top:1px solid var(--line); margin-top: 40px; }
@media (max-width: 780px) {
  .public-nav .links { display:none; }
  .app-topnav .links { display:none; }
  .bottom-nav { display:flex; }
  body.has-bottom-nav { padding-bottom: 72px; }
  .auth-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    overflow: visible;
  }
  .user-pill--compact {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 6px 8px;
    font-size: 0.78rem;
  }
  .btn-signout--compact {
    padding: 8px 10px;
    min-width: 0;
  }
  .btn-signout--compact .btn-signout-label {
    display: none;
  }
  .auth-profile-link {
    padding: 8px 10px;
    font-size: 0.82rem;
  }
}
body:not(.has-bottom-nav) .bottom-nav { display:none; }

/* ─── SOS / Help safety subsystem ─────────────────────────────── */
.sos-help-fab {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(72px + max(12px, env(safe-area-inset-bottom)));
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 2px solid #b91c1c;
  border-radius: 999px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sos-help-fab:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(185, 28, 28, 0.45); }
.sos-help-fab-icon { font-size: 1rem; line-height: 1; }
.sos-modal .modal { max-width: 420px; }
/* Must sit above .sos-active-overlay (z-index 1200) when END/Cancel confirmations open */
.modal-backdrop.sos-modal.open {
  z-index: 1300;
}
.sos-modal-card { text-align: center; }
.sos-modal-icon { font-size: 2.5rem; margin-bottom: 8px; }
.sos-disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 12px 0 16px;
  line-height: 1.45;
}
.sos-disclaimer--compact { margin: 14px 0 0; font-size: 0.78rem; }
.sos-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sos-btn-call {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
}
.sos-btn-muted { color: var(--muted); border-color: var(--line); }
.sos-desktop-hint { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
.sos-active-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.sos-active-overlay[hidden] { display: none !important; }
.sos-active-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  border: 2px solid #fecaca;
}
.sos-active-header h2 {
  margin: 8px 0 4px;
  color: #b91c1c;
  font-size: 1.35rem;
}
.sos-active-icon { font-size: 2rem; }
.sos-active-meta {
  text-align: left;
  margin: 16px 0;
  padding: 12px;
  background: #fef2f2;
  border-radius: 10px;
  font-size: 0.9rem;
}
.sos-active-meta dt { font-weight: 600; color: #7f1d1d; margin-top: 8px; }
.sos-active-meta dt:first-child { margin-top: 0; }
.sos-active-meta dd { margin: 2px 0 0; font-family: Consolas, monospace; }
.sos-location-warning {
  font-size: 0.85rem;
  color: #b45309;
  background: #fffbeb;
  padding: 10px;
  border-radius: 8px;
  margin: 0 0 12px;
}
.sos-demo-banner {
  font-size: 0.75rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 6px;
}
.safety-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.safety-section h3 { margin: 0 0 8px; font-size: 1rem; }
.safety-contact-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.safety-contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.safety-contact-actions { display: flex; gap: 6px; }
.ec-notify-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 12px;
  cursor: pointer;
}
.ec-notify-row input { margin-top: 3px; }
.ec-sms-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 6px 0 0 28px;
  text-align: left;
}
.session-sos-help {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  text-align: center;
}
.session-sos-help .btn-sos-inline {
  background: transparent;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-weight: 600;
}
@media (min-width: 781px) {
  .sos-help-fab { bottom: max(20px, env(safe-area-inset-bottom)); }
}
.sos-help-fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.sos-btn-call:focus-visible,
#sosEndBtn:focus-visible,
#sosCancelActiveBtn:focus-visible {
  outline: 3px solid #b91c1c;
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .sos-help-fab { padding: 9px 12px; font-size: 0.78rem; }
  .sos-active-card { padding: 18px 14px; }
}
