/* سُكّرة — Sukkara landing page
   Layout: berry hero with Karamel the cupcake waiter on a gold cake stand, icing drips into a
   pink-sugar vitrine of price-tagged sweets; the chatbot panel is the star of the page.
   Single deliberate look (brand page), not theme-switched. */
:root {
  --berry: #4E0E30;
  --berry-2: #6B1844;
  --berry-3: #8A2A5C;
  --sugar: #FFF5F8;
  --sugar-2: #FCE6EE;
  --rose: #F59AB8;
  --rose-deep: #D96A92;
  --rose-light: #FFD3E1;
  --pistachio: #A8CB6E;
  --pistachio-ink: #2F4F12;
  --saffron: #F5B841;
  --saffron-deep: #C98A1E;
  --saffron-light: #FFD97A;
  --ink: #2C0919;
  --ink-2: #6E3E57;
  --line: #F1C9D7;
  --white: #FFFFFF;
  --wa: #168B4A;
  --error: #B3261E;

  --font-display: "Lalezar", "Readex Pro", "Segoe UI", Tahoma, "Geeza Pro", sans-serif;
  --font-body: "Readex Pro", "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", sans-serif;

  --fs-xs: .8125rem;
  --fs-s: .9375rem;
  --fs-m: 1.0625rem;
  --fs-l: 1.375rem;
  --fs-xl: clamp(1.75rem, 4.4vw, 2.6rem);
  --fs-2xl: clamp(2.1rem, 5.4vw, 3.2rem);
  --fs-brand: clamp(5.2rem, 21vw, 10.5rem);

  --gutter: clamp(16px, 4vw, 32px);
  --radius: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sugar);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-m);
  line-height: 1.75;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

.preview-bar {
  background: var(--saffron-light);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: center;
  padding: 8px var(--gutter);
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px;
  border: 0; border-radius: 999px;
  font-family: var(--font-body); font-size: var(--fs-m); font-weight: 600; line-height: 1.2;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(3px); }
.btn-ico { width: 22px; height: 22px; flex: none; }
.btn-saffron { background: var(--saffron); color: var(--berry); box-shadow: 0 6px 0 var(--saffron-deep); }
.btn-saffron:active { box-shadow: 0 3px 0 var(--saffron-deep); }
.btn-berry { background: var(--berry); color: var(--sugar); box-shadow: 0 6px 0 var(--ink); }
.btn-berry:active { box-shadow: 0 3px 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--sugar); box-shadow: inset 0 0 0 2px rgba(255, 211, 225, .45); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--rose-light); }
.btn-sugar { background: var(--rose-light); color: var(--berry); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: var(--fs-s); }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60;
  background: var(--berry); color: var(--sugar);
  box-shadow: 0 1px 0 rgba(255, 211, 225, .08);
}
.topbar-in { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-face { width: 40px; height: 40px; }
.logo-word { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--rose-light); padding-top: 6px; }
.nav { display: none; gap: 26px; margin-inline-start: auto; font-size: var(--fs-s); }
.nav a { text-decoration: none; opacity: .85; }
.nav a:hover { opacity: 1; color: var(--rose-light); }
.topbar .btn { margin-inline-start: auto; }
@media (min-width: 780px) {
  .nav { display: flex; }
  .topbar .btn { margin-inline-start: 0; }
}

