:root {
  --ink: #332a3a;
  --muted: #746b7f;
  --line: #6b5a76;
  --paper: #fff7e7;
  --surface: #fffdf8;
  --surface-2: #f6f0ff;
  --mint: #b7ead7;
  --leaf: #4b947d;
  --sun: #ffd66f;
  --coral: #ffb4aa;
  --berry: #9d88d7;
  --sky: #a9d9ff;
  --lilac: #cbc5f2;
  --peach: #ffd8ca;
  --cream-thread: rgba(255, 250, 238, 0.88);
  --thread-shadow: rgba(91, 76, 106, 0.22);
  --shadow: 0 5px 0 rgba(130, 109, 133, 0.34), 0 18px 32px rgba(85, 71, 99, 0.14);
  --soft-shadow: 0 12px 28px rgba(91, 76, 106, 0.16);
  --radius: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #faf5ea;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    repeating-linear-gradient(90deg, rgba(107, 90, 118, 0.038) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.48) 0 2px, transparent 2px 12px),
    linear-gradient(135deg, rgba(255, 214, 111, 0.34), rgba(203, 197, 242, 0.28) 48%, rgba(183, 234, 215, 0.3)),
    #faf5ea;
}

body {
  position: relative;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(35deg, rgba(255, 255, 255, 0.22) 0 3px, transparent 3px 14px),
    repeating-linear-gradient(125deg, rgba(89, 77, 109, 0.035) 0 1px, transparent 1px 13px);
  content: "";
  mix-blend-mode: multiply;
}

body.modal-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

img {
  display: block;
  max-width: 100%;
}

.icon-sprite,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app-frame {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 16px 16px calc(88px + var(--safe-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto 16px;
  padding: 10px 0 12px;
  border: 1px solid rgba(107, 90, 118, 0.12);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 10px),
    rgba(255, 250, 240, 0.68);
  padding: 10px 10px 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px rgba(91, 76, 106, 0.08);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-bird {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(107, 90, 118, 0.16);
  border-radius: 16px;
  background: #fffdf8;
  filter: drop-shadow(0 8px 10px rgba(91, 76, 106, 0.2));
  object-fit: contain;
  transform-origin: 50% 80%;
  animation: bird-bob 3.8s ease-in-out infinite;
}

img.brand-bird,
img.nav-video {
  display: block;
}

video.brand-bird,
video.plate-bird,
video.empty-bird,
video.pick-bird-img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1;
}

.header-actions,
.card-actions,
.inline-actions,
.slot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-button {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}

.icon-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.icon-button.accent {
  background: var(--sun);
}

.icon-button.danger {
  background: #ffe1dc;
}

.memo-button.has-dot::before {
  position: absolute;
  right: -5px;
  top: -5px;
  z-index: 2;
  width: 13px;
  height: 13px;
  border: 2px solid #fffdf8;
  border-radius: 999px;
  background: #ff5f57;
  box-shadow: 1px 2px 0 rgba(107, 90, 118, 0.28);
  content: "";
}

[data-tooltip]::after {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 160px;
  padding: 6px 8px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 3px 3px 0 var(--line);
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.content {
  max-width: 1180px;
  margin: 0 auto;
}

.view {
  display: grid;
  gap: 16px;
  animation: view-in 260ms ease both;
}

.hero-panel,
.today-panel,
.tool-panel,
.empty-state,
.settings-panel {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 220px;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 8px;
  padding: 18px;
  background:
    linear-gradient(125deg, rgba(255, 207, 86, 0.65), rgba(255, 250, 240, 0.92) 45%, rgba(130, 217, 184, 0.45)),
    var(--paper);
}

.hero-panel::before {
  position: absolute;
  inset: auto 0 0;
  height: 24px;
  background: repeating-linear-gradient(90deg, var(--line) 0 18px, transparent 18px 36px);
  opacity: 0.08;
  content: "";
}

.today-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 211, 106, 0.72), rgba(255, 250, 240, 0.96) 45%, rgba(142, 216, 207, 0.46)),
    var(--paper);
}

.today-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.today-title h2 {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1.05;
}

.meal-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  padding: 7px 13px;
  box-shadow: 3px 3px 0 var(--line);
  font-size: 0.95rem;
  font-weight: 1000;
  white-space: nowrap;
}

