@font-face {
  font-family: "MBB Rubik Wet Paint";
  src: url("./assets/fonts/rubik-wet-paint.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MBB Orbit";
  src: url("./assets/fonts/orbit.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MBB Bagel Fat One";
  src: url("./assets/fonts/bagel-fat-one.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MBB Jua";
  src: url("./assets/fonts/jua.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MBB Poor Story";
  src: url("./assets/fonts/poor-story.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MBB Black And White";
  src: url("./assets/fonts/black-and-white-picture.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MBB Sans";
  src: url("./assets/fonts/noto-sans-kr.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "MBB Mono";
  src: url("./assets/fonts/noto-sans-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #251b21;
  --muted: #76646a;
  --cream: #fff8ec;
  --paper: #f7ead6;
  --tomato: #b73527;
  --pumpkin: #df753d;
  --sage: #799b58;
  --violet: #4d4252;
  --line: rgba(53, 38, 44, 0.13);
  --shadow: 0 20px 60px rgba(65, 43, 39, 0.14);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  color-scheme: dark;
  background:
    radial-gradient(circle at 86% 8%, rgba(232, 108, 60, .27), transparent 24rem),
    radial-gradient(circle at 12% 88%, rgba(124, 56, 137, .32), transparent 30rem),
    linear-gradient(155deg, #21102b 0%, #160b20 48%, #08060d 100%) #1a0b22;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

html.viewport-fit-lock,
body.viewport-fit-lock {
  overflow-y: hidden;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: #f2edf7;
  font-family: "MBB Sans";
  background: transparent;
}

@supports not (height: 100dvh) {
  body { min-height: -webkit-fill-available; }
}

button, summary {
  font: inherit;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button { -webkit-tap-highlight-color: transparent; }

.page-glow {
  display: none;
}
.page-glow-a { top: -10rem; right: -7rem; background: #dd713c; }
.page-glow-b { bottom: -12rem; left: -8rem; background: #713c86; }

.app-shell {
  width: min(760px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero { margin: 0; padding: 12px 4px 16px; }
.eyebrow {
  margin: 0 0 7px;
  color: var(--pumpkin);
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0.17em;
}
.eyebrow.small { margin-bottom: 3px; font-size: 0.66rem; }
.hero h1 {
  margin: 0;
  color: #f7f4ff;
  font-family: "MBB Rubik Wet Paint";
  font-size: clamp(2.55rem, 8vw, 4.35rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: .035em;
  text-align: center;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .72);
}
.hero-copy { margin: 9px 0 0; color: var(--muted); font-size: 0.92rem; }

.game-layout {
  position: relative;
  display: block;
  overflow: visible;
}

.pizza-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.pizza-panel { padding: 18px; }
.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 8px 14px;
}
.stage-bar > div { display: flex; align-items: baseline; gap: 8px; }
.stage-label, .cheese-meter span { color: var(--muted); font-size: 0.75rem; }
.stage-bar strong { font-size: 0.95rem; }
.cheese-meter {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3e3c4;
}
.cheese-meter strong { min-width: 3.4em; text-align: right; color: #9b5e28; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.topping-field {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  width: min(100%, 620px);
  gap: 0;
  margin: 0 auto;
  padding: 8px 2px 2px;
  transform: translateY(8px);
}

.pizza-workspace {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  touch-action: manipulation;
  background: transparent;
  box-shadow: none;
}

.pizza-panel,
.pizza-workspace,
.topping-field,
.dressing-panel,
.action-bar,
.how-to,
.canvas-wrap,
#pizzaCanvas {
  -webkit-touch-callout: none;
}

.topping-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 65px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform .15s, filter .15s, opacity .15s;
}
.topping-card canvas {
  display: block;
  width: 62px;
  height: 62px;
  max-width: 100%;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .48));
}
.topping-card.cheese-card canvas { width: 104px; height: auto; }
.topping-card:hover:not(:disabled) { transform: scale(1.08); }
.topping-card:active:not(:disabled) { transform: scale(.97); }
.topping-card.selected { transform: scale(1.08); }
.topping-card.selected canvas {
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .48)) drop-shadow(0 0 5px rgba(239, 117, 62, .28));
}
.topping-card:focus-visible { outline: 2px solid rgba(191, 69, 45, .58); outline-offset: 0; }
.topping-card:disabled { cursor: default; opacity: .5; }
.topping-card:nth-child(1) { translate: 0 3px; rotate: -7deg; }
.topping-card:nth-child(2) { translate: 0 -2px; rotate: 4deg; }
.topping-card:nth-child(3) { translate: 0 4px; rotate: -3deg; }
.topping-card:nth-child(4) { translate: 0 -1px; rotate: 6deg; }
.topping-card:nth-child(5) { translate: 0 3px; rotate: -5deg; }
.topping-card:nth-child(6) { translate: 0 14px; rotate: 5deg; }
.topping-card:nth-child(7) { translate: 0 4px; rotate: -4deg; }
.topping-card:nth-child(8) { translate: 0 -2px; rotate: 3deg; }
.topping-card:nth-child(9) { translate: 0 10px; rotate: -5deg; }
.topping-card:nth-child(10) { translate: 0 22px; rotate: 4deg; }

.canvas-wrap {
  position: relative;
  display: grid;
  place-items: center;
  overflow: visible;
  aspect-ratio: 1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  touch-action: manipulation;
}
.canvas-wrap.dressing-active { touch-action: manipulation; }

.dressing-mode,
.dressing-mode * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

.dressing-mode .canvas-wrap,
.dressing-mode #pizzaCanvas {
  -webkit-user-drag: none;
}

.dressing-mode #pizzaCanvas {
  touch-action: manipulation !important;
}

#pizzaCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  cursor: auto;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5)) drop-shadow(0 0 8px rgba(178, 104, 198, .16));
}

.tool-cursor {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  display: none;
  width: 220px;
  height: 220px;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  transition: opacity .08s;
  filter: drop-shadow(0 3px 3px rgba(35, 22, 25, .25));
}

.topping-thought {
  position: absolute;
  z-index: 6;
  top: 72px;
  left: 10px;
  width: max-content;
  max-width: min(250px, calc(100% - 24px));
  padding: 12px 18px;
  border: 1px solid rgba(83, 61, 61, .18);
  border-radius: 999px;
  color: #49383e;
  background: rgba(255, 252, 245, .97);
  box-shadow: 0 8px 22px rgba(58, 37, 38, .16);
  font-family: "MBB Poor Story";
  font-size: .96rem;
  font-weight: 400;
  line-height: 1.25;
  white-space: pre-line;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-100% - 30px)) scale(.92);
  transform-origin: 0 100%;
  transition: opacity .16s, transform .2s;
}
.topping-thought::before,
.topping-thought::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(83, 61, 61, .17);
  border-radius: 50%;
  background: rgba(255, 252, 245, .97);
  box-shadow: 0 3px 8px rgba(58, 37, 38, .1);
}
.topping-thought::before { left: 4px; bottom: -14px; width: 13px; height: 13px; }
.topping-thought::after { left: -8px; bottom: -25px; width: 7px; height: 7px; }
.topping-thought.place-left {
  transform: translate(-100%, calc(-100% - 30px)) scale(.92);
  transform-origin: 100% 100%;
}
.topping-thought.place-left::before { left: auto; right: 4px; }
.topping-thought.place-left::after { left: auto; right: -8px; }

@media (hover: hover) and (pointer: fine) {
  #pizzaCanvas { cursor: none; }
  .tool-cursor { display: block; }
  .tool-cursor.visible { opacity: 1; }
  .topping-thought.active.cursor-visible { opacity: 1; transform: translateY(calc(-100% - 30px)) scale(1); }
  .topping-thought.active.cursor-visible.place-left { transform: translate(-100%, calc(-100% - 30px)) scale(1); }
}

@media (hover: none), (pointer: coarse) {
  .topping-thought {
    top: 12px !important;
    left: 50% !important;
    max-width: min(250px, calc(100% - 34px));
    transform: translateX(-50%) scale(.92);
    transform-origin: 50% 0;
  }
  .topping-thought.tail-left::before { right: auto; bottom: -17px; left: 28px; }
  .topping-thought.tail-left::after { right: auto; bottom: -28px; left: 16px; }
  .topping-thought.tail-right::before { right: 28px; bottom: -17px; left: auto; }
  .topping-thought.tail-right::after { right: 16px; bottom: -28px; left: auto; }
  .topping-thought.active { opacity: 1; transform: translateX(-50%) scale(1); }
}

.bake-toast {
  position: fixed;
  z-index: 30;
  left: 0;
  top: var(--bake-track-y, 50vh);
  box-sizing: border-box;
  width: 100vw;
  height: 70px;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fffaf4;
  background: transparent;
  box-shadow: none;
  font-family: "MBB Poor Story";
  font-size: clamp(1.4rem, 5vw, 1.72rem);
  font-weight: 700;
  line-height: 1.28;
  text-align: center;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity .18s;
}
.bake-toast.visible { opacity: 1; transform: translateY(-50%); }
.bake-toast-text {
  display: none;
}
.bake-progress {
  display: block;
  position: relative;
  overflow: visible;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}
.bake-progress::before {
  content: none;
}
.bake-progress-fill {
  display: none;
}
.bake-progress-icon {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 2px 3px rgba(10, 4, 12, .45);
  --face-direction: 1;
  transform: translate(-50%, -50%) rotate(0deg) scaleX(var(--face-direction));
  transform-origin: 50% 50%;
}
.bake-progress-icon::before {
  content: "🕸️";
  position: absolute;
  z-index: -1;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 50px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(10, 4, 12, .35));
}
.bake-progress-icon::after {
  content: none;
}
.bake-progress-icon.face-forward { --face-direction: -1; }

.package-thought {
  position: absolute;
  z-index: 100;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 12px 18px;
  border: 1px solid rgba(83, 61, 61, .18);
  border-radius: 999px;
  color: #49383e;
  background: rgba(255, 252, 245, .97);
  box-shadow: 0 8px 22px rgba(58, 37, 38, .16);
  font-family: "MBB Poor Story";
  font-size: .96rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: scale(.92);
  transform-origin: 0 0;
  transition: opacity .18s, transform .2s;
}
.package-thought::before,
.package-thought::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(83, 61, 61, .17);
  border-radius: 50%;
  background: rgba(255, 252, 245, .97);
}
.package-thought::before { left: 28px; bottom: -15px; width: 13px; height: 13px; }
.package-thought::after { left: 18px; bottom: -27px; width: 7px; height: 7px; }
.package-thought.visible { opacity: 1; transform: scale(1); }