/* ---------------- hero ---------------- */
.hero {
  position: relative; z-index: 2;
  background-color: var(--berry);
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22160%22 height=%22160%22 viewBox=%220 0 160 160%22%3E%3Crect x=%2267.6%22 y=%2286.8%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23F59AB8%22 transform=%22rotate%28166 73.1 88.6%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%2269.6%22 y=%2279.3%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23F5B841%22 transform=%22rotate%28105 75.1 81.1%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%2229.1%22 y=%2279.9%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23A8CB6E%22 transform=%22rotate%28113 34.6 81.7%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%22116.7%22 y=%2219.8%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23FFFFFF%22 transform=%22rotate%2854 122.2 21.6%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%2215.6%22 y=%22122.8%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23F59AB8%22 transform=%22rotate%28124 21.1 124.6%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%228.5%22 y=%22147.6%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23F5B841%22 transform=%22rotate%28173 14 149.4%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%2296.7%22 y=%2294.8%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23A8CB6E%22 transform=%22rotate%2828 102.2 96.6%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%224.7%22 y=%2282.3%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23FFFFFF%22 transform=%22rotate%2810 10.2 84.1%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%2229.9%22 y=%2241%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23F59AB8%22 transform=%22rotate%285 35.4 42.8%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%2269.3%22 y=%2269.6%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23F5B841%22 transform=%22rotate%28151 74.8 71.4%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%2277.3%22 y=%2298.4%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23A8CB6E%22 transform=%22rotate%2889 82.8 100.2%29%22 fill-opacity=%22.13%22/%3E%3Crect x=%2297.9%22 y=%2272.1%22 width=%2211%22 height=%223.6%22 rx=%221.8%22 fill=%22%23FFFFFF%22 transform=%22rotate%2850 103.4 73.9%29%22 fill-opacity=%22.13%22/%3E%3C/svg%3E");
  color: var(--sugar);
  padding-block: 28px 8px;
  container: hero / inline-size;
}
.hero-in { display: grid; gap: 8px; align-items: center; }
.hero-copy { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.offer-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(245, 184, 65, .12);
  border: 1.5px solid rgba(245, 184, 65, .7);
  color: var(--saffron-light);
  font-size: var(--fs-s); font-weight: 600; line-height: 1.4; text-align: start;
}
.offer-pill:hover { background: rgba(245, 184, 65, .2); }
.offer-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 0 rgba(245, 184, 65, .7); animation: ping 2.2s ease-out infinite; flex: none; }

.hero-title { display: grid; gap: 4px; }
.brand-mark {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-brand);
  font-size: clamp(5.2rem, 22cqi, 10.5rem);
  line-height: 1.02;
  color: var(--rose-light);
  text-shadow:
    0 2px 0 var(--rose),
    0 4px 0 #EC88AC,
    0 6px 0 var(--rose-deep),
    0 8px 0 #BF5580,
    0 10px 0 #9E3F68,
    0 22px 30px rgba(20, 0, 10, .5);
  padding-top: .12em;
}
.hero-line {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.25;
  color: var(--white);
  margin-top: 6px;
}
.hero-sub { max-width: 34em; color: rgba(255, 240, 246, .84); font-size: var(--fs-m); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

.hero-art { position: relative; width: 100%; max-width: 500px; margin-inline: auto; margin-top: 22px; min-width: 0; }
.hero-scene { display: block; width: 100%; height: auto; overflow: visible; }
.halo { fill: var(--berry-2); }
.halo-dots { fill: none; stroke: var(--rose); stroke-opacity: .55; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 0 23; }
.mascot-wrap { transform-box: fill-box; transform-origin: 50% 100%; animation: pop-up .8s cubic-bezier(.2, 1.35, .4, 1) .15s both; }
.floater { transform-box: fill-box; transform-origin: center; }
.f1 { animation: float-in .6s ease-out .55s both, bob 6s ease-in-out 1.2s infinite; }
.f2 { animation: float-in .6s ease-out .7s both, bob 7s ease-in-out 1.6s infinite reverse; }
.m-eye { transform-box: fill-box; transform-origin: center; animation: blink 5.5s 2.4s infinite; }

.hero-bubble {
  position: absolute; top: -3%; right: 0;
  display: grid; gap: 2px; text-align: start;
  max-width: 220px; padding: 12px 16px 12px 18px;
  background: var(--white); color: var(--ink);
  border: 0; border-radius: 22px 22px 22px 6px;
  font-size: var(--fs-s); line-height: 1.5;
  box-shadow: 0 16px 30px -12px rgba(20, 0, 10, .55);
  animation: pop-in .45s cubic-bezier(.2, 1.4, .4, 1) 1.1s both;
}
.hero-bubble strong { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--berry); line-height: 1.2; }
.hero-bubble::after {
  content: ""; position: absolute; bottom: -10px; left: 18px;
  border: 10px solid transparent; border-top-color: var(--white); border-bottom: 0; border-left: 0;
}

.drip { position: absolute; left: 0; right: 0; top: 100%; width: 100%; height: 70px; fill: var(--berry); pointer-events: none; margin-top: -1px; }

@media (min-width: 900px) { .hero { padding-block: 40px 0; } }
@container hero (min-width: 860px) {
  .hero-in { grid-template-columns: 1.05fr 1fr; gap: 24px; }
  .brand-mark { font-size: clamp(5.2rem, 13cqi, 10.5rem); }
  .hero-bubble { top: 4%; right: -2%; }
}

