/* سَمَر — SAMAR fine-dining landing page
   Layout: a candlelit oud-wood table seen from above, a brass Kufi logotype, and a Sadu weaving band
   as the one ornament; the menu reads like a printed card with leader dots. Nadeem's chat is the star.
   Single deliberate dark look (brand page), not theme-switched. */
:root {
  --oud: #1F1713;
  --oud-2: #2A201A;
  --oud-3: #382B23;
  --line: rgba(201, 162, 102, .26);
  --line-strong: rgba(201, 162, 102, .55);
  --linen: #F1E8D8;
  --linen-2: #E4D7C0;
  --brass: #C9A266;
  --brass-hi: #E9CB8E;
  --brass-lo: #8F6A35;
  --sadu: #8C2B22;
  --cardamom: #8FAA7F;
  --ink: #2A1F19;
  --ink-2: #6A5848;
  --mist: #BDAE9A;
  --wa: #1E7A48;
  --error: #F08A7A;

  --font-display: "Reem Kufi", "Noto Kufi Arabic", "Geeza Pro", Tahoma, sans-serif;
  --font-body: "Markazi Text", "Noto Naskh Arabic", "Geeza Pro", "Times New Roman", serif;

  --fs-xs: .875rem;
  --fs-s: 1rem;
  --fs-m: 1.1875rem;
  --fs-l: 1.5rem;
  --fs-xl: clamp(1.6rem, 4vw, 2.3rem);
  --fs-2xl: clamp(2rem, 5vw, 3rem);

  --gutter: clamp(18px, 4.5vw, 40px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--oud);
  color: var(--linen);
  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: 2px solid var(--brass-hi); outline-offset: 3px; }

.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: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

.preview-bar { background: var(--brass-hi); color: var(--ink); font-family: var(--font-body); font-size: var(--fs-s); font-weight: 600; text-align: center; padding: 8px var(--gutter); line-height: 1.5; }