.today-clock {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  align-items: center;
  border: 2px solid rgba(33, 49, 61, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  padding: 6px 10px;
  color: #4d5f6b;
  font-size: 0.95rem;
  font-weight: 900;
}

.today-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-copy h2 {
  max-width: 8em;
  margin: 0 0 12px;
  font-size: clamp(2.15rem, 8vw, 4.7rem);
  line-height: 0.95;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-meta li,
.chip,
.category-pill,
.metric {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 5px 10px;
  font-size: 0.83rem;
  font-weight: 800;
  white-space: nowrap;
}

.hero-plate {
  position: relative;
  z-index: 1;
  display: grid;
  aspect-ratio: 1;
  width: min(42vw, 270px);
  place-items: center;
  justify-self: end;
}

.plate-ring {
  position: absolute;
  inset: 8%;
  border: 8px solid var(--surface);
  border-radius: 50%;
  background:
    conic-gradient(from 20deg, var(--coral), var(--sun), var(--mint), var(--sky), var(--coral));
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.72), 0 12px 0 rgba(33, 49, 61, 0.12);
  animation: plate-turn 18s linear infinite;
}

.plate-bird {
  position: relative;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 28%;
  background: #fffdf8;
  filter: drop-shadow(0 8px 0 rgba(33, 49, 61, 0.12));
  animation: bird-pop 2.8s ease-in-out infinite;
}

.hero-panel.has-saved-menus {
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
  align-items: stretch;
}

.hero-saved-list {
  position: relative;
  z-index: 1;
  display: grid;
  max-height: 265px;
  align-content: center;
  gap: 10px;
  overflow: auto;
  padding: 2px 4px 2px 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.hero-saved-card {
  display: grid;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px 10px),
    rgba(255, 253, 248, 0.84);
  padding: 12px;
  box-shadow: 4px 5px 0 rgba(107, 90, 118, 0.28);
}

.hero-saved-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.hero-saved-actions {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
}

.hero-saved-actions .icon-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.hero-saved-head h3 {
  margin: 0;
  color: #3a2d43;
  font-size: 1rem;
  line-height: 1.25;
}

.hero-saved-dishes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hero-saved-dish {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.hero-saved-dish img {
  width: 54px;
  height: 54px;
  border: 2px solid rgba(107, 90, 118, 0.35);
  border-radius: 50%;
  background: #fffdf8;
  object-fit: cover;
}

.hero-saved-dish span {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-panel,
.settings-panel {
  padding: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 1.08rem;
}

.draft-panel-title.is-menu-ready {
  justify-content: center;
}

.draft-panel-title.is-menu-ready .menu-actions {
  width: min(100%, 520px);
  justify-content: center;
}

.grid {
  display: grid;
  gap: 12px;
}

.control-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control {
  display: grid;
  min-height: 94px;
  gap: 10px;
  align-content: space-between;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
}

.control label,
.field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.segmented button,
.text-button,
.primary-button,
.category-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px 12px;
  font-weight: 900;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.segmented button,
.category-button {
  box-shadow: 3px 3px 0 var(--line);
}

.segmented button.is-active,
.category-button.is-active {
  background: var(--mint);
}

.stepper {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
}

.stepper button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stepper strong {
  min-width: 0;
  text-align: center;
  font-size: 1.15rem;
}

.menu-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.menu-actions .text-button,
.menu-actions .primary-button,
.menu-actions .save-menu-button {
  min-width: 112px;
}

.draft-meal-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.draft-meal-selector button {
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.38) 0 2px, transparent 2px 10px),
    var(--surface);
  box-shadow: 4px 5px 0 rgba(107, 90, 118, 0.42);
  font-weight: 1000;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.draft-meal-selector button:nth-child(1).is-active {
  background: linear-gradient(135deg, #ffedaa, #fffdf8);
}

.draft-meal-selector button:nth-child(2).is-active {
  background: linear-gradient(135deg, #b7ead7, #fffdf8);
}

.draft-meal-selector button:nth-child(3).is-active {
  background: linear-gradient(135deg, #ffd8ca, #f3edff);
}

.draft-meal-selector button:hover,
.draft-meal-selector button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 7px 0 rgba(107, 90, 118, 0.38);
}

.save-menu-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--sun);
  padding: 9px 16px;
  box-shadow: 5px 5px 0 var(--line);
  font-weight: 1000;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.save-menu-button:hover,
.save-menu-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--line);
}

.save-menu-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.primary-button {
  border-color: var(--line);
  background: var(--coral);
  box-shadow: 5px 5px 0 var(--line);
  color: #1d2b34;
}

.primary-button:hover,
.primary-button:focus-visible,
.text-button:hover,
.text-button:focus-visible,
.category-button:hover,
.category-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}