/* ---------------- section heads ---------------- */
.sec-head { display: grid; gap: 6px; margin-bottom: 34px; }
.sec-head h2 { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.2; color: var(--berry); }
.sec-head p { color: var(--ink-2); font-size: var(--fs-s); }

/* ---------------- vitrine (menu) ---------------- */
.vitrine { padding-block: 112px 76px; }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 18px; }
@media (min-width: 760px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px 28px; } }

.item { display: grid; justify-items: center; text-align: center; gap: 6px; min-width: 0; }
.plate {
  position: relative; width: 100%; max-width: 250px; aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sugar-2);
  box-shadow: inset 0 0 0 9px var(--white), 0 20px 26px -18px rgba(78, 14, 48, .45);
  margin-bottom: 6px;
}
.item-art { width: 88%; height: auto; transition: transform .3s cubic-bezier(.2, 1.4, .4, 1); }
.item-art.is-photo { width: 84%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.item:hover .item-art { transform: scale(1.05) rotate(-3deg); }
.price-tag {
  position: absolute; bottom: 4%; left: -2%;
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 8px 14px 4px 22px;
  background: var(--saffron); color: var(--berry);
  font-family: var(--font-display); font-size: 1.55rem; line-height: 1;
  font-variant-numeric: tabular-nums;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  transform: rotate(-8deg);
  filter: drop-shadow(0 6px 6px rgba(78, 14, 48, .25));
}
.price-tag::before { content: ""; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--sugar); }
.price-tag small { font-family: var(--font-body); font-size: .72rem; font-weight: 600; }
.item-badge {
  position: absolute; top: 5%; right: 2%;
  padding: 3px 12px; border-radius: 999px;
  background: var(--pistachio); color: var(--pistachio-ink);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.6;
}
.item h3 { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.3; color: var(--berry); }
.item p { color: var(--ink-2); font-size: var(--fs-s); line-height: 1.6; max-width: 22em; }
.item .unit { font-size: var(--fs-xs); color: var(--berry-3); font-weight: 600; }
.item-order {
  margin-top: 6px; min-height: 40px; padding: 6px 20px;
  border: 2px solid var(--berry); border-radius: 999px; background: transparent; color: var(--berry);
  font-size: var(--fs-s); font-weight: 600;
}
.item-order:hover { background: var(--berry); color: var(--sugar); }

/* ---------------- steps ---------------- */
.steps { background: var(--sugar-2); padding-block: 72px; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: none; }
.steps-list li {
  position: relative; display: grid; gap: 6px; align-content: start;
  padding: 24px 22px 26px; border-radius: var(--radius);
  background: var(--white);
}
.step-n {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  background: var(--berry); color: var(--rose-light);
  font-family: var(--font-display); font-size: 1.7rem; line-height: 1; padding-top: 4px;
  margin-bottom: 6px;
}
.steps-list h3 { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.3; color: var(--berry); }
.steps-list p { color: var(--ink-2); font-size: var(--fs-s); }
@media (min-width: 780px) { .steps-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }

/* ---------------- story ---------------- */
.story { padding-block: 84px; }
.story-in { display: grid; gap: 30px; align-items: center; }
.story-art {
  width: min(400px, 100%); aspect-ratio: 1; margin-inline: auto;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--berry);
  box-shadow: inset 0 0 0 14px var(--berry-2);
}
.story-art svg { width: 86%; height: auto; transform: rotate(-6deg); }
.story-copy { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.story-copy h2 { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.2; color: var(--berry); }
.story-copy p { font-size: 1.125rem; line-height: 1.95; max-width: 32em; color: var(--ink); }
@media (min-width: 860px) { .story-in { grid-template-columns: 1fr 1.1fr; gap: 56px; } }

/* ---------------- occasions band ---------------- */
.occasions { position: relative; z-index: 1; background: var(--rose); color: var(--ink); padding-block: 64px 56px; }
.drip-band { fill: var(--rose); height: 60px; }
.occ-in { display: grid; gap: 22px; align-items: center; }
.occ-copy { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.occ-copy h2 { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.15; color: var(--berry); }
.occ-copy p { font-size: 1.0625rem; max-width: 30em; }
.occ-art { width: min(300px, 80%); margin-inline: auto; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--rose-light); }
.occ-art svg { width: 92%; height: auto; transform: rotate(4deg); }
@media (min-width: 780px) { .occ-in { grid-template-columns: 1.3fr 1fr; } }

/* ---------------- branches ---------------- */
.branches { padding-block: 110px 84px; }
.branch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 780px) { .branch-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
.branch {
  display: grid; gap: 10px; padding: 22px 22px 20px;
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line), 0 20px 30px -26px rgba(78, 14, 48, .5);
  min-width: 0;
}
.branch-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.branch h3 { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.25; color: var(--berry); }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 12px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.7;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.is-open { background: #E6F2D2; color: var(--pistachio-ink); }
.status.is-closed { background: var(--sugar-2); color: var(--berry-3); }
.branch-meta { display: grid; gap: 4px; color: var(--ink-2); font-size: var(--fs-s); }
.branch-meta span { display: flex; gap: 8px; align-items: flex-start; }
.branch-meta svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--rose-deep); }
.branch .btn { justify-self: start; }

