:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #11140f;
  --muted: #6f7469;
  --paper: #f3f0e8;
  --card: #fffdf8;
  --sage: #78905c;
  --sage-dark: #24351d;
  --line: rgba(17, 20, 15, .1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button { font: inherit; }

button,
[role="button"] { -webkit-tap-highlight-color: transparent; }

.demo-shell {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(176, 198, 146, .34), transparent 34%),
    linear-gradient(180deg, #f7f3e9 0, #eeece4 100%);
}

.demo-head {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(62px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 16px 10px;
  border-bottom: 1px solid rgba(17, 20, 15, .08);
  background: rgba(247, 243, 233, .9);
  backdrop-filter: blur(18px) saturate(1.25);
}

.demo-head__brand,
.demo-head__close {
  border: 0;
  color: inherit;
  background: none;
}

body.is-embedded .demo-head__close { display: none; }

.demo-head__brand {
  display: grid;
  grid-template-columns: 36px auto;
  grid-template-rows: auto auto;
  column-gap: 9px;
  padding: 0;
  text-align: left;
}

.demo-head__brand > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--sage-dark);
  color: #f3e9c6;
  font-size: 12px;
  font-weight: 900;
}

.demo-head__brand strong { font-size: 15px; line-height: 1.1; }
.demo-head__brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.demo-head__close {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .65);
  font-size: 12px;
  font-weight: 800;
}

.demo-safety {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 16px 0;
  padding: 10px 12px;
  border: 1px solid rgba(84, 112, 62, .2);
  border-radius: 13px;
  background: rgba(215, 231, 193, .7);
  color: #3f5132;
  font-size: 11px;
  line-height: 1.35;
}

.demo-safety i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #638346;
  box-shadow: 0 0 0 5px rgba(99, 131, 70, .12);
}

.demo-main {
  min-height: calc(100dvh - 72px);
  padding: 14px 16px calc(94px + var(--safe-bottom));
}

.demo-view { display: none; animation: view-in .34s ease both; }
.demo-view.is-active { display: block; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.menu-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 270px;
  padding: 24px 22px;
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(15, 20, 12, .94), rgba(23, 34, 17, .63)),
    url("../../../assets/media/cases/norma/product-hero-bg.webp") center / cover;
  color: #fff;
  box-shadow: 0 20px 50px rgba(35, 42, 27, .18);
}

.menu-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -45px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(221, 237, 191, .26);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(221, 237, 191, .06), 0 0 0 70px rgba(221, 237, 191, .04);
}

.menu-hero small,
.builder-head small,
.cart-head small,
.boundary-screen > small,
.profile-screen > small {
  display: block;
  margin-bottom: 12px;
  color: #d7e7bd;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.menu-hero h1,
.builder-head h1,
.cart-head h1,
.boundary-screen h1,
.profile-screen h1 {
  margin: 0;
  font-size: clamp(32px, 10vw, 45px);
  line-height: .94;
  letter-spacing: -.055em;
}

.menu-hero p {
  max-width: 290px;
  margin: 15px 0 22px;
  color: rgba(255, 255, 255, .74);
  font-size: 13px;
  line-height: 1.5;
}

.menu-hero button,
.cart-empty button,
.boundary-screen button,
.profile-screen button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 15px;
  background: #d9eaad;
  color: #17200f;
  font-size: 13px;
  font-weight: 900;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 28px 2px 13px;
}

.section-head small,
.product-card small,
.dish-detail__copy small {
  color: var(--sage);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.section-head h2 { margin: 2px 0 0; font-size: 25px; letter-spacing: -.04em; }
.section-head > span { color: var(--muted); font-size: 11px; }

.product-list { display: grid; gap: 10px; }

.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 13px;
  padding: 9px;
  border: 1px solid rgba(17, 20, 15, .07);
  border-radius: 21px;
  background: rgba(255, 253, 248, .86);
  box-shadow: 0 10px 30px rgba(25, 31, 20, .06);
}

.product-card__image {
  overflow: hidden;
  width: 96px;
  height: 104px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #dfe3d8;
}

.product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.product-card h3 { margin: 4px 0; font-size: 15px; line-height: 1.1; }
.product-card p { margin: 0 0 7px; color: var(--muted); font-size: 10px; }
.product-card strong { font-size: 15px; }

.product-card__plus {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--sage-dark);
  color: #fff;
  font-size: 22px;
}

.product-card__plus.is-added { animation: pop .38s ease; background: var(--sage); }

@keyframes pop { 50% { transform: scale(1.22); } }

.back-link {
  margin: 2px 0 13px;
  padding: 9px 0;
  border: 0;
  background: none;
  color: #56654a;
  font-weight: 800;
}

.dish-detail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(29, 35, 23, .1);
}

