:root {
      --bg:        #fffdf8;
      --surface:   #f5f1e9;
      --fg:        #191816;
      --muted:     #6f6c65;
      --border:    rgba(25,24,22,.14);
      --accent:    #9f2721;
      --accent-deep:#741b17;
      --olive:     #596047;

      --accent-soft: color-mix(in oklch, var(--accent) 14%, transparent);
      --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);

      --font-display: 'Manrope', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;

      --fs-h1: 24px;
      --fs-h2: 19px;
      --fs-h3: 16px;
      --fs-body: 15px;
      --fs-meta: 11px;

      --radius-card: 8px;
      --radius-pill: 999px;
    }

    *, *::before, *::after { box-sizing: border-box; }
    html, body { margin: 0; padding: 0; height: 100%; }
    body {
      background:
        radial-gradient(60% 80% at 50% 0%, color-mix(in oklch, var(--accent) 5%, var(--bg)) 0%, var(--bg) 60%);
      color: var(--fg);
      font-family: var(--font-body);
      font-size: var(--fs-body);
      line-height: 1.42;
      -webkit-font-smoothing: antialiased;
      display: grid;
      place-items: center;
      padding: 32px;
    }

    .stage { display: flex; flex-direction: column; align-items: center; gap: 22px; }
    .caption {
      font-family: var(--font-mono);
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      text-align: center;
    }
    .caption strong { color: var(--fg); font-weight: 600; }

    /* ─── device frame (Pixel 7) ─────────────────────────────────────── */
    .device {
      position: relative;
      width: 412px;
      height: 915px;
      border-radius: 48px;
      padding: 10px;
      background: linear-gradient(160deg, #232326 0%, #17171a 50%, #0d0d10 100%);
      box-shadow:
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 0 2px #000 inset,
        0 28px 60px -12px rgba(0,0,0,0.45),
        0 8px 20px -8px rgba(0,0,0,0.35);
      isolation: isolate;
    }
    .device::before, .device::after {
      content: '';
      position: absolute;
      width: 3px;
      background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.06) 8%, transparent 16%, transparent 84%, rgba(255,255,255,0.04) 92%, transparent 100%);
      top: 110px; bottom: 110px;
      pointer-events: none;
    }
    .device::before { left: -1px; }
    .device::after  { right: -1px; }

    .camera {
      position: absolute;
      top: 20px; left: 50%;
      transform: translateX(-50%);
      width: 12px; height: 12px;
      border-radius: 50%;
      background: #000;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), inset 0 0 4px rgba(30,40,80,0.7);
      z-index: 5;
    }

    .screen {
      position: relative;
      width: 100%; height: 100%;
      background: var(--bg);
      border-radius: 38px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .statusbar {
      flex: 0 0 30px;
      padding: 16px 24px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 500;
      color: var(--fg);
      letter-spacing: 0;
    }
    .statusbar .right { display: inline-flex; align-items: center; gap: 7px; }
    .statusbar svg { width: 17px; height: 12px; fill: var(--fg); }
    .statusbar .battery { width: 25px; }

    .content {
      flex: 1 1 auto;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      padding: 4px 0 20px;
    }
    .content::-webkit-scrollbar { display: none; }

    .home-indicator { flex: 0 0 26px; position: relative; pointer-events: none; }
    .home-indicator::after {
      content: '';
      position: absolute;
      left: 50%; bottom: 8px;
      transform: translateX(-50%);
      width: 120px; height: 4px;
      background: color-mix(in oklch, var(--fg) 60%, transparent);
      border-radius: 999px;
    }

    /* ─── primitives ────────────────────────────────────────────────── */
    .pad     { padding-inline: 20px; }
    .stack   { display: flex; flex-direction: column; gap: 16px; }
    .row     { display: flex; align-items: center; gap: 12px; }
    .row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

    .header {
      padding: 8px 20px 12px;
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
    }
    .header h1 {
      font-family: var(--font-display);
      font-size: var(--fs-h1);
      letter-spacing: -0.04em;
      line-height: 1.1;
      margin: 0;
      font-weight: 700;
    }
    .header .hsub { font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: -0.01em; }
    .icon-btn {
      position: relative;
      width: 44px; height: 44px;
      border-radius: 999px;
      background: var(--surface);
      border: 1px solid var(--border);
      display: grid; place-items: center;
      color: var(--fg);
      cursor: pointer;
      padding: 0;
      flex: 0 0 auto;
      transition: background .15s ease;
    }
    .icon-btn:hover { background: var(--fg-soft); }
    .icon-btn:focus-visible, .btn-primary:focus-visible, .btn-secondary:focus-visible,
    .chip:focus-visible, .seg-btn:focus-visible, .input:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .icon-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; }
    .icon-btn.back { background: transparent; border: 0; }
    .icon-btn .dot {
      position: absolute; top: -2px; right: -2px;
      min-width: 17px; height: 17px;
      padding: 0 4px;
      border-radius: 999px;
      background: var(--accent);
      color: #fff;
      font-size: 10px; font-weight: 700;
      display: grid; place-items: center;
      font-variant-numeric: tabular-nums;
      border: 2px solid var(--bg);
    }
    .icon-btn .dot.hide { display: none; }

    .h2  { font-family: var(--font-display); font-size: var(--fs-h2); letter-spacing: -0.03em; font-weight: 700; line-height: 1.2; margin: 0; }
    .h3  { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; margin: 0; }
    .meta { font-family: var(--font-body); font-size: var(--fs-meta); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
    .num  { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-card);
      padding: 16px;
    }
    .card.flat { background: transparent; border: 0; padding: 12px 0; border-top: 1px solid var(--border); border-radius: 0; }
    .card.flat:first-child { border-top: 0; padding-top: 0; }

    .list-row {
      display: grid;
      grid-template-columns: 40px 1fr auto;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
      border-top: 1px solid var(--border);
    }
    .list-row:first-child { border-top: 0; }
    .list-row .body { min-width: 0; }
    .list-row .body .title { font-size: 15px; font-weight: 500; line-height: 1.25; }
    .list-row .body .sub   { color: var(--muted); font-size: 13px; line-height: 1.3; margin-top: 2px; }

    /* ─── tab bar ───────────────────────────────────────────────────── */
    .tabbar {
      flex: 0 0 auto;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      margin: 0 10px 8px;
      padding: 5px;
      border: 1px solid var(--border);
      border-radius: 22px;
      background: color-mix(in oklch, var(--surface) 92%, transparent);
      backdrop-filter: blur(20px);
      box-shadow: 0 8px 24px -12px rgba(25,24,22,0.28);
    }
    .tab {
      display: flex; flex-direction: column; align-items: center; gap: 3px;
      padding: 8px 4px;
      color: var(--muted);
      font-size: 10px;
      letter-spacing: 0.02em;
      cursor: pointer;
      border: 0;
      border-radius: 17px;
      background: none;
      font-family: var(--font-body);
    }
    .tab.active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
    .tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
    .tab.active svg { stroke-width: 2; }
    .tab:focus, .tab:focus-visible { outline: none; }

    /* ─── buttons ───────────────────────────────────────────────────── */
    .btn-primary {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      width: 100%;
      min-height: 50px;
      padding: 14px 20px;
      background: var(--accent);
      color: #fff;
      border: 0;
      border-radius: 8px;
      font: inherit;
      font-size: 15px;
      font-weight: 600;
      letter-spacing: -0.005em;
      cursor: pointer;
      transition: background .15s ease, transform .05s ease;
    }
    .btn-primary:hover { background: color-mix(in oklch, var(--accent) 86%, black); }
    .btn-primary:active { transform: translateY(1px); }
    .btn-primary.ghosty { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
    .btn-primary.ghosty:hover { background: var(--accent-soft); }
    .btn-secondary {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      width: 100%;
      min-height: 50px;
      padding: 14px 20px;
      background: transparent;
      color: var(--fg);
      border: 1px solid var(--border);
      border-radius: 8px;
      font: inherit;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      transition: border-color .15s ease, background .15s ease;
    }
    .btn-secondary:hover { border-color: var(--fg); background: var(--fg-soft); }
    .link-btn {
      display: inline-flex; align-items: center; gap: 4px;
      border: 0; background: none; padding: 10px 6px; margin: -10px -6px;
      font: inherit; font-size: 13px; font-weight: 500;
      color: var(--muted);
      cursor: pointer;
    }
    .link-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }

    /* ─── misc brand bits ───────────────────────────────────────────── */
    .eyebrow {
      font-family: var(--font-body);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--muted);
      margin: 0;
    }
    .pill {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 5px 11px;
      background: var(--accent-soft);
      color: var(--accent);
      border-radius: 999px;
      font-family: var(--font-body);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }
    .tag {
      display: inline-flex;
      padding: 3px 9px;
      background: transparent;
      color: var(--muted);
      border: 1px solid var(--border);
      border-radius: 999px;
      font-size: 11px;
      font-weight: 500;
      white-space: nowrap;
    }
    .badge {
      display: inline-flex;
      padding: 3px 9px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
      background: var(--fg-soft);
      color: var(--fg);
      white-space: nowrap;
    }
    .badge.ok    { background: color-mix(in oklch, var(--olive) 14%, transparent); color: color-mix(in oklch, var(--olive) 80%, black); }
    .badge.warn  { background: color-mix(in oklch, #a16207 14%, transparent); color: #a16207; }
    .badge.info  { background: color-mix(in oklch, #2569b5 14%, transparent); color: #2569b5; }
    .badge.done  { background: color-mix(in oklch, #1a4d96 14%, transparent); color: #1a4d96; }

    /* ─── section headers ───────────────────────────────────────────── */
    .sec { margin-top: 22px; }
    .sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .sec-title {
      font-family: var(--font-body);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--muted);
    }

    /* ─── search / chips ────────────────────────────────────────────── */
    .search {
      display: flex; align-items: center; gap: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0 12px;
      min-height: 46px;
    }
    .search svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.8; flex: 0 0 auto; }
    .search input { border: 0; background: transparent; font: inherit; color: var(--fg); flex: 1; min-width: 0; outline: none; }
    .search input::placeholder { color: var(--muted); }
    .chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
    .chip {
      flex: 0 0 auto;
      padding: 11px 15px;
      min-height: 44px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--fg);
      font: inherit;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: background .15s ease, border-color .15s ease, color .15s ease;
    }
    .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

    /* ─── product card ──────────────────────────────────────────────── */
    .prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .pcard {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-card);
      padding: 10px;
      cursor: pointer;
      transition: border-color .15s ease;
      min-width: 0;
    }
    .pcard:hover { border-color: var(--fg); }
    .swatch {
      position: relative;
      aspect-ratio: 1 / 1;
      border-radius: 6px;
      overflow: hidden;
      background: linear-gradient(160deg, var(--c), color-mix(in oklch, var(--c) 80%, black));
      display: grid; place-items: center;
      border: 1px solid var(--border);
    }
    .swatch::after {
      content: '';
      position: absolute; inset: 0;
      background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.28) 0%, transparent 55%);
      pointer-events: none;
    }
    .sw-g { position: relative; width: 54%; height: 54%; color: rgba(0,0,0,0.16); }
    .swatch.dark .sw-g { color: rgba(255,255,255,0.22); }
    .sw-g svg { width: 100%; height: 100%; }
    .sw-tag {
      position: absolute; top: 8px; left: 8px; z-index: 2;
      padding: 3px 8px;
      border-radius: 999px;
      background: rgba(25,24,22,.82);
      color: var(--bg);
      font-size: 9px; font-weight: 600;
      letter-spacing: 0.08em; text-transform: uppercase;
    }
    .sw-fav, .sw-add {
      position: absolute; z-index: 2;
      width: 36px; height: 36px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface);
      display: grid; place-items: center;
      cursor: pointer;
      padding: 0;
      color: var(--fg);
    }
    .sw-fav { top: 8px; right: 8px; }
    .sw-fav svg, .sw-add svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
    .sw-fav.active { color: var(--accent); background: var(--bg); }
    .sw-fav.active svg { fill: currentColor; }
    .sw-add { right: 8px; bottom: 8px; background: var(--accent); border-color: var(--accent); color: #fff; }
    .sw-add:hover { background: var(--accent-deep); }
    .sw-add.added { background: var(--olive); border-color: var(--olive); }
    .pcat { font-family: var(--font-body); font-size: 9px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 10px 0 3px; }
    .pname { font-size: 13px; font-weight: 500; line-height: 1.25; margin: 0; min-height: 32px; }
    .pprice { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
    .pprice .num { font-size: 15px; font-weight: 700; }
    .pprice .unit { font-size: 11px; color: var(--muted); }

    /* ─── promo ─────────────────────────────────────────────────────── */
    .promo {
      position: relative;
      border-radius: var(--radius-card);
      overflow: hidden;
      padding: 18px;
      background: linear-gradient(150deg, var(--accent) 0%, var(--accent-deep) 100%);
      color: #fff;
    }
    .promo .meta { color: rgba(255,255,255,0.72); }
    .promo h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; line-height: 1.15; margin: 10px 0 6px; }
    .promo p { margin: 0; font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.4; }
    .promo .promo-cta {
      margin-top: 14px;
      display: inline-flex; align-items: center; gap: 6px;
      padding: 10px 16px;
      border-radius: 999px;
      background: var(--bg);
      color: var(--accent);
      font-weight: 600; font-size: 13px;
      cursor: pointer; border: 0;
    }
    .promo .promo-cta:hover { background: color-mix(in oklch, var(--bg) 88%, white); }

    /* ─── category tiles ────────────────────────────────────────────── */
    .cat-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
    .cat-tile {
      flex: 0 0 96px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-card);
      padding: 12px 10px;
      cursor: pointer;
      text-align: left;
      transition: border-color .15s ease;
    }
    .cat-tile:hover { border-color: var(--fg); }
    .cat-swatch {
      width: 40px; height: 40px;
      border-radius: 8px;
      background: linear-gradient(160deg, var(--c), color-mix(in oklch, var(--c) 78%, black));
      border: 1px solid var(--border);
    }
    .cat-tile .ct-name { font-size: 12px; font-weight: 600; margin-top: 10px; }
    .cat-tile .ct-count { font-size: 11px; color: var(--muted); margin-top: 1px; }

    /* ─── stepper ───────────────────────────────────────────────────── */
    .stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
    .stepper button {
      width: 44px; height: 44px;
      border: 0; background: none;
      display: grid; place-items: center;
      cursor: pointer;
      color: var(--fg);
      font-size: 18px;
    }
    .stepper button:hover { background: var(--fg-soft); }
    .stepper .val { min-width: 36px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; }

    /* ─── sticky bottom bar ─────────────────────────────────────────── */
    .stick {
      position: sticky;
      bottom: 0;
      background: color-mix(in oklch, var(--bg) 90%, transparent);
      backdrop-filter: blur(14px);
      border-top: 1px solid var(--border);
      padding: 12px 20px 14px;
      display: flex; align-items: center; gap: 12px;
    }

    /* ─── cart rows ─────────────────────────────────────────────────── */
    .cart-row {
      display: grid;
      grid-template-columns: 52px 1fr auto;
      gap: 12px;
      align-items: center;
      padding: 12px 0;
      border-top: 1px solid var(--border);
    }
    .cart-row:first-child { border-top: 0; }
    .cart-thumb { width: 52px; height: 52px; border-radius: 6px; background: linear-gradient(160deg, var(--c), color-mix(in oklch, var(--c) 80%, black)); border: 1px solid var(--border); display: grid; place-items: center; }
    .cart-thumb svg { width: 60%; height: 60%; color: rgba(0,0,0,0.16); }
    .cart-row.dark .cart-thumb svg { color: rgba(255,255,255,0.22); }
    .cart-row .body { min-width: 0; }
    .cart-row .body .ttl { font-size: 14px; font-weight: 500; line-height: 1.25; }
    .cart-row .body .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
    .cart-row .ctl { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
    .cart-row .ctl .num { font-size: 14px; font-weight: 700; }
    .cart-del { border: 0; background: none; padding: 6px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
    .cart-del:hover { color: var(--accent); }
    .cart-del svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

    .sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
    .sum-row.tot { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; }
    .sum-row.tot .num { font-size: 20px; font-weight: 700; }

    /* ─── selectable option cards ───────────────────────────────────── */
    .opt {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius-card);
      background: var(--surface);
      cursor: pointer;
      transition: border-color .15s ease, background .15s ease;
    }
    .opt:hover { border-color: color-mix(in oklch, var(--fg) 55%, transparent); }
    .opt.sel { border-color: var(--accent); background: var(--accent-soft); }
    .opt .radio {
      width: 20px; height: 20px; flex: 0 0 auto;
      border-radius: 999px;
      border: 2px solid var(--muted);
      display: grid; place-items: center;
      margin-top: 2px;
    }
    .opt.sel .radio { border-color: var(--accent); }
    .opt.sel .radio::after { content: ''; width: 10px; height: 10px; border-radius: 999px; background: var(--accent); }
    .opt .opt-ico { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 8px; background: var(--fg-soft); display: grid; place-items: center; color: var(--fg); }
    .opt .opt-ico svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; }
    .opt .ot { font-size: 14px; font-weight: 600; }
    .opt .os { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.35; }

    /* ─── timeline ──────────────────────────────────────────────────── */
    .steps { display: flex; gap: 4px; margin-top: 6px; }
    .step { flex: 1; text-align: center; position: relative; }
    .step .dot { width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--border); background: var(--bg); margin: 0 auto 8px; position: relative; z-index: 2; }
    .step .sl { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); line-height: 1.25; }
    .step:not(:first-child)::before {
      content: ''; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 1;
    }
    .step.on .dot { border-color: var(--accent); background: var(--accent); }
    .step.on .sl { color: var(--fg); }
    .step.on::before { background: var(--accent); }

    /* ─── account menu ──────────────────────────────────────────────── */
    .menu-row {
      display: flex; align-items: center; gap: 12px;
      padding: 14px 2px;
      border-top: 1px solid var(--border);
      cursor: pointer;
      background: none; border-left: 0; border-right: 0; border-bottom: 0;
      width: 100%;
      text-align: left;
      font: inherit;
      color: var(--fg);
    }
    .menu-row:first-child { border-top: 0; }
    .menu-row:hover .mt { color: var(--accent); }
    .menu-ico { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 8px; background: var(--fg-soft); display: grid; place-items: center; color: var(--fg); }
    .menu-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }
    .menu-row .mt { font-size: 14px; font-weight: 500; flex: 1; min-width: 0; }
    .menu-row .chev { color: var(--muted); }
    .menu-row .chev svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

    /* ─── views / router ────────────────────────────────────────────── */
    .view { display: none; }
    .view.active { display: block; }

    .dhead { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px 16px; }
    .dhead h1 { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
    .dhead .dh-sub { font-size: 11px; color: var(--muted); }

    /* ─── sheet (bottom drawer) ─────────────────────────────────────── */
    .overlay {
      position: absolute; inset: 0;
      background: rgba(25,24,22,0.4);
      opacity: 0; pointer-events: none;
      transition: opacity .2s ease;
      z-index: 40;
    }
    .overlay.show { opacity: 1; pointer-events: auto; }
    .sheet {
      position: absolute;
      left: 0; right: 0; bottom: 0;
      background: var(--bg);
      border-radius: 20px 20px 0 0;
      transform: translateY(105%);
      transition: transform .24s ease;
      z-index: 45;
      padding: 10px 20px 22px;
      box-shadow: 0 -18px 40px -18px rgba(0,0,0,0.3);
    }
    .sheet.open { transform: translateY(0); }
    .sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--border); margin: 0 auto 12px; }
    .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .sheet-head .h3 { font-size: 17px; }
    .sheet-head .icon-btn { width: 40px; height: 40px; }
    .sheet-body { padding: 14px 0 6px; max-height: 46vh; overflow-y: auto; }
    .sheet-sec { margin-bottom: 18px; }
    .sheet-sec .sec-title { margin-bottom: 10px; display: block; }
    .sheet-sec .chip-row { flex-wrap: wrap; }
    .sheet-sec .chip { flex: 1 1 auto; text-align: center; }
    .sheet-foot { padding-top: 12px; }

    /* ─── empty / misc ──────────────────────────────────────────────── */
    .empty { text-align: center; padding: 36px 20px; }
    .empty .e-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 999px; background: var(--fg-soft); display: grid; place-items: center; color: var(--muted); }
    .empty .e-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; }
    .empty h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
    .empty p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }

    .check-big {
      width: 64px; height: 64px;
      margin: 6px auto 16px;
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent);
      display: grid; place-items: center;
    }
    .check-big svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 2; }

    .map-tile {
      position: relative;
      aspect-ratio: 16 / 9;
      border-radius: var(--radius-card);
      border: 1px solid var(--border);
      background:
        linear-gradient(135deg, var(--fg-soft), transparent 60%),
        var(--surface);
      display: grid; place-items: center;
      color: var(--muted);
    }
    .map-tile svg { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.6; }

    /* ─── toast ─────────────────────────────────────────────────────── */
    .toast {
      position: absolute;
      left: 50%; bottom: 130px;
      transform: translateX(-50%);
      background: var(--fg);
      color: var(--bg);
      font-size: 13px;
      font-weight: 500;
      padding: 12px 18px;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.25);
      z-index: 60;
      white-space: nowrap;
      opacity: 0;
      animation: toast-in .2s ease forwards;
      pointer-events: none;
    }
    @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

    /* ─── splash / loading ──────────────────────────────────────────── */
    .splash {
      position: absolute; inset: 0; z-index: 4;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 10px; padding: 40px; text-align: center;
      background: var(--bg);
      transition: opacity .45s ease;
    }
    .splash.done { opacity: 0; pointer-events: none; }
    .splash-logo { width: calc(var(--fs-h1) * 4); height: auto; object-fit: contain; }
    .splash-name { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--fs-h1) * 1.15); letter-spacing: -0.03em; color: var(--fg); }
    .splash-sub { font-size: 13px; color: var(--muted); margin-top: -4px; }
    .splash-bar { margin-top: 20px; width: 128px; height: 3px; border-radius: 999px; background: var(--border); overflow: hidden; }
    .splash-bar::after {
      content: ''; display: block; width: 38%; height: 100%;
      border-radius: 999px; background: var(--accent);
      animation: splash-load 1s ease-in-out infinite;
    }
    @keyframes splash-load { from { transform: translateX(-130%); } to { transform: translateX(330%); } }

    /* ─── login ─────────────────────────────────────────────────────── */
    #view-login.active { display: flex; flex-direction: column; height: 100%; }
    .login { flex: 1; display: flex; flex-direction: column; }
    .login-main { flex: 1 0 auto; align-self: center; width: 100%; max-width: 460px; display: flex; flex-direction: column; justify-content: center; padding: 0 20px; }
    .login-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 26px; }
    .login-logo { width: calc(var(--fs-h1) * 3); height: auto; object-fit: contain; }
    .login-head h1 { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--fs-h1) * 1.05); letter-spacing: -0.04em; line-height: 1.15; margin: 6px 0 0; }
    .login-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
    .field { position: relative; margin-bottom: 12px; }
    .field input {
      width: 100%; min-height: 52px; padding: 0 48px 0 16px;
      border: 1px solid var(--border); border-radius: var(--radius-card);
      background: var(--bg); color: var(--fg);
      font: inherit; font-size: 15px;
      transition: border-color .15s ease;
    }
    .field input::placeholder { color: var(--muted); }
    .field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
    .f-toggle {
      position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
      width: 40px; height: 40px; display: grid; place-items: center;
      border: 0; background: none; color: var(--muted); cursor: pointer;
    }
    .f-toggle:hover { color: var(--fg); }
    .f-toggle svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; }
    .login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 20px; }
    .login-row .link-btn { color: var(--muted); font-weight: 600; } .login-row .link-btn:hover, .login-row .link-btn:focus-visible { color: var(--accent); }
    .check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg); cursor: pointer; }
    .check input {
      appearance: none; -webkit-appearance: none;
      width: 18px; height: 18px; margin: 0; flex: 0 0 auto;
      border: 1.5px solid var(--muted); border-radius: 5px;
      display: grid; place-items: center; cursor: pointer;
    }
    .check input:checked { background: var(--accent); border-color: var(--accent); }
    .check input:checked::after {
      content: ''; width: 100%; height: 100%;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
    }
    .check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
    .divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
    .btn-wa {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      width: 100%; min-height: 50px; padding: 13px 20px;
      border: 1px solid var(--border); border-radius: var(--radius-card);
      background: var(--surface); color: var(--fg);
      font: inherit; font-size: 15px; font-weight: 600;
      cursor: pointer; transition: background .15s ease, border-color .15s ease;
    }
    .btn-wa:hover { border-color: color-mix(in oklch, var(--fg) 55%, transparent); background: var(--fg-soft); }
    .btn-wa svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }
    .btn-google svg { stroke: none; stroke-width: 0; }
    .login-foot { flex: 0 0 auto; padding: 16px 20px 6px; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.55; }
    .login-foot b { color: var(--fg); cursor: pointer; font-weight: 600; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; } .login-foot b:hover { color: var(--accent); text-decoration-color: var(--accent); }
    .spin {
      width: 15px; height: 15px; flex: 0 0 auto;
      border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
      border-radius: 999px; animation: spin-rot .7s linear infinite;
    }
    @keyframes spin-rot { to { transform: rotate(360deg); } }
    .btn-primary.loading { opacity: .9; cursor: progress; }

    /* ─── signup ────────────────────────────────────────────────────── */
    #view-signup.active { display: flex; flex-direction: column; height: 100%; }
    .signup { flex: 1; display: flex; flex-direction: column; }
    .signup-main { flex: 1 0 auto; align-self: center; width: 100%; max-width: 460px; display: flex; flex-direction: column; padding: 4px 20px 20px; }
    .seg { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
    .seg-btn { flex: 1; min-height: 46px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s ease, color .15s ease; }
    .seg-btn:hover { color: var(--fg); }
    .seg-btn.active { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(25,24,22,.12); }
    .hide { display: none !important; }
