/* ============================================================================
   Sufra — mobile-first food delivery PWA
   Identity: "Pomegranate & Pistachio" — a warm spice-market palette on toasted
   cream, with a Calistoga display serif carrying the brand voice. Light + dark.
   The app lives in a phone-width column that centers as a device frame on
   larger screens.
   ============================================================================ */

:root {
  /* Brand — pomegranate */
  --brand:      #B5232E;
  --brand-600:  #9A1C26;
  --brand-700:  #7F1620;
  --brand-050:  #F8E6E4;
  /* Accent — pistachio / sage */
  --accent:     #6E8B4F;
  --accent-700: #52693A;
  --accent-050: #EBF0DF;
  /* Neutrals — toasted cream + espresso */
  --bg:         #FBF4E9;
  --surface:    #FFFFFF;
  --surface-2:  #F3E9D9;
  --text:       #2A211E;
  --muted:      #8A7B6E;
  --line:       #EADFCD;
  /* Signal */
  --ok:         #5F7A48;
  --ok-050:     #EBF0DF;
  --warn:       #B57A1E;
  --danger:     #911B2E;
  --star:       #E0A32E;

  --font-display: 'Calistoga', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius:   16px;
  --radius-l: 22px;
  --radius-s: 10px;
  --shadow:   0 10px 26px rgba(74, 32, 24, .12);
  --shadow-s: 0 2px 8px rgba(74, 32, 24, .07);
  --maxw:     480px;
  --nav-h:    64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:      #E4545E;
    --brand-600:  #EE6670;
    --brand-700:  #F4808A;
    --brand-050:  #3A1C20;
    --accent:     #A7C489;
    --accent-700: #B9D69B;
    --accent-050: #24301B;
    --bg:         #181012;
    --surface:    #221619;
    --surface-2:  #2C1D20;
    --text:       #F3E9E4;
    --muted:      #B6A79E;
    --line:       #3A2A2C;
    --ok:         #8FB56B;
    --ok-050:     #24301B;
    --warn:       #E0A24A;
    --danger:     #F1727D;
    --star:       #EBB44A;
    --shadow:     0 12px 30px rgba(0, 0, 0, .5);
    --shadow-s:   0 2px 10px rgba(0, 0, 0, .38);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 620px) {
  body { background: #E7DBC8; }
  @media (prefers-color-scheme: dark) { body { background: #0b0708; } }
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--maxw);
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 620px) {
  #app {
    height: min(880px, 100dvh);
    margin-top: max(0px, calc((100dvh - 880px) / 2));
    border-radius: 30px;
    box-shadow: 0 34px 90px rgba(40, 20, 12, .34);
    overflow: hidden;
  }
}

button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: .1px; }

/* ── Boot splash ─────────────────────────────────────────────────────────── */
.boot {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
}
.boot-logo {
  width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; font-size: 44px;
  background: linear-gradient(150deg, var(--brand), var(--brand-700));
  box-shadow: var(--shadow); animation: pop .5s ease;
}
.boot-name { font-family: var(--font-display); font-size: 30px; color: var(--text); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Screen scroll area ──────────────────────────────────────────────────── */
.screen {
  flex: 1 1 auto;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.screen::-webkit-scrollbar { width: 0; }
.pad { padding: 16px; }
.pad-b { padding-bottom: 24px; }

/* ── Top bar (home / list screens) ───────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 16px) 16px 18px;
  border-bottom-left-radius: 24px; border-bottom-right-radius: 24px;
  box-shadow: 0 8px 22px rgba(127, 22, 32, .28);
}
.topbar .loc-label { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 5px; }
.topbar .loc-value { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.topbar .loc-value .chev { opacity: .8; }
.topbar-title { font-family: var(--font-display); font-size: 26px; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.18); color: #fff;
  display: grid; place-items: center; font-size: 18px;
}

/* Search */
.search {
  display: flex; align-items: center; gap: 10px;
  margin-top: 15px; padding: 13px 14px;
  background: var(--surface); color: var(--text);
  border-radius: 14px; box-shadow: var(--shadow-s);
}
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 15px; }
.search .ic { color: var(--brand); }

/* ── Cuisine chips ───────────────────────────────────────────────────────── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 16px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); padding: 9px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
  white-space: nowrap; transition: transform .08s ease, background .15s ease, color .15s ease;
}
.chip:active { transform: scale(.96); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Section heading (pistachio underline motif) ─────────────────────────── */
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 10px 16px 4px; }
.sec-head h2 { margin: 0; font-size: 19px; }
.sec-head h2::after { content: ""; display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--accent); margin-top: 6px; }
.sec-head .count { font-size: 12px; color: var(--muted); font-weight: 600; padding-top: 6px; }

