/* ============================================================
   ROOZY — shared mockup stylesheet
   Shopper side = blue theme   (body.theme-blue)
   Delivery side = green theme (body.theme-green)
   Admin side   = slate theme  (body.theme-admin)
   Design language: rounded, friendly, Segoe UI, pill buttons,
   white cards, doodle-tinted page background.
   ============================================================ */

:root {
  --blue: #027bc4;   /* exact brand blue from Benny's A06 swatch */
  --blue-dark: #04619b;
  --blue-bg: #d9edf9;
  --green: #5aa71c;
  --green-dark: #47850f;
  --green-bg: #edf7e2;
  --order-green: #43b02a;
  --order-green-light: #8fd35e;
  --slate: #2f3a45;
  --slate-dark: #222b34;
  --slate-bg: #eef1f4;
  --tan: #c89b6c;
  --brown: #4a3123;
  --gray-card: #9aa0a6;
  --text: #1c2733;
  --radius-card: 18px;
  --radius-big: 24px;
  --shadow-card: 0 2px 8px rgba(20, 40, 70, .12);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background: #cfd6dd;
  -webkit-font-smoothing: antialiased;
}

/* The app column — phone-width, centered on desktop, full-bleed on phones */
.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  overflow-x: clip;   /* clip (not hidden) — hidden makes .app a scroll box and breaks the sticky top bar */
  box-shadow: 0 0 32px rgba(0, 0, 0, .25);
  display: flex;
  flex-direction: column;
}

/* freeze the page behind an open pop-up — pin the body at its current scroll
   offset (top set inline by JS) so the background can't move at all */
body.modal-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.theme-blue  .app { background: var(--blue-bg); }
.theme-green .app { background: var(--green-bg); }
.theme-admin .app { background: var(--slate-bg); }

/* subtle doodle texture over the page background */
.theme-blue  .app { background-image: radial-gradient(rgba(255,255,255,.55) 1.5px, transparent 1.6px); background-size: 26px 26px; }
.theme-green .app { background-image: radial-gradient(rgba(255,255,255,.55) 1.5px, transparent 1.6px); background-size: 26px 26px; }

/* ---------- theme plumbing ---------- */
.theme-blue  { --brand: var(--blue);  --brand-dark: var(--blue-dark);  --brand-bg: var(--blue-bg); }
.theme-green { --brand: var(--green); --brand-dark: var(--green-dark); --brand-bg: var(--green-bg); }
.theme-admin { --brand: var(--slate); --brand-dark: var(--slate-dark); --brand-bg: var(--slate-bg); }

/* ============================ HEADER ============================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
}
.menu-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.menu-btn span { display:block; width:18px; height:2.5px; border-radius:2px; background: var(--brand); margin: 2px 0; }
.brand { display: flex; align-items: center; gap: 9px; margin: 0 auto; }
.kanga-chip {
  width: 50px; height: 50px;   /* 25% larger top-left avatar */
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}
.kanga-chip img { width: 40px; height: auto; display: block; }
.kanga-chip img.photo { width: 100%; height: 100%; object-fit: cover; }
.brand-word { font-size: 24px; font-weight: 700; letter-spacing: .3px; }
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #fff;
  overflow: hidden;
  flex: none;
  display: grid;
  place-items: center;
}
.avatar svg { width: 100%; height: 100%; }

/* back-chip used on sub-screens */
.back-chip {
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: var(--brand);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700;
  text-decoration: none;
  flex: none;
}
.screen-title { font-size: 21px; font-weight: 700; margin: 0 auto; color: #fff; }

/* ====================== SLIDE-DOWN DRAWER ====================== */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 25, 40, .45);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  z-index: 90;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; left: 50%;
  transform: translate(-50%, -102%);
  width: 100%; max-width: 430px;
  max-height: 88dvh;
  overflow-y: auto;
  scrollbar-width: none;                 /* no scrollbar on the right */
  background: linear-gradient(180deg, var(--brand-dark), var(--brand));
  color: #fff;
  border-radius: 0 0 var(--radius-big) var(--radius-big);
  transition: transform .38s cubic-bezier(.3, .8, .3, 1);
  z-index: 100;
  padding-bottom: 0;
}
.drawer::-webkit-scrollbar { display: none; }
.drawer.open { transform: translate(-50%, 0); }
/* When the drawer fits the screen (signed-out login, or the collapsed signed-in
   menu) a thumb-drag up anywhere slides it away. Text fields keep normal touch so
   tapping / typing / paste still work; the rest of the surface is for dragging. */