.primary-button:active,
.text-button:active,
.category-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.text-button {
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--line);
}

.text-button.warning {
  background: #ffe1dc;
}

.menu-grid,
.dish-grid,
.history-grid,
.today-saved-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.slot-card,
.dish-card,
.history-card,
.saved-menu-card {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--line);
  transform-origin: 50% 80%;
}

.slot-card {
  animation: card-rise 360ms ease both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.slot-media,
.dish-media {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
}

.slot-media img,
.dish-media img {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  width: clamp(112px, 13vw, 148px);
  height: clamp(112px, 13vw, 148px);
  border: 2px solid rgba(107, 90, 118, 0.56);
  border-radius: 50%;
  background: #fffdf8;
  box-shadow:
    0 9px 18px rgba(91, 76, 106, 0.18),
    0 0 0 9px rgba(255, 253, 248, 0.56),
    inset 0 -5px 0 rgba(203, 197, 242, 0.18);
  object-fit: cover;
}

.category-ribbon {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--sun);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.slot-body,
.dish-body,
.history-body,
.saved-menu-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.today-saved-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.saved-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.saved-menu-head h3 {
  margin: 0;
  font-size: 1.22rem;
}

.saved-menu-pdf {
  min-height: 40px;
  padding-inline: 12px;
  background: var(--sun);
  white-space: nowrap;
}

.saved-dish-list {
  display: grid;
  gap: 8px;
}

.saved-dish {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1.5px solid rgba(33, 49, 61, 0.18);
  border-radius: 8px;
  background: #fffaf0;
  padding: 7px;
}

.saved-dish img {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 2px 5px rgba(91, 76, 106, 0.12);
  object-fit: cover;
}

.saved-dish strong,
.saved-dish span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.saved-dish strong {
  font-size: 0.95rem;
}

.saved-dish span {
  color: #647684;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-head h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.12rem;
  line-height: 1.2;
}

.dish-meta,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  min-height: 26px;
  border-width: 1.5px;
  padding: 3px 8px;
  font-size: 0.75rem;
}

.chip.mint {
  background: rgba(130, 217, 184, 0.55);
}

.chip.sky {
  background: rgba(120, 183, 255, 0.4);
}

.chip.sun {
  background: rgba(255, 207, 86, 0.52);
}

.chip.coral {
  background: rgba(255, 125, 110, 0.34);
}

.slot-actions {
  justify-content: flex-end;
}

.dish-pick-button {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 52px;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 211, 106, 0.96), rgba(142, 216, 207, 0.88)),
    var(--sun);
  padding: 7px 12px 7px 7px;
  box-shadow: 5px 5px 0 var(--line);
  font-size: 1rem;
  font-weight: 1000;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.dish-pick-button::after {
  position: absolute;
  inset: -50% auto auto -20%;
  width: 42%;
  height: 200%;
  background: rgba(255, 255, 255, 0.38);
  content: "";
  transform: rotate(18deg) translateX(-120%);
  transition: transform 360ms ease;
}

.dish-pick-button:hover,
.dish-pick-button:focus-visible {
  transform: translate(-2px, -2px) rotate(-0.5deg);
  box-shadow: 7px 7px 0 var(--line);
  filter: saturate(1.08);
}

.dish-pick-button:hover::after,
.dish-pick-button:focus-visible::after {
  transform: rotate(18deg) translateX(360%);
}

.dish-pick-button:active,
.dish-pick-button.is-popping {
  transform: translate(2px, 2px) scale(0.98);
  box-shadow: 2px 2px 0 var(--line);
}

.pick-bird {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fffdfd;
  color: #9a6c5b;
  font-size: 0.9rem;
  box-shadow: inset 0 -6px 0 rgba(169, 220, 255, 0.55);
}

.filter-bar {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.search-box {
  position: relative;
}

.search-box .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-box input,
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 11px 12px;
  outline: none;
}