/* ---------------- footer ---------------- */
.footer { background: var(--berry); color: var(--sugar); padding-block: 56px calc(110px + var(--safe-b)); }
.footer-in { display: grid; gap: 22px; }
.footer-brand { display: grid; gap: 8px; }
.footer .logo-word { font-size: 3rem; }
.footer-brand p { opacity: .8; font-size: var(--fs-s); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  text-decoration: none; font-size: var(--fs-s); font-weight: 500;
  box-shadow: inset 0 0 0 1.5px rgba(255, 211, 225, .35);
}
.footer-links a:hover { box-shadow: inset 0 0 0 1.5px var(--rose-light); color: var(--rose-light); }
.privacy summary { cursor: pointer; font-size: var(--fs-s); font-weight: 600; color: var(--rose-light); width: fit-content; }
.privacy p { margin-top: 10px; max-width: 46em; font-size: var(--fs-s); opacity: .85; line-height: 1.9; }
.copy { font-size: var(--fs-xs); opacity: .6; }

/* =====================================================================
   Karamel chat
   ===================================================================== */
.chat-fab {
  position: fixed; z-index: 900;
  bottom: calc(18px + var(--safe-b)); left: 18px;
  display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 10px;
  padding: 5px; border: 0; border-radius: 999px;
  background: var(--berry); color: var(--sugar);
  box-shadow: 0 0 0 3px var(--rose-light), 0 16px 30px -10px rgba(44, 9, 25, .65);
  animation: pop-in .5s cubic-bezier(.2, 1.4, .4, 1) .9s both;
  transition: transform .2s ease, opacity .2s ease, visibility 0s;
}
.chat-fab:hover { transform: translateY(-2px); }
.fab-face { width: 58px; height: 58px; border-radius: 50%; background: var(--sugar); overflow: hidden; display: grid; place-items: center; flex: none; }
.fab-face svg { width: 100%; height: 100%; }
.fab-label { display: none; font-family: var(--font-display); font-size: 1.25rem; line-height: 1; padding: 6px 4px 0 16px; }
.fab-badge {
  position: absolute; top: -6px; left: -6px; min-width: 24px; height: 24px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--saffron); color: var(--berry); font-size: .8rem; font-weight: 700;
  box-shadow: 0 0 0 2px var(--berry);
}
body.chat-is-open .chat-fab { opacity: 0; visibility: hidden; transform: scale(.8); transition: transform .2s ease, opacity .2s ease, visibility 0s .2s; }
@media (min-width: 560px) { .fab-label { display: inline; } }

.chat-nudge {
  position: fixed; z-index: 901;
  bottom: calc(92px + var(--safe-b)); left: 18px;
  display: flex; align-items: flex-start; gap: 4px;
  max-width: min(290px, calc(100vw - 36px));
  padding: 12px 8px 12px 14px;
  background: var(--white); color: var(--ink);
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 18px 36px -14px rgba(44, 9, 25, .5), 0 0 0 1px rgba(78, 14, 48, .06);
  animation: pop-in .45s cubic-bezier(.2, 1.4, .4, 1) both;
  transform-origin: bottom left;
}
.nudge-body { border: 0; background: none; padding: 0; text-align: start; font-size: var(--fs-s); line-height: 1.55; color: var(--ink); }
.nudge-body strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--berry); }
.nudge-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--sugar-2); color: var(--berry); display: grid; place-items: center; padding: 0; }
.nudge-x svg { width: 14px; height: 14px; }