.drawer.login-mode, .drawer.fits { touch-action: none; }
.drawer.login-mode input, .drawer.login-mode textarea, .drawer.login-mode select,
.drawer.fits input, .drawer.fits textarea, .drawer.fits select { touch-action: auto; }
.drawer-top { display: flex; align-items: center; justify-content: center; padding: 16px 16px 4px; position: relative; }
.drawer-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: #fff; border: 3px solid #fff; overflow: hidden;
  display: grid; place-items: center;
}
.drawer-avatar svg { width: 100%; height: 100%; }
img.kanga-default { width: 100%; height: 100%; object-fit: cover; }   /* fills the circle (square image, no crop) */
/* inline sign-in inside the drop-down menu (phone-only) */
.drawer-sub { text-align: center; font-size: 14px; opacity: .92; margin: 12px 22px 8px; }
.drawer-login { padding: 2px 16px 14px; }
.drawer-login-label { text-align: center; font-size: 13.5px; opacity: .95; line-height: 1.45; margin: 6px 2px 10px; }
#dwr-phone { width: 15rem; max-width: 100%; margin: 0 auto; display: block; text-align: center; }   /* shorter, centered phone field */
.drawer-btn {
  display: block; width: fit-content; max-width: 100%;
  border: none; border-radius: 999px;
  padding: 12px 30px;
  font-family: var(--font); font-size: 16px; font-weight: 500;
  cursor: pointer; background: #e3f1fc; color: var(--brand);   /* very pale blue, distinct from the white input */
  margin: 18px auto 2px;   /* narrow, centered, dropped down off the phone field */
}
.drawer-btn:active { transform: translateY(1px); }
.drawer-login .code-boxes input { background: #fff; }
.drawer-name { text-align: center; font-weight: 700; font-size: 17px; margin-top: 6px; }
/* inline click-to-edit name (Card Hush): button previews the field on hover */
.name-edit {
  font: inherit; font-weight: 700; font-size: 17px;
  color: #fff; background: none;
  border: 1px solid transparent; border-radius: 10px;
  padding: 3px 14px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.name-edit:hover { background: #fff; color: var(--brand); border-color: rgba(255, 255, 255, .7); }
.name-input {
  font: inherit; font-weight: 700; font-size: 17px; text-align: center;
  color: #1c2733; background: #fff;
  border: 1px solid #ccd4db; border-radius: 10px;
  padding: 4px 12px; outline: none;
  width: 15rem; max-width: 80%;
}
.drawer-phone { text-align: center; font-size: 13.5px; color: #fff; opacity: .85; letter-spacing: .4px; margin: 2px 0 2px; }
.drawer-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 11px 16px;
  margin: 10px 16px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border: none; color: #fff; width: calc(100% - 32px); text-align: left;
}
.drawer-item .ico {
  width: 30px; height: 30px;
  color: #fff;                               /* white line-icons on the blue — one tone, no tile */
  display: grid; place-items: center;
  flex: none;
}
.drawer-item .ico svg { width: 28px; height: 28px; fill: currentColor; display: block; }
.drawer-card {
  background: rgba(255, 255, 255, .13);
  border-radius: var(--radius-card);
  margin: -2px 16px 10px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.55;
  display: none;
}
.drawer-card.open { display: block; }
/* open accordion = one connected panel: the header rounds only its top and
   drops its bottom margin; the card rounds only its bottom and sits flush
   under the header, sharing the same translucent background. */
.drawer-item.open { border-radius: var(--radius-card) var(--radius-card) 0 0; margin-bottom: 0; }
.drawer-card.open { margin-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); background: rgba(255, 255, 255, .16); }
/* right-justified expand/collapse glyph on the header row (▾ closed, ✕ open) */
.drawer-caret { margin-left: auto; flex: none; width: 22px; text-align: center; font-size: 19px; opacity: .85; }
.drawer-caret::before { content: "\25BE"; }              /* ▾ down = tap to expand */
.drawer-item.open .drawer-caret::before { content: "\25B4"; }   /* ▴ up = tap to collapse */
/* Become-a-deliverer: a green button + green panel (matches the delivery side) */
.drawer-item.deliverer-item,
.drawer-item.deliverer-item.open { background: var(--green); }
.drawer-item.admin-item { background: var(--slate); }   /* gray — jump to admin panel */
.drawer-item.deliver-item { background: var(--green); }  /* green — jump to the delivery side */
.drawer-card.deliverer-card.open { background: var(--green); }
/* under review: expandable like a normal item; the form is locked and the bottom
   Apply button becomes a plain status line */
.deliverer-card .del-status { display: block; text-align: center; margin: 14px auto 4px; color: #fff; font-weight: 700; font-size: 15px; }
.deliverer-card .del-intro { margin: 2px 2px 12px; font-size: 14px; line-height: 1.45; }
/* two info columns (car | home) — a Roozy Hopper does both, so no picker */
.deliverer-card .del-modes { display: flex; gap: 16px; margin: 0 2px 12px; }
.deliverer-card .del-mode { flex: 1; }
.deliverer-card .del-mode-title { font-weight: 700; font-size: 13.5px; }
.deliverer-card .del-mode-desc { margin: 5px 0 0; font-size: 12px; opacity: .92; line-height: 1.4; }
.deliverer-card .del-submit {
  display: block; width: fit-content; margin: 14px auto 4px;
  background: #fff; color: var(--green); border: none; border-radius: 999px;
  padding: 11px 30px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.deliverer-card .del-submit:active { transform: translateY(1px); }
.deliverer-card .del-note { font-size: 11.5px; opacity: .85; text-align: center; margin: 6px 2px 0; line-height: 1.4; }
.drawer-card .edit-chip {
  float: right;
  background: #fff; color: var(--brand);
  border: none; border-radius: 999px;
  font-weight: 700; font-size: 13px;
  padding: 4px 16px; cursor: pointer;
}
/* big grab zone for thumb slide-to-close; the visible bar is the ::before */
.drawer-handle {
  width: 100%;
  padding: 12px 0 14px;
  margin: 2px 0 0;
  display: flex; justify-content: center;
  cursor: grab;
  touch-action: none;
  /* stay pinned at the bottom so the grab bar is always reachable, even when the
     menu content scrolls — but no shadow (Benny wanted the old flat look). */
  position: sticky; bottom: 0; z-index: 2;
  background: var(--brand);
}
.drawer-handle:active { cursor: grabbing; }
.drawer-handle::before {
  content: "";
  width: 66px; height: 5px; border-radius: 3px;
  background: rgba(255, 255, 255, .7);
}

/* ============== POP-UP WINDOWS (Card Hush style) ==============
   Matched to cardhush.com: rgba(0,0,0,.4) overlay + 4px blur,
   white 27px-radius panel, soft double shadow, fade-up entrance,
   dark pill Close button. */
.rz-modal-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.rz-modal-overlay.show { display: flex; }
.rz-modal {
  position: relative;
  background: #fff;
  border-radius: 27px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
  width: 100%; max-width: 432px;
  max-height: 88dvh; overflow-y: auto;
  padding: 27px;
  text-align: center;
  font-family: var(--font);
  animation: rz-fade-up .35s ease-out both;
}
@keyframes rz-fade-up {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: none; }
}
.rz-modal h3 { margin: 0 0 4px; font-size: 19px; font-weight: 600; color: #171717; }
.rz-pill {
  display: inline-block;
  background: #171717; color: #fff;
  border: none; border-radius: 9999px;
  padding: 10px 26px;
  font-size: 15px; font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 16px;
}
.rz-pill.brand { background: var(--brand); }
.rz-pill.light { background: #eef1f4; color: #171717; }
.rz-pill:active { transform: translateY(1px); }
.rz-avatar-big {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 0 auto 12px; display: block;
  object-fit: cover; background: #eef1f4;
}
.rz-item-img { width: 100%; max-height: 360px; object-fit: contain; margin: 2px auto 8px; display: block; }
.rz-item-img.gray { filter: grayscale(1); opacity: .55; }
.rz-gallery { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 0 10px; }
.rz-gallery-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; background: #f2f5f8; }
.rz-gallery-thumb.active { border-color: var(--brand); }
/* close X on the top-LEFT, share on the top-RIGHT of the item pop-up */
.rz-modal-x {
  position: absolute; top: 12px; left: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: #eef1f4; color: #55606b;
  border: none; cursor: pointer;
  font-size: 15px; line-height: 1;
  display: grid; place-items: center;
  z-index: 2;
}
.rz-modal-x:hover { background: #e2e6ea; }
.rz-modal-share {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: #eef1f4; color: #55606b;
  border: none; cursor: pointer;
  display: grid; place-items: center;
}
.rz-modal-share:hover { background: #e2e6ea; }
.rz-modal-share svg { width: 17px; height: 17px; display: block; }
.rz-modal.ordered .rz-modal-share { background: #fff; color: var(--order-green); }
/* item pop-up "ordered" state: whole window goes green, text white,
   ORDER→"Cancel order"; X and Close invert to white-with-green */
.rz-modal.ordered { background: var(--order-green); }
.rz-modal.ordered #im-name,
.rz-modal.ordered #im-stock,
.rz-modal.ordered #im-desc { color: #fff !important; }
.rz-modal.ordered .rz-modal-x { background: #fff; color: var(--order-green); }
.rz-modal.ordered #im-close { background: #fff; color: var(--order-green); }
.rz-pill.cancel { background: #fff; color: #c0392b; }
.rz-pill.cancel:active { transform: translateY(1px); }
/* "Item ordered" banner under the image, shown only in the ordered state */
.ordered-banner {
  display: none;
  background: #fff;
  color: var(--order-green);
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  padding: 9px 20px;
  margin: 2px auto 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.rz-modal.ordered .ordered-banner { display: block; }

/* ---- emoji avatars ---- */
.emoji-avatar { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; line-height: 1; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ==================== AVATAR PICKER (Card Hush style) ==================== */
.ap-modal { max-width: 384px; }
.ap-modal h3 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
.ap-preview {
  position: relative;
  width: 100%; max-width: 300px; aspect-ratio: 1;
  margin: 0 auto 16px;
}
.ap-preview-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: #f3f4f6; overflow: hidden;
  display: grid; place-items: center;
}
.ap-preview-inner img.photo { width: 100%; height: 100%; object-fit: cover; }
.ap-trash {
  position: absolute; top: 12px; right: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18);
  border: none; cursor: pointer; color: #55606b;
  display: grid; place-items: center; z-index: 2;
}
.ap-trash:hover { color: #d64545; }
.rz-pill.dark { display: block; width: 100%; background: #1c2733; color: #fff; margin: 0 0 16px; }
.ap-preset-label { font-size: 12.5px; color: #8b95a0; margin: 0 0 8px; text-align: left; }
.ap-row-wrap { display: flex; align-items: center; gap: 4px; }
.ap-emoji-row { flex: 1; display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px; scroll-snap-type: x proximity; }
.ap-emoji-btn {
  scroll-snap-align: start; flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  background: #f3f4f6; border: none; cursor: pointer;
  font-size: 24px; display: grid; place-items: center;
}
.ap-emoji-btn:hover { background: #e6e8ea; }
.ap-arrow { flex: none; width: 32px; height: 32px; border-radius: 50%; border: none; background: none; color: #8b95a0; font-size: 22px; cursor: pointer; display: none; }
@media (hover: hover) and (min-width: 640px) { .ap-arrow { display: grid; place-items: center; } .ap-arrow:hover { background: #f3f4f6; } }
.ap-close-wrap { text-align: center; margin-top: 16px; }
.ap-close-link { background: none; border: none; cursor: pointer; font-size: 13px; color: #8b95a0; text-decoration: underline; font-family: var(--font); }

/* ---- photo cropper (opens over the picker, full-screen dark) ---- */
.ap-crop-overlay { background: #000; backdrop-filter: none; -webkit-backdrop-filter: none; z-index: 160; }
.ap-crop { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ap-crop-actions { display: flex; align-items: center; gap: 12px; }
.ap-crop-cancel { background: none; border: none; color: #fff; font-size: 15px; cursor: pointer; font-family: var(--font); text-decoration: underline; }
.crop-stage {
  position: relative;
  width: 288px; height: 288px;
  border-radius: 16px;
  overflow: hidden;
  background: #11202e;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.crop-stage.empty { display: flex; align-items: center; justify-content: center; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; display: block; }
.crop-ring { position: absolute; inset: 6px; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .6); border: 2px solid rgba(255, 255, 255, .9); pointer-events: none; }
.crop-zoom { width: 240px; display: block; accent-color: #fff; }

/* ---- drawer accordion panels (X to collapse, compact forms, mini chat) ---- */
.drawer-card { position: relative; }
.card-x {
  position: absolute; top: 10px; right: 12px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .28); color: #fff;
  border: none; cursor: pointer; font-size: 14px; line-height: 1;
  display: grid; place-items: center;
}
.drawer-field { margin-bottom: 9px; }
.drawer-field label { display: block; font-size: 12px; opacity: .85; margin-bottom: 3px; }
.drawer-field input, .drawer-field select, .drawer-field textarea {
  width: 100%; border: none; border-radius: 999px;
  padding: 9px 14px; font-family: inherit; font-size: 14px;
  background: #fff; color: #1c2733; outline: none;
}
.drawer-field textarea { border-radius: 14px; resize: none; }
.drawer-photo {
  width: 100%; border-radius: 12px; display: block;
  margin: 4px 0 8px; background: #fff;
}
.mini-chat {
  background: rgba(255, 255, 255, .12);
  border-radius: 14px; padding: 8px;
  margin: 6px 0 8px; max-height: 240px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.mini-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.35; }
.mini-msg.them { align-self: flex-start; background: #fff; color: #3a3f45; border-bottom-left-radius: 4px; }
.mini-msg.me { align-self: flex-end; background: #dbe9f6; color: #123; border-bottom-right-radius: 4px; }
.mini-reply { display: flex; gap: 6px; }
.mini-reply input { flex: 1; border: none; border-radius: 999px; padding: 9px 13px; font-family: inherit; font-size: 14px; outline: none; }
.mini-reply button { border: none; border-radius: 999px; background: #fff; color: var(--brand); font-weight: 700; padding: 0 16px; cursor: pointer; }

/* profile photos slot into the round avatar frames */
.avatar img.photo, .drawer-avatar img.photo {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.drawer-avatar { cursor: pointer; }
.drawer-avatar.locked { cursor: default; pointer-events: none; }   /* signed-out: no tooltip, not clickable */

/* ==================== CHAT SUPPORT ==================== */
.chat-page {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f4f5f6;
  box-shadow: 0 0 32px rgba(0, 0, 0, .18);
}
.chat-hero {
  background: var(--brand);   /* follows the page theme — blue for shoppers, green for hoppers */
  color: #fff;
  text-align: center;
  padding: 18px 22px 0;
  position: relative;
  border-bottom-left-radius: 50% 46px;
  border-bottom-right-radius: 50% 46px;
}
.chat-hero .back-chip { position: absolute; top: 16px; left: 16px; }
.chat-hero h1 { margin: 4px 0 8px; font-size: 30px; font-weight: 800; letter-spacing: .3px; }
.chat-hero p { margin: 0; font-size: 16px; line-height: 1.35; opacity: .96; }
.chat-agent {
  width: 118px; height: 118px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: #fff;
  object-fit: cover;
  display: block;
  margin: 16px auto -59px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .18);
}
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 74px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.msg.them { align-self: flex-start; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .who {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  object-fit: cover; background: #dfe3e7; overflow: hidden;
}
.msg .who svg { width: 100%; height: 100%; }
.bubble {
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.4;
  color: #3a3f45;
  word-break: break-word;
  white-space: pre-line;                 /* honor explicit line breaks in a message */
}
.msg.them .bubble { background: #fff; border: 1px solid #e6e8ea; border-bottom-left-radius: 6px; }
.msg.me .bubble { background: #e6e8ea; border-bottom-right-radius: 6px; }
.bubble.typing { display: flex; gap: 6px; padding: 17px 18px; align-items: center; }
.bubble.typing i { width: 9px; height: 9px; border-radius: 50%; background: #b6bcc2; animation: rz-blink 1.2s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .2s; }
.bubble.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes rz-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.chat-reply {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border-top: 2px solid var(--blue);
  position: sticky; bottom: 0;
}
.chat-reply input {
  flex: 1; border: none; outline: none;
  font-size: 17px; font-family: var(--font);
  background: transparent; color: #3a3f45;
}
.chat-reply .icon-btn {
  background: none; border: none; cursor: pointer;
  color: #9aa0a6; display: grid; place-items: center; padding: 4px;
}
.chat-reply .icon-btn svg { width: 27px; height: 27px; fill: currentColor; }

/* ============== BRAND-AS-MENU BUTTON (top-left) ============== */
.brand-btn {
  display: flex; align-items: center; gap: 9px;
  background: none; border: none; padding: 0; margin: 0;
  cursor: pointer;
  color: #fff; font-family: var(--font);
  flex: none;
}
.brand-btn:hover .kanga-chip { box-shadow: 0 0 0 3px #fff; }   /* crisp white hover ring (blue + green) */
.brand-btn:active { transform: scale(.97); }
/* Tooltip comes from the native title="Menu" attribute — a CSS pseudo-tooltip
   here would be clipped by the category bar's horizontal-scroll overflow. */

/* category marker tile — sits inside the product grid, same size as items */
.cat-marker {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  scroll-margin-top: 84px;   /* land below the sticky merged bar */
}
.cat-marker img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cat-tile.dim { opacity: .5; }

/* ================= CATEGORY BAR (merged top row) =================
   The brand (profile photo + "Roozy" = menu button) sits sticky at the
   left; category tiles scroll after it; density toggle sticky at the right.
   Unselected tile = white icon/text on the blue bar (blends, no stroke).
   Selected tile = the white-tile image (blue icon/text) = "button turns
   white". No borders anywhere — clean. */
.cat-bar {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto;
  padding: 9px 12px;
  background: var(--brand);
  scrollbar-width: none;
  position: sticky; top: 0; z-index: 60;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar .brand-btn {
  gap: 8px;
  padding: 2px 6px 2px 2px;
  align-self: center;
  flex: none;
}
.cat-tile { flex: none; border-radius: 12px; overflow: hidden; border: none; cursor: pointer; padding: 0; background: none; }
.cat-tile img { display: block; height: 58px; width: auto; }

/* density toggle (2-per-row / 3-per-row) — the LAST item in the row; on a
   phone it scrolls with everything (sits after the last category); on a wide
   desktop the auto margin parks it at the far right. */
.density-btn {
  flex: none;
  margin-left: auto;
  width: 46px; height: 40px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,.85);
  background: var(--brand);
  cursor: pointer;
  display: grid; place-items: center;
  gap: 0;
}
.density-btn .dots { display: flex; gap: 4px; }
.density-btn .dots i { width: 9px; height: 9px; border-radius: 2.5px; background: #fff; display: block; }

/* ===================== BEING-DELIVERED RIBBON ===================== */
.ribbon {
  background: var(--order-green);
  color: #fff;
  padding: 8px 12px;
  display: none;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
}
.ribbon.show { display: flex; }
.ribbon .ribbon-label { font-weight: 700; font-size: 15px; flex: none; }
.ribbon .thumb {
  background: #fff; border-radius: 10px;
  height: 56px; width: 56px; flex: none;
  display: grid; place-items: center; overflow: hidden;
}
.ribbon .thumb img { max-height: 52px; max-width: 52px; object-fit: contain; }

/* ========================= PRODUCT GRID ========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
/* no white frame — the transparent product PNGs (shadow baked in) float on
   the page background */
.prod {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 2px;
  position: relative;
  cursor: pointer;
  transition: transform .12s;
}
.prod:active { transform: scale(.96); }
.prod img { width: 100%; height: auto; display: block; }
.prod .badge {
  position: absolute; top: 2px; right: 2px;
  width: 32%; max-width: 60px;
  display: none;
}
/* being ordered/delivered: a flat green rounded rectangle behind the image */
.prod.ordering { background: var(--order-green); border-radius: 14px; }
.prod.ordering .badge { display: none; }
/* out of stock: just the gray image — still clickable, opens the details pop-up */
.prod.out { cursor: pointer; }
.prod.out img { filter: grayscale(1); opacity: .45; }

/* ========================= PILL BUTTONS ========================= */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: #fff;
}
.btn-brand { background: var(--brand); }
.btn-green { background: var(--order-green); box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.btn-gray  { background: var(--gray-card); }
.btn-ghost { background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.75); }
.btn:active { transform: translateY(1px); }

/* ========================= JOB CARDS (delivery) ========================= */
.job-card {
  border-radius: var(--radius-big);
  padding: 12px;
  margin: 12px;
  color: #fff;
  box-shadow: var(--shadow-card);
  position: relative;
}
.job-card.incoming { background: var(--blue); }
.job-card.accepted { background: var(--green); }
.job-card.expired  { background: var(--gray-card); }
.job-card.expired .door-wrap img,
.job-card.expired .thumbs { filter: grayscale(1); opacity: .55; }
.door-wrap { position: relative; border-radius: 16px; overflow: hidden; }
.door-wrap img, .door-wrap svg { width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover; display: block; }
.eta-bubble {
  position: absolute; top: 10px; left: 10px;
  background: var(--brand);
  border: 3px solid #fff;
  color: #fff;
  border-radius: 999px;
  padding: 5px 15px;
  font-weight: 800;
  font-size: 17px;
}
.eta-bubble::after {
  content: ""; position: absolute; left: 14px; bottom: -9px;
  border: 6px solid transparent; border-top-color: #fff;
}
.addr-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 4px 4px;
  font-size: 16.5px;
}
.addr-row .est { font-size: 14px; opacity: .85; }
.addr-row .est b { font-size: 21px; opacity: 1; }
.thumbs { display: flex; justify-content: center; gap: 10px; padding: 6px 0 10px; }
.thumbs .thumb {
  background: #fff; border-radius: 12px;
  width: 76px; height: 76px;
  display: grid; place-items: center; overflow: hidden;
}
.thumbs .thumb img { max-width: 68px; max-height: 68px; object-fit: contain; }

/* countdown ring */
.countdown {
  position: absolute; top: -8px; right: -8px;
  width: 58px; height: 58px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-card);
  display: grid; place-items: center;
  z-index: 5;
}
.countdown svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.countdown .num { font-weight: 800; font-size: 17px; color: var(--blue); }

/* queue rows */
.queue-row {
  display: flex; justify-content: space-between; align-items: baseline;
  background: var(--gray-card);
  color: #fff;
  border-radius: 999px;
  padding: 13px 20px;
  margin: 10px 14px;
  font-weight: 700;
  font-size: 16px;
}
.queue-row .est { font-size: 13px; font-weight: 600; opacity: .9; }
.queue-row .est b { font-size: 18px; }

/* ===================== SLIDE-TO-DELIVER ===================== */
.slide-row { display: flex; align-items: center; gap: 12px; padding: 4px 2px 8px; }
.slide-track {
  flex: 1;
  position: relative;
  height: 56px;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.slide-track .slide-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-weight: 800; font-size: 19px;
  color: var(--green);
}
.slide-knob {
  position: absolute; top: 4px; left: 4px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--order-green-light);
  display: grid; place-items: center;
  color: #2e6b0d; font-size: 20px; font-weight: 800;
  cursor: grab;
  z-index: 2;
}
.slide-track.done { background: var(--order-green); }
.slide-track.done .slide-label { color: #fff; }
.slide-track.done .slide-knob { background: #fff; color: var(--order-green); cursor: default; }
.nav-btn {
  flex: none;
  width: 62px;
  text-align: center;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}
.nav-btn .nav-circle {
  width: 52px; height: 52px; margin: 0 auto 3px;
  background: #fff; border-radius: 50%;
  display: grid; place-items: center;
}
.nav-btn .nav-circle svg { width: 26px; height: 26px; fill: var(--green); }

/* ========================= TABS (delivery) ========================= */
.tabs {
  display: flex;
  gap: 8px;
  padding: 8px 12px 10px;
  background: var(--brand);
  position: sticky;
  top: 62px;
  z-index: 55;
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
}
.tab img { height: 46px; width: auto; border-radius: 8px; }
.tab.active { background: #fff; color: var(--brand); }

/* ========================= EMPTY STATE ========================= */
.empty-panel {
  background: #e3e5e8;
  border-radius: var(--radius-big);
  margin: 16px;
  padding: 48px 24px;
  text-align: center;
  color: #8b9096;
  font-size: 16.5px;
  line-height: 1.5;
}
.empty-panel svg { width: 120px; height: auto; margin-bottom: 12px; fill: #b3b8bd; }

/* ========================= FORMS / LOGIN ========================= */
.login-hero {
  background: linear-gradient(180deg, var(--brand-dark), var(--brand));
  color: #fff;
  text-align: center;
  padding: 44px 20px 70px;
  border-radius: 0 0 var(--radius-big) var(--radius-big);
}
.login-hero .kanga-big {
  width: 92px; height: 92px;
  background: #fff; border-radius: 50%;
  margin: 0 auto 10px;
  display: grid; place-items: center;
  overflow: hidden;
}
.login-hero .kanga-big img { width: 72px; }
.login-hero h1 { margin: 4px 0 2px; font-size: 32px; }
.login-hero p { margin: 0; opacity: .9; font-size: 15px; }
.card {
  background: #fff;
  border-radius: var(--radius-big);
  box-shadow: var(--shadow-card);
  margin: 16px;
  padding: 20px;
}
.card.overlap { margin-top: -44px; position: relative; }
.card h2 { margin: 0 0 4px; font-size: 20px; color: var(--brand); }
.card .sub { margin: 0 0 14px; color: #66707a; font-size: 14px; line-height: 1.5; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: #55606b; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  padding: 12px 15px;
  border: 1.5px solid #ccd4db;
  border-radius: 999px;
  outline-color: var(--brand);
  background: #fff;
}
.field textarea { border-radius: var(--radius-card); resize: none; }
.code-boxes { display: flex; gap: 9px; justify-content: center; }
.code-boxes input {
  width: 46px; height: 54px;
  text-align: center;
  font-size: 24px; font-weight: 700;
  border: 1.5px solid #ccd4db;
  border-radius: 12px;
  outline-color: var(--brand);
}
.hint { text-align: center; font-size: 13px; color: #7a848e; margin: 10px 0 0; line-height: 1.5; }
.hint a { color: var(--brand); font-weight: 600; }

/* choice tiles (car vs home) */
.choice-tile {
  border: 2.5px solid #ccd4db;
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: center;
  background: #fff;
}
.choice-tile.selected { border-color: var(--brand); background: var(--brand-bg); }
.choice-tile .big-emoji { font-size: 38px; flex: none; }
.choice-tile h3 { margin: 0 0 3px; font-size: 16.5px; }
.choice-tile p { margin: 0; font-size: 13px; color: #66707a; line-height: 1.45; }

/* ========================= MISC ========================= */
.section-label {
  font-size: 14px; font-weight: 700; color: #66707a;
  text-transform: uppercase; letter-spacing: .6px;
  margin: 18px 18px 6px;
}
.pill-note {
  background: #fff;
  border-radius: 999px;
  margin: 10px 16px;
  padding: 10px 18px;
  font-size: 13.5px;
  color: #55606b;
  box-shadow: var(--shadow-card);
}
.footer-note {
  text-align: center;
  color: #8b95a0;
  font-size: 12px;
  padding: 18px 24px 24px;
  margin-top: auto;
}

/* inventory check grid */
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 2px; }
.inv-item { position: relative; background: #fff; border: 2px solid #dde3e8; border-radius: 12px; padding: 5px; cursor: pointer; }
.inv-item img.pic { width: 100%; height: auto; display: block; }
.inv-item .chk {
  position: absolute; top: -7px; left: -7px;
  width: 26px; height: 26px;
  border-radius: 7px;
  background: #fff;
  border: 2px solid #b9c2ca;
  display: grid; place-items: center;
  font-weight: 900; color: #fff; font-size: 15px;
}
.inv-item.checked { border-color: var(--order-green); }
.inv-item.checked .chk { background: var(--order-green); border-color: var(--order-green); }

/* earnings placeholder */
.stat-row { display: flex; gap: 10px; margin: 12px 16px; }
.stat-card {
  flex: 1;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 14px;
  text-align: center;
}
.stat-card .big { font-size: 24px; font-weight: 800; color: var(--brand); }
.stat-card .lbl { font-size: 12px; color: #7a848e; font-weight: 600; }

/* generic list row (delivered history) */
.list-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin: 10px 14px;
  padding: 10px 14px;
}
.list-row .thumb {
  width: 54px; height: 54px; flex: none;
  border-radius: 10px; background: #f2f4f6;
  display: grid; place-items: center; overflow: hidden;
}
.list-row .thumb img { max-width: 48px; max-height: 48px; object-fit: contain; }
.list-row .info { flex: 1; min-width: 0; }
.list-row .info b { display: block; font-size: 15px; }
.list-row .info span { font-size: 12.5px; color: #7a848e; }
.list-row .amt { font-weight: 800; color: var(--green); font-size: 16px; }

/* ===================== DESKTOP LAYOUT (≥900px) =====================
   ALL pages go full-bleed on desktop: grids and tables stretch edge to
   edge and reflow (wider browser = more items per row); card-like
   content (forms, job cards, lists) centers at a readable width. */
/* ---- Foldables unfolded + small tablets (~500–899px: Galaxy Z Fold inner
   screen, iPad-mini portrait, big phones in landscape / split-screen). The
   phone frame caps .app at 430px and locks the grid to 3 fixed columns, so
   these wider screens render like a narrow phone. Un-cap the app and reflow
   the grid into as many columns as the extra width allows. ---- */
@media (min-width: 500px) and (max-width: 899px) {
  .app { max-width: none; box-shadow: none; }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 12px;
    padding: 14px 16px;
  }
  .grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

  /* card-style content stays at a readable width instead of stretching edge-to-edge */
  .card { max-width: 600px; margin-left: auto; margin-right: auto; }
  .card.wide { max-width: 1100px; }
  .job-card,
  .queue-row,
  .pill-note,
  .empty-panel { max-width: 600px; margin-left: auto; margin-right: auto; }
  .list-row { max-width: 680px; margin-left: auto; margin-right: auto; }
  .section-label { max-width: 680px; margin-left: auto; margin-right: auto; }
  .stat-row { max-width: 760px; margin-left: auto; margin-right: auto; }
  .deliv-marker { max-width: 760px; margin-left: auto; margin-right: auto; }
}

@media (min-width: 900px) {
  .app { max-width: none; box-shadow: none; }
  .app-header { padding: 12px 28px; }
  .cat-bar { padding: 12px 24px; gap: 10px; }
  .ribbon { padding: 10px 24px; }

  /* product grid: as many columns as fit, edge to edge */
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px 28px;
  }
  .grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

  /* readable centered widths for card-style content */
  .card { max-width: 600px; margin-left: auto; margin-right: auto; }
  .card.wide { max-width: 1100px; }
  .job-card,
  .queue-row,
  .pill-note,
  .empty-panel { max-width: 600px; margin-left: auto; margin-right: auto; }
  .list-row { max-width: 680px; margin-left: auto; margin-right: auto; }
  .section-label { max-width: 680px; margin: 18px auto 6px; padding: 0 6px; }
  .stat-row { max-width: 760px; margin-left: auto; margin-right: auto; }
  .login-hero { padding: 48px 20px 74px; }

  /* delivery tabs: centered, not absurdly stretched */
  .tabs { justify-content: center; }
  .tab { max-width: 230px; }

  /* inventory grid reflows like the store grid */
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  /* admin: tables stretch the full window width (body. prefix outranks the
     base .theme-admin .app cap that appears later in this file) */
  body.theme-admin .app { max-width: none; }
  body.theme-admin .card { max-width: none; margin-left: 16px; margin-right: 16px; }
  body.theme-admin .stat-row { max-width: none; margin-left: 16px; margin-right: 16px; }
}

/* ========================= ADMIN (desktop-friendly too) ========================= */
.theme-admin .app { max-width: 900px; }
.admin-side-note { font-size: 12px; opacity: .75; font-weight: 400; }
.theme-admin .card { overflow-x: auto; }   /* tables scroll sideways on phones */
.admin-table { width: 100%; min-width: 620px; border-collapse: collapse; background: #fff; border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); }
.admin-table th { background: var(--slate); color: #fff; text-align: left; font-size: 13px; padding: 10px 14px; }
.admin-table td { padding: 10px 14px; border-top: 1px solid #e6eaee; font-size: 14px; vertical-align: middle; }
.admin-table img.prod-mini { height: 44px; width: auto; }
.admin-table img.prod-mini.gray { filter: grayscale(1); opacity: .5; }
/* admin header: brand on the left, section-jump nav on the right */
.admin-header { justify-content: space-between; gap: 12px; }
.admin-nav { display: flex; gap: 6px; overflow-x: auto; }
.admin-nav-link { color: #fff; text-decoration: none; background: rgba(255,255,255,.16); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.admin-nav-link:hover { background: rgba(255,255,255,.28); }
.section-label { scroll-margin-top: 76px; }
.drawer-item.shop-item { background: var(--blue); }   /* "Shop Roozy" pops blue in the admin drawer */
/* product photo manager in the add/edit form */
.pf-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.pf-photo { position: relative; width: 88px; }
.pf-photo img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; border: 1.5px solid #e6eaee; background: #f2f5f8; display: block; }
.pf-photo.main img { border-color: var(--brand); }
.pf-badge { position: absolute; top: 4px; left: 4px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.pf-remove { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; cursor: pointer; font-size: 11px; line-height: 1; display: grid; place-items: center; }
.pf-makemain { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--brand); border: 1px solid var(--brand); border-radius: 999px; font-size: 10px; font-weight: 700; padding: 2px 8px; cursor: pointer; white-space: nowrap; }
.tag { display: inline-block; border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 3px 12px; }
.tag.ok { background: #e0f4d8; color: #3c8413; }
.tag.low { background: #fdeeda; color: #b06a00; }
.tag.out { background: #eceff2; color: #7a848e; }
.tag.pending { background: #dcebfb; color: #1465ad; }

/* ============== GREEN DELIVERY — merged scrollspy bar ==============
   One long-scroll delivery page: brand (menu) + 4 tab chips share one row.
   Each tab has a white icon; the active tab flips to a white rounded-square
   with a green icon (mirrors the blue shopper cat-bar). Section dividers
   below anchor the scrollspy and keep the active tab centered. */
.deliv-bar {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto;
  padding: 9px 12px;
  background: var(--green);
  scrollbar-width: none;
  position: sticky; top: 0; z-index: 60;
}
.deliv-bar::-webkit-scrollbar { display: none; }
.deliv-bar .brand-btn { gap: 8px; padding: 2px 6px 2px 2px; flex: none; }
.deliv-tab {
  flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 60px; height: 54px; padding: 6px 10px;
  border: none; border-radius: 14px; cursor: pointer;
  background: transparent; color: #fff;
  font-family: var(--font); font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.deliv-tab svg { width: 24px; height: 24px; fill: currentColor; }
.deliv-tab.active { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(20,40,70,.18); }

/* section dividers = scrollspy anchors */
.deliv-marker {
  scroll-margin-top: 82px;
  display: flex; align-items: center; gap: 12px;
  margin: 20px 16px 10px;
  color: var(--green-dark); font-weight: 800; font-size: 14px; letter-spacing: .4px; text-transform: uppercase;
}
.deliv-marker::before, .deliv-marker::after { content: ""; height: 2px; background: rgba(90,167,28,.28); border-radius: 2px; flex: 1; }
.deliv-marker span { flex: none; }

/* stored-address form inside the drawer */
.sa-field { width: 100%; border: none; border-radius: 12px; padding: 9px 14px; font-family: inherit; font-size: 14px; margin: 4px 0 8px; box-sizing: border-box; }
.sa-row { display: flex; gap: 8px; }
.sa-row .sa-field { flex: 1; }
.sa-note { font-size: 12px; opacity: .85; margin: 2px 0 8px; }

@media (min-width: 720px) {
  .deliv-marker { max-width: 760px; margin-left: auto; margin-right: auto; }
}

/* ============== ADMIN box↔product association ============== */
/* staged product chips inside the box editor */
.assoc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.assoc-chip { display: inline-flex; align-items: center; gap: 8px; background: #f2f5f8; border: 1px solid #e2e8ee; border-radius: 999px; padding: 4px 8px 4px 4px; }
.assoc-chip img { width: 32px; height: 32px; object-fit: contain; background: #fff; border-radius: 50%; flex: none; }
.assoc-name { font-size: 13px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assoc-qty { font-size: 12px; color: #7a848e; display: inline-flex; align-items: center; gap: 2px; }
.assoc-qty-in { width: 44px; border: 1px solid #ccd4db; border-radius: 8px; padding: 2px 6px; font-family: inherit; font-size: 12px; }
.assoc-x { border: none; background: rgba(0,0,0,.45); color: #fff; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1; display: grid; place-items: center; flex: none; }

/* box chips inside the product editor */
.box-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--slate); color: #fff; border-radius: 999px; padding: 4px 8px 4px 12px; font-size: 12.5px; font-weight: 700; margin: 0 6px 6px 0; }
.box-chip-x { border: none; background: rgba(255,255,255,.28); color: #fff; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1; display: grid; place-items: center; }

/* the "N products" expand toggle in a box row */
.box-expand { border: 1px solid #ccd4db; background: #fff; color: var(--slate); border-radius: 999px; padding: 4px 12px; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.box-expand:hover { background: #f2f5f8; }

/* expanded sub-row: product thumbnails + titles for one box */
.box-products-row > td { background: #f7f9fb; }
.box-products { display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 2px; }
.box-prod { width: 92px; text-align: center; }
.box-prod img { width: 72px; height: 72px; object-fit: contain; background: #fff; border: 1px solid #e6eaee; border-radius: 12px; display: block; margin: 0 auto 4px; }
.box-prod-name { font-size: 11.5px; line-height: 1.25; color: #33404b; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.box-prod-qty { font-size: 11px; font-weight: 800; color: var(--slate); margin-top: 2px; }

/* ============== FREEBIE tile + welcome banner ============== */
/* the first cat-bar tile: bright-yellow gift icon + word instead of the image */
.cat-tile.freebie-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: 58px; padding: 2px 12px; background: none;
}
.freebie-ico svg { width: 30px; height: 30px; fill: #ffd21e; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.freebie-word { font-size: 11px; font-weight: 800; color: #ffd21e; letter-spacing: .3px; }
.cat-tile.freebie-tile.active { background: #fff; border-radius: 12px; }
.cat-tile.freebie-tile.active .freebie-ico svg { fill: #eaa400; filter: none; }
.cat-tile.freebie-tile.active .freebie-word { color: #eaa400; }

/* full-width welcome banner that opens the store (the "home" section) */
.freebie-banner {
  grid-column: 1 / -1;
  overflow: visible;
  background: linear-gradient(135deg, #fff6d6, #ffe6a0);
  border: 1.5px solid #ffd94d;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 22px 18px;
  text-align: center;
  scroll-margin-top: 84px;
}
.freebie-banner .fb-gift { font-size: 42px; line-height: 1; }
.freebie-banner .fb-title { font-size: 22px; font-weight: 800; color: #7a5a00; margin: 6px 0 4px; }
.freebie-banner .fb-sub { font-size: 14px; color: #6b5a2a; line-height: 1.5; max-width: 520px; margin: 0 auto; }
.freebie-banner .fb-card { background: rgba(255,255,255,.78); border-radius: 14px; padding: 14px 16px; margin: 16px auto 0; max-width: 560px; text-align: left; }
.freebie-banner .fb-card h3 { font-size: 16px; font-weight: 800; color: #33404b; margin: 0 0 6px; }
.freebie-banner .fb-card p { font-size: 13.5px; color: #525b64; line-height: 1.55; margin: 0 0 12px; }
.fb-become { background: var(--blue); color: #fff; border: none; border-radius: 999px; padding: 10px 22px; font-family: var(--font); font-weight: 800; font-size: 14px; cursor: pointer; }
.fb-become:active { transform: scale(.97); }

/* ============== hopper availability switches + referral gauge ============== */
.avail-bar { background: #fff; border-radius: 18px; box-shadow: var(--shadow-card); padding: 12px 16px 6px; margin: 0 16px 12px; }
.avail-status { display: block; text-align: center; font-weight: 800; font-size: 13.5px; padding: 4px 0 10px; }
.avail-status.on { color: #3c8413; }
.avail-status.off { color: #8b95a0; }
.avail-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 2px; cursor: pointer; border-top: 1px solid #eef2f5; }
.avail-face { display: flex; align-items: center; gap: 10px; }
.avail-ico { font-size: 22px; }
.avail-label { font-size: 14.5px; font-weight: 700; color: #33404b; }
.avail-toggle input { display: none; }
.avail-switch { position: relative; width: 46px; height: 27px; background: #d7dee4; border-radius: 999px; flex: none; transition: background .18s; }
.avail-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .18s; }
.avail-toggle input:checked + .avail-switch { background: var(--green); }
.avail-toggle input:checked + .avail-switch::after { left: 22px; }

.referral-card { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-card); padding: 14px 16px; margin: 0 16px 14px; }
.ref-gauge { position: relative; width: 84px; height: 84px; flex: none; }
.ref-gauge svg { width: 84px; height: 84px; display: block; }
#ref-arc { transition: stroke-dashoffset .6s ease; }
.ref-num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--green-dark); }
.ref-copy b { display: block; font-size: 15px; color: #33404b; margin-bottom: 3px; }
.ref-copy span { font-size: 12.5px; color: #7a848e; line-height: 1.45; }

/* ============== hopper welcome / how-it-works + radius visualizer (shared) ============== */
.hi-perks { display: grid; grid-template-columns: 1fr; gap: 12px; }
.hi-perk { display: flex; gap: 12px; align-items: flex-start; }
.hi-perk .em { font-size: 26px; flex: none; line-height: 1.1; }
.hi-perk b { display: block; font-size: 15px; color: #2f3a45; }
.hi-perk span { font-size: 13.5px; color: #6b7580; line-height: 1.5; }

/* ============== Hopper welcome — marketing one-pager (green side) ============== */
.hop-hero {
  margin: 14px 16px 0;
  background: linear-gradient(145deg, #6fbc2e, #4c9a17 55%, #3c8413);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  color: #fff;
  text-align: center;
  padding: 36px 22px 30px;
  position: relative;
  overflow: hidden;
}
.hop-hero .hh-deco { position: absolute; font-size: 30px; opacity: .28; pointer-events: none; }
.hop-hero .hh-kanga { font-size: 56px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.hop-hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -.3px; margin: 10px 0 8px; }
.hop-hero > p { font-size: 15.5px; line-height: 1.55; opacity: .95; max-width: 470px; margin: 0 auto; }
.hop-cta {
  margin-top: 20px; border: none; cursor: pointer;
  background: #fff; color: #3c8413;
  font-family: var(--font); font-weight: 800; font-size: 16.5px;
  padding: 14px 30px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.hop-cta:active { transform: scale(.97); }
.hh-stats { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hh-stat { background: rgba(255,255,255,.16); border-radius: 14px; padding: 10px 14px; min-width: 92px; }
.hh-stat b { display: block; font-size: 21px; }
.hh-stat span { font-size: 11px; font-weight: 700; opacity: .9; letter-spacing: .4px; }

.hop-perks { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 14px 16px 0; }
@media (min-width: 720px) { .hop-perks { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin-left: auto; margin-right: auto; } }
.hop-perk { background: #fff; border-radius: 18px; box-shadow: var(--shadow-card); padding: 20px 16px; text-align: center; }
.hop-perk .em { font-size: 36px; line-height: 1; }
.hop-perk b { display: block; font-size: 16.5px; color: #2f3a45; margin: 9px 0 4px; }
.hop-perk span { font-size: 13.5px; color: #6b7580; line-height: 1.5; }

.hop-step { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; text-align: left; }
.hop-step + .hop-step { border-top: 1px dashed #e0e8d8; }
.hop-step .num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: 16px; display: grid; place-items: center; }
.hop-step b { display: block; font-size: 15.5px; color: #2f3a45; margin-bottom: 2px; }
.hop-step span { font-size: 13.5px; color: #6b7580; line-height: 1.5; }

/* ============== "Purchase your pouch now" section ============== */
.pouch-card { text-align: center; }
.pouch-viz { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px auto 6px; max-width: 560px; }
.pouch-viz .pv-bag { font-size: 46px; line-height: 1; flex: none; }
.pouch-viz .pv-eq { font-size: 24px; font-weight: 800; color: #9aa5af; flex: none; }
.pouch-viz .pv-items { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; font-size: 17px; line-height: 1.2;
  background: #f4f8ef; border-radius: 14px; padding: 10px 12px; }
@media (max-width: 560px) { .pouch-viz .pv-items { grid-template-columns: repeat(5, 1fr); font-size: 16px; } }
.pv-cap { font-size: 12.5px; color: #7a848e; font-weight: 600; margin: 0 0 4px; }

.pouch-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 4px; }
@media (max-width: 620px) { .pouch-tiers { grid-template-columns: 1fr; gap: 14px; } }
.pouch-tier { position: relative; border: 2px solid #e2e8ee; border-radius: 16px; padding: 16px 10px 14px;
  cursor: pointer; background: #fff; font-family: var(--font); }
.pouch-tier.sel { border-color: var(--green); background: #f4faec; box-shadow: 0 4px 14px rgba(90,167,28,.2); }
.pouch-tier .pt-name { font-weight: 800; font-size: 13.5px; color: #3c8413; text-transform: uppercase; letter-spacing: .5px; }
.pouch-tier .pt-qty { font-size: 12.5px; color: #7a848e; font-weight: 600; }
.pouch-tier .pt-price { font-size: 26px; font-weight: 800; color: #2f3a45; margin: 5px 0 1px; }
.pouch-tier .pt-items { font-size: 12.5px; color: #6b7580; }
.pouch-tier .pt-profit { margin-top: 8px; display: inline-block; background: #e4f5dd; color: #3c8413;
  font-weight: 800; font-size: 12.5px; border-radius: 999px; padding: 4px 11px; }
.pouch-tier .pt-flag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .4px;
  padding: 3px 11px; border-radius: 999px; white-space: nowrap; }

.pouch-math { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.pouch-math .pm-chip { background: #f2f5f8; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 700; color: #4a5560; }
.pouch-math .pm-chip.win { background: #e4f5dd; color: #3c8413; }
.pouch-math .pm-arr { color: #9aa5af; font-weight: 800; }
.pouch-fine { font-size: 11px; color: #9aa5af; margin: 10px 0 0; line-height: 1.5; }
.rv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .rv-row { grid-template-columns: 1fr; } }
.rv-panel { text-align: center; }
.rv-svg { width: 100%; max-width: 220px; height: auto; }
.rv-house path { fill: #2f3a45; }
.rv-ring { fill: rgba(90,167,28,.10); stroke: var(--green); stroke-width: 2.5; }
.rv-mover path { fill: var(--green-dark); }
.rv-range { -webkit-appearance: none; appearance: none; width: 90%; height: 6px; border-radius: 999px; background: #dce6d0; outline: none; margin: 10px 0 6px; }
.rv-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.rv-range::-moz-range-thumb { width: 24px; height: 24px; border: none; border-radius: 50%; background: var(--green); cursor: pointer; }
.rv-label { font-size: 15px; color: #2f3a45; }
.rv-label b { font-size: 22px; color: var(--green-dark); }
.rv-cap { font-size: 12.5px; color: #7a848e; margin-top: 2px; }

/* ============== AI-first support chat widget (inline + full) ============== */
.sc { display: flex; flex-direction: column; }
/* segmented toggle: Roozy Assistant | Talk to a real person — active one is a brand pill */
.sc-toggle { display: flex; gap: 6px; padding: 8px; background: #fff; border-radius: 12px 12px 0 0; }
.sc-opt { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none;
  background: none; color: #6b7580; font-family: var(--font); font-weight: 800; font-size: 11.5px;
  padding: 8px 6px; border-radius: 999px; cursor: pointer; white-space: nowrap; line-height: 1; }
.sc-opt.active { background: var(--brand); color: #fff; }
.sc-opt:active { transform: scale(.97); }
.sc-emo { font-size: 24px; line-height: 1; }
.sc-personico { width: 30px; height: 30px; flex: none; object-fit: contain; }   /* bigger clip-art, no circle */
.sc-body { background: #eef1f4; padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.sc-body.human { background: #fff8de; }
.sc-compact .sc-body { height: 300px; }
.sc-full .sc-body { flex: 1; min-height: 0; }
.sc-full .sc-toggle, .sc-full .sc-form { border-radius: 0; }
.sc-form { display: flex; gap: 6px; padding: 8px; background: #fff; border-radius: 0 0 12px 12px; }
.sc-in { flex: 1; border: 1.5px solid #ccd4db; border-radius: 999px; padding: 8px 13px; font-family: inherit; font-size: 13.5px; }
.sc-send { border: none; background: var(--brand); color: #fff; border-radius: 999px; padding: 8px 16px;
  font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; flex: none; }
.sc .msg { max-width: 92%; }
.who-ai { display: grid; place-items: center; font-size: 18px; background: #dfe6ec; }
.chat-sysnote { text-align: center; font-size: 12px; color: #8a7326; background: #fff2c2; border-radius: 10px;
  padding: 7px 11px; margin: 4px auto; max-width: 92%; font-weight: 600; line-height: 1.4; align-self: center;
  white-space: pre-line; }             /* honor the explicit 2-line break */

/* ============== pull-down handle (drag the menu down from the header) ==============
   Styled to look like the open menu's own drag bar (same blue, same white grabber
   line) so pulling it down feels like grabbing the same menu. */
.pull-handle {
  position: fixed; left: 50%; transform: translateX(-50%); top: 64px; z-index: 58;
  width: 100px; height: 27px; border-radius: 0 0 16px 16px;
  background: var(--brand);              /* same colour as the menu (blue shopper / green hopper) */
  box-shadow: 0 5px 12px rgba(0,0,0,.24);
  display: grid; place-items: center; cursor: grab; touch-action: none;
}
.pull-handle::before {                    /* the same white grabber line as .drawer-handle */
  content: ""; width: 66px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.7);
}
.pull-handle:active { cursor: grabbing; background: var(--brand-dark); }
@media (min-width: 900px) { .pull-handle { display: none; } }   /* desktop: use the menu button */
@media (max-width: 700px) {
  /* phones: the grab bar spans the whole screen edge-to-edge, not a little tab */
  .pull-handle { left: 0; right: 0; width: auto; transform: none; border-radius: 0; }
  .pull-handle::before { width: 110px; }
}

/* ============== Orders (top-bar button + list) ============== */
.orders-btn { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; height: 58px; padding: 2px 8px; background: none; border: none; cursor: pointer; }
.orders-btn .oico svg { width: 26px; height: 26px; fill: #fff; display: block; }
.orders-btn span:last-child { font-size: 10.5px; font-weight: 800; color: #fff; letter-spacing: .2px; }
.orders-btn:active { transform: scale(.96); }
.order-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #f4f7f9; margin-bottom: 8px; }
.order-row.live { background: #e4f5dd; }
.order-row .thumb { width: 48px; height: 48px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 8px; }
.order-row .thumb img { max-width: 42px; max-height: 42px; object-fit: contain; }
.order-row .info { flex: 1; min-width: 0; }
.order-row .info b { display: block; font-size: 14px; color: #33404b; }
.order-row .info span { font-size: 12px; color: #7a848e; }

/* In-page Orders view (blue store) */
.orders-head { grid-column: 1 / -1; text-align: center; padding: 4px 2px 6px; }
.orders-head h2 { font-size: 22px; font-weight: 800; color: #1f2a33; margin: 6px 0 4px; }
.orders-head p { font-size: 13.5px; color: #7a848e; margin: 0; }
.orders-back { display: inline-flex; align-items: center; gap: 4px; background: #eef3f7; border: 0;
  color: var(--brand); font-weight: 800; font-size: 13.5px; padding: 8px 14px; border-radius: 999px;
  cursor: pointer; float: left; }
.orders-back:active { transform: scale(.96); }
.orders-empty { grid-column: 1 / -1; text-align: center; color: #7a848e; font-size: 14px; padding: 24px 0; }
.order-card .order-badge { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 800;
  color: #525b64; background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 9px; box-shadow: var(--shadow-card); }
.order-card .order-badge.live { color: #fff; background: var(--green); }
.order-status { font-size: 20px; flex: none; }
