/* =====================================================================
   BloomBox design system
   One place for the palette: change a value here and the whole site follows.
   Colors are stored as "R G B" triplets so Tailwind can add opacity (bg-sage-500/40).
   ===================================================================== */
:root {
  --cream: 253 251 247;            /* #FDFBF7  soft ivory page background */
  --ink: 44 53 49;                 /* #2C3531  charcoal text */

  /* Brand sage (eucalyptus): main buttons, menu highlights, active states */
  --sage-50: 244 246 243;  --sage-100: 231 236 230; --sage-200: 207 215 206; --sage-300: 180 192 179; --sage-400: 151 166 150;
  --sage-500: 122 139 121;         /* #7A8B79 */
  --sage-600: 102 117 101; --sage-700: 82 95 81;    --sage-800: 63 74 62;    --sage-900: 44 53 49;

  /* Brand blush (dusty rose): soft accents, badges, hovers */
  --blush-50: 253 247 247; --blush-100: 249 236 237; --blush-200: 242 218 220;
  --blush-300: 232 197 200;        /* #E8C5C8 */
  --blush-400: 219 169 174; --blush-500: 201 138 145; --blush-600: 178 111 120; --blush-700: 143 86 94;

  /* Champagne gold: fine borders, premium highlights, logo accent (gold-500+ for text, gold-400 for lines) */
  --gold-50: 251 247 232;  --gold-100: 245 236 198; --gold-200: 234 217 142; --gold-300: 225 197 90;
  --gold-400: 212 175 55;          /* #D4AF37 */
  --gold-500: 169 132 40;  --gold-600: 140 108 28;  --gold-700: 107 82 22;

  /* Errors and destructive actions (a muted red that fits the palette) */
  --danger-50: 253 243 242; --danger-100: 250 227 225; --danger-200: 243 196 192;
  --danger-500: 196 90 82;  --danger-600: 172 74 67;   --danger-700: 142 59 53;

  /* Neutrals (warm, with the charcoal text color at the dark end) */
  --stone-50: 249 246 240; --stone-100: 242 238 230; --stone-200: 229 224 213; --stone-300: 208 202 189; --stone-400: 166 160 148;
  --stone-500: 120 115 105; --stone-600: 91 87 80;   --stone-700: 68 65 60;    --stone-800: 44 53 49;    --stone-900: 44 53 49;

  --shadow-soft: 0 1px 2px rgb(var(--ink) / .04), 0 4px 18px rgb(var(--ink) / .06);
  --shadow-lift: 0 2px 4px rgb(var(--ink) / .04), 0 16px 36px -12px rgb(var(--ink) / .20);
}

html { scroll-behavior: smooth; background: rgb(var(--cream)); }
body { background: rgb(var(--cream)); color: rgb(var(--ink)); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgb(var(--blush-300) / .55); color: rgb(var(--ink)); }
:focus-visible { outline: 2px solid rgb(var(--sage-500)); outline-offset: 2px; }
dialog::backdrop { backdrop-filter: blur(3px); }
.font-display { letter-spacing: .01em; }

