/* ==========================================================================
   VERY EASY — /calories ("Know your calories")
   Same brand tokens and fonts as the main site (css/style.css), kept in their
   own file so this page never changes the homepage. Mobile-first; logical
   properties so Arabic (RTL) and English (LTR) share one stylesheet.
   ========================================================================== */

@font-face {
  font-family: "Red Rose"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url("../assets/fonts/red-rose-latin-wght-normal.woff2") format("woff2-variations"), url("../assets/fonts/red-rose-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-display: swap; font-weight: 160 700;
  src: url("../assets/fonts/readex-pro-arabic-wght-normal.woff2") format("woff2-variations"), url("../assets/fonts/readex-pro-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --burgundy: #6A2233; --burgundy-deep: #571B2A;
  --pearl: #F3EFE8; --pearl-2: #EAE3D8; --paper: #FAF8F4;
  --navy: #1D2A44; --green: #556B3D; --green-deep: #3F5130; --black: #161616;
  --khaki: #C79B6B; --khaki-light: #D9B88F; --khaki-text: #8A6238;
  --ink: var(--black); --ink-2: #4D4648; --ink-3: #6E6668; --line: #DCD3C6;
  --font: "Readex Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Red Rose", "Readex Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 6px; --radius-lg: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 18px 40px -24px rgba(22, 22, 22, .35);
  --top-h: 60px;
}

/* In Arabic, punctuation such as ( ) falls back past Readex Pro (Arabic-only subset). On Windows the
   "Helvetica" fallback is substituted and draws brackets reversed in RTL, so Arial comes first there. */
html[lang="ar"] { --font: "Readex Pro", Arial, "Helvetica Neue", Helvetica, sans-serif; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.7; color: var(--ink); background: var(--pearl);
  overflow-x: clip; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
html[lang="en"] body { line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure, fieldset { margin: 0; }
ul { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 3px; border-radius: 4px; }

/* Scrollbars: thin burgundy thumb on a pearl track (standard property first; WebKit rules for Safari) */
html, .sheet__card { scrollbar-width: thin; scrollbar-color: rgba(106, 34, 51, .55) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(106, 34, 51, .45); border: 3px solid var(--pearl); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--burgundy); }
::-webkit-scrollbar-button { display: none; }
.sheet--meal .sheet__card { scrollbar-color: rgba(243, 239, 232, .4) transparent; }
.summary :focus-visible { outline-color: var(--pearl); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; z-index: 200; inset-block-start: 8px; inset-inline-start: 8px; padding: .7rem 1rem; background: var(--black); color: var(--pearl); border-radius: var(--radius); font-weight: 600; transform: translateY(-200%); }
.skip:focus { transform: none; }
.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
@media (min-width: 640px) { .wrap { width: min(100% - 48px, 1120px); } }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .icon--flip { transform: scaleX(-1); }
.logo { fill: currentColor; height: 1em; width: auto; aspect-ratio: 806.92 / 134.21; overflow: visible; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--burgundy);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; }
h1, h2, h3 { font-family: var(--font-display); color: var(--burgundy); font-weight: 700; }
html[lang="en"] h1, html[lang="en"] h2 { text-transform: uppercase; letter-spacing: .01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: 0 1.4rem; border: 2px solid transparent; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; line-height: 1.2; text-align: center;
  background: none; transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s, opacity .2s;
}
html[lang="en"] .btn { text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--primary { background: var(--burgundy); color: var(--pearl); }
.btn--ghost { border-color: var(--burgundy); color: var(--burgundy); }
.btn--light { background: var(--pearl); color: var(--green-deep); }
.btn--outline-light { border-color: rgba(243, 239, 232, .6); color: var(--pearl); }
@media (hover: hover) { .btn--outline-light:hover { background: var(--pearl); color: var(--green-deep); } }
.btn--text { color: inherit; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; padding: 0 .6rem; font-weight: 600; }
.btn--wa { background: #1F7A4D; color: #fff; }
.btn--sm { min-height: 44px; padding: 0 1rem; font-size: .88rem; }
@media (hover: hover) {
  .btn--primary:hover { background: var(--burgundy-deep); }
  .btn--ghost:hover { background: var(--burgundy); color: var(--pearl); }
  .btn--light:hover { background: #fff; }
  .btn--wa:hover { background: #18643F; }
}

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--top-h);
  background: rgba(243, 239, 232, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in { height: 100%; display: flex; align-items: center; gap: 12px; }
.top__brand { color: var(--burgundy); line-height: 0; }
.top__brand .logo { height: 18px; }
.top__home { display: none; margin-inline-start: auto; font-size: .9rem; font-weight: 500; color: var(--ink-2); }
.top__home:hover { color: var(--burgundy); }
.lang { margin-inline-start: auto; display: inline-flex; padding: 2px; gap: 2px; border: 1.5px solid var(--line); border-radius: var(--radius); }
.lang button { min-height: 36px; padding: 0 .7rem; border: 0; border-radius: 4px; background: transparent; color: var(--ink-2); font-size: .8rem; font-weight: 600; line-height: 1; }
.lang button[aria-pressed="true"] { background: var(--burgundy); color: var(--pearl); }
@media (min-width: 640px) {
  .top__brand .logo { height: 22px; }
  .top__home { display: inline; }
  .lang { margin-inline-start: 8px; }
}

/* ---------- Hero ---------- */
/* clip sideways only (the faint symbol), so the suggestions panel can drop below the hero; z-index keeps it above the next section */
.hero { position: relative; z-index: 5; padding: 28px 0 22px; overflow-x: clip; overflow-y: visible; }
/* the brand symbol, very faint, behind the title */
.mark { position: absolute; z-index: 0; fill: currentColor; pointer-events: none; height: auto; }
.hero__mark { inset-block-start: -30px; inset-inline-start: -70px; width: 230px; color: var(--burgundy); opacity: .06; }
.hero__in { position: relative; display: grid; gap: 14px; justify-items: start; }
.hero h1 { font-size: clamp(2rem, 9vw, 3.4rem); line-height: 1.15; }
html[lang="en"] .hero h1 { line-height: 1.02; }
.hero__sub { color: var(--ink-2); font-size: 1.05rem; max-width: 36ch; }

.search { position: relative; width: 100%; max-width: 640px; margin-top: 8px; }
.search input {
  width: 100%; min-height: 62px; padding-block: 0; padding-inline: 54px 52px;
  background: #fff; border: 2px solid var(--line); border-radius: 999px;
  font-size: 1.05rem; box-shadow: var(--shadow); -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 4px rgba(106, 34, 51, .14), var(--shadow); }
.search__ic { position: absolute; inset-block-start: 50%; inset-inline-start: 20px; transform: translateY(-50%); width: 22px; height: 22px; color: var(--burgundy); pointer-events: none; }
.search input { padding-inline-end: 104px; }
.search__clear { position: absolute; inset-block-start: 50%; inset-inline-end: 56px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--pearl-2); color: var(--ink-2); }

/* voice */
.search__mic {
  position: absolute; inset-block-start: 50%; inset-inline-end: 8px; transform: translateY(-50%);
  display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--burgundy); color: var(--pearl); transition: background-color .2s, transform .2s var(--ease);
}
.search__mic:active { transform: translateY(-50%) scale(.94); }
.search__mic.is-on { background: #B3261E; }
.search__mic.is-on::before, .search__mic.is-on::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #B3261E; animation: mic-ring 1.4s ease-out infinite;
}
.search__mic.is-on::after { animation-delay: .7s; }
@keyframes mic-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.8); opacity: 0; } }
.search:not(:has(.search__mic:not([hidden]))) input { padding-inline-end: 56px; }
.search:not(:has(.search__mic:not([hidden]))) .search__clear { inset-inline-end: 10px; }
.voice-status { width: 100%; max-width: 640px; font-size: .88rem; font-weight: 600; color: var(--burgundy); animation: fade-in .2s var(--ease) both; }
.voice-status--ok { color: #2F7A3E; }
.voice-status--err { color: #A0332B; }
/* processing: the microphone turns khaki and breathes while the browser works out the words */
.search__mic.is-busy { background: var(--khaki); color: var(--burgundy); animation: mic-busy 1s ease-in-out infinite; }
@keyframes mic-busy { 50% { opacity: .6; } }

/* type-ahead: the rest of the best match, in grey, behind the caret (same box metrics as the input) */
.search__ghost {
  position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden; pointer-events: none;
  padding-inline: 56px 106px; font-size: 1.05rem; white-space: pre; color: var(--ink-3); opacity: .75;
}
.ghost__typed { color: transparent; }

/* suggestions panel */
.suggest {
  position: absolute; z-index: 30; inset-inline: 0; inset-block-start: calc(100% + 8px);
  max-height: min(60vh, 440px); overflow-y: auto; overscroll-behavior: contain; padding: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 20px; box-shadow: 0 24px 48px -24px rgba(22, 22, 22, .35);
  text-align: start; animation: fade-in .2s var(--ease) both;
}
.sg__head { display: flex; align-items: center; gap: .4rem; padding: 6px 10px 4px; font-size: .78rem; font-weight: 700; color: var(--khaki-text); }
.sg__head .icon { width: 16px; height: 16px; }
.sg__opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 12px; cursor: pointer; }
.sg__opt[aria-selected="true"], .sg__opt:hover { background: var(--pearl); }
.sg__opt .thumb { width: 44px; height: 44px; padding: 3px; border-radius: 10px; }
.sg__opt .thumb .icon { width: 20px; height: 20px; }
.sg__txt { flex: 1; min-width: 0; display: grid; line-height: 1.35; font-size: .95rem; }
.sg__name { font-weight: 600; }
.sg__alt { font-size: .75rem; color: var(--ink-3); }
.sg__k { flex: none; font-size: .82rem; font-weight: 700; color: var(--burgundy); }
.sg__ic { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--pearl-2); color: var(--burgundy); }
.sg__opt--ask .sg__txt { font-weight: 500; }
.sg__opt--ask strong { color: var(--burgundy); }

/* the assistant's answer */
.answer {
  width: 100%; max-width: 640px; margin-top: 4px; padding: 16px 16px 14px; text-align: start;
  background: #fff; border: 1.5px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  animation: fade-in .35s var(--ease) both;
}
.ans__head { display: flex; align-items: center; gap: .6rem; margin-bottom: 8px; }
.ans__avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--burgundy); color: var(--pearl); }
.ans__avatar .icon { width: 18px; height: 18px; }
.ans__title { font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: var(--burgundy); }
html[lang="en"] .ans__title { text-transform: uppercase; letter-spacing: .06em; }
.ans__body { display: grid; gap: 6px; }
.ans__text { font-size: 1rem; line-height: 1.7; color: var(--ink); }
.ans__sub { font-size: .82rem; color: var(--ink-3); }
.ans__cards { display: flex; gap: 8px; overflow-x: auto; margin: 6px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
.ans__cards::-webkit-scrollbar { display: none; }
.ans__card {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-width: 210px; max-width: 260px; padding: 8px 12px 8px 8px;
  background: var(--paper); border: 1.5px solid transparent; border-radius: 14px; text-align: start; transition: border-color .2s;
}
[dir="rtl"] .ans__card { padding: 8px 8px 8px 12px; }
@media (hover: hover) { .ans__card:hover { border-color: var(--line); } }
.ans__card .thumb { width: 52px; height: 52px; padding: 4px; border-radius: 10px; }
.ans__cardtxt { display: grid; line-height: 1.3; min-width: 0; }
.ans__cardname { font-weight: 600; font-size: .9rem; }
.ans__cardk { font-size: .78rem; color: var(--ink-3); }
.ans__cardk strong { font-family: var(--font-display); font-size: 1rem; color: var(--burgundy); }
.ans__cardp { font-size: .75rem; color: var(--green); font-weight: 600; }
.ans__cmp { display: grid; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .88rem; }
.ans__row { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; }
.ans__row > span { padding: 8px 10px; border-top: 1px solid var(--line); }
.ans__row--head > span { border-top: 0; background: var(--pearl); font-weight: 700; font-size: .8rem; }
.ans__row > span:first-child { color: var(--ink-3); font-weight: 600; }
.ans__row .is-better { color: var(--green); font-weight: 700; }
.ans__ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ans__ex .chip { min-height: 38px; font-size: .85rem; }

/* search: the matched part of a name, the "no results" line, "show all", calories unit */
mark { background: rgba(199, 155, 107, .32); color: inherit; border-radius: 3px; padding: 0 1px; }
.sg__empty { padding: 14px 12px; font-size: .9rem; color: var(--ink-2); }
.sg__all { font-weight: 700; color: var(--burgundy); text-align: center; }
.sg__k small { font-family: var(--font); font-weight: 500; font-size: .72rem; color: var(--ink-3); }
.sg__alt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* compare: the round button on dish rows and tiles */
.row { position: relative; }
.row .item { padding-inline-end: 62px; }
.cmpbtn {
  position: absolute; inset-block-start: 50%; inset-inline-end: 12px; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--burgundy); transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.cmpbtn .icon { width: 18px; height: 18px; }
.cmpbtn:active { transform: translateY(-50%) scale(.92); }
.cmpbtn[aria-pressed="true"] { background: var(--burgundy); border-color: var(--burgundy); color: var(--pearl); }
@media (hover: hover) { .cmpbtn:not([aria-pressed="true"]):hover { border-color: var(--burgundy); } }
.grid > li { position: relative; }
.cmpbtn--tile { inset-block-start: 16px; transform: none; width: 36px; height: 36px; }
.cmpbtn--tile:active { transform: scale(.92); }

/* compare bar: shows the pick (1 of 2) without covering the page; sits above the "my meal" bar */
.cmpbar {
  position: fixed; z-index: 46; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; max-width: 460px; margin-inline: auto; min-height: 58px; padding: 6px 8px 6px 12px;
  background: var(--navy); color: var(--pearl); border-radius: 18px; box-shadow: 0 16px 34px -14px rgba(22, 22, 22, .6);
  animation: fade-in .25s var(--ease) both;
}
[dir="rtl"] .cmpbar { padding: 6px 12px 6px 8px; }
.cmpbar__thumbs { flex: none; display: flex; }
.cmpbar__thumbs .thumb { width: 40px; height: 40px; padding: 3px; border-radius: 50%; border: 2px solid var(--navy); }
.cmpbar__thumbs .thumb + .thumb { margin-inline-start: -12px; }
.cmpbar__thumbs .thumb .icon { width: 18px; height: 18px; }
.cmpbar__txt { flex: 1; min-width: 0; font-size: .85rem; font-weight: 600; line-height: 1.35; }
.cmpbar__go { flex: none; min-height: 40px; }
.cmpbar__x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(243, 239, 232, .12); color: var(--pearl); }
.has-cmpbar .mealbar { bottom: calc(80px + env(safe-area-inset-bottom)); }