.sadu { height: 22px; background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2232%22 height=%2222%22 viewBox=%220 0 32 22%22%3E%3Crect width=%2232%22 height=%2222%22 fill=%22%231F1713%22/%3E%3Crect width=%2232%22 height=%222%22 fill=%22%23C9A266%22/%3E%3Crect y=%222%22 width=%2232%22 height=%222.4%22 fill=%22%238C2B22%22/%3E%3Cpath d=%22M0 18 L8 6 L16 18Z M16 18 L24 6 L32 18Z%22 fill=%22%23F1E8D8%22/%3E%3Cpath d=%22M16 7 L19 10.5 L16 14 L13 10.5Z M0 7 L3 10.5 L0 14Z M32 7 L29 10.5 L32 14Z%22 fill=%22%238C2B22%22/%3E%3Cpath d=%22M8 12 L10 15 L8 18 L6 15Z M24 12 L26 15 L24 18 L22 15Z%22 fill=%22%231F1713%22/%3E%3Crect y=%2218%22 width=%2232%22 height=%222%22 fill=%22%238C2B22%22/%3E%3Crect y=%2220%22 width=%2232%22 height=%222%22 fill=%22%23C9A266%22/%3E%3C/svg%3E"); background-size: auto 100%; background-repeat: repeat-x; }
.sadu-thin { height: 14px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 28px;
  border: 0; border-radius: 2px;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; line-height: 1.2;
  text-decoration: none; letter-spacing: .01em;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-brass { background: linear-gradient(135deg, #B88E52, var(--brass-hi) 45%, #B88E52 70%, #D9B97F); color: var(--ink); box-shadow: 0 10px 24px -14px rgba(233, 203, 142, .7); }
.btn-brass:hover { box-shadow: 0 0 0 1px var(--brass-hi), 0 12px 28px -12px rgba(233, 203, 142, .8); }
.btn-line { background: transparent; color: var(--brass-hi); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--brass-hi); background: rgba(201, 162, 102, .08); }
.btn-ink { background: var(--ink); color: var(--brass-hi); }
.btn-ink:hover { background: #3A2C23; }
.btn-sm { min-height: 40px; padding: 6px 18px; font-size: .95rem; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60;
  background: rgba(31, 23, 19, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-emblem { width: 38px; height: 38px; }
.logo-type { width: 64px; height: auto; margin-top: 4px; }
.nav { display: none; gap: 30px; margin-inline-start: auto; font-family: var(--font-display); font-size: .95rem; }
.nav a { text-decoration: none; color: var(--mist); transition: color .2s ease; }
.nav a:hover { color: var(--brass-hi); }
.topbar .btn { margin-inline-start: auto; }
@media (min-width: 820px) { .nav { display: flex; } .topbar .btn { margin-inline-start: 0; } }

/* ---------------- hero ---------------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 30% 20%, #2C211B 0%, var(--oud) 60%, #150F0C 100%);
  padding-block: 40px 28px;
  container: hero / inline-size;
}
.wood { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 70% at 50% 40%, transparent 40%, rgba(10, 6, 4, .55) 100%);
}
.hero-in { display: grid; gap: 10px; align-items: center; }
.hero-copy { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.kicker { font-family: var(--font-display); font-size: .95rem; color: var(--brass); letter-spacing: .02em; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--brass); }
.hero-title { display: grid; gap: 14px; }
.hero-logotype { width: min(360px, 78vw); height: auto; display: block; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45)); }
.hero-line { display: block; font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.35; color: var(--linen); }
.hero-sub { max-width: 30em; color: var(--mist); font-size: 1.25rem; line-height: 1.8; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.gift-line {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; border: 0; background: none;
  color: var(--brass-hi); font-family: var(--font-body); font-size: 1.1rem; text-align: start;
  border-bottom: 1px solid var(--line-strong);
}
.gift-line svg { width: 22px; height: 22px; flex: none; }
.gift-line:hover { border-color: var(--brass-hi); }
.hero-art { width: 100%; max-width: 560px; margin-inline: auto; min-width: 0; }
.table-scene { display: block; width: 100%; height: auto; overflow: visible; }
.t-glow { animation: candle 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.t-flame { animation: flame 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@container hero (min-width: 860px) {
  .hero-in { grid-template-columns: 1fr 1.05fr; gap: 30px; }
  .hero-logotype { width: min(440px, 44cqi); }
}
@media (min-width: 900px) { .hero { padding-block: 64px 44px; } }

/* intro sequence */
.hero-logotype { animation: rise 1s cubic-bezier(.2, .8, .2, 1) .1s both; }
.hero-line { animation: rise .9s cubic-bezier(.2, .8, .2, 1) .3s both; }
.hero-sub, .hero-cta, .gift-line, .kicker { animation: fade .9s ease .55s both; }
.table-scene { animation: settle 1.4s cubic-bezier(.2, .8, .2, 1) .15s both; }

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

/* ---------------- dishes ---------------- */
.menu { padding-block: 84px 72px; }
.dishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.dish { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; }
.dish-art { width: 112px; height: 112px; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.dish-art.is-photo { object-fit: cover; border-radius: 50%; }
.dish:hover .dish-art { transform: rotate(-8deg); }
.dish-body { display: grid; gap: 4px; min-width: 0; }
.dish-row { display: flex; align-items: baseline; gap: 10px; }
.dish-row h3 { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.35; color: var(--linen); flex: 0 1 auto; min-width: 0; }
.dish-lead { flex: 1 1 24px; min-width: 24px; border-bottom: 1px dotted var(--line-strong); transform: translateY(-5px); }
.dish-price { flex: none; font-family: var(--font-display); font-size: 1.2rem; color: var(--brass-hi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dish-price small { font-family: var(--font-body); font-size: .85rem; color: var(--brass); }
.dish p { color: var(--mist); font-size: 1.05rem; line-height: 1.6; }
.dish-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.dish-badge { font-family: var(--font-display); font-size: .78rem; color: var(--oud); background: var(--brass); padding: 1px 10px; line-height: 1.8; }
.dish-order { border: 0; background: none; padding: 0; color: var(--brass); font-family: var(--font-body); font-size: 1rem; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.dish-order:hover { color: var(--brass-hi); text-decoration-color: var(--brass-hi); }
@media (max-width: 559px) {
  .dish { grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: start; }
  .dish-art { width: 92px; height: 92px; }
  .dish-row { flex-direction: column; align-items: flex-start; gap: 0; }
  .dish-lead { display: none; }
}
@media (min-width: 760px) {
  .dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 56px; }
}
@media (min-width: 1100px) {
  .dishes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 48px; }
  .dish { grid-template-columns: 1fr; justify-items: center; align-items: start; align-content: start; text-align: center; gap: 14px; }
  .dish-art { width: 220px; height: 220px; }
  .dish-body { width: 100%; }
  .dish-meta { justify-content: center; }
}

/* ---------------- tasting menu card ---------------- */
.tasting { padding-block: 40px 96px; }
.menu-card {
  position: relative; max-width: 620px; margin-inline: auto;
  display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 44px clamp(22px, 6vw, 56px) 40px;
  background: var(--linen); color: var(--ink);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .8);
  outline: 1px solid var(--brass); outline-offset: -12px;
}
.menu-card::before { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(143, 106, 53, .35); pointer-events: none; }
.mc-emblem { width: 52px; height: 52px; }
.menu-card h2 { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.2; color: var(--ink); }
.mc-sub { color: var(--ink-2); font-size: 1.15rem; }
.courses { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 18px; width: 100%; counter-reset: course; }
.courses li { display: grid; gap: 2px; counter-increment: course; }
.courses li::before {
  content: counter(course, arabic-indic); justify-self: center;
  font-family: var(--font-display); font-size: .9rem; color: var(--brass-lo);
  width: 30px; height: 30px; line-height: 30px; border: 1px solid rgba(143, 106, 53, .45); border-radius: 50%; margin-bottom: 4px;
}
.courses b { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; color: var(--ink); }
.courses span { color: var(--ink-2); font-size: 1.1rem; line-height: 1.55; }
.mc-price { font-family: var(--font-display); font-size: 1.8rem; color: var(--ink); margin-top: 8px; font-variant-numeric: tabular-nums; }
.mc-price small { font-family: var(--font-body); font-size: 1rem; color: var(--ink-2); }
.menu-card .btn { margin-top: 10px; }

/* ---------------- place ---------------- */
.place { padding-block: 84px; border-top: 1px solid var(--line); }
.place-in { display: grid; gap: 36px; }
.place-copy { display: grid; gap: 16px; min-width: 0; }
.place-copy h2 { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--linen); }
.place-lede { font-size: 1.45rem; line-height: 1.85; color: var(--linen); max-width: 28em; }
.details { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); min-width: 0; }
.details div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.details dt { font-family: var(--font-display); color: var(--brass); font-size: 1rem; padding-top: 3px; }
.details dd { margin: 0; color: var(--mist); font-size: 1.15rem; line-height: 1.6; }
@media (min-width: 900px) { .place-in { grid-template-columns: 1.1fr 1fr; gap: 72px; align-items: start; } }

/* ---------------- private room ---------------- */
.private { padding-block: 72px; background: var(--oud-2); }
.private-in { display: grid; gap: 28px; align-items: center; }
.private-art { width: min(320px, 80%); margin-inline: auto; }
.private-art svg { width: 100%; height: auto; display: block; }
.private-copy { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.private-copy h2 { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--linen); }
.private-copy p { color: var(--mist); font-size: 1.25rem; max-width: 30em; }
@media (min-width: 820px) { .private-in { grid-template-columns: 1fr 1.3fr; gap: 56px; } }

/* ---------------- visit ---------------- */
.visit { padding-block: 84px 90px; }
.branch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 820px) { .branch-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
.branch { display: grid; gap: 12px; padding: 26px 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(201, 162, 102, .05), transparent 60%); 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.45rem; color: var(--linen); }
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: .8rem; letter-spacing: .02em; padding: 2px 12px; border: 1px solid currentColor; line-height: 1.9; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.is-open { color: var(--cardamom); }
.status.is-closed { color: var(--mist); }
.branch-meta { display: grid; gap: 6px; color: var(--mist); font-size: 1.1rem; line-height: 1.55; }
.branch-meta span { display: flex; gap: 10px; align-items: flex-start; }
.branch-meta svg { width: 18px; height: 18px; flex: none; margin-top: 6px; color: var(--brass); }
.branch .btn { justify-self: start; }

/* ---------------- footer ---------------- */
.footer { background: #17110E; padding-bottom: calc(110px + var(--safe-b)); }
.footer-in { display: grid; gap: 22px; padding-top: 52px; }
.footer-brand { display: grid; gap: 10px; }
.footer-logo { width: 120px; height: auto; }
.footer-brand p { color: var(--mist); font-size: 1.05rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { font-family: var(--font-display); font-size: .95rem; color: var(--mist); text-decoration: none; display: inline-block; padding: 6px 0; }
.footer-links a:hover { color: var(--brass-hi); }
.privacy summary { cursor: pointer; font-family: var(--font-display); font-size: .95rem; color: var(--brass); width: fit-content; }
.privacy p { margin-top: 10px; max-width: 46em; color: var(--mist); font-size: 1.05rem; line-height: 1.8; }
.copy { color: #7E6F5E; font-size: .95rem; }

/* =====================================================================
   Nadeem 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: 12px;
  padding: 6px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(31, 23, 19, .94); color: var(--linen);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .9), 0 0 0 4px rgba(201, 162, 102, .08);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fade .6s ease .8s both;
  transition: opacity .2s ease, transform .2s ease, visibility 0s;
}
.chat-fab:hover { border-color: var(--brass-hi); }
.fab-face { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3A2C23, var(--oud)); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--brass); flex: none; }
.fab-face svg { width: 34px; height: 34px; }
.fab-label { display: none; flex-direction: column; align-items: flex-start; line-height: 1.15; padding-inline: 14px 4px; }
.fab-label > span { font-family: var(--font-display); font-size: 1.15rem; color: var(--brass-hi); }
.fab-label small { font-size: .9rem; color: var(--mist); }
.fab-badge { position: absolute; top: -4px; left: -4px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--sadu); color: var(--linen); font-size: .8rem; font-weight: 700; box-shadow: 0 0 0 2px var(--oud); }
body.chat-is-open .chat-fab { opacity: 0; visibility: hidden; transform: scale(.85); transition: opacity .2s ease, transform .2s ease, visibility 0s .2s; }
@media (min-width: 560px) { .fab-label { display: flex; } }

.chat-nudge {
  position: fixed; z-index: 901; bottom: calc(92px + var(--safe-b)); left: 18px;
  display: flex; align-items: flex-start; gap: 6px; max-width: min(300px, calc(100vw - 36px));
  padding: 14px 10px 14px 16px;
  background: var(--linen); color: var(--ink);
  box-shadow: 0 24px 44px -16px rgba(0, 0, 0, .85);
  outline: 1px solid var(--brass); outline-offset: -6px;
  animation: fade .5s ease both;
}
.nudge-body { border: 0; background: none; padding: 0; text-align: start; font-family: var(--font-body); font-size: 1.05rem; line-height: 1.5; color: var(--ink); }
.nudge-body strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--ink); }
.nudge-x { flex: none; width: 28px; height: 28px; border: 0; background: none; color: var(--ink-2); 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(410px, calc(100vw - 36px));
  height: min(690px, calc(var(--vvh, 100dvh) - 36px));
  display: flex; flex-direction: column;
  background: var(--oud-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .95);
  overflow: hidden;
  transform-origin: bottom left;
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .3s ease, transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .45s;
}
.chat.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (min-width: 1024px) {
  body { transition: padding-left .4s cubic-bezier(.2, .8, .2, 1); }
  body.chat-is-open { padding-left: 438px; }
  .chat { top: 18px; height: auto; width: 402px; transform: translateX(-20px); }
}
@media (max-width: 559px) {
  .chat {
    left: 0; right: 0; bottom: var(--kb, 0px); width: 100%;
    height: min(88dvh, calc(var(--vvh, 100dvh) - 10px));
    border-width: 1px 0 0; transform: translateY(104%);
    transition: opacity .25s ease, transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .45s;
    padding-bottom: var(--safe-b);
  }
  .chat.is-open { transform: none; }
}

.chat-head {
  position: relative; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 16px 16px 14px;
  background: radial-gradient(120% 140% at 85% 0%, #3A2C23, var(--oud) 70%);
}
.chat-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 3px; margin-left: -20px; border-radius: 3px; background: var(--line-strong); display: none; }
@media (max-width: 559px) { .chat-head { padding-top: 22px; } .chat-head::before { display: block; } }
.chat-avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #3A2C23, var(--oud)); box-shadow: inset 0 0 0 1px var(--brass), 0 0 0 4px rgba(201, 162, 102, .1); }
.chat-avatar svg { width: 32px; height: 32px; }
.chat-id { min-width: 0; display: grid; gap: 2px; }
#chatTitle { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.15; color: var(--brass-hi); }
.chat-status { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--mist); line-height: 1.3; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cardamom); color: rgba(143, 170, 127, .6); animation: ping 2.2s ease-out infinite; flex: none; }
.chat-close { margin-inline-start: auto; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--mist); }
.chat-close:hover { color: var(--brass-hi); border-color: var(--brass); }
.chat-close svg { width: 16px; height: 16px; }
.sadu-chat { flex: none; height: 12px; }

.chat-log {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 14px 12px;
  background: radial-gradient(100% 50% at 50% 0%, rgba(233, 203, 142, .06), transparent 70%);
  scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--oud-3) transparent;
}
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 90%; min-width: 0; animation: msg-in .35s 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: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--oud); box-shadow: inset 0 0 0 1px var(--line-strong); }
.msg-avatar svg { width: 18px; height: 18px; }
.msg.bot + .msg.bot .msg-avatar { visibility: hidden; }
.bubble { min-width: 0; padding: 9px 15px 10px; font-size: 1.12rem; line-height: 1.65; overflow-wrap: anywhere; }
.bot .bubble { background: var(--linen); color: var(--ink); border-radius: 14px 14px 3px 14px; }
.user .bubble { background: transparent; color: var(--linen); border: 1px solid var(--line-strong); border-radius: 14px 14px 14px 3px; }
.bubble strong { font-weight: 700; }
.bot .bubble strong { color: #6B3A1E; }
.bubble-body { flex: 1; min-width: 0; display: grid; gap: 8px; }

.typing .bubble { display: inline-flex; gap: 6px; padding: 14px 16px; background: var(--oud-3); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); animation: dot 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }

/* rich blocks */
.carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: thin; scrollbar-color: var(--oud-3) transparent; }
.pcard {
  flex: 0 0 146px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 12px 10px; border: 1px solid var(--line); background: rgba(31, 23, 19, .6);
}
.pcard .pc-art { width: 104px; height: 104px; }
.pcard img.pc-art { object-fit: cover; border-radius: 50%; }
.pcard b { font-family: var(--font-display); font-weight: 400; font-size: .98rem; line-height: 1.35; color: var(--linen); }
.pc-price { font-family: var(--font-display); font-size: 1.05rem; color: var(--brass-hi); font-variant-numeric: tabular-nums; }
.pc-price small { font-family: var(--font-body); font-size: .85rem; color: var(--brass); }
.pcard .mini-btn { margin-top: auto; }

.mini-btn {
  min-height: 36px; padding: 4px 14px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--brass-hi); font-family: var(--font-display); font-size: .88rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; border-radius: 2px;
}
.mini-btn:hover { background: rgba(201, 162, 102, .1); border-color: var(--brass-hi); }
.mini-btn.solid { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.mini-btn.solid:hover { background: var(--brass-hi); }
.mini-btn.wa { border-color: rgba(143, 170, 127, .6); color: #CFE3C3; }
.mini-btn svg { width: 16px; height: 16px; }

.card { display: grid; gap: 10px; padding: 14px 15px; border: 1px solid var(--line); background: rgba(31, 23, 19, .55); font-size: 1.08rem; line-height: 1.6; color: var(--linen); }
.card-title { font-family: var(--font-display); font-size: .98rem; color: var(--brass-hi); }
.card-note { font-size: .98rem; color: var(--mist); }
.card-note strong { color: var(--linen); }
.app-row { display: flex; flex-wrap: wrap; gap: 8px; }
.app-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line-strong); color: var(--linen); font-family: var(--font-display); font-size: .92rem; text-decoration: none; }
a.app-btn:hover { border-color: var(--brass-hi); color: var(--brass-hi); }
.app-btn svg { width: 16px; height: 16px; color: var(--brass); }
.app-btn.is-static { border-style: dashed; }

.summary { display: grid; gap: 0; margin: 0; }
.summary div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary dt { font-family: var(--font-display); font-size: .85rem; color: var(--brass); padding-top: 3px; }
.summary dd { margin: 0; color: var(--linen); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.gift { display: grid; gap: 6px; padding: 14px 15px; border: 1px dashed var(--brass); background: rgba(201, 162, 102, .07); color: var(--linen); font-size: 1.05rem; line-height: 1.55; }
.gift-head { font-family: var(--font-display); color: var(--brass-hi); font-size: 1rem; }
.gift-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.gift-code { direction: ltr; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .12em; color: var(--brass-hi); user-select: all; }
.gift small { color: var(--mist); font-size: .95rem; }

.b-rows { display: grid; gap: 10px; }
.b-row { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid 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 { font-family: var(--font-display); font-weight: 400; color: var(--linen); }
.b-row .status { font-size: .72rem; }
.b-row span { font-size: 1rem; color: var(--mist); }
.course-mini { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: c; }
.course-mini li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; counter-increment: c; color: var(--linen); }
.course-mini li::before { content: counter(c, arabic-indic); font-family: var(--font-display); color: var(--brass); font-size: .9rem; padding-top: 3px; }
.course-mini span { color: var(--mist); }

/* 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: 5px 15px; border: 1px solid var(--line-strong); border-radius: 2px;
  background: transparent; color: var(--linen); font-family: var(--font-display); font-size: .9rem; white-space: nowrap; line-height: 1.3;
}
.chip:hover { border-color: var(--brass-hi); color: var(--brass-hi); }
.chip.primary { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.chip.primary:hover { background: var(--brass-hi); color: var(--ink); }

.chat-form { flex: none; display: flex; gap: 8px; padding: 8px 12px 4px; position: relative; }
#chatInput {
  flex: 1; min-width: 0; height: 50px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 2px; background: var(--oud); color: var(--linen);
  font-family: var(--font-body); font-size: 18px; text-align: right; color-scheme: dark;
  transition: border-color .2s ease, box-shadow .2s ease;
}
#chatInput::placeholder { color: #8C7C69; }
#chatInput:focus { outline: none; border-color: var(--brass-hi); box-shadow: 0 0 0 3px rgba(201, 162, 102, .15); }
#chatInput.is-invalid { border-color: var(--error); }
.chat-send { flex: none; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 2px; display: grid; place-items: center; background: linear-gradient(135deg, #B88E52, var(--brass-hi) 50%, #B88E52); color: var(--ink); }
.chat-send svg { width: 20px; height: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.chat-hint { flex: none; min-height: 1.6em; padding: 2px 18px 12px; font-size: .95rem; line-height: 1.5; color: var(--mist); }
.chat-hint.is-error { color: var(--error); }
.chat-hint a { color: var(--brass-hi); }

/* ---------------- motion ---------------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { opacity: 0; transform: scale(.96) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes candle { 0%, 100% { opacity: .85; transform: scale(1); } 40% { opacity: 1; transform: scale(1.04); } 70% { opacity: .9; transform: scale(.98); } }
@keyframes flame { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .82; transform: scale(.9); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dot { 0%, 100% { opacity: .3; } 40% { opacity: 1; } }

@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; }
}