.hide-scrollbar { scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- forms */
.input {
  width: 100%; border: 1px solid rgb(var(--stone-300)); border-radius: .75rem; background: rgb(var(--surface));
  padding: .65rem .9rem; font-size: .9rem; color: rgb(var(--ink));
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder { color: rgb(var(--stone-400)); }
.input:hover { border-color: rgb(var(--stone-400)); }
.input:focus { outline: none; border-color: rgb(var(--sage-500)); box-shadow: 0 0 0 4px rgb(var(--sage-200) / .55); }

/* ---------------------------------------------------------------- buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; border: 0;
  border-radius: .75rem; background: rgb(var(--sage-500)); padding: .8rem 1.4rem;
  font-size: .9rem; font-weight: 600; letter-spacing: .01em; color: #fff; text-shadow: 0 1px 0 rgb(0 0 0 / .12);
  box-shadow: 0 1px 2px rgb(var(--ink) / .12), 0 6px 14px -6px rgb(var(--sage-600) / .55);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn-primary:hover { background: rgb(var(--sage-600)); box-shadow: 0 2px 4px rgb(var(--ink) / .14), 0 10px 20px -8px rgb(var(--sage-700) / .55); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* secondary: soft pink fill or fine gold outline */
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer;
  border-radius: .75rem; border: 1px solid rgb(var(--gold-400)); background: transparent; padding: .75rem 1.3rem;
  font-size: .9rem; font-weight: 600; color: rgb(var(--ink)); transition: background .2s ease, border-color .2s ease;
}
.btn-secondary:hover { background: rgb(var(--blush-100)); border-color: rgb(var(--gold-500)); }

.lang-btn { border-radius: 9999px; padding: .3rem .6rem; color: rgb(var(--stone-500)); transition: background .2s ease, color .2s ease; }
.lang-btn:hover { color: rgb(var(--sage-700)); }
.lang-btn.is-active { background: rgb(var(--sage-500)); color: #fff; }

.type-card {
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer;
  border: 1px solid rgb(var(--stone-300)); border-radius: .75rem; padding: .6rem .5rem; font-size: .8rem; font-weight: 500;
  background: rgb(var(--surface)); transition: border-color .2s ease, background .2s ease;
}
.type-card:hover { border-color: rgb(var(--sage-400)); }
.type-card:has(input:checked) { border-color: rgb(var(--sage-500)); background: rgb(var(--sage-50)); color: rgb(var(--sage-700)); }
.type-card:has(input:focus-visible) { box-shadow: 0 0 0 3px rgb(var(--sage-200)); }

/* ---------------------------------------------------------------- product pieces */
.swatch {
  height: 1.5rem; width: 1.5rem; flex: none; border-radius: 9999px; cursor: pointer;
  border: 1px solid rgb(var(--ink) / .18); transition: transform .15s ease, box-shadow .15s ease;
}
.swatch:hover { transform: scale(1.12); }
.swatch.is-active { box-shadow: 0 0 0 2px rgb(var(--surface)), 0 0 0 4px rgb(var(--gold-400)); }

.product-card { box-shadow: var(--shadow-soft); transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.product-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); border-color: rgb(var(--gold-400) / .55); }

.color-chip {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  border: 1px solid rgb(var(--stone-300)); border-radius: 9999px; background: rgb(var(--surface)); padding: .35rem .8rem .35rem .55rem;
  font-size: .8rem; font-weight: 500; transition: border-color .2s ease, background .2s ease;
}
.color-chip:hover { border-color: rgb(var(--sage-400)); }
.color-chip.is-active { border-color: rgb(var(--sage-500)); background: rgb(var(--sage-50)); color: rgb(var(--sage-700)); }

.qty-input { -moz-appearance: textfield; appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------------------------------------------------------------- tabs, dialogs, toasts */
.tab-btn { margin-bottom: -1px; border-bottom: 2px solid transparent; padding: .65rem 1rem; font-size: .9rem; font-weight: 600; color: rgb(var(--stone-500)); transition: color .2s ease, border-color .2s ease; }
.tab-btn:hover { color: rgb(var(--sage-700)); }
.tab-btn.is-active { border-bottom-color: rgb(var(--sage-500)); color: rgb(var(--sage-700)); }

body:has(dialog[open]) { overflow: hidden; }

@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.toast { animation: toast-in .2s ease-out; box-shadow: var(--shadow-lift); }

/* === BloomBox menu (update_menu1) =========================================== */
.mnav-bar { display: flex; align-items: center; gap: .75rem; padding: 0 0 .75rem; }
.mnav-burger { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid rgb(var(--stone-200)); background: rgb(var(--surface)); color: rgb(var(--ink));
  border-radius: 9999px; padding: .5rem 1rem; font-size: .875rem; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s; }
.mnav-burger:hover, .mnav.is-open .mnav-burger { border-color: rgb(var(--sage-500)); color: rgb(var(--sage-700)); }
.mnav-current { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: rgb(var(--stone-500)); }
.mnav-list { display: none; list-style: none; margin: 0; padding: 0 0 .5rem; max-height: 65vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mnav.is-open .mnav-list { display: block; }
.mnav-item { position: relative; display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid rgb(var(--stone-100)); }
.mnav-link { flex: 1; text-align: left; background: none; border: 0; cursor: pointer; padding: .8rem .25rem; font-size: .95rem; font-weight: 500; color: rgb(var(--ink)); }
.mnav-link.is-active { color: rgb(var(--sage-700)); font-weight: 600; }
.mnav-chev { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; background: none; border: 0; cursor: pointer; color: rgb(var(--stone-500)); border-radius: 9999px; }
.mnav-chev svg { transition: transform .2s; }
.mnav-item.is-open > .mnav-chev svg { transform: rotate(180deg); }
.mnav-sub { display: none; list-style: none; width: 100%; margin: 0; padding: 0 0 .5rem .75rem; }
.mnav-item.is-open > .mnav-sub { display: block; }
.mnav-sublink { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: .6rem .75rem; border-radius: 10px;
  font-size: .9rem; color: rgb(var(--stone-700)); }
.mnav-sublink:hover { background: rgb(var(--blush-50)); color: rgb(var(--sage-700)); }
.mnav-sublink.is-active { background: rgb(var(--sage-100)); color: rgb(var(--sage-800)); font-weight: 600; }
.mnav button:focus-visible { outline: 2px solid rgb(var(--sage-500)); outline-offset: 2px; }

@media (min-width: 1024px) {
  .mnav-bar { display: none; }
  .mnav-list { display: flex !important; flex-wrap: wrap; align-items: center; gap: 0 .125rem; max-height: none; overflow: visible; padding: 0 0 .25rem; }
  .mnav-item { flex-wrap: nowrap; border: 0; }
  .mnav-link { flex: none; position: relative; white-space: nowrap; padding: .6rem .7rem; font-size: .9rem; transition: color .15s; }
  .mnav-link::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 2px; border-radius: 2px;
    background: rgb(var(--sage-500)); transform: scaleX(0); transform-origin: center; transition: transform .2s ease; }
  .mnav-link:hover { color: rgb(var(--sage-700)); }
  .mnav-link:hover::after, .mnav-link.is-active::after { transform: scaleX(1); }
  .mnav-chev { width: 1.5rem; height: 1.5rem; margin-left: -.6rem; margin-right: .1rem; }
  .mnav-item:hover > .mnav-chev, .mnav-item.is-open > .mnav-chev { color: rgb(var(--sage-700)); }
  .mnav-sub { position: absolute; top: 100%; left: 0; z-index: 60; width: auto; min-width: 16rem; padding: .5rem;
    background: rgb(var(--surface)); border: 1px solid rgb(var(--gold-200)); border-radius: 14px; box-shadow: var(--shadow-lift); }
  .mnav-item:hover > .mnav-sub, .mnav-item:focus-within > .mnav-sub, .mnav-item.is-open > .mnav-sub { display: block; }
  .mnav-item[data-suppress]:hover > .mnav-sub { display: none; }
  .mnav-item:hover > .mnav-chev svg, .mnav-item.is-open > .mnav-chev svg { transform: rotate(180deg); }
}
/* === /BloomBox menu ========================================================= */

/* === BloomBox footer (update_footer1) ======================================= */
.site-footer { background: linear-gradient(to bottom, rgb(var(--cream)), rgb(var(--blush-50) / .55)); }
.footer-line { height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--gold-400)) 50%, transparent); opacity: .7; }
.footer-title { display: flex; align-items: center; gap: .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--sage-700)); }
.footer-title::before { content: ""; width: 1.25rem; height: 2px; border-radius: 2px; background: rgb(var(--gold-400)); }
.footer-link { position: relative; color: rgb(var(--ink)); transition: color .15s; }
.footer-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: rgb(var(--gold-400)); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.footer-link:hover { color: rgb(var(--sage-700)); }
.footer-link:hover::after { transform: scaleX(1); }
.footer-ic { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: rgb(var(--surface)); color: rgb(var(--sage-600));
  border: 1px solid rgb(var(--gold-200)); box-shadow: var(--shadow-soft); }