.chat {
  position: fixed; z-index: 1000;
  bottom: calc(18px + var(--safe-b) + var(--kb, 0px)); left: 18px;
  width: min(408px, calc(100vw - 36px));
  height: min(680px, calc(var(--vvh, 100dvh) - 36px));
  display: flex; flex-direction: column;
  background: var(--sugar);
  border-radius: 28px;
  box-shadow: 0 40px 80px -24px rgba(44, 9, 25, .6), 0 0 0 1px rgba(78, 14, 48, .1);
  overflow: hidden;
  transform-origin: bottom left;
  opacity: 0; visibility: hidden;
  transform: translateY(18px) scale(.94);
  transition: opacity .2s ease, transform .34s cubic-bezier(.2, 1.25, .4, 1), visibility 0s linear .34s;
}
.chat.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (min-width: 1024px) {
  body { transition: padding-left .36s cubic-bezier(.2, 1, .3, 1); }
  body.chat-is-open { padding-left: 436px; }
  .chat { top: 18px; height: auto; width: 400px; transform: translateX(-24px); }
}
@media (max-width: 559px) {
  .chat {
    left: 0; right: 0; bottom: var(--kb, 0px); width: 100%;
    height: min(88dvh, calc(var(--vvh, 100dvh) - 10px));
    border-radius: 26px 26px 0 0;
    transform: translateY(104%);
    transition: opacity .2s ease, transform .38s cubic-bezier(.2, 1, .3, 1), visibility 0s linear .38s;
    padding-bottom: var(--safe-b);
  }
  .chat.is-open { transform: none; }
}

.chat-head {
  position: relative; z-index: 2; flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px;
  background: var(--berry); color: var(--sugar);
}
.chat-head::before {
  content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px;
  border-radius: 4px; background: rgba(255, 211, 225, .35); display: none;
}
@media (max-width: 559px) { .chat-head { padding-top: 20px; } .chat-head::before { display: block; } }
.chat-avatar {
  width: 52px; height: 52px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--sugar); box-shadow: 0 0 0 3px var(--rose);
}
.chat-avatar svg { width: 100%; height: 100%; }
.chat-id { min-width: 0; display: grid; gap: 2px; }
#chatTitle { font-family: var(--font-display); font-size: 1.65rem; line-height: 1.05; color: var(--rose-light); padding-top: 4px; }
.chat-status { display: flex; align-items: center; gap: 7px; font-size: var(--fs-xs); color: rgba(255, 240, 246, .85); line-height: 1.4; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pistachio); box-shadow: 0 0 0 0 rgba(168, 203, 110, .7); animation: ping 2s ease-out infinite; flex: none; }
.chat-close {
  margin-inline-start: auto; flex: none;
  width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: var(--sugar);
}
.chat-close:hover { background: rgba(255, 255, 255, .22); }
.chat-close svg { width: 18px; height: 18px; }
.chat-drip { position: absolute; left: 0; right: 0; top: 100%; width: 100%; height: 30px; fill: var(--berry); margin-top: -1px; pointer-events: none; }

.chat-log {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px;
  padding: 34px 14px 12px;
  scroll-behavior: smooth;
}
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 90%; min-width: 0; animation: msg-in .24s ease-out both; }
.msg.bot { align-self: flex-start; }
.msg.user { align-self: flex-end; }
.msg.wide { max-width: 100%; align-self: stretch; }
.msg-avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; background: var(--white); box-shadow: 0 0 0 2px var(--rose-light); }
.msg-avatar svg { width: 100%; height: 100%; }
.msg.bot + .msg.bot .msg-avatar { visibility: hidden; }
.bubble {
  min-width: 0; padding: 10px 15px; border-radius: 20px;
  font-size: .98rem; line-height: 1.7; overflow-wrap: anywhere;
}
.bot .bubble { background: var(--white); color: var(--ink); border-bottom-right-radius: 6px; box-shadow: 0 1px 0 var(--line); }
.user .bubble { background: var(--berry); color: var(--sugar); border-bottom-left-radius: 6px; }
.bubble strong { font-weight: 700; color: var(--berry); }
.user .bubble strong { color: var(--rose-light); }
.bubble-body { flex: 1; min-width: 0; display: grid; gap: 8px; }

.typing .bubble { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--rose-deep); animation: dot 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