.dish-detail__image { aspect-ratio: 4 / 3; overflow: hidden; background: #dfe3d8; }
.dish-detail__image img { width: 100%; height: 100%; object-fit: cover; }
.dish-detail__copy { padding: 20px 20px 15px; }
.dish-detail__copy h1 { margin: 7px 0 9px; font-size: 31px; line-height: .98; letter-spacing: -.05em; }
.dish-detail__copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0 18px 18px;
}

.macro-grid span {
  padding: 11px 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: center;
}

.macro-grid small { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.macro-grid b { display: block; margin-top: 3px; font-size: 13px; }

.dish-detail__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px calc(15px + var(--safe-bottom));
  background: #182116;
  color: #fff;
}

.dish-detail__foot small { display: block; color: rgba(255, 255, 255, .55); font-size: 9px; }
.dish-detail__foot strong { display: block; margin-top: 2px; font-size: 20px; }
.dish-detail__foot button { padding: 13px 15px; border: 0; border-radius: 14px; background: #d9eaad; color: #17200f; font-size: 11px; font-weight: 900; }

.builder-head,
.cart-head {
  padding: 16px 4px 18px;
}

.builder-head small,
.cart-head small,
.boundary-screen > small,
.profile-screen > small { color: #758b5d; }

.builder-head p,
.cart-head p,
.boundary-screen p,
.profile-screen p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.builder-stage {
  overflow: hidden;
  border: 1px solid rgba(17, 20, 15, .08);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 33%, rgba(207, 222, 185, .9), transparent 42%),
    linear-gradient(160deg, #fbfaf5, #e2e7d9);
  box-shadow: 0 24px 55px rgba(38, 44, 30, .1);
}

.builder-bowl {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 265px;
}

.builder-bowl::after {
  content: "";
  position: absolute;
  bottom: 20px;
  left: 50%;
  width: 210px;
  height: 62px;
  transform: translateX(-50%);
  border: 2px solid rgba(49, 63, 38, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .58);
  box-shadow: inset 0 -14px 18px rgba(50, 65, 38, .08), 0 25px 35px rgba(31, 40, 25, .12);
}

.builder-bowl__empty {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #69765b;
}

.builder-bowl__empty span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px dashed rgba(58, 74, 44, .35);
  border-radius: 50%;
  font-size: 25px;
}

.builder-bowl__empty p { margin: 8px 0 0; font-size: 11px; font-weight: 800; }

.builder-bowl__items {
  position: absolute;
  z-index: 3;
  inset: 18px 20px 35px;
  pointer-events: none;
}

.builder-bowl__items img {
  position: absolute;
  width: 118px;
  height: 118px;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, .84);
  border-radius: 50%;
  box-shadow: 0 14px 24px rgba(30, 38, 23, .2);
  animation: ingredient-in .45s cubic-bezier(.17, .76, .22, 1.25) both;
}

.builder-bowl__items img:nth-child(1) { top: 14px; left: calc(50% - 59px); }
.builder-bowl__items img:nth-child(2) { right: calc(50% - 104px); bottom: 0; }
.builder-bowl__items img:nth-child(3) { bottom: 0; left: calc(50% - 104px); }

@keyframes ingredient-in {
  from { opacity: 0; transform: translateY(-35px) scale(.6) rotate(-12deg); }
  to { opacity: 1; transform: none; }
}

.builder-total {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid rgba(17, 20, 15, .08);
  background: rgba(255, 255, 255, .65);
}

.builder-total span small { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.builder-total span b { display: block; margin-top: 2px; font-size: 13px; }
.builder-total > strong { font-size: 21px; }

.component-list { display: grid; gap: 8px; margin-top: 14px; }

.component-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, .88);
  color: var(--ink);
  text-align: left;
  transition: border-color .2s, background .2s, transform .2s;
}