.social-btn { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px; background: rgb(var(--surface)); color: rgb(var(--sage-700));
  border: 1px solid rgb(var(--gold-300)); box-shadow: var(--shadow-soft); transition: background .15s, color .15s, transform .15s, border-color .15s; }
a.social-btn:hover { background: rgb(var(--sage-500)); color: #fff; border-color: rgb(var(--sage-500)); transform: translateY(-2px); }
.social-btn.is-off { opacity: .45; cursor: default; box-shadow: none; }
.site-footer a:focus-visible { outline: 2px solid rgb(var(--sage-500)); outline-offset: 3px; border-radius: 4px; }
/* === /BloomBox footer ======================================================= */

/* === BloomBox barcode scan (update_scanner1) ================================ */
.scan-box { position: relative; display: flex; align-items: center; width: 100%; max-width: 20rem; }
@media (min-width: 640px) { .scan-box { width: 18rem; } }
.scan-ico { position: absolute; left: .85rem; width: 1.25rem; height: 1.25rem; color: rgb(var(--sage-600)); pointer-events: none; }
.scan-input { width: 100%; border: 1px solid rgb(var(--gold-300)); border-radius: 9999px; background: rgb(var(--surface)); box-shadow: var(--shadow-soft);
  padding: .6rem 2.75rem .6rem 2.6rem; font-size: .85rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.scan-input::placeholder { color: rgb(var(--stone-500)); }
.scan-input:focus { border-color: rgb(var(--sage-500)); box-shadow: 0 0 0 4px rgb(var(--sage-200) / .7); }
.scan-sound { position: absolute; right: .35rem; display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 9999px;
  background: none; color: rgb(var(--sage-600)); cursor: pointer; }
.scan-sound:hover { background: rgb(var(--sage-100)); }
.scan-sound svg { width: 1.1rem; height: 1.1rem; }
.scan-sound.is-off { color: rgb(var(--stone-500)); }
.scan-sound.is-off .wave { display: none; }
.scan-status { display: block; margin: 0 0 1rem; border-radius: .85rem; padding: .6rem .9rem; font-size: .85rem; border: 1px solid transparent; }
.scan-status.is-ok { background: rgb(var(--sage-50)); color: rgb(var(--sage-800)); border-color: rgb(var(--sage-200)); }
.scan-status.is-err { background: rgb(var(--danger-50)); color: rgb(var(--danger-700)); border-color: rgb(var(--danger-200)); }
.scan-status.is-loading { background: rgb(var(--surface)); color: rgb(var(--stone-500)); border-color: rgb(var(--stone-200)); }
/* === /BloomBox barcode scan ================================================= */

/* === BloomBox chat assistant (update_chat1) ================================= */
.chat-root { position: fixed; right: 1rem; bottom: 1rem; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; pointer-events: none; }
.chat-root > * { pointer-events: auto; }
.chat-root .hidden { display: none !important; }
.chat-fab { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border: 0; border-radius: 9999px; cursor: pointer;
  background: rgb(var(--sage-500)); color: #fff; box-shadow: 0 0 0 2px rgb(var(--surface)), 0 0 0 3.5px rgb(var(--gold-400) / .85), var(--shadow-lift);
  transition: background .15s, transform .15s; }
.chat-fab:hover { background: rgb(var(--sage-600)); transform: translateY(-2px); }
.chat-fab:focus-visible, .chat-root button:focus-visible, .chat-input:focus-visible { outline: 2px solid rgb(var(--sage-500)); outline-offset: 2px; }
.chat-nudge { position: relative; max-width: 15rem; border: 1px solid rgb(var(--gold-300)); background: rgb(var(--surface)); color: rgb(var(--ink));
  border-radius: 14px 14px 4px 14px; padding: .6rem 1.9rem .6rem .9rem; font-size: .82rem; box-shadow: var(--shadow-lift); cursor: pointer; animation: chat-in .25s ease-out; }
.chat-nudge-x { position: absolute; top: .2rem; right: .3rem; width: 1.5rem; height: 1.5rem; border: 0; background: none; border-radius: 9999px;
  color: rgb(var(--stone-500)); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.chat-nudge-x:hover { background: rgb(var(--stone-100)); }

.chat-panel { display: flex; flex-direction: column; width: 22rem; max-width: calc(100vw - 2rem); height: min(34rem, calc(100dvh - 7.5rem));
  background: rgb(var(--cream)); border: 1px solid rgb(var(--gold-200)); border-radius: 18px; box-shadow: var(--shadow-lift); overflow: hidden; animation: chat-in .2s ease-out; }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; border-bottom: 1px solid rgb(var(--gold-200));
  background: linear-gradient(135deg, rgb(var(--blush-100)), rgb(var(--cream))); }
.chat-avatar { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 9999px; background: rgb(var(--sage-500)); color: #fff;
  box-shadow: 0 0 0 1.5px rgb(var(--gold-400) / .8); }
.chat-head-text { min-width: 0; flex: 1; }
.chat-title { margin: 0; font-family: "Cormorant Garamond", "Noto Serif Georgian", Georgia, serif; font-size: 1.1rem; font-weight: 700; line-height: 1.2; color: rgb(var(--ink)); }
.chat-sub { display: flex; align-items: center; gap: .35rem; margin: .1rem 0 0; font-size: .72rem; color: rgb(var(--stone-500)); }
.chat-dot { width: .45rem; height: .45rem; border-radius: 9999px; background: rgb(var(--sage-400)); }
.chat-head-actions { display: flex; gap: .15rem; }
.chat-icon-btn { display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 9999px; background: none; color: rgb(var(--stone-600)); cursor: pointer; }
.chat-icon-btn:hover { background: rgb(255 255 255 / .75); color: rgb(var(--sage-700)); }

.chat-log { flex: 1; display: flex; flex-direction: column; gap: .55rem; overflow-y: auto; padding: 1rem .9rem; -webkit-overflow-scrolling: touch; }
.chat-row { display: flex; }
.chat-row.user { justify-content: flex-end; }
.chat-bubble { max-width: 86%; padding: .6rem .85rem; font-size: .875rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-row.bot .chat-bubble { background: rgb(var(--surface)); color: rgb(var(--ink)); border: 1px solid rgb(var(--stone-100)); border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow-soft); }
.chat-row.user .chat-bubble { background: rgb(var(--sage-500)); color: #fff; border-radius: 16px 16px 4px 16px; }
.chat-typing { display: inline-flex; gap: .3rem; align-items: center; padding: .8rem .9rem; }
.chat-typing i { width: .4rem; height: .4rem; border-radius: 9999px; background: rgb(var(--sage-400)); animation: chat-dot 1s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .15s; } .chat-typing i:nth-child(3) { animation-delay: .3s; }
.chat-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-chip { border: 1px solid rgb(var(--gold-300)); background: rgb(var(--surface)); color: rgb(var(--sage-700)); border-radius: 9999px; padding: .4rem .8rem; font-size: .78rem; cursor: pointer; transition: background .15s, border-color .15s; }
.chat-chip:hover { background: rgb(var(--blush-50)); border-color: rgb(var(--sage-400)); }
.chat-prods { display: flex; flex-direction: column; gap: .4rem; margin-top: .55rem; white-space: normal; }
.chat-prod { display: flex; justify-content: space-between; align-items: center; gap: .6rem; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid rgb(var(--gold-200)); background: rgb(var(--blush-50) / .7); border-radius: 12px; padding: .5rem .7rem; font-size: .8rem; color: rgb(var(--ink)); transition: border-color .15s; }
.chat-prod:hover { border-color: rgb(var(--sage-400)); }
.chat-prod-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-prod-p { flex: none; font-weight: 700; color: rgb(var(--sage-700)); font-size: .78rem; }

.chat-form { display: flex; gap: .5rem; padding: .6rem .7rem; background: rgb(var(--surface)); border-top: 1px solid rgb(var(--gold-200)); }
.chat-input { flex: 1; min-width: 0; border: 1px solid rgb(var(--stone-200)); border-radius: 9999px; padding: .6rem .95rem; font-size: .9rem; background: rgb(var(--cream)); outline: none; }
.chat-input:focus { border-color: rgb(var(--sage-500)); box-shadow: 0 0 0 3px rgb(var(--sage-200) / .7); background: rgb(var(--surface)); }
.chat-send { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 9999px; background: rgb(var(--sage-500)); color: #fff; cursor: pointer; transition: background .15s; }
.chat-send:hover:not(:disabled) { background: rgb(var(--sage-600)); }
.chat-send:disabled { opacity: .55; cursor: default; }
.chat-note { margin: 0; padding: .1rem .9rem .6rem; background: rgb(var(--surface)); text-align: center; font-size: .68rem; line-height: 1.3; color: rgb(var(--stone-500)); }

@keyframes chat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes chat-dot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-panel, .chat-nudge, .chat-typing i { animation: none; } .chat-fab { transition: none; } }

@media (max-width: 639px) {
  .chat-root { right: .75rem; bottom: .75rem; }
  .chat-panel { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: min(82dvh, 40rem);
    border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .chat-root.is-open .chat-fab { display: none; }
  .chat-input { font-size: 1rem; }                 /* 16px: iOS does not zoom the page */
  .chat-bubble { max-width: 90%; }
}
/* === /BloomBox chat assistant =============================================== */

/* === BloomBox texture products (update_products1) ============================ */
.tb { position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate; }
.tb-bg, .tb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tb.has-bg .tb-img { inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.tb-tint {
  position: absolute; inset: 0;
  background: var(--tb-c, transparent);
  -webkit-mask: var(--tb-m) center / cover no-repeat; mask: var(--tb-m) center / cover no-repeat;
  mix-blend-mode: multiply; pointer-events: none;
  transition: background-color .25s ease;
}
.tb.has-bg .tb-tint { inset: 8%; -webkit-mask-size: contain; mask-size: contain; }
/* === /BloomBox texture products ============================================== */

/* === BloomBox many colors (update_colors1) ================================== */
.swatch-more {
  display: inline-grid; place-items: center; height: 1.5rem; min-width: 1.75rem; padding: 0 .4rem; flex: none;
  border-radius: 9999px; cursor: pointer; font-size: .7rem; font-weight: 700;
  border: 1px solid rgb(var(--sage-300)); background: rgb(var(--sage-50)); color: rgb(var(--sage-700));
  transition: background .15s ease, border-color .15s ease;
}
.swatch-more:hover { background: rgb(var(--sage-100)); border-color: rgb(var(--sage-400)); }
.pm-scroll { max-height: 11rem; overflow-y: auto; padding: .25rem; }
.ap-scroll { max-height: 30rem; overflow-y: auto; padding-right: .25rem; }
/* === /BloomBox many colors =================================================== */

/* === BloomBox backup tab (update_prompt11_storage) =========================== */
.bk-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); }
.bk-stat { border: 1px solid rgb(var(--stone-200)); border-radius: 1rem; background: rgb(var(--surface)); padding: .9rem 1rem; box-shadow: var(--shadow-soft); }
.bk-stat-label { font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: rgb(var(--stone-500)); }
.bk-stat-value { margin-top: .25rem; font-family: var(--font-display, inherit); font-size: 1.4rem; font-weight: 700; color: rgb(var(--sage-700)); }
.bk-stat-sub { margin-top: .1rem; font-size: .75rem; color: rgb(var(--stone-500)); }
.bk-warn { border: 1px solid rgb(var(--gold-400) / .7); border-radius: 1rem; background: rgb(var(--cream)); padding: .8rem 1rem; font-size: .875rem; color: rgb(var(--ink)); }
/* === /BloomBox backup tab ==================================================== */

/* === BloomBox payments (update_prompt12_payments) ============================ */
.pay-opt {
  display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; padding: .75rem .9rem;
  border: 1px solid rgb(var(--stone-200)); border-radius: 1rem; background: rgb(var(--surface));
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.pay-opt:hover { border-color: rgb(var(--stone-400)); }
.pay-opt.is-on { border-color: rgb(var(--sage-500)); background: rgb(var(--sage-50)); box-shadow: 0 0 0 3px rgb(var(--sage-200) / .55); }
.pay-opt input { margin-top: .3rem; accent-color: rgb(var(--sage-600)); flex: none; }
.pay-opt-body { display: grid; gap: .1rem; min-width: 0; }
.pay-opt-body b { font-size: .9rem; font-weight: 600; color: rgb(var(--ink)); }
.pay-opt-body small { font-size: .75rem; color: rgb(var(--stone-500)); }
.pay-badge {
  display: inline-block; padding: .15rem .6rem; border-radius: 9999px; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  background: rgb(var(--gold-100)); color: rgb(var(--gold-700)); border: 1px solid rgb(var(--gold-300));
}
.pay-amount {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .85rem 1rem;
  border: 1px solid rgb(var(--blush-200)); border-radius: 1rem; background: rgb(var(--blush-50)); font-size: .9rem; color: rgb(var(--stone-600));
}
.pay-amount b { font-family: var(--font-display, inherit); font-size: 1.5rem; color: rgb(var(--sage-700)); }
.pay-busy { display: flex; align-items: center; justify-content: center; gap: .7rem; padding: .9rem; font-size: .9rem; font-weight: 600; color: rgb(var(--sage-700)); }
.pay-spin {
  width: 1.2rem; height: 1.2rem; border-radius: 9999px; flex: none;
  border: 3px solid rgb(var(--sage-200)); border-top-color: rgb(var(--sage-600)); animation: pay-rot .8s linear infinite;
}
@keyframes pay-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-spin { animation-duration: 3s; } }
.pay-icon { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 9999px; font-size: 1.9rem; }
.pay-icon.ok { background: rgb(var(--sage-100)); color: rgb(var(--sage-600)); }
.pay-icon.bad { background: rgb(var(--danger-100)); color: rgb(var(--danger-600)); }
.pay-icon.wait { background: rgb(var(--gold-100)); color: rgb(var(--gold-600)); }
.pay-icon.none { background: rgb(var(--stone-100)); color: rgb(var(--stone-500)); }
/* === /BloomBox payments ====================================================== */

/* === BloomBox B2B approval (update_b2b_approval) ============================= */
.ad-badge {
  display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; margin-left: .4rem; padding: 0 .3rem;
  border-radius: 9999px; font-size: .68rem; font-weight: 700; line-height: 1;
  background: rgb(var(--blush-500)); color: #fff;
}
.ad-badge.hidden { display: none; }
/* === /BloomBox B2B approval ================================================== */

/* === BloomBox info pages (update_info_pages) ================================= */
.info-body section { margin-top: 1.25rem; }
.info-body h3 { font-weight: 700; color: rgb(var(--ink)); font-size: 1rem; margin-bottom: .35rem; }
.info-body p + p { margin-top: .5rem; }
.info-seller { border-radius: 1rem; background: rgb(var(--gold-50)); border: 1px solid rgb(var(--gold-200)); padding: 1rem 1.1rem; }
.info-seller dl { display: grid; gap: .35rem; margin-top: .5rem; }
.info-seller dl > div { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.info-seller dt { min-width: 9rem; color: rgb(var(--stone-500)); }
.info-seller dd { font-weight: 600; color: rgb(var(--ink)); overflow-wrap: anywhere; }
.info-body > .info-seller:not(:first-child) { margin-top: 1.5rem; }
.info-others { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid rgb(var(--stone-200)); font-size: .8rem; }
/* === /BloomBox info pages ==================================================== */

/* === BloomBox admin help (update_admin_help) ================================= */
.help-item { border: 1px solid rgb(var(--stone-200)); border-radius: 1rem; background: rgb(var(--surface)); }
.help-item > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; font-weight: 700; }
.help-item > summary::-webkit-details-marker { display: none; }
.help-item > summary::after { content: "+"; margin-left: auto; font-size: 1.25rem; color: rgb(var(--stone-400)); }
.help-item[open] > summary::after { content: "\2212"; }
.help-no { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 9999px; background: rgb(var(--sage-100)); color: rgb(var(--sage-700)); font-size: .8rem; }
.help-body { padding: 0 1.1rem 1.1rem 3.5rem; font-size: .875rem; line-height: 1.65; color: rgb(var(--stone-700)); }
.help-body p + p, .help-body ul + p, .help-body p + ul { margin-top: .6rem; }
.help-list { list-style: disc; padding-left: 1.1rem; }
.help-list li + li { margin-top: .3rem; }
/* === /BloomBox admin help ==================================================== */