.search-box input {
  min-height: 46px;
  padding-left: 42px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.category-button {
  min-width: max-content;
  min-height: 38px;
  padding: 6px 11px;
  font-size: 0.84rem;
}

.dish-detail {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.steps {
  margin: 0;
  padding-left: 18px;
}

.steps li + li {
  margin-top: 5px;
}

.empty-state {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.empty-state h3 {
  margin: 10px 0 8px;
}

.empty-state p {
  max-width: 28rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.empty-bird {
  width: 118px;
  aspect-ratio: 1;
  border-radius: 28%;
  background: #fffdf8;
  animation: bird-bob 3.4s ease-in-out infinite;
}

.history-card.is-open {
  background: #fffdf8;
}

.history-dishes {
  display: grid;
  gap: 8px;
}

.history-dish {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1.5px solid rgba(33, 49, 61, 0.22);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

.history-dish img {
  width: 54px;
  height: 54px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 2px 5px rgba(91, 76, 106, 0.12);
  object-fit: cover;
}

.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sync-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sync-actions {
  margin-top: 12px;
}

.metric {
  justify-content: space-between;
  min-height: 70px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9rem;
}

.metric strong {
  font-size: 1.4rem;
}

.sound-toggle {
  display: grid;
  width: 100%;
  min-height: 64px;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffaf0, rgba(169, 220, 255, 0.45));
  padding: 10px 12px;
  box-shadow: 5px 5px 0 var(--line);
  font-weight: 1000;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--line);
}

.sound-toggle strong {
  display: inline-grid;
  min-width: 38px;
  min-height: 32px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
}

.toggle-track {
  position: relative;
  display: block;
  width: 64px;
  height: 36px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #d9e4ea;
  box-shadow: inset 0 4px 0 rgba(33, 49, 61, 0.08);
  transition: background 180ms ease;
}

.toggle-knob {
  position: absolute;
  left: 4px;
  top: 4px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fffdfd;
  box-shadow: 2px 2px 0 rgba(33, 49, 61, 0.18);
  transition: transform 180ms cubic-bezier(0.2, 1.4, 0.38, 1);
}

.toggle-knob::after {
  color: #9a6c5b;
  content: "♪";
  font-size: 0.78rem;
  font-weight: 1000;
}

.sound-toggle.is-on {
  background: linear-gradient(135deg, rgba(255, 211, 106, 0.82), rgba(142, 216, 207, 0.72));
}

.sound-toggle.is-on .toggle-track {
  background: #8ed8cf;
}

.sound-toggle.is-on .toggle-knob {
  transform: translateX(28px) rotate(10deg);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  overflow: hidden;
  padding: 16px;
  background: rgba(21, 31, 39, 0.45);
  animation: fade-in 160ms ease both;
  overscroll-behavior: contain;
}

.modal {
  display: grid;
  width: min(760px, 100%);
  max-height: min(86vh, 780px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--line);
  animation: sheet-in 210ms ease both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--line);
  background: var(--sun);
  padding: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.meal-picker-modal {
  max-width: 560px;
}

.meal-picker {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.meal-picker-dish {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(169, 220, 255, 0.34));
  padding: 10px;
}

.meal-picker-dish img {
  width: 96px;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 6px 12px rgba(91, 76, 106, 0.14);
  object-fit: cover;
}

.meal-picker-dish h3 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  font-size: 1.2rem;
}

.meal-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meal-choice-button {
  display: grid;
  min-height: 92px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 8px;
  box-shadow: 5px 5px 0 var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.meal-choice-button:nth-child(1) {
  background: #fff2a5;
}

.meal-choice-button:nth-child(2) {
  background: #8ed8cf;
}

.meal-choice-button:nth-child(3) {
  background: #a9dcff;
}

.meal-choice-button span {
  font-size: 1.08rem;
  font-weight: 1000;
}

.meal-choice-button small {
  color: rgba(33, 49, 61, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
}

.meal-choice-button:hover,
.meal-choice-button:focus-visible,
.meal-choice-button.is-popping {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 7px 7px 0 var(--line);
}

.draft-cart-modal {
  max-width: 560px;
}

.draft-cart-content {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 14px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

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

.draft-cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  border: 2px solid rgba(107, 90, 118, 0.32);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px 10px),
    #fff7e7;
  padding: 10px;
}

.draft-cart-item img {
  width: 64px;
  height: 64px;
  border: 2px solid rgba(107, 90, 118, 0.35);
  border-radius: 50%;
  background: #fffdf8;
  object-fit: cover;
}

.draft-cart-item strong,
.draft-cart-item span,
.draft-cart-empty strong,
.draft-cart-empty span {
  display: block;
}

.draft-cart-item strong {
  margin-bottom: 3px;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.draft-cart-item span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.draft-cart-empty {
  display: grid;
  min-height: 140px;
  place-items: center;
  gap: 6px;
  border: 2px dashed rgba(107, 90, 118, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.66);
  color: var(--muted);
  text-align: center;
}

.notebook-backdrop {
  perspective: 1100px;
}

.notebook-modal {
  max-width: 720px;
  transform-origin: 50% 85%;
  overflow: hidden;
  animation: notebook-open 260ms cubic-bezier(0.2, 1.2, 0.32, 1) both;
}

.notebook-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notebook-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(107, 90, 118, 0.28) calc(50% - 1px), rgba(107, 90, 118, 0.28) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(0deg, rgba(255, 220, 120, 0.12) 0 1px, transparent 1px 28px),
    linear-gradient(135deg, #fff8dc, #fffdf8 58%, #f3edff);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.notebook-editor,
.notebook-list {
  display: grid;
  align-content: start;
  gap: 12px;
}

.notebook-editor textarea {
  min-height: 180px;
  max-height: 46vh;
  resize: vertical;
  line-height: 1.7;
}

.note-tab {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 2px solid rgba(107, 90, 118, 0.36);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0 2px, transparent 2px 10px),
    rgba(255, 253, 248, 0.8);
  padding: 10px;
  box-shadow: 3px 4px 0 rgba(107, 90, 118, 0.22);
  text-align: left;
}

.note-tab.is-active {
  background: linear-gradient(135deg, var(--sun), #fffdf8);
}

.note-tab span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-form {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.image-picker {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.image-preview {
  width: 118px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.image-preview img {
  position: relative;
  z-index: 1;
  width: 76%;
  height: 76%;
  border: 1.5px solid rgba(107, 90, 118, 0.5);
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 5px 10px rgba(91, 76, 106, 0.14);
  object-fit: cover;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 2px solid rgba(33, 49, 61, 0.12);
  padding-top: 12px;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  left: 12px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  padding: 8px;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 0 rgba(33, 49, 61, 0.12);
}

.nav-item {
  display: grid;
  min-width: 0;
  height: 56px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.nav-item .icon,
.nav-video {
  width: 22px;
  height: 22px;
}

.nav-video {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(107, 90, 118, 0.14);
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: 0 4px 8px rgba(91, 76, 106, 0.12);
  object-fit: contain;
}

.nav-item.is-active {
  border: 2px solid var(--line);
  background: var(--sun);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--line);
}

.nav-item.is-active .nav-video {
  border-color: rgba(107, 90, 118, 0.32);
  box-shadow: 0 5px 10px rgba(91, 76, 106, 0.16);
}

.draft-cart-fab {
  position: fixed;
  right: 18px;
  bottom: calc(104px + var(--safe-bottom));
  z-index: 44;
  display: inline-grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px 10px),
    linear-gradient(135deg, var(--sun), var(--peach));
  box-shadow: 5px 6px 0 rgba(107, 90, 118, 0.42), 0 16px 24px rgba(85, 71, 99, 0.16);
  color: var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.draft-cart-fab .icon {
  width: 28px;
  height: 28px;
}

.draft-cart-fab:hover,
.draft-cart-fab:focus-visible {
  transform: translate(-2px, -3px) rotate(-1deg);
  box-shadow: 7px 9px 0 rgba(107, 90, 118, 0.38), 0 18px 26px rgba(85, 71, 99, 0.18);
}

.draft-cart-count {
  position: absolute;
  top: -8px;
  right: -6px;
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid #fffdf8;
  border-radius: 999px;
  background: #ff5f57;
  color: white;
  padding: 0 6px;
  box-shadow: 2px 3px 0 rgba(107, 90, 118, 0.32);
  font-size: 0.8rem;
  font-weight: 1000;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(94px + var(--safe-bottom));
  z-index: 60;
  max-width: min(360px, calc(100vw - 32px));
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  padding: 11px 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.shuffle-pulse .slot-card {
  animation-name: card-flip;
  animation-duration: 430ms;
}

.manual-pick-pulse .slot-card {
  animation-name: card-drop-in;
  animation-duration: 620ms;
}

.hero-panel,
.today-panel,
.tool-panel,
.empty-state,
.settings-panel,
.control,
.metric,
.slot-card,
.dish-card,
.history-card,
.saved-menu-card,
.modal,
.meal-picker-dish,
.sound-toggle,
.bottom-nav {
  position: relative;
  border-color: var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(135deg, rgba(126, 111, 148, 0.06) 0 1px, transparent 1px 9px),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel::after,
.today-panel::before,
.tool-panel::before,
.empty-state::before,
.settings-panel::before,
.control::before,
.metric::before,
.slot-card::before,
.dish-card::before,
.history-card::before,
.saved-menu-card::before,
.modal::before,
.meal-picker-dish::before,
.sound-toggle::before,
.bottom-nav::before {
  position: absolute;
  inset: 7px;
  z-index: 3;
  border: 1.5px dashed rgba(107, 90, 118, 0.36);
  border-radius: 5px;
  content: "";
  pointer-events: none;
}

.hero-panel > *,
.today-panel > *,
.tool-panel > *,
.empty-state > *,
.settings-panel > *,
.control > *,
.metric > *,
.slot-card > *,
.dish-card > *,
.history-card > *,
.saved-menu-card > *,
.modal > *,
.meal-picker-dish > *,
.sound-toggle > *,
.bottom-nav > * {
  position: relative;
  z-index: 2;
}

.hero-panel {
  min-height: 244px;
  border-width: 2px;
  background:
    linear-gradient(135deg, rgba(255, 246, 220, 0.94), rgba(243, 237, 255, 0.92) 54%, rgba(216, 244, 236, 0.88)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0 4px, transparent 4px 14px),
    var(--paper);
}

.hero-panel::before {
  position: absolute;
  inset: auto 18px 14px;
  height: 18px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(107, 90, 118, 0.18) 0 8px, transparent 8px 16px),
    linear-gradient(90deg, rgba(255, 180, 170, 0.42), rgba(203, 197, 242, 0.5), rgba(183, 234, 215, 0.42));
  content: "";
  opacity: 1;
}

.hero-copy h2,
.today-title h2 {
  color: #3a2d43;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.85);
}

.hero-meta li,
.chip,
.category-pill,
.metric,
.meal-badge {
  border-color: rgba(107, 90, 118, 0.72);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px 9px),
    rgba(255, 253, 248, 0.88);
  box-shadow: 2px 3px 0 rgba(130, 109, 133, 0.22);
}

.today-panel {
  background:
    linear-gradient(135deg, rgba(255, 246, 220, 0.96), rgba(255, 216, 202, 0.74) 45%, rgba(203, 197, 242, 0.58)),
    var(--paper);
}

.today-clock {
  border-color: rgba(107, 90, 118, 0.35);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px 11px),
    rgba(255, 253, 248, 0.72);
  color: #665c73;
}

.plate-ring {
  inset: 5%;
  border: 7px solid rgba(255, 253, 248, 0.95);
  background:
    radial-gradient(circle, rgba(255, 253, 248, 0.88) 0 34%, transparent 35%),
    repeating-conic-gradient(from -8deg, #ffdf86 0 9deg, #ffd8ca 9deg 18deg, #cbc5f2 18deg 27deg, #b7ead7 27deg 36deg);
  box-shadow:
    inset 0 0 0 16px rgba(255, 255, 255, 0.48),
    inset 0 0 0 25px rgba(107, 90, 118, 0.1),
    0 16px 26px rgba(91, 76, 106, 0.16);
  animation: placemat-breathe 5.6s ease-in-out infinite;
}

.plate-bird {
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(107, 90, 118, 0.12);
  border-radius: 28%;
  background: #fffdf8;
  filter: drop-shadow(0 14px 16px rgba(91, 76, 106, 0.24));
  animation: bird-pop 3.2s ease-in-out infinite;
}

.icon-button,
.segmented button,
.text-button,
.primary-button,
.category-button,
.save-menu-button,
.stepper button,
.meal-choice-button {
  border-color: var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.38) 0 2px, transparent 2px 10px),
    var(--surface);
  box-shadow: 4px 5px 0 rgba(107, 90, 118, 0.42);
}

.icon-button.accent,
.primary-button,
.save-menu-button,
.category-button.is-active,
.segmented button.is-active,
.nav-item.is-active {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.33) 0 2px, transparent 2px 11px),
    linear-gradient(135deg, var(--sun), var(--peach) 60%, #f3edff);
}

.primary-button {
  color: #342b3a;
}

.icon-button.danger,
.text-button.warning {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.36) 0 2px, transparent 2px 11px),
    #ffe1dc;
}

.icon-button:hover,
.icon-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.text-button:hover,
.text-button:focus-visible,
.category-button:hover,
.category-button:focus-visible,
.save-menu-button:hover,
.save-menu-button:focus-visible,
.meal-choice-button:hover,
.meal-choice-button:focus-visible {
  transform: translate(-2px, -3px) rotate(-0.3deg);
  box-shadow: 6px 8px 0 rgba(107, 90, 118, 0.4);
}

.icon-button:active,
.primary-button:active,
.text-button:active,
.category-button:active,
.save-menu-button:active,
.meal-choice-button.is-popping,
.meal-choice-button:active {
  transform: translate(2px, 2px) scale(0.985);
  box-shadow: 2px 2px 0 rgba(107, 90, 118, 0.4);
}

.control {
  min-height: 104px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(246, 240, 255, 0.94)),
    var(--surface-2);
}

.stepper strong {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1.5px dashed rgba(107, 90, 118, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.6);
}

.slot-card,
.dish-card,
.history-card,
.saved-menu-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.slot-card:hover,
.dish-card:hover,
.history-card:hover,
.saved-menu-card:hover {
  transform: translateY(-3px) rotate(-0.2deg);
  box-shadow: 0 6px 0 rgba(130, 109, 133, 0.34), 0 22px 34px rgba(85, 71, 99, 0.16);
}

.slot-media,
.dish-media,
.image-preview,
.meal-picker-dish img,
.saved-dish img,
.history-dish img {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.36) 0 2px, transparent 2px 10px),
    var(--paper);
}