/* ── Restaurant card ─────────────────────────────────────────────────────── */
.rlist { display: flex; flex-direction: column; gap: 12px; padding: 8px 16px 16px; }
.rcard {
  position: relative; display: flex; gap: 13px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-s); transition: transform .08s ease, box-shadow .15s ease;
}
.rcard:active { transform: scale(.985); }
.avatar {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center; font-size: 34px; color: #fff;
}
.rcard .body { flex: 1 1 auto; min-width: 0; }
.rcard .title { display: flex; align-items: center; gap: 8px; }
.rcard .title h3 { margin: 0; font-family: var(--font-body); font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0; }
.rcard .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; color: var(--text);
  background: var(--surface-2); padding: 4px 9px; border-radius: 999px;
}
.pill.rating { background: var(--accent-050); color: var(--accent-700); }
.pill .star { color: var(--star); }
.pill.free { color: var(--accent-700); background: var(--accent-050); }

.closed-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(42,33,30,.82); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
}
.rcard.is-closed .avatar, .rcard.is-closed .body { opacity: .5; }

/* Skeletons */
.skel-card { display: flex; gap: 13px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sh 1.3s ease infinite; border-radius: 8px; }
.skel.box { width: 64px; height: 64px; border-radius: 18px; }
.skel.line { height: 12px; margin-top: 8px; }
@keyframes sh { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ── Page header (sub-screens) ───────────────────────────────────────────── */
.pagehead {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 10px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.pagehead.on-hero { background: transparent; border: 0; position: absolute; left: 0; right: 0; }
.pagehead h1 { margin: 0; font-family: var(--font-body); font-weight: 800; font-size: 17px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.circ {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: 0;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-s);
  display: grid; place-items: center; font-size: 18px;
}

/* ── Restaurant hero + menu ──────────────────────────────────────────────── */
.rhero {
  padding: 66px 16px 18px;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  border-bottom-left-radius: 26px; border-bottom-right-radius: 26px;
}
.rhero .rh-top { display: flex; align-items: center; gap: 14px; }
.rhero .avatar { background: rgba(255,255,255,.18); width: 60px; height: 60px; }
.rhero h1 { margin: 0; font-family: var(--font-display); font-size: 26px; }
.rhero .rh-sub { opacity: .92; font-size: 13px; margin-top: 4px; }
.rhero .rh-meta { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rhero .rh-meta .pill { background: rgba(255,255,255,.18); color: #fff; }
.rhero .rh-meta .pill .star { color: #FFD66B; }

.closed-note {
  margin: 14px 16px 0; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); color: var(--warn); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}

.menu-cat { padding: 6px 16px 2px; }
.menu-cat h2 { font-family: var(--font-display); font-size: 18px; margin: 18px 0 6px; }
.mi { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.menu-cat .mi:last-child { border-bottom: 0; }
.mi .mi-body { flex: 1 1 auto; min-width: 0; }
.mi .mi-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.mi .mi-desc { color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.mi .mi-price { margin-top: 7px; font-weight: 800; font-size: 14px; color: var(--brand); }
.mi .mi-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mi .mi-emoji { width: 66px; height: 66px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; font-size: 30px; }
.tag-pop { font-size: 10px; font-weight: 800; color: var(--brand); background: var(--brand-050); padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }

/* Add button + stepper */
.add-btn {
  border: 1.5px solid var(--brand); color: var(--brand); background: var(--surface);
  font-weight: 800; font-size: 13px; padding: 7px 16px; border-radius: 12px;
  box-shadow: var(--shadow-s); transition: transform .08s ease;
}
.add-btn:active { transform: scale(.95); }
.add-btn[disabled] { opacity: .45; border-color: var(--line); color: var(--muted); box-shadow: none; }
.stepper {
  display: inline-flex; align-items: center; background: var(--brand); color: #fff;
  border-radius: 12px; box-shadow: var(--shadow-s); overflow: hidden;
}
.stepper button { border: 0; background: transparent; color: #fff; width: 34px; height: 34px; font-size: 18px; font-weight: 700; display: grid; place-items: center; }
.stepper .q { min-width: 22px; text-align: center; font-weight: 800; font-size: 14px; }

/* ── Sticky cart bar ─────────────────────────────────────────────────────── */
.cartbar { flex: 0 0 auto; padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px); }
.cartbar .inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff;
  padding: 14px 16px; border-radius: 16px;
  box-shadow: 0 10px 26px rgba(127, 22, 32, .42);
}
.cartbar .cb-left { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.cartbar .cb-count { background: rgba(255,255,255,.24); border-radius: 9px; padding: 3px 9px; font-size: 13px; font-weight: 800; }
.cartbar .cb-total { font-weight: 800; }

/* ── Bottom navigation ───────────────────────────────────────────────────── */
.bottomnav {
  flex: 0 0 auto; display: flex; align-items: stretch;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--nav-h); font-size: 11px; font-weight: 700; position: relative;
}
.tab .ic { font-size: 21px; line-height: 1; }
.tab.active { color: var(--brand); }
.tab.active::before { content: ""; position: absolute; top: 0; width: 30px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
.tab .dot { position: absolute; top: 8px; right: calc(50% - 20px); background: var(--brand); color: #fff; font-size: 10px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 13px 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-600)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(127,22,32,.34); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn-danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; box-shadow: none; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 13px 14px; border-radius: 12px; font-size: 15px; outline: 0; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, textarea.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
textarea.input { resize: vertical; min-height: 64px; }
.row-2 { display: flex; gap: 10px; }
.row-2 > * { flex: 1; }

/* ── Generic card / list ─────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); }
.card + .card { margin-top: 12px; }
.card-pad { padding: 15px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ── Cart / checkout ─────────────────────────────────────────────────────── */
.cart-rest { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; }
.cart-rest .avatar { width: 42px; height: 42px; border-radius: 12px; font-size: 22px; }
.cline { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); }
.cline .cl-emoji { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; }
.cline .cl-body { flex: 1; min-width: 0; }
.cline .cl-name { font-weight: 700; font-size: 14px; }
.cline .cl-price { color: var(--muted); font-size: 13px; margin-top: 2px; }

.summary { padding: 4px 16px 16px; }
.summary .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--muted); }
.summary .row.total { color: var(--text); font-weight: 800; font-size: 17px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }

.minwarn { margin: 0 16px 12px; padding: 11px 14px; border-radius: 12px; background: var(--brand-050); color: var(--brand-700); font-size: 13px; font-weight: 700; }

.opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 auto; display: grid; place-items: center; }
.opt.sel .radio { border-color: var(--brand); }
.opt.sel .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.opt .opt-body { flex: 1; min-width: 0; }
.opt .opt-title { font-weight: 700; font-size: 14px; }
.opt .opt-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.actionbar { flex: 0 0 auto; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px); }

/* ── Order status tracker (pistachio done · pomegranate current) ─────────── */
.track-head { text-align: center; padding: 22px 16px 8px; }
.track-head .big { font-size: 40px; }
.track-head h1 { margin: 10px 0 3px; font-family: var(--font-display); font-size: 22px; }
.track-head .sub { color: var(--muted); font-size: 13px; }
.steps { padding: 12px 22px; }
.step { display: flex; gap: 14px; }
.step .rail { display: flex; flex-direction: column; align-items: center; }
.step .bead { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.step .wire { width: 2px; flex: 1; background: var(--line); min-height: 26px; }
.step:last-child .wire { display: none; }
.step .st-body { padding-bottom: 20px; }
.step .st-title { font-weight: 700; font-size: 14px; }
.step .st-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.step.done .bead { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.done .wire { background: var(--ok); }
.step.current .bead { background: var(--brand); border-color: var(--brand); color: #fff; animation: pulse 1.6s infinite; }
.step.current .st-title { color: var(--brand); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(181,35,46,.35); } 50% { box-shadow: 0 0 0 7px rgba(181,35,46,0); } }

/* ── Order list rows ─────────────────────────────────────────────────────── */
.orow { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.orow .avatar { width: 46px; height: 46px; border-radius: 13px; font-size: 22px; background: var(--surface-2); color: var(--text); }
.orow .o-body { flex: 1; min-width: 0; }
.orow .o-title { font-weight: 700; font-size: 15px; }
.orow .o-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.status-chip { font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }
.sc-active { background: var(--brand-050); color: var(--brand-700); }
.sc-done { background: var(--ok-050); color: var(--accent-700); }
.sc-cancel { background: var(--surface-2); color: var(--muted); }

/* ── Account ─────────────────────────────────────────────────────────────── */
.profile { display: flex; align-items: center; gap: 14px; padding: 18px 16px; }
.profile .pf-av { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(150deg, var(--brand), var(--brand-700)); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.profile .pf-name { font-family: var(--font-display); font-size: 20px; }
.profile .pf-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.list-link { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-top: 1px solid var(--line); font-weight: 600; }
.list-link .ll-ic { font-size: 18px; width: 24px; text-align: center; }
.list-link .chev { margin-left: auto; color: var(--muted); }

.addr-card { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.addr-card .ac-body { flex: 1; min-width: 0; }
.addr-card .ac-label { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.addr-card .ac-text { color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.tag-default { font-size: 10px; font-weight: 800; color: var(--accent-700); background: var(--accent-050); padding: 2px 7px; border-radius: 999px; text-transform: uppercase; }

/* ── Empty states ────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 48px 28px; }
.empty .em-ic { font-size: 52px; }
.empty h3 { margin: 14px 0 6px; font-family: var(--font-display); font-size: 20px; }
.empty p { color: var(--muted); font-size: 14px; margin: 0 0 18px; line-height: 1.5; }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-wrap { padding: 24px 20px; }
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo .al-mark { width: 72px; height: 72px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; font-size: 38px; background: linear-gradient(150deg, var(--brand), var(--brand-700)); box-shadow: var(--shadow); }
.auth-logo h1 { margin: 12px 0 4px; font-family: var(--font-display); font-size: 28px; }
.auth-logo p { color: var(--muted); font-size: 14px; margin: 0; }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); font-weight: 700; padding: 10px; border-radius: 9px; font-size: 14px; }
.seg button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-s); }
.auth-alt { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px); transform: translate(-50%, 20px);
  background: #2A211E; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 32px rgba(0,0,0,.32); opacity: 0; pointer-events: none; transition: all .25s ease;
  z-index: 200; max-width: calc(var(--maxw) - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
@media (prefers-color-scheme: dark) { .toast { background: #3a2a2c; } }

/* ── Bottom sheet (confirm dialogs) ──────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(30,15,12,.5); opacity: 0; transition: opacity .2s ease; z-index: 210; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  width: 100%; max-width: var(--maxw); background: var(--surface); color: var(--text);
  border-top-left-radius: 22px; border-top-right-radius: 22px; padding: 22px 20px calc(env(safe-area-inset-bottom) + 20px);
  transform: translateY(100%); transition: transform .25s ease;
}
.sheet-backdrop.show .sheet { transform: translateY(0); }
.sheet h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 20px; }
.sheet p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.sheet .sheet-actions { display: flex; flex-direction: column; gap: 10px; }

/* Utility */
.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.center-load { display: flex; justify-content: center; padding: 40px; }
.center-load .spin { border-color: var(--line); border-top-color: var(--brand); width: 26px; height: 26px; }
.text-muted { color: var(--muted); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }

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