.component-card:active { transform: scale(.985); }
.component-card.is-selected { border-color: #7d995d; background: #e8f0dc; }
.component-card img { width: 62px; height: 62px; object-fit: cover; border-radius: 14px; }
.component-card span { min-width: 0; }
.component-card small { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.component-card b { display: block; overflow: hidden; margin: 4px 0; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.component-card em { display: block; color: #667b50; font-size: 10px; font-style: normal; font-weight: 800; }
.component-card i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #20301b; color: #fff; font-size: 18px; font-style: normal; }
.component-card.is-selected i { background: #78905c; }

.builder-add {
  position: sticky;
  z-index: 8;
  bottom: calc(74px + var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 14px;
  padding: 16px 17px;
  border: 0;
  border-radius: 17px;
  background: #182116;
  color: #fff;
  box-shadow: 0 14px 30px rgba(26, 35, 20, .24);
  font-size: 12px;
  font-weight: 900;
}

.builder-add:disabled { opacity: .45; box-shadow: none; }
.builder-add span { color: #d9eaad; font-size: 15px; }
.legal-note { margin: 15px 4px 0; color: var(--muted); font-size: 9px; line-height: 1.55; }

.cart-empty {
  display: grid;
  place-items: center;
  min-height: 390px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, .75);
  text-align: center;
}

.cart-empty > span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: #e2ebd5;
  color: #6f8655;
  font-size: 34px;
  font-weight: 300;
}

.cart-empty h2 { margin: 22px 0 6px; font-size: 26px; }
.cart-empty p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.cart-empty button { max-width: 220px; justify-content: center; background: #182116; color: #fff; }

.cart-list { display: grid; gap: 9px; }

.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 13px; }
.cart-item h3 { margin: 0 0 5px; font-size: 13px; }
.cart-item p { margin: 0; color: var(--muted); font-size: 9px; }
.cart-item strong { font-size: 13px; }
.cart-item button { grid-column: 3; padding: 8px; border: 0; background: none; color: #9b5c52; font-size: 16px; }

.cart-summary {
  margin-top: 14px;
  padding: 18px;
  border-radius: 22px;
  background: #182116;
  color: #fff;
}

.cart-summary p { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: 11px; }
.cart-summary p strong { color: #d9eaad; font-size: 24px; }
.cart-summary button { width: 100%; margin-top: 8px; padding: 15px; border: 0; border-radius: 15px; background: #d9eaad; color: #182116; font-size: 12px; font-weight: 900; }
.cart-summary small { display: block; margin-top: 10px; color: rgba(255, 255, 255, .5); font-size: 8px; line-height: 1.45; }

.boundary-screen,
.profile-screen {
  min-height: 520px;
  padding: 30px 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0, rgba(180, 205, 143, .26), transparent 34%),
    var(--card);
  box-shadow: 0 24px 60px rgba(28, 34, 23, .08);
}

.boundary-screen > span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 35px;
  border: 1px solid #758d59;
  border-radius: 50%;
  color: #758d59;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}

.boundary-screen ul {
  display: grid;
  gap: 10px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.boundary-screen li {
  position: relative;
  padding: 13px 14px 13px 40px;
  border: 1px solid rgba(85, 110, 64, .15);
  border-radius: 14px;
  background: rgba(229, 239, 216, .55);
  color: #3b4b30;
  font-size: 12px;
  font-weight: 800;
}

.boundary-screen li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  color: #718c54;
}

.boundary-screen button,
.profile-screen button { justify-content: center; margin-top: 24px; background: #182116; color: #fff; }

.profile-screen__avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 28px;
  border-radius: 30px;
  background: #21301c;
  color: #d9eaad;
  font-family: Georgia, serif;
  font-size: 42px;
}

.profile-screen > div:not(.profile-screen__avatar) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 10px;
}

.profile-screen > div span { color: var(--muted); }
.profile-screen > div b { text-align: right; }

.demo-nav {
  position: fixed;
  z-index: 40;
  right: 10px;
  bottom: max(10px, var(--safe-bottom));
  left: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 21px;
  background: rgba(20, 25, 17, .94);
  box-shadow: 0 20px 45px rgba(15, 20, 12, .3);
  backdrop-filter: blur(18px);
}

.demo-nav button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 54px;
  padding: 5px 2px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: rgba(255, 255, 255, .45);
}

.demo-nav button.is-active { background: rgba(217, 234, 173, .12); color: #d9eaad; }
.demo-nav i { font-size: 19px; font-style: normal; line-height: 1; }
.demo-nav span { font-size: 8px; font-weight: 800; }
.demo-nav b { position: absolute; top: 4px; right: calc(50% - 22px); display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d9eaad; color: #16200f; font-size: 8px; }

.demo-toast {
  position: fixed;
  z-index: 60;
  right: 22px;
  bottom: calc(86px + var(--safe-bottom));
  left: 22px;
  padding: 13px 15px;
  transform: translateY(18px);
  border-radius: 14px;
  background: #10150e;
  color: #fff;
  box-shadow: 0 18px 36px rgba(13, 18, 11, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.demo-toast.is-visible { transform: none; opacity: 1; }

@media (min-width: 680px) {
  .demo-main { width: min(100%, 620px); margin: 0 auto; }
  .demo-head { padding-right: max(24px, calc((100vw - 620px) / 2)); padding-left: max(24px, calc((100vw - 620px) / 2)); }
  .demo-safety { width: min(calc(100% - 32px), 588px); margin-right: auto; margin-left: auto; }
  .demo-nav { right: max(18px, calc((100vw - 620px) / 2)); left: max(18px, calc((100vw - 620px) / 2)); }
}

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