.slot-media::after,
.dish-media::after,
.image-preview::after {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(0deg, rgba(107, 90, 118, 0.04) 0 1px, transparent 1px 8px);
  content: "";
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.image-preview {
  position: relative;
}

.category-ribbon {
  border-color: rgba(107, 90, 118, 0.72);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px 9px),
    var(--sun);
  box-shadow: 2px 3px 0 rgba(107, 90, 118, 0.22);
}

.chip.mint {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 9px),
    rgba(183, 234, 215, 0.78);
}

.chip.sky {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 9px),
    rgba(169, 217, 255, 0.62);
}

.chip.sun {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 9px),
    rgba(255, 214, 111, 0.74);
}

.chip.coral {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 9px),
    rgba(255, 180, 170, 0.68);
}

.saved-dish,
.history-dish {
  border-color: rgba(107, 90, 118, 0.24);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px 10px),
    #fff7e7;
}

.dish-pick-button {
  border-color: var(--line);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.36) 0 2px, transparent 2px 10px),
    linear-gradient(135deg, #ffdf86, #ffd8ca 45%, #cbc5f2 100%);
  box-shadow: 5px 6px 0 rgba(107, 90, 118, 0.42);
}

.dish-pick-button::after {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.54) 0 3px, transparent 3px 9px);
  opacity: .55;
}