/* rich blocks */
.carousel {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 10px; scrollbar-width: thin;
}
.pcard {
  flex: 0 0 142px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 10px 10px 12px; border-radius: 20px;
  background: var(--white); box-shadow: 0 1px 0 var(--line);
}
.pcard .pc-art { width: 100px; height: 100px; }
.pcard .mini-btn { margin-top: auto; }
.pcard img.pc-art { object-fit: cover; border-radius: 50%; }
.pcard b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; line-height: 1.3; color: var(--berry); }
.pcard .pc-meta { font-size: var(--fs-xs); color: var(--ink-2); }
.pc-price { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; color: var(--berry); font-variant-numeric: tabular-nums; }
.pc-price small { font-family: var(--font-body); font-size: .7rem; font-weight: 600; }
.mini-btn {
  min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px;
  background: var(--berry); color: var(--sugar); font-size: .85rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.mini-btn:hover { background: var(--berry-2); }
.mini-btn.alt { background: var(--saffron); color: var(--berry); }
.mini-btn.wa { background: var(--wa); color: var(--white); }
.mini-btn svg { width: 16px; height: 16px; }

.card {
  display: grid; gap: 10px; padding: 14px; border-radius: 20px;
  background: var(--white); box-shadow: 0 1px 0 var(--line); font-size: .95rem; line-height: 1.65;
}
.card-title { font-weight: 700; color: var(--berry); }
.app-row { display: flex; flex-wrap: wrap; gap: 8px; }
.app-btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 7px 14px; border-radius: 14px;
  background: var(--sugar); border: 2px solid var(--rose); color: var(--berry);
  font-weight: 700; font-size: .95rem; text-decoration: none;
}
a.app-btn:hover { background: var(--rose-light); }
.app-btn svg { width: 18px; height: 18px; color: var(--rose-deep); }
.app-btn.is-static { border-style: dashed; }
.card-note { font-size: .82rem; color: var(--ink-2); }

.coupon {
  display: grid; gap: 8px; padding: 14px; border-radius: 20px;
  background: #FFF6DE; border: 2px dashed var(--saffron-deep);
}
.coupon-head { font-weight: 700; color: var(--berry); }
.coupon-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.coupon-code {
  direction: ltr; font-family: var(--font-body); font-weight: 700; font-size: 1.35rem; letter-spacing: .08em;
  color: var(--berry); user-select: all;
}
.coupon small { font-size: .78rem; color: var(--ink-2); }

.b-rows { display: grid; gap: 10px; }
.b-row { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.b-row:last-child { border-bottom: 0; padding-bottom: 0; }
.b-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.b-row b { color: var(--berry); }
.b-row .status { font-size: .72rem; }
.b-row span { font-size: .85rem; color: var(--ink-2); }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* chips + composer */
.chat-chips {
  flex: none; display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 12px 4px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to left, #000 88%, transparent);
  mask-image: linear-gradient(to left, #000 88%, transparent);
}
.chat-chips::-webkit-scrollbar { display: none; }
.chat-chips:empty { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 6px 14px; border-radius: 999px;
  background: var(--white); border: 1.5px solid #EDB4C8; color: var(--berry);
  font-size: .88rem; font-weight: 600; white-space: nowrap; line-height: 1.3;
}
.chip:hover { background: var(--rose-light); }
.chip.primary { background: var(--saffron); border-color: var(--saffron-deep); }

.chat-form { flex: none; display: flex; gap: 8px; padding: 8px 12px 4px; position: relative; }
#chatInput {
  flex: 1; min-width: 0; height: 50px; padding: 0 18px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; text-align: right;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#chatInput::placeholder { color: #A9879A; }
#chatInput:focus { outline: none; border-color: var(--berry-3); box-shadow: 0 0 0 4px rgba(138, 42, 92, .14); }
#chatInput.is-invalid { border-color: var(--error); }
.chat-send {
  flex: none; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--berry); color: var(--sugar);
}
.chat-send:hover { background: var(--berry-2); }
.chat-send svg { width: 22px; height: 22px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.chat-hint { flex: none; min-height: 1.6em; padding: 2px 20px 12px; font-size: .78rem; line-height: 1.5; color: var(--ink-2); }
.chat-hint.is-error { color: var(--error); font-weight: 600; }
.chat-hint a { color: var(--berry-3); font-weight: 600; }

/* ---------------- motion ---------------- */
@keyframes pop-up { from { opacity: 0; transform: translateY(40px) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes float-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.offer-dot { color: rgba(245, 184, 65, .7); }
.live-dot { color: rgba(168, 203, 110, .7); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