.action-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 13px;
}
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42em;
  min-height: 45px;
  border: 0;
  border-radius: 15px;
  font-family: "MBB Bagel Fat One";
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.035em;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, opacity .15s, box-shadow .15s;
}
.action-button:hover:not(:disabled) { transform: translateY(-1px); }
.action-button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.action-button:disabled { opacity: .38; cursor: default; }
.action-button.secondary {
  color: #eee8f8;
  background: rgba(57, 35, 69, .9);
  box-shadow: inset 0 0 0 1px rgba(214, 187, 231, .2);
}
.action-button.bake {
  color: #fff;
  background: linear-gradient(135deg, #c83f2d, #ee7438);
  box-shadow: 0 7px 18px rgba(215, 69, 39, .25);
}
.baking-mode .action-button.bake {
  opacity: .78;
  background-image: linear-gradient(90deg,
    #c83f2d 0%,
    #ee7438 50%,
    #2a1035 50%,
    #4a183f 100%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: bake-button-fill var(--bake-duration, 1250ms) linear forwards;
}
@keyframes bake-button-fill {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}
.action-button.ghost {
  color: #eee8f8;
  background: rgba(57, 35, 69, .9);
  box-shadow: inset 0 0 0 1px rgba(214, 187, 231, .2);
}
body:not(.packaged-mode) #undoButton::before,
body:not(.packaged-mode) #redoButton::after {
  content: "";
  width: .42em;
  height: .42em;
  opacity: .68;
  position: relative;
  top: 1px;
}
body:not(.packaged-mode) #undoButton::before {
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}
body:not(.packaged-mode) #redoButton::after {
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.dressing-panel {
  position: relative;
  display: none;
  min-height: 140px;
  margin: 0;
  padding: 0;
}
.dressing-panel.active {
  display: grid;
  place-items: center;
}
.dressing-mode .topping-field { display: none; }
.dressing-grid {
  display: grid;
  grid-template-columns: repeat(3, 70px);
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: min(100%, 330px);
}
.dressing-card {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .15s, opacity .15s;
}
.dressing-card:hover:not(:disabled) { transform: scale(1.08); }
.dressing-card:disabled { cursor: default; opacity: .58; }
.dressing-card.selected { transform: scale(1.12); }
.saver-card {
  position: absolute;
  top: 96%;
  right: clamp(42px, 7vw, 70px);
  left: auto;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  translate: 0 -50%;
  transition: transform .15s, opacity .15s;
}
.saver-card:hover:not(:disabled) { transform: scale(1.08); }
.saver-card:disabled { cursor: default; opacity: .32; }
.saver-card.selected { transform: scale(1.12); }
.saver-icon {
  display: block;
  width: 54px;
  height: 54px;
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(47, 38, 39, .18));
}
.saver-icon-base,
.saver-icon-top {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.saver-icon-base { stroke: #bdbab6; stroke-width: 11; }
.saver-icon-top { stroke: #fbfaf7; stroke-width: 7; }
.saver-icon circle { fill: #fff; stroke: #d4d1cd; stroke-width: 2; }
.sauce-icon {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 60% 38% 60% 40%;
  rotate: 42deg;
  box-shadow: inset 3px 3px 6px rgba(255,255,255,.5), 0 2px 5px rgba(57,37,38,.16);
}
.sauce-icon::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  rotate: -42deg;
}
.mayo-icon { background: linear-gradient(135deg, #fff8db, #e7d5ad); }
.mayo-icon::after { background: rgba(255,255,255,.8); }
.chili-icon { background: linear-gradient(135deg, rgba(241,91,55,.86), rgba(142,29,29,.9)); }
.chili-icon::after { background: #6e201a; box-shadow: 7px -4px 0 -2px #f0b35a, -5px 6px 0 -2px #7b261d; }
.basil-icon { background: linear-gradient(135deg, #c8db73, #89aa4d); }
.basil-icon::after { background: #3f713b; box-shadow: 7px -4px 0 -2px #2e6133, -5px 6px 0 -2px #4c8242; }

.how-to { margin-top: 20px; color: #c8bad3; font-family: "MBB Orbit"; font-size: .75rem; }
.how-to summary { cursor: pointer; font-weight: 400; color: #f0e8f5; }
.how-to ul { margin: 9px 0 0; padding-left: 18px; line-height: 1.7; }

.package-panel {
  position: absolute;
  z-index: 8;
  top: clamp(42px, 6%, 50px);
  right: clamp(42px, 6%, 50px);
  left: auto;
  display: none;
  padding: 0;
  translate: var(--package-x, 0px) var(--package-y, 0px);
  pointer-events: none;
  will-change: translate;
}
.package-panel.active { display: block; }
.package-panel.receipt-hidden { display: none; }
.order-docket {
  position: relative;
  width: clamp(162px, 27.5vw, 210px);
  padding: 16px 13px 21px;
  rotate: .6deg;
  color: #272322;
  background: #fff;
  box-shadow: 1px 7px 13px rgba(43,30,25,.2);
  font-family: "MBB Mono";
  font-size: clamp(.62rem, 1.88vw, .84rem);
  line-height: 1.32;
  letter-spacing: -.035em;
  text-align: left;
}
.order-docket::before {
  content: none;
}
.order-docket::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 7px;
  background: linear-gradient(135deg, #fff 50%, transparent 51%) 0 0 / 10px 10px repeat-x;
}
.docket-shop { margin: 1px 0 6px; font-size: 1.18em; font-weight: 700; line-height: 1.35; text-align: center; white-space: nowrap; }
.docket-rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  overflow: hidden;
  line-height: 1;
  white-space: nowrap;
}
.docket-heading { margin: 3px 0; font-size: .9em; font-weight: 400; letter-spacing: -.07em; text-align: left; white-space: nowrap; }
.docket-item {
  display: grid;
  grid-template-columns: 1em 1fr;
  gap: 2px;
  margin: 8px 0 12px;
  font-size: 1em;
  letter-spacing: -.06em;
}
.docket-item span { font-weight: 700; white-space: nowrap; }
.docket-item span.fit-tight { font-size: .86em; letter-spacing: -.08em; }
.docket-footer { font-size: .96em; font-weight: 400; letter-spacing: -.055em; text-align: left; white-space: nowrap; }
.receipt-remove {
  position: absolute;
  z-index: 3;
  top: -11px;
  right: -11px;
  display: none;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0 0 2px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 7px;
  color: #fff;
  background: #26122f;
  box-shadow: 0 4px 10px rgba(31,14,37,.28);
  font-family: "MBB Sans";
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.package-liner {
  position: absolute;
  z-index: 1;
  top: 3.5%;
  right: 3.5%;
  bottom: auto;
  left: 3.5%;
  display: none;
  aspect-ratio: 1;
  background:
    repeating-linear-gradient(45deg, rgba(119, 112, 102, .055) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(-45deg, rgba(119, 112, 102, .045) 0 1px, transparent 1px 8px),
    radial-gradient(circle at 72% 18%, rgba(172, 124, 69, .08) 0 3px, transparent 4px),
    #fffdf8;
  clip-path: polygon(2% 1%, 97% 0, 100% 5%, 99% 96%, 95% 100%, 3% 99%, 0 95%, 1% 4%);
  box-shadow: 0 5px 18px rgba(65, 45, 36, .17);
  rotate: -1.1deg;
}
.package-canvas {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.packaged-mode .package-draggable {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.packaged-mode .package-draggable.dragging { cursor: grabbing; }
.packaged-mode .pizza-workspace {
  background: linear-gradient(145deg, #f7ead9, #ead7bd);
  box-shadow: inset 0 0 0 1px rgba(72, 48, 45, .08);
}
.packaged-mode .topping-field { display: none; }
.packaged-mode .dressing-panel {
  display: flex;
  visibility: hidden;
  pointer-events: none;
}
.packaged-mode .package-liner {
  display: block;
  animation: package-reveal .2s ease-out both;
}
.packaged-mode .package-canvas { display: none; }
.packaged-mode .receipt-remove { display: grid; }
.packaged-mode .canvas-wrap { aspect-ratio: 1; touch-action: pan-y pinch-zoom; isolation: isolate; }
.packaged-mode .canvas-wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 1.5%;
  left: 1.5%;
  width: 97%;
  aspect-ratio: 1;
  border-radius: 20px;
  background: #d5bd98;
  box-shadow: 0 9px 20px rgba(72,48,45,.15), inset 0 0 0 1px rgba(72,48,45,.13), inset 0 0 28px rgba(82,57,38,.08);
  animation: package-reveal .2s ease-out both;
}
.packaged-mode #pizzaCanvas {
  z-index: 2;
  width: 100%;
  height: 100%;
  clip-path: none;
  transform: none;
  pointer-events: none;
}
.packaged-mode .package-panel.active {
  transform-origin: 82% 0;
  animation: receipt-place .36s cubic-bezier(.2, .86, .28, 1.12) both;
}

@keyframes package-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes receipt-place {
  0% { opacity: 0; transform: translateY(-16px) rotate(1.2deg) scale(.975); }
  72% { opacity: 1; transform: translateY(3px) rotate(-.25deg) scale(1.006); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
.packaged-mode .tool-cursor { display: none !important; }
.packaged-mode #redoButton {
  color: #fffaf2;
  background: linear-gradient(135deg, #bf452d, #e17a3d);
}
.packaged-mode #bakeButton {
  color: #fffaf2;
  background: #4d4252;
  box-shadow: none;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  translate: -50% 20px;
  box-sizing: border-box;
  width: max-content;
  max-width: none;
  padding: 11px 16px;
  border-radius: 999px;
  color: #fffaf4;
  background: rgba(38, 27, 33, .91);
  box-shadow: 0 12px 32px rgba(42, 27, 31, .25);
  font-family: "MBB Orbit";
  font-size: clamp(.88rem, 3.6vw, 1rem);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, translate .2s;
}
.toast.visible { opacity: 1; translate: -50% 0; }

@media (max-width: 940px) {
  .app-shell { padding-top: 24px; }
}

@media (min-width: 601px) {
  .app-shell {
    width: min(760px, calc(100% - 24px), calc(100dvh - 280px));
    padding: 14px 0 10px;
  }
  .hero { margin: 0; padding: 10px 4px 14px; }
  .eyebrow { margin-bottom: 4px; font-size: .68rem; }
  .hero h1 { font-size: clamp(2.6rem, 6.8vh, 4rem); }
  .pizza-panel { padding: 12px; border-radius: 24px; }
  .topping-field { padding: 4px 2px 0; transform: translateY(9px); }
  .topping-card { min-height: 50px; }
  .topping-card canvas { width: 50px; height: 50px; }
  .topping-card.cheese-card canvas { width: 84px; height: auto; }
  .dressing-panel { min-height: 110px; }
  .action-bar { gap: 8px; padding-top: 8px; }
  .action-button { min-height: 40px; border-radius: 13px; font-size: .92rem; }
  .how-to { margin-top: 19px; font-size: .68rem; }
  .packaged-mode .app-shell {
    width: min(700px, calc(100% - 24px), calc(100dvh - 340px));
  }
}

@media (max-width: 600px) {
  .app-shell { width: min(calc(100% - 10px), 560px); padding: 10px 0 28px; }
  .hero { margin: 0; padding: 8px 8px 12px; }
  .eyebrow { margin-bottom: 3px; font-size: .62rem; }
  .hero h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .hero-copy { margin-top: 5px; font-size: .76rem; }
  .pizza-panel { padding: 6px; border-radius: 20px; }
  .topping-field {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    margin: 0 auto;
    padding: 5px 0 1px;
    transform: translateY(7px);
  }
  .topping-card { min-height: 49px; }
  .topping-card canvas { width: 49px; height: 49px; }
  .topping-card.cheese-card canvas { width: 100%; height: auto; max-height: 55px; }
  .topping-thought {
    top: 12px !important;
    left: 50% !important;
    max-width: min(250px, calc(100% - 34px));
    transform: translateX(-50%) scale(.92) !important;
    transform-origin: 50% 0;
  }
  .topping-thought.tail-left::before { right: auto; bottom: -17px; left: 28px; }
  .topping-thought.tail-left::after { right: auto; bottom: -28px; left: 16px; }
  .topping-thought.tail-right::before { right: 28px; bottom: -17px; left: auto; }
  .topping-thought.tail-right::after { right: 16px; bottom: -28px; left: auto; }
  .topping-thought.active { opacity: 1; transform: translateX(-50%) scale(1) !important; }
  .pizza-workspace { border-radius: 18px; }
  .action-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-top: 7px; }
  .action-button {
    min-height: 38px;
    padding: 1px 2px 3px;
    border-radius: 11px;
    font-size: clamp(.72rem, 3.7vw, .9rem);
  }
  .how-to { margin: 20px 5px 2px; font-size: .69rem; }
  .package-panel {
    top: 42px;
    right: 46px;
    left: auto;
  }
  .order-docket { width: 168px; padding: 13px 11px 18px; }
  .package-thought {
    padding: 9px 12px;
    font-size: clamp(.72rem, 3.25vw, .88rem);
    line-height: 1.18;
  }
  .dressing-panel { min-height: 104px; }
  .dressing-grid { grid-template-columns: repeat(3, 58px); gap: 16px; width: min(100%, 240px); }
  .dressing-card { width: 58px; height: 58px; }
  .sauce-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .saver-card { top: 102%; right: 38px; left: auto; width: 64px; height: 64px; }
  .saver-icon { width: 46px; height: 46px; }
}

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