/* comparison sheet */
.cmp { display: grid; gap: 14px; padding: 22px 16px 20px; }
.cmp__title { font-size: 1.4rem; padding-inline-end: 48px; }
.cmp__heads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp__head { display: grid; justify-items: center; gap: 4px; padding: 10px 8px 12px; background: var(--paper); border-radius: var(--radius-lg); text-align: center; min-width: 0; }
.cmp__media { width: 100%; padding: 0; border: 0; background: none; }
.cmp__media .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; padding: 8px; }
.cmp__name { font-weight: 700; font-size: .95rem; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.cmp__serv { font-size: .75rem; color: var(--ink-3); }
.cmp__acts { display: flex; gap: 14px; margin-top: 2px; font-size: .82rem; }
.cmp__slot {
  display: grid; place-items: center; align-content: center; gap: 6px; min-height: 180px; padding: 12px;
  border: 2px dashed var(--line); border-radius: var(--radius-lg); background: transparent; color: var(--burgundy); font-weight: 700;
}
.cmp__slot .icon { width: 26px; height: 26px; }
.cmp__rice { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.cmp__rice input { width: 20px; height: 20px; accent-color: var(--burgundy); }
.cmp__note { padding: 10px 12px; border-radius: 12px; background: rgba(199, 155, 107, .16); color: var(--khaki-text); font-size: .85rem; font-weight: 600; }
.cmp__wait { text-align: center; color: var(--ink-3); padding: 8px 0; }
.cmp__rows { display: grid; gap: 10px; }
.cmp__row { padding: 12px; background: var(--paper); border-radius: 14px; }
.cmp__label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; font-weight: 700; font-size: .9rem; }
.cmp__diff { font-weight: 500; font-size: .78rem; color: var(--ink-2); }
.cmp__cells { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp__cell { display: grid; gap: 6px; min-width: 0; }
.cmp__val { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.cmp__row--k .cmp__val { font-size: 1.45rem; color: var(--burgundy); }
.cmp__cell--na .cmp__val { font-family: var(--font); font-size: .82rem; font-weight: 500; color: var(--ink-3); }
.cmp__bar { height: 6px; border-radius: 6px; background: var(--pearl-2); overflow: hidden; }
.cmp__bar span { display: block; height: 100%; border-radius: inherit; background: var(--dot, var(--navy)); transition: width .5s var(--ease); }
.cmp__row--k { --dot: var(--burgundy); }
.cmp__row--p { --dot: #8E3A4E; }
.cmp__row--c { --dot: var(--khaki); }
.cmp__row--f { --dot: var(--green); }
.cmp__foot { display: flex; justify-content: space-between; gap: 10px; }
@media (min-width: 720px) { .sheet--compare { width: min(100% - 48px, 620px); } .cmp { padding: 26px 24px 24px; } }
.ans__cmpgo { justify-self: start; margin-top: 4px; }

/* typo help in the empty state */
.didyou { color: var(--ink-2); }
.linkish { padding: 0; border: 0; background: none; color: var(--burgundy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 640px; margin-top: 6px; }
.quick__i {
  display: grid; justify-items: center; gap: 6px; padding: 14px 6px 12px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  font-size: .82rem; font-weight: 600; line-height: 1.3; text-align: center; color: var(--ink);
  transition: border-color .2s, transform .2s var(--ease), background-color .2s;
}
.quick__i .icon { width: 26px; height: 26px; color: var(--burgundy); }
.quick__i:active { transform: scale(.97); }
@media (hover: hover) { .quick__i:hover { border-color: var(--burgundy); background: #fff; } }
@media (min-width: 900px) {
  .hero { padding: 64px 0 56px; }
  .hero__mark { width: 340px; inset-inline-start: 2%; inset-block-start: -10px; }
  .hero__in { justify-items: center; text-align: center; }
  .hero__sub { font-size: 1.15rem; }
  .quick__i { grid-auto-flow: column; justify-content: center; align-items: center; padding: 14px; font-size: .9rem; }
  .quick__i .icon { width: 22px; height: 22px; }
}

/* ---------- Sections ---------- */
.sec { padding: 40px 0 48px; }
.hero + .sec { padding-top: 20px; }
/* while a search is typed, the results sit right under the search box */
.has-query .quick, .has-query #build, .has-query #range, .has-query #find .sec__head { display: none; }
.has-query #find { padding-top: 6px; }

/* ---------- Category groups (open / close) ---------- */
.accs { display: grid; gap: 10px; }
.acc { background: var(--paper); border-radius: var(--radius-lg); overflow: hidden; }
.acc__h { font: inherit; color: inherit; text-transform: none; letter-spacing: 0; }
.acc__head {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 16px;
  border: 0; background: transparent; text-align: start; transition: background-color .2s;
}
@media (hover: hover) { .acc__head:hover { background: #fff; } }
.acc__peek { flex: none; display: flex; align-items: center; }
.acc__peek img, .acc__ic {
  width: 44px; height: 44px; padding: 4px; border-radius: 50%; background: var(--pearl); border: 2px solid var(--paper); object-fit: contain;
}
.acc__peek > * + * { margin-inline-start: -16px; }
.acc__ic { display: grid; place-items: center; background: var(--navy); color: var(--pearl); }
.acc__ic .icon { width: 20px; height: 20px; }
.acc__txt { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.acc__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--burgundy); }
html[lang="en"] .acc__name { text-transform: uppercase; letter-spacing: .03em; }
.acc__count { font-size: .8rem; color: var(--ink-3); }
.acc__chev { flex: none; width: 22px; height: 22px; color: var(--burgundy); transform: rotate(90deg); transition: transform .3s var(--ease); }
.acc__head[aria-expanded="true"] .acc__chev { transform: rotate(-90deg); }
.acc__body { padding: 0 10px 10px; }
.acc__body .item { background: var(--pearl); }
@media (min-width: 720px) { .accs { gap: 12px; } .acc__body { padding: 0 14px 14px; } }
.sec--alt { background: var(--pearl-2); }
.sec__head { display: grid; gap: 4px; margin-bottom: 20px; }
.sec__head h2 { font-size: clamp(1.6rem, 6.4vw, 2.4rem); line-height: 1.2; }
html[lang="en"] .sec__head h2 { line-height: 1.05; }
.sec__sub { color: var(--ink-2); }
@media (min-width: 900px) { .sec { padding: 72px 0 80px; } .sec__head { margin-bottom: 28px; } }

/* ---------- Chips (categories, ranges) ---------- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .chips { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }
.chip {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 42px; padding: 0 1rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: .92rem; font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s, border-color .2s;
}
.chip[aria-pressed="true"] { background: var(--burgundy); border-color: var(--burgundy); color: var(--pearl); }
@media (hover: hover) { .chip:not([aria-pressed="true"]):hover { border-color: var(--burgundy); color: var(--burgundy); } }
.chips--range .chip { min-height: 48px; padding: 0 1.2rem; font-size: 1rem; }

.count { margin: 12px 0 10px; color: var(--ink-3); font-size: .88rem; }
.count:empty { margin: 0; }
.loading { padding: 32px 0; text-align: center; color: var(--ink-3); }

/* ---------- Product list (search results) ---------- */
.list { display: grid; gap: 10px; }
@media (min-width: 720px) { .list { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (min-width: 1040px) { .list { grid-template-columns: repeat(3, 1fr); } }
.item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; padding-inline-end: 14px;
  background: var(--paper); border: 1.5px solid transparent; border-radius: var(--radius-lg); text-align: start;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.item:active { transform: scale(.985); }
@media (hover: hover) { .item:hover { border-color: var(--line); box-shadow: var(--shadow); } }
.thumb {
  flex: none; display: grid; place-items: center; width: 76px; height: 76px; padding: 6px;
  border-radius: 12px; background: var(--pearl); overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb .icon { width: 30px; height: 30px; color: var(--pearl); }
.thumb--drinks { background: var(--navy); }
.thumb--shake { background: var(--khaki); }
.thumb--shake .icon { color: var(--black); }
.thumb--carb { background: var(--khaki-light); }
.thumb--carb .icon { color: var(--burgundy); }
.item__txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.item__name { font-weight: 600; font-size: 1rem; line-height: 1.35; color: var(--ink); }
.item__alt { font-size: .78rem; color: var(--ink-3); line-height: 1.3; }
.item__kcal { margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--burgundy); line-height: 1.2; }
.item__kcal small { font-family: var(--font); font-weight: 500; font-size: .75rem; color: var(--ink-3); }
.item__kcal--na { font-family: var(--font); font-size: .82rem; font-weight: 500; color: var(--ink-3); }
.item__go { flex: none; width: 20px; height: 20px; color: var(--ink-3); }
[dir="rtl"] .item__go { transform: scaleX(-1); }
.tag { display: inline-block; margin-inline-start: .35rem; padding: 0 .45rem; border-radius: 999px; background: var(--pearl-2); color: var(--ink-2); font-family: var(--font); font-size: .7rem; font-weight: 600; vertical-align: middle; }

.empty { display: grid; justify-items: center; gap: 6px; padding: 36px 16px; text-align: center; background: var(--paper); border-radius: var(--radius-lg); }
.empty > .icon { width: 34px; height: 34px; color: var(--khaki); margin-bottom: 4px; }
.empty__t { font-weight: 700; font-size: 1.05rem; }
.empty__s { color: var(--ink-3); margin-bottom: 8px; }

/* ---------- Build your meal ---------- */
.build__grid { display: grid; gap: 22px; }
.build__steps { display: grid; gap: 24px; }
.step__t { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 12px; font-weight: 700; font-size: 1.05rem; }
.step__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--burgundy); color: var(--pearl); font-family: var(--font-display); font-size: .85rem; }
.step__hint { font-weight: 500; font-size: .8rem; color: var(--ink-3); }

.picks { display: grid; gap: 8px; }
.picks--protein { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.picks--rice { grid-template-columns: repeat(3, 1fr); }
.pick {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 52px; padding: 10px 6px 10px;
  background: var(--paper); border: 2px solid transparent; border-radius: 12px; text-align: center;
  font-size: .82rem; font-weight: 600; line-height: 1.3; transition: border-color .2s, background-color .2s, transform .2s var(--ease);
}
.pick:active { transform: scale(.97); }
.pick img { width: 100%; height: 58px; object-fit: contain; }
.pick__k { font-size: .72rem; font-weight: 500; color: var(--ink-3); }
.pick[aria-pressed="true"], .pick[aria-checked="true"] { border-color: var(--green); background: #fff; }
.pick[aria-pressed="true"]::after, .pick[aria-checked="true"]::after {
  content: ""; position: absolute; inset-block-start: 6px; inset-inline-end: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3EFE8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (hover: hover) { .pick:not([aria-pressed="true"]):not([aria-checked="true"]):hover { border-color: var(--line); } }
.picks--rice .pick { padding: 12px 6px; font-size: .88rem; }
/* phones: the 15 proteins become one row you swipe, instead of five rows */
@media (max-width: 899px) {
  .picks--protein {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
    margin-inline: -16px; padding: 2px 16px 10px; scroll-padding-inline: 16px;
  }
  .picks--protein::-webkit-scrollbar { display: none; }
  .picks--protein .pick { flex: 0 0 112px; scroll-snap-align: start; }
}
@media (min-width: 640px) and (max-width: 899px) { .picks--protein { margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; } }
.step--off { opacity: .45; pointer-events: none; }

.extras { display: grid; gap: 8px; }
.extra { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 10px; padding-inline-start: 14px; background: var(--paper); border-radius: 12px; }
.extra__txt { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.extra__name { font-weight: 600; font-size: .92rem; }
.extra__k { font-size: .78rem; color: var(--ink-3); }
.stepper { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.stepper button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--burgundy); }
.stepper button[disabled] { color: var(--line); cursor: default; }
@media (hover: hover) { .stepper button:not([disabled]):hover { background: var(--pearl-2); } }
.stepper output { min-width: 1.6em; text-align: center; font-weight: 700; font-family: var(--font-display); }

.added { display: grid; gap: 8px; }
.added .extra { padding-inline-start: 8px; }
.added .thumb { width: 48px; height: 48px; padding: 4px; border-radius: 10px; }
.added .thumb .icon { width: 22px; height: 22px; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); }
@media (hover: hover) { .icon-btn:hover { background: var(--pearl-2); color: var(--burgundy); } }

/* live summary (dark green panel) */
.summary {
  position: relative; display: grid; gap: 6px; padding: 22px 20px 18px; border-radius: var(--radius-lg);
  background: var(--green-deep); color: var(--pearl); box-shadow: var(--shadow); overflow: hidden;
}
.summary__mark { inset-block-end: -40px; inset-inline-end: -24px; width: 140px; color: var(--pearl); opacity: .07; }
.summary > :not(.mark) { position: relative; z-index: 1; }
.summary__k { font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--khaki-light); }
.summary__label { font-size: .9rem; color: rgba(243, 239, 232, .8); }
.summary__kcal { font-family: var(--font-display); font-weight: 700; font-size: 3.4rem; line-height: 1; }
.summary__kcal small { font-family: var(--font); font-size: .95rem; font-weight: 500; color: rgba(243, 239, 232, .8); }
.summary__partial { font-size: .82rem; line-height: 1.5; color: var(--khaki-light); }
.summary__lines { display: grid; gap: 4px; margin-top: 4px; padding-top: 12px; border-top: 1px solid rgba(243, 239, 232, .18); font-size: .85rem; }
.summary__lines:empty { display: none; }
.summary__lines li { display: flex; justify-content: space-between; gap: 12px; color: rgba(243, 239, 232, .86); }
.summary__lines li span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.summary__empty { font-size: .9rem; color: rgba(243, 239, 232, .75); }
.summary__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.summary__actions .btn--light { flex: 1 1 auto; }
@media (min-width: 900px) {
  .build__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: start; }
  .summary { position: sticky; top: calc(var(--top-h) + 20px); padding: 28px 28px 22px; }
  .summary__kcal { font-size: 4.2rem; }
  .picks--protein { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}

/* macros: grams + a thin bar showing each macro's share of the energy */
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.macro { display: grid; gap: 4px; padding: 12px 10px; background: var(--paper); border-radius: 12px; }
.macro dt { display: flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.macro dt::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.macro dd { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; color: var(--ink); }
.macro dd small { font-family: var(--font); font-size: .75rem; font-weight: 500; color: var(--ink-3); }
.macro__bar { height: 4px; border-radius: 4px; background: var(--pearl-2); overflow: hidden; }
.macro__bar span { display: block; height: 100%; width: 0; background: var(--dot); border-radius: inherit; transition: width .6s var(--ease); }
.macro--na dd { font-family: var(--font); font-size: .8rem; font-weight: 500; color: var(--ink-3); }
.macro--p { --dot: var(--burgundy); }
.macro--c { --dot: var(--khaki); }
.macro--f { --dot: var(--green); }
.macros--dark .macro { background: rgba(243, 239, 232, .08); }
.macros--dark .macro dt, .macros--dark .macro dd small { color: rgba(243, 239, 232, .78); }
.macros--dark .macro dd { color: var(--pearl); }
.macros--dark .macro__bar { background: rgba(243, 239, 232, .14); }
.macros--dark .macro--p { --dot: #E4A3B0; }
.macros--dark .macro--f { --dot: #A9C18B; }

/* ---------- Find by calories ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: grid; gap: 6px; width: 100%; padding: 10px 10px 12px; background: var(--paper); border: 1.5px solid transparent; border-radius: var(--radius-lg);
  text-align: start; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.tile:active { transform: scale(.985); }
@media (hover: hover) { .tile:hover { border-color: var(--line); box-shadow: var(--shadow); } }
.tile .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; padding: 10px; }
.tile__name { font-weight: 600; font-size: .92rem; line-height: 1.35; }
.tile__kcal { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--burgundy); line-height: 1.1; }
.tile__kcal small { font-family: var(--font); font-weight: 500; font-size: .72rem; color: var(--ink-3); }
.tile__p { font-size: .78rem; color: var(--ink-3); }
.tile__p--on { color: var(--green); font-weight: 700; }

/* sort + high-protein filter under the calorie ranges */
.rtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.seg button { min-height: 38px; padding: 0 .9rem; border: 0; border-radius: 999px; background: transparent; font-size: .85rem; font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--pearl); }
.chip--toggle { min-height: 44px; }
.chip--toggle .icon { width: 16px; height: 16px; }
.chip--toggle[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--pearl); }

/* ---------- Footer ---------- */
.foot { padding: 40px 0 calc(110px + env(safe-area-inset-bottom)); background: var(--black); color: var(--pearl); }
.foot__in { display: grid; justify-items: center; gap: 8px; text-align: center; }
.foot__logo { height: 20px; color: var(--pearl); }
.foot__tag { font-family: var(--font-display); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--khaki); }
.foot__note { font-size: .85rem; color: rgba(243, 239, 232, .7); max-width: 46ch; }
.foot__back { margin-top: 6px; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.foot :focus-visible { outline-color: var(--pearl); }

/* ---------- Floating "my meal" bar ---------- */
.mealbar {
  width: auto; border: 0; font: inherit; font-weight: 600; text-align: start;
  position: fixed; z-index: 45; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; max-width: 460px; margin-inline: auto; min-height: 56px; padding: 0 18px;
  background: var(--burgundy); color: var(--pearl); border-radius: 999px; box-shadow: 0 16px 34px -14px rgba(22, 22, 22, .6);
  font-weight: 600; transform: translateY(160%); transition: transform .35s var(--ease);
}
.mealbar.is-on { transform: none; }
.mealbar__t { flex: 1; }
.mealbar__k { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.mealbar__k small { font-family: var(--font); font-size: .78rem; font-weight: 500; opacity: .85; }
.mealbar__go { width: 18px; height: 18px; transform: rotate(-90deg); }   /* points up: opens a sheet */
.mealbar:focus-visible { outline-color: var(--burgundy); outline-offset: 4px; }

/* "my meal" sheet: the summary panel inside a bottom sheet */
.sheet--meal .sheet__card { background: var(--green-deep); }
.sheet--meal .sheet__close { background: rgba(243, 239, 232, .14); color: var(--pearl); box-shadow: none; }
.summary--sheet { border-radius: 0; box-shadow: none; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); }
.summary--sheet .summary__actions .btn--light { flex: 1 1 100%; }
.summary--sheet .summary__actions .btn--outline-light { flex: 1 1 auto; }
@media (min-width: 720px) { .sheet--meal { width: min(100% - 48px, 480px); } .summary--sheet { padding: 30px 28px 26px; } }

/* ---------- Sheets (details, share) ---------- */
.sheet {
  width: 100%; max-width: 100%; max-height: 100%; margin: 0; margin-top: auto; padding: 0; border: 0; background: transparent; color: var(--ink);
  overflow: visible;
}
.sheet::backdrop { background: rgba(22, 22, 22, .55); }
.sheet__card {
  position: relative; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--pearl); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom);
}
.sheet[open] .sheet__card { animation: sheet-up .38s var(--ease); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__close {
  position: absolute; z-index: 3; inset-block-start: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(250, 248, 244, .92); color: var(--ink); box-shadow: 0 6px 16px -8px rgba(22, 22, 22, .4);
}
@media (min-width: 720px) {
  .sheet { width: min(100% - 48px, 560px); margin: auto; }
  .sheet__card { max-height: 88dvh; border-radius: 20px; }
  .sheet--share { width: min(100% - 48px, 480px); }
}

.d-media { display: grid; place-items: center; height: 230px; padding: 24px 24px 10px; background: radial-gradient(circle at 50% 60%, #fff 0, var(--pearl-2) 70%); }
/* fixed pixel height: tall pictures (the drink cups) must not grow past the frame */
.d-media img { height: auto; width: auto; max-height: 196px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(22, 22, 22, .18)); }
@media (min-width: 720px) { .d-media img { max-height: 236px; } }
.d-media--icon { background: var(--navy); }
.d-media--shake { background: var(--khaki); }
.d-media--carb { background: var(--khaki-light); }
.d-media .icon { width: 72px; height: 72px; color: var(--pearl); stroke-width: 1.5; }
.d-media--shake .icon { color: var(--black); }
.d-media--carb .icon { color: var(--burgundy); }
@media (min-width: 720px) { .d-media { height: 270px; } }
.d-body { display: grid; gap: 4px; padding: 18px 20px 22px; }
.d-cat { font-size: .8rem; font-weight: 600; color: var(--khaki-text); }
.d-name { font-size: 1.7rem; line-height: 1.2; }
html[lang="en"] .d-name { text-transform: uppercase; }
.d-alt { font-size: .85rem; color: var(--ink-3); }
.d-kcal { margin: 12px 0 6px; padding: 16px; background: var(--paper); border-radius: var(--radius-lg); text-align: center; }
.d-kcal__label { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--burgundy); }
.d-kcal__label .icon { width: 18px; height: 18px; color: #C25B2C; }
.d-kcal__n { font-family: var(--font-display); font-weight: 700; font-size: 3.6rem; line-height: 1.05; color: var(--burgundy); }
.d-kcal__unit { font-size: .85rem; color: var(--ink-3); }
.d-kcal__meal { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); }
.d-kcal__meal strong { color: var(--burgundy); font-family: var(--font-display); }
.d-na { margin: 10px 0 4px; padding: 14px; background: var(--paper); border-radius: var(--radius-lg); text-align: center; color: var(--ink-2); font-weight: 600; }
.d-extra { margin-top: 10px; font-size: .88rem; color: var(--ink-2); line-height: 1.7; }
.d-extra strong { color: var(--ink); }
.d-extras { margin-top: 12px; background: var(--paper); border-radius: 12px; }
/* custom summary row: the default disclosure marker made the browser lay "(50 جم)" out left-to-right */
.d-extras summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; padding: 12px 14px; font-weight: 600; font-size: .9rem; list-style: none; }
.d-extras summary::-webkit-details-marker { display: none; }
.d-extras__chev { width: 18px; height: 18px; color: var(--burgundy); transform: rotate(90deg); transition: transform .25s var(--ease); }
.d-extras[open] .d-extras__chev { transform: rotate(-90deg); }
.d-extras ul { display: grid; gap: 2px; padding: 0 14px 12px; font-size: .85rem; }
.d-extras li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
/* main action across the full width; compare and share side by side under it */
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.d-actions #d-add { grid-column: 1 / -1; }
.d-actions .btn { padding-inline: .9rem; }
#d-compare[aria-pressed="true"] { background: var(--burgundy); color: var(--pearl); }

.share { display: grid; gap: 14px; padding: 22px 20px 22px; }
.share__t { font-size: 1.4rem; padding-inline-end: 48px; }
.share__preview { display: grid; place-items: center; }
.share__preview canvas { width: min(100%, 300px); height: auto; aspect-ratio: 4 / 5; border-radius: 12px; box-shadow: var(--shadow); background: var(--pearl-2); }
.share__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share__btns .btn { min-height: 48px; padding: 0 .8rem; }
.share__msg { min-height: 1.4em; text-align: center; font-size: .88rem; color: var(--green); font-weight: 600; }

.noscript { padding: 20px; text-align: center; }

/* ---------- Motion ---------- */
.js .fade { animation: fade-in .45s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.06); } }
html.is-switching main { opacity: 0; }
main { transition: opacity .16s ease; }

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