.pick-bird {
  overflow: hidden;
  border-color: rgba(107, 90, 118, 0.72);
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(203, 197, 242, 0.5), 2px 2px 0 rgba(107, 90, 118, 0.25);
}

.pick-bird-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transform-origin: 50% 80%;
  animation: tiny-bird-wiggle 2.8s ease-in-out infinite;
}

.empty-state {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(243, 237, 255, 0.86)),
    var(--surface);
}

.empty-bird {
  width: 132px;
  aspect-ratio: 1;
  border: 1px solid rgba(107, 90, 118, 0.12);
  border-radius: 28%;
  background: #fffdf8;
  margin-inline: auto;
  filter: drop-shadow(0 12px 14px rgba(91, 76, 106, 0.2));
}

.search-box input,
.field input,
.field textarea,
.field select {
  border-color: rgba(107, 90, 118, 0.78);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.45) 0 2px, transparent 2px 10px),
    #fffdf8;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 3px 0 rgba(130, 109, 133, 0.16);
}

.modal-backdrop {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 12px),
    rgba(57, 43, 66, 0.54);
}

.modal-header {
  border-color: var(--line);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0 2px, transparent 2px 10px),
    linear-gradient(135deg, var(--sun), var(--peach));
}

.meal-choice-button:nth-child(1) {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 10px),
    #ffedaa;
}

.meal-choice-button:nth-child(2) {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 10px),
    #b7ead7;
}

.meal-choice-button:nth-child(3) {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 10px),
    #c9e5ff;
}

.bottom-nav {
  position: fixed;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 10px),
    rgba(255, 253, 248, 0.88);
  box-shadow: 0 5px 0 rgba(130, 109, 133, 0.25), 0 18px 26px rgba(85, 71, 99, 0.16);
}

.nav-item {
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  transform: translateY(-2px);
}

.toast {
  border-color: rgba(255, 253, 248, 0.78);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 10px),
    #3a2d43;
  box-shadow: 0 7px 0 rgba(107, 90, 118, 0.32), var(--soft-shadow);
}

@media (min-width: 880px) {
  .app-frame {
    padding: 18px 24px 24px 118px;
  }

  .bottom-nav {
    top: 118px;
    right: auto;
    bottom: auto;
    left: 18px;
    width: 78px;
    grid-template-columns: 1fr;
    max-width: none;
  }

  .nav-item {
    height: 66px;
  }

  .nav-video {
    width: 34px;
    height: 34px;
  }

  .draft-cart-fab {
    right: 24px;
    bottom: 24px;
  }

  .modal-backdrop {
    place-items: center;
  }
}

@media (max-width: 760px) {
  .app-frame {
    padding-inline: 12px;
  }

  .hero-panel {
    min-height: 250px;
    grid-template-columns: 1fr;
  }

  .hero-panel.has-saved-menus {
    grid-template-columns: 1fr;
  }

  .hero-saved-list {
    max-height: none;
    align-content: stretch;
    padding-right: 0;
  }

  .today-title {
    align-items: flex-start;
  }

  .today-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-plate {
    width: min(68vw, 260px);
    justify-self: center;
    margin-top: -12px;
  }

  .control-grid,
  .settings-grid,
  .sync-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .menu-actions {
    justify-content: stretch;
  }

  .menu-actions .text-button,
  .menu-actions .primary-button,
  .menu-actions .save-menu-button {
    flex: 1 1 120px;
  }

  .image-picker {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .image-preview {
    width: 92px;
  }

  .meal-choice-grid {
    grid-template-columns: 1fr;
  }

  .meal-picker-dish {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .meal-picker-dish img {
    width: 82px;
  }

  .notebook-modal {
    width: min(94vw, 560px);
  }

  .notebook-body {
    grid-template-columns: 1fr;
    max-height: min(72vh, 680px);
    background:
      repeating-linear-gradient(0deg, rgba(255, 220, 120, 0.12) 0 1px, transparent 1px 28px),
      linear-gradient(135deg, #fff8dc, #fffdf8 58%, #f3edff);
  }

  .notebook-list {
    border-top: 2px dashed rgba(107, 90, 118, 0.28);
    padding-top: 12px;
  }
}

@media (max-width: 430px) {
  .app-header {
    align-items: flex-start;
  }

  .brand-bird {
    width: 50px;
    height: 50px;
  }

  .header-actions {
    gap: 6px;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .nav-video {
    width: 30px;
    height: 30px;
    border-radius: 11px;
  }

  .control-grid,
  .settings-grid,
  .sync-grid,
  .menu-grid,
  .dish-grid,
  .history-grid,
  .today-saved-grid {
    grid-template-columns: 1fr;
  }

  .hero-saved-dishes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draft-meal-selector {
    gap: 6px;
  }

  .draft-cart-fab {
    width: 56px;
    height: 56px;
    right: 14px;
  }

  .hero-copy h2 {
    font-size: 2.15rem;
  }
}

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

@keyframes bird-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg) scale(1);
  }
  50% {
    transform: translateY(-5px) rotate(1.6deg) scale(1.025, 0.985);
  }
}

@keyframes bird-pop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  36% {
    transform: translateY(3px) scale(1.04, 0.96);
  }
  50% {
    transform: translateY(-6px) scale(0.99, 1.035);
  }
  74% {
    transform: translateY(1px) scale(1.018, 0.988);
  }
}

@keyframes placemat-breathe {
  0%,
  100% {
    transform: rotate(-1.2deg) scale(1);
  }
  50% {
    transform: rotate(1.2deg) scale(1.025);
  }
}

@keyframes tiny-bird-wiggle {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  42% {
    transform: translateY(-2px) rotate(4deg);
  }
  68% {
    transform: translateY(1px) rotate(-1deg);
  }
}

@keyframes plate-turn {
  0%,
  100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

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

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985) rotate(-0.7deg);
  }
  68% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01) rotate(0.4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes card-flip {
  0% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-7px) scale(1.018, 0.985) rotate(-0.6deg);
  }
  72% {
    transform: translateY(2px) scale(0.992, 1.01) rotate(0.3deg);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes card-drop-in {
  0% {
    opacity: 0.55;
    transform: translateY(-18px) scale(0.97, 1.03) rotate(-1.2deg);
  }
  55% {
    opacity: 1;
    transform: translateY(4px) scale(1.025, 0.98) rotate(0.8deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notebook-open {
  from {
    opacity: 0;
    transform: translateY(24px) rotateX(18deg) scale(0.96);
  }
  72% {
    opacity: 1;
    transform: translateY(-2px) rotateX(-2deg) scale(1.01);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}
