:root {
  color-scheme: light;
  --bg: #f6f8f2;
  --surface: #ffffff;
  --surface-soft: #eef3e8;
  --ink: #20251f;
  --muted: #6d766b;
  --line: #d7decf;
  --line-strong: #bac8b0;
  --tomato: #d84a2b;
  --leaf: #247a62;
  --blue: #3f6687;
  --gold: #b78223;
  --shadow: 0 18px 50px rgba(42, 52, 37, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(246, 248, 242, 0) 260px),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0 18px;
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--tomato);
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(39, 55, 35, 0.08);
}

.brand h1 {
  margin: 0;
  font-size: clamp(24px, 3.8vw, 42px);
  line-height: 1;
  letter-spacing: 0;
}

.subtle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.date-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgba(42, 52, 37, 0.06);
}

.date-strip strong,
.date-strip span {
  display: block;
}

.date-strip strong {
  font-size: 18px;
  line-height: 1.1;
}

.date-strip span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.sync-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.sync-strip.online {
  border-color: rgba(36, 122, 98, 0.34);
  background: rgba(36, 122, 98, 0.08);
}

.sync-strip.setup {
  border-color: rgba(183, 130, 35, 0.38);
  background: rgba(183, 130, 35, 0.08);
}

.sync-strip strong,
.sync-strip span {
  display: block;
}

.sync-strip strong {
  font-size: 14px;
}

.sync-strip span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.sync-strip .sync-error {
  color: var(--tomato);
  font-weight: 820;
}

.auth-gate {
  display: grid;
  min-height: 48vh;
  place-items: start center;
}

.auth-panel {
  width: min(520px, 100%);
}

.date-controls {
  display: inline-grid;
  grid-template-columns: 38px minmax(140px, 1fr) 38px auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.date-button,
.date-input {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
}

.date-button:hover,
.date-input:hover,
.date-input:focus {
  background: var(--surface-soft);
}

.date-input {
  min-width: 0;
  padding: 0 8px;
  outline: none;
}

.today-button {
  padding: 0 10px;
}

.role-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.role-tab {
  position: relative;
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  padding: 0 12px;
  white-space: nowrap;
}

.role-tab.active {
  background: var(--ink);
  color: #fff;
}

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--tomato);
  box-shadow: 0 0 0 2px #fff;
}

.button,
.icon-button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
}

.button.wide {
  width: 100%;
}

.button.mini-button {
  min-height: 40px;
  padding: 0 10px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 0;
}

.icon-button.danger {
  border-color: rgba(216, 74, 43, 0.36);
  color: var(--tomato);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--leaf);
}

.button:disabled,
.button:disabled:hover {
  cursor: default;
  transform: none;
  border-color: var(--line-strong);
  background: #e7ede2;
  color: #6f7b6d;
}

.button.primary {
  border-color: var(--tomato);
  background: var(--tomato);
  color: #fff;
}

.button.ghost {
  background: transparent;
}

.button.green {
  border-color: var(--leaf);
  background: var(--leaf);
  color: #fff;
}

.button.blue {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.main-column,
.side-column {
  min-width: 0;
}

.control-strip {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(42, 52, 37, 0.06);
}

.meal-tabs,
.category-tabs,
.view-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.meal-tabs::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar,
.view-tabs::-webkit-scrollbar {
  display: none;
}

.tab,
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 760;
  white-space: nowrap;
}

.tab {
  min-height: 44px;
  padding: 0 16px;
}

.chip {
  min-height: 36px;
  padding: 0 12px;
}

.tab.active,
.chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 4px;
  border-radius: 7px;
  background: rgba(36, 122, 98, 0.12);
  color: var(--leaf);
  font-size: 12px;
}

.tab.active span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.tab.resolved:not(.active) {
  border-color: rgba(36, 122, 98, 0.32);
}

.decision-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px;
}

.decision-row strong,
.decision-row span {
  display: block;
}

.decision-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.date-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(63, 102, 135, 0.28);
  border-radius: 8px;
  background: rgba(63, 102, 135, 0.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 860;
  padding: 0 10px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.search {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}

.search:focus,
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(36, 122, 98, 0.12);
}

.wish-form {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(183, 130, 35, 0.28);
  border-radius: 8px;
  background: rgba(183, 130, 35, 0.08);
  padding: 12px;
}

.wish-copy {
  display: grid;
  gap: 3px;
}

.wish-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.wish-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.wish-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.wish-form input,
.wish-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.wish-form input {
  min-height: 42px;
}

.wish-form textarea {
  min-height: 62px;
  resize: vertical;
}

.wish-form input:focus,
.wish-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(183, 130, 35, 0.12);
}

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

.dish-card {
  display: grid;
  grid-template-rows: 172px auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(42, 52, 37, 0.08);
}

.history-dish-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  box-shadow: 0 12px 36px rgba(42, 52, 37, 0.08);
}

.history-dish-card img {
  width: 100%;
  height: 128px;
  border-radius: 7px;
  object-fit: cover;
}

.history-dish-card > div {
  display: grid;
  gap: 10px;
  align-content: start;
}

.history-state {
  grid-column: 1 / -1;
}

.dish-image {
  position: relative;
  overflow: hidden;
  background: var(--surface-soft);
}

.dish-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.34));
}

.dish-rating {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  min-width: 58px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--tomato);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  padding: 5px 8px;
  white-space: nowrap;
}

.dish-body {
  display: grid;
  gap: 11px;
  padding: 13px;
}

.dish-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.dish-title-row h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0;
}

.dish-title-row h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--leaf);
  font-size: 12px;
  font-weight: 820;
  padding: 0 8px;
  white-space: nowrap;
}

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

.meta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 7px;
  background: #f4f6f7;
  color: #59616a;
  font-size: 12px;
  font-weight: 760;
  padding: 0 8px;
}

.ingredients-line {
  display: -webkit-box;
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

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

.ordered-note {
  color: var(--leaf);
  font-size: 13px;
  font-weight: 820;
}

.side-column {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(42, 52, 37, 0.08);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 0;
}

.panel-header h2,
.section-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.notice-panel.unread {
  border-color: rgba(216, 74, 43, 0.42);
  box-shadow: 0 14px 42px rgba(216, 74, 43, 0.12);
}

.day-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.stat strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.meal-block {
  display: grid;
  gap: 8px;
}

.meal-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 840;
}

.meal-heading-button {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 0;
  text-align: left;
}

.meal-heading-button:hover {
  color: var(--leaf);
}

.order-list,
.shopping-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.menu-item-actions {
  align-items: center;
  justify-content: flex-end;
}

.menu-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-list-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px;
}

.menu-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-soft);
}

.menu-list-item strong,
.menu-list-item small {
  display: block;
}

.menu-list-item strong {
  line-height: 1.2;
}

.menu-list-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.order-item,
.shopping-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px;
}

.wish-order-item {
  border-color: rgba(183, 130, 35, 0.34);
  background: rgba(183, 130, 35, 0.07);
}

.after-meal-panel {
  overflow: hidden;
}

.photo-count {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--leaf);
  font-size: 13px;
  font-weight: 900;
}

.photo-uploader {
  display: grid;
  gap: 8px;
}

.photo-target-field {
  display: grid;
  gap: 6px;
}

.photo-target-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 830;
}

.photo-target-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.photo-upload-card {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 74, 43, 0.08), rgba(36, 122, 98, 0.08)),
    #fbfcfa;
  color: var(--ink);
  cursor: pointer;
  padding: 14px;
  text-align: center;
}

.photo-upload-card:hover {
  border-color: var(--leaf);
}

.photo-upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-upload-card strong,
.photo-upload-card span {
  display: block;
}

.photo-upload-card strong {
  font-size: 15px;
  line-height: 1.2;
}

.photo-upload-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.meal-photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.meal-photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.meal-photo-frame {
  position: relative;
  overflow: hidden;
  margin: 8px 8px 0;
  border: 1px solid rgba(22, 24, 23, 0.08);
  border-radius: 8px;
  background: var(--surface-soft);
}

.meal-photo-frame > img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--surface-soft);
}

.meal-photo-frame.share-preview-frame {
  display: grid;
  max-height: min(68vh, 720px);
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(241, 237, 229, 0.74)),
    var(--surface-soft);
  padding: 6px;
}

.meal-photo-frame.share-preview-frame > img {
  width: 100%;
  height: 100%;
  max-height: calc(min(68vh, 720px) - 12px);
  border-radius: 6px;
  object-fit: contain;
}

.meal-photo-frame.photo-placeholder-frame > img {
  object-fit: contain;
  padding: 18px;
}

.photo-cache-note {
  margin: 8px 10px 0;
  border: 1px dashed rgba(183, 130, 35, 0.36);
  border-radius: 8px;
  background: rgba(183, 130, 35, 0.08);
  color: var(--gold);
  font-size: 12px;
  line-height: 1.45;
  padding: 8px;
}

.calorie-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.calorie-ring {
  position: absolute;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 46% 54% 47% 53% / 56% 42% 58% 44%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  outline: 1px dashed rgba(255, 255, 255, 0.72);
  outline-offset: 4px;
}

.calorie-ring.ring-1 {
  border-radius: 55% 45% 52% 48% / 44% 58% 42% 56%;
  transform: rotate(-2deg);
}

.calorie-ring.ring-2 {
  border-radius: 48% 52% 57% 43% / 52% 46% 54% 48%;
  transform: rotate(3deg);
}

.calorie-bubble {
  position: absolute;
  display: grid;
  min-width: 88px;
  max-width: 142px;
  gap: 1px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px 14px 17px 15px;
  background: rgba(32, 37, 31, 0.48);
  color: #fff;
  padding: 6px 8px;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-1deg);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
}

.calorie-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 24px;
  height: 18px;
  border-right: 2px solid rgba(255, 255, 255, 0.96);
  border-bottom: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 0 0 16px 0;
  transform: translateX(-50%) rotate(28deg);
}

.calorie-bubble.bubble-1 {
  transform: translate(-50%, -50%) rotate(2deg);
}

.calorie-bubble.bubble-2 {
  transform: translate(-50%, -50%) rotate(-3deg);
}

.calorie-bubble b,
.calorie-bubble em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calorie-bubble b {
  font-size: 12px;
  line-height: 1.15;
}

.calorie-bubble em {
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  color: #ffe5ec;
}

.meal-photo-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 9px 9px 0;
}

.meal-photo-meta strong,
.meal-photo-meta small {
  display: block;
}

.meal-photo-meta strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-photo-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.meal-photo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 9px 10px;
}

.meal-photo-tags span {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-analysis {
  display: grid;
  gap: 9px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.photo-analysis p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.photo-analysis.failed {
  background: rgba(216, 74, 43, 0.08);
}

.calorie-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(36, 122, 98, 0.24);
  border-top-color: var(--leaf);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

.calorie-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(216, 74, 43, 0.24);
  border-radius: 8px;
  background: rgba(216, 74, 43, 0.07);
  padding: 10px;
}

.calorie-summary strong,
.calorie-summary span {
  display: block;
}

.calorie-summary strong {
  font-size: 26px;
  line-height: 1;
  color: var(--tomato);
}

.calorie-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.confidence {
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  padding: 6px 9px;
  white-space: nowrap;
}

.confidence.high {
  color: var(--leaf);
}

.confidence.low {
  color: var(--gold);
}

.calorie-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.calorie-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.calorie-list b,
.calorie-list small {
  display: block;
}

.calorie-list b {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calorie-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.calorie-list strong {
  color: var(--tomato);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.calorie-note {
  border-left: 3px solid rgba(63, 102, 135, 0.34);
  padding-left: 8px;
}

.calorie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-image-block {
  display: grid;
  gap: 8px;
  border-top: 1px dashed var(--line-strong);
  padding-top: 9px;
}

.share-image-block img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.share-image-block.failed {
  border: 1px solid rgba(216, 74, 43, 0.24);
  border-radius: 8px;
  background: rgba(216, 74, 43, 0.08);
  color: var(--tomato);
  font-size: 12px;
  font-weight: 760;
  padding: 9px;
}

.menu-summary-panel .panel-body {
  gap: 10px;
}

.menu-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.menu-category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-category-preview span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  padding: 5px 8px;
}

.menu-preview-line {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: flex;
  justify-content: flex-end;
  background: rgba(32, 37, 31, 0.34);
}

.menu-drawer {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(520px, calc(100vw - 18px));
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -18px 0 48px rgba(42, 52, 37, 0.16);
  animation: drawer-in 180ms ease;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes drawer-in {
  from {
    opacity: 0.9;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.drawer-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.drawer-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 18px 12px;
}

.drawer-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  font-weight: 860;
}

.drawer-tabs button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 0 18px 18px;
}

.menu-browser {
  display: grid;
  gap: 10px;
}

.compact-search {
  min-height: 42px;
}

.compact-tabs {
  gap: 6px;
  max-height: 102px;
  overflow: auto;
  padding-bottom: 2px;
}

.compact-tabs .chip {
  min-height: 34px;
  padding: 0 10px;
}

.compact-tabs .chip span {
  margin-left: 5px;
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
}

.compact-tabs .chip:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.order-main,
.shopping-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.order-main strong,
.shopping-main strong {
  line-height: 1.2;
}

.order-main small,
.shopping-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.feedback-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.feedback-button.active[data-value="love"] {
  border-color: var(--tomato);
  background: rgba(216, 74, 43, 0.1);
  color: var(--tomato);
}

.feedback-button.active[data-value="ok"] {
  border-color: var(--gold);
  background: rgba(183, 130, 35, 0.12);
  color: var(--gold);
}

.feedback-button.active[data-value="skip"] {
  border-color: var(--blue);
  background: rgba(63, 102, 135, 0.12);
  color: var(--blue);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.58);
}

.empty-state.compact {
  padding: 12px;
  font-size: 13px;
}

.meal-empty-button {
  width: 100%;
  cursor: pointer;
}

.meal-empty-button:hover {
  border-color: var(--leaf);
  color: var(--leaf);
  background: rgba(36, 122, 98, 0.06);
}

.skip-card {
  border: 1px dashed rgba(63, 102, 135, 0.45);
  border-radius: 8px;
  background: rgba(63, 102, 135, 0.08);
  color: var(--blue);
  font-weight: 820;
  padding: 12px;
}

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

.cook-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.wish-cook-card {
  border-color: rgba(183, 130, 35, 0.36);
  background: #fffdf7;
}

.cook-card > img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.cook-card-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.cook-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wish-status {
  color: var(--gold);
  background: rgba(183, 130, 35, 0.12);
}

.wish-status.found {
  color: var(--leaf);
  background: rgba(36, 122, 98, 0.12);
}

.wish-status.failed,
.wish-status.declined {
  color: var(--tomato);
  background: rgba(216, 74, 43, 0.1);
}

.wish-actions {
  display: flex;
  flex-wrap: wrap;
}

.wish-actions .button {
  flex: 1 1 116px;
}

.mini-section {
  display: grid;
  gap: 5px;
}

.mini-section strong {
  font-size: 13px;
}

.mini-section p,
.mini-section ol,
.ingredient-list {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mini-section ol,
.ingredient-list {
  padding-left: 18px;
}

.step-text-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.step-text-list li {
  min-width: 0;
}

.step-text-list span {
  display: block;
}

.step-inline-image {
  display: block;
  width: min(100%, 260px);
  max-height: 160px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  margin: 4px 0 6px;
}

.step-note-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.step-note-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.step-note-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--leaf);
  font-size: 13px;
  font-weight: 850;
}

.step-note-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.step-note-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.step-note-image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.shopping-item {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.shopping-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--leaf);
}

.shopping-item.done strong,
.shopping-item.done small {
  color: #9aa49a;
  text-decoration: line-through;
}

.shopping-group {
  display: grid;
  gap: 8px;
}

.shopping-group-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 4px 0 0;
}

.shopping-group-title h3 {
  margin: 0;
  color: var(--leaf);
  font-size: 13px;
  font-weight: 900;
}

.shopping-group-title small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.group-toggle {
  display: inline-flex;
  min-width: 70px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.group-toggle b {
  color: var(--leaf);
  font-size: 12px;
}

.shopping-group-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 246, 0.86);
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

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

.source-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.source-import-row .button {
  min-height: 43px;
  white-space: nowrap;
}

.import-cover-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 8px;
}

.import-cover-preview[hidden] {
  display: none;
}

.import-cover-preview img {
  width: 64px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--surface-soft);
}

.import-cover-preview strong,
.import-cover-preview span {
  display: block;
}

.import-cover-preview strong {
  font-size: 13px;
}

.import-cover-preview span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.import-step-preview {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 8px;
}

.import-step-preview[hidden] {
  display: none;
}

.import-step-preview strong,
.import-step-preview span {
  display: block;
}

.import-step-preview strong {
  font-size: 13px;
}

.import-step-preview span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.import-step-grid figure {
  min-width: 0;
  margin: 0;
}

.import-step-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.import-step-grid figcaption {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-button {
  cursor: pointer;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 780;
}

.checkbox-pill input {
  width: 16px;
  height: 16px;
  accent-color: var(--leaf);
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(32, 37, 31, 0.42);
}

.detail-sheet {
  width: min(720px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-media {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: var(--surface-soft);
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.detail-content {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10;
  transform: translateX(-50%);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 940px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .side-column {
    position: static;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 10px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .date-strip {
    grid-template-columns: 1fr;
  }

  .sync-strip {
    grid-template-columns: 1fr;
  }

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

  .date-controls {
    width: 100%;
  }

  .role-switch {
    width: 100%;
  }

  .top-actions .button,
  .top-actions .date-controls,
  .top-actions .role-switch {
    flex: 1 1 0;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .wish-input-row {
    grid-template-columns: 1fr;
  }

  .dish-grid {
    grid-template-columns: 1fr;
  }

  .dish-card {
    grid-template-rows: 188px auto;
  }

  .history-dish-card {
    grid-template-columns: 1fr;
  }

  .history-dish-card img {
    height: 168px;
  }

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

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

  .decision-row,
  .dish-actions,
  .source-import-row {
    grid-template-columns: 1fr;
  }

  .decision-row {
    display: grid;
  }

  .cook-card {
    grid-template-columns: 1fr;
  }

  .cook-card > img {
    height: 188px;
    min-height: 188px;
  }

  .menu-list-item {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .menu-thumb {
    width: 44px;
    height: 44px;
  }

  .menu-drawer {
    width: 100vw;
  }

  .day-summary,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* Premium interface refresh */
:root {
  --stage-bg: #090b0c;
  --stage-ink: #f6f4ee;
  --stage-muted: #aab2ac;
  --stage-soft: rgba(255, 255, 255, 0.08);
  --stage-line: rgba(255, 255, 255, 0.16);
  --stage-line-strong: rgba(255, 255, 255, 0.28);
  --paper: #f5f2ea;
  --paper-soft: #e9e7de;
  --paper-ink: #161817;
  --paper-muted: #68716d;
  --titanium: #d6d1c6;
  --champagne: #d6aa6d;
  --coral: #e9614d;
  --sage: #75ad8a;
  --steel: #8da7b4;
  --deep-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 20px 64px rgba(7, 9, 9, 0.2);
}

html {
  background: var(--stage-bg);
}

body {
  color: var(--stage-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 220px),
    linear-gradient(145deg, #080a0a 0%, #101413 42%, #16130f 100%);
  font-family:
    "Avenir Next", "Hiragino Sans GB", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 78%);
}

.app-shell {
  width: min(1240px, calc(100% - 36px));
  padding: 18px 0 48px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 12;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--stage-line);
  border-radius: 8px;
  background: rgba(9, 11, 12, 0.7);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px) saturate(140%);
}

.brand {
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(214, 209, 198, 0.72)),
    #ece8dc;
  color: #111312;
  font-size: 16px;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 34px rgba(0, 0, 0, 0.28);
}

.brand-eyebrow,
.stage-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--champagne);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.brand h1 {
  color: var(--stage-ink);
  font-size: 32px;
  font-weight: 860;
  line-height: 1;
}

.subtle {
  color: var(--stage-muted);
  font-size: 13px;
}

.top-actions {
  align-items: center;
}

.role-switch {
  border-color: var(--stage-line);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.role-tab {
  color: rgba(246, 244, 238, 0.72);
}

.role-tab.active {
  background: var(--paper);
  color: #0e100f;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.badge-dot {
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--paper);
}

.date-strip {
  position: relative;
  min-height: 126px;
  margin-bottom: 12px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 242, 234, 0.98), rgba(214, 209, 198, 0.88)),
    var(--paper);
  color: var(--paper-ink);
  box-shadow: var(--deep-shadow);
  overflow: hidden;
}

.date-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(22, 24, 23, 0.1), transparent 34%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 18px);
  opacity: 0.55;
}

.date-strip > * {
  position: relative;
  z-index: 1;
}

.date-strip strong {
  font-size: 44px;
  font-weight: 880;
  line-height: 0.98;
}

.date-strip span:not(.stage-eyebrow) {
  color: rgba(22, 24, 23, 0.62);
  font-size: 14px;
  font-weight: 760;
}

.date-controls {
  border-color: rgba(22, 24, 23, 0.12);
  background: rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 16px 34px rgba(22, 24, 23, 0.12);
  backdrop-filter: blur(18px);
}

.date-button,
.date-input {
  color: var(--paper-ink);
}

.date-button:hover,
.date-input:hover,
.date-input:focus {
  background: rgba(22, 24, 23, 0.08);
}

.sync-strip {
  min-height: 0;
  padding: 8px 12px;
  border-color: var(--stage-line);
  background: rgba(255, 255, 255, 0.075);
  color: var(--stage-ink);
  backdrop-filter: blur(18px);
}

.sync-strip.online {
  border-color: rgba(117, 173, 138, 0.34);
  background: rgba(117, 173, 138, 0.12);
}

.sync-strip.setup {
  border-color: rgba(214, 170, 109, 0.34);
  background: rgba(214, 170, 109, 0.12);
}

.sync-strip strong {
  color: var(--stage-ink);
}

.sync-strip span {
  color: var(--stage-muted);
}

.sync-strip span:not(.sync-error) {
  display: none;
}

.sync-strip .sync-error {
  color: #ff8979;
}

.button,
.icon-button {
  min-height: 40px;
  border-color: rgba(22, 24, 23, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #151715;
  font-weight: 820;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.button:hover,
.icon-button:hover {
  border-color: rgba(214, 170, 109, 0.72);
  transform: translateY(-2px);
}

.button:active,
.icon-button:active {
  transform: translateY(0);
}

.button.primary {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, #fffaf1, #d8c4a0 58%, #b78046),
    var(--champagne);
  color: #111312;
}

.button.green {
  border-color: rgba(117, 173, 138, 0.42);
  background: linear-gradient(135deg, #d7f2df, #75ad8a);
  color: #101411;
}

.button.blue {
  border-color: rgba(141, 167, 180, 0.42);
  background: linear-gradient(135deg, #d7e6eb, #8da7b4);
  color: #101316;
}

.button.ghost {
  border-color: var(--stage-line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--stage-ink);
}

.button:disabled,
.button:disabled:hover {
  border-color: rgba(22, 24, 23, 0.1);
  background: rgba(255, 255, 255, 0.36);
  color: rgba(22, 24, 23, 0.42);
}

.workspace {
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 16px;
  margin-top: 16px;
}

.control-strip {
  gap: 13px;
  padding: 14px;
  border-color: var(--stage-line);
  background: rgba(17, 21, 20, 0.72);
  color: var(--stage-ink);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(26px) saturate(130%);
}

.meal-tabs,
.category-tabs {
  gap: 6px;
}

.tab,
.chip,
.drawer-tabs button {
  border-color: var(--stage-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(246, 244, 238, 0.7);
}

.tab.active,
.chip.active,
.drawer-tabs button.active {
  border-color: rgba(255, 255, 255, 0.24);
  background: var(--paper);
  color: #101211;
}

.tab span {
  background: rgba(117, 173, 138, 0.18);
  color: #c8efd7;
}

.tab.active span {
  background: rgba(16, 18, 17, 0.1);
  color: #101211;
}

.tab.resolved:not(.active) {
  border-color: rgba(117, 173, 138, 0.38);
}

.decision-row {
  padding: 16px;
  border-color: var(--stage-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.06);
  color: var(--stage-ink);
}

.decision-row strong {
  font-size: 22px;
  line-height: 1.1;
}

.decision-row span {
  color: var(--stage-muted);
}

.date-status {
  border-color: rgba(141, 167, 180, 0.32);
  background: rgba(141, 167, 180, 0.14);
  color: #d9edf4;
}

.search {
  border-color: var(--stage-line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--stage-ink);
}

.search::placeholder,
.form-field input::placeholder,
.form-field textarea::placeholder,
.wish-form input::placeholder,
.wish-form textarea::placeholder {
  color: rgba(246, 244, 238, 0.42);
}

.search:focus,
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: rgba(214, 170, 109, 0.74);
  box-shadow: 0 0 0 3px rgba(214, 170, 109, 0.14);
}

.wish-form {
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-color: rgba(214, 170, 109, 0.22);
  background: rgba(214, 170, 109, 0.08);
}

.wish-copy strong {
  color: var(--stage-ink);
}

.wish-copy span {
  color: var(--stage-muted);
}

.wish-input-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.wish-form input,
.wish-form textarea {
  border-color: var(--stage-line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--stage-ink);
}

.wish-form textarea {
  grid-column: 2;
  min-height: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 180ms ease,
    opacity 180ms ease,
    padding 180ms ease;
}

.wish-form:focus-within textarea {
  min-height: 58px;
  max-height: 92px;
  padding-top: 10px;
  padding-bottom: 10px;
  opacity: 1;
}

.dish-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.dish-grid > .empty-state,
.dish-grid > .history-state {
  grid-column: 1 / -1;
}

.dish-card {
  position: relative;
  grid-column: span 6;
  grid-template-rows: minmax(308px, auto);
  min-height: 308px;
  border-color: var(--stage-line);
  background: #111413;
  color: var(--stage-ink);
  box-shadow: var(--soft-shadow);
  transform: translateZ(0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.dish-card:first-child {
  grid-column: span 12;
  grid-template-rows: minmax(392px, auto);
  min-height: 392px;
}

.dish-card:hover {
  border-color: rgba(214, 170, 109, 0.46);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.34);
  transform: translateY(-3px);
}

.dish-image {
  grid-row: 1;
  min-height: 100%;
  background: #111413;
}

.dish-image img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.01);
  transition: transform 420ms ease;
}

.dish-card:hover .dish-image img {
  transform: scale(1.045);
}

.dish-image::after {
  inset: 0;
  height: auto;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0) 55%);
}

.dish-body {
  position: relative;
  z-index: 2;
  grid-row: 1;
  align-content: end;
  gap: 10px;
  padding: 18px;
}

.dish-card:first-child .dish-body {
  max-width: 520px;
  padding: 26px;
}

.dish-title-row h2,
.dish-title-row h3 {
  color: inherit;
  font-size: 25px;
  font-weight: 870;
}

.dish-card:first-child .dish-title-row h2 {
  font-size: 36px;
}

.dish-title-row {
  align-items: flex-start;
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.14);
  color: #fff4dd;
}

.dish-card .pill,
.cook-card .pill {
  backdrop-filter: blur(14px);
}

.meta {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
}

.ingredients-line,
.cook-note {
  color: rgba(246, 244, 238, 0.7);
}

.dish-card .ingredients-line {
  min-height: 0;
  -webkit-line-clamp: 1;
}

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

.dish-card .button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: var(--stage-ink);
  backdrop-filter: blur(18px);
}

.dish-card .button.green {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(215, 242, 223, 0.86)),
    var(--sage);
  color: #101411;
}

.dish-rating {
  top: 12px;
  right: 12px;
  bottom: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 12, 12, 0.48);
  color: #fff4dd;
  backdrop-filter: blur(16px);
}

.side-column {
  top: 84px;
  gap: 12px;
}

.panel {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(245, 242, 234, 0.92);
  color: var(--paper-ink);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(22px) saturate(120%);
}

.panel-header {
  padding: 15px 15px 0;
}

.panel-header h2,
.section-title {
  color: var(--paper-ink);
  font-size: 18px;
  font-weight: 860;
}

.panel-header p {
  color: var(--paper-muted);
}

.panel-body {
  gap: 12px;
  padding: 15px;
}

.day-summary {
  border-top: 1px solid rgba(22, 24, 23, 0.09);
  border-bottom: 1px solid rgba(22, 24, 23, 0.09);
}

.stat {
  border: 0;
  border-right: 1px solid rgba(22, 24, 23, 0.09);
  border-radius: 0;
  background: transparent;
  padding: 11px 8px;
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  font-size: 24px;
  font-weight: 880;
}

.stat span {
  color: var(--paper-muted);
}

.meal-heading {
  color: var(--paper-muted);
}

.meal-heading-button {
  color: var(--paper-muted);
}

.meal-heading-button:hover {
  color: var(--paper-ink);
}

.order-item,
.shopping-item,
.menu-list-item,
.meal-photo-card,
.history-dish-card {
  border-color: rgba(22, 24, 23, 0.1);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.history-dish-card {
  grid-column: span 6;
}

.order-main small,
.shopping-main small,
.menu-list-item small,
.meal-photo-meta small,
.mini-section p,
.mini-section ol,
.ingredient-list,
.photo-analysis p,
.calorie-list small,
.calorie-note,
.helper {
  color: var(--paper-muted);
}

.empty-state {
  border-color: rgba(22, 24, 23, 0.15);
  background: rgba(255, 255, 255, 0.36);
  color: var(--paper-muted);
}

.control-strip .empty-state {
  border-color: var(--stage-line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--stage-muted);
}

.notice-panel.unread {
  border-color: rgba(233, 97, 77, 0.46);
  box-shadow: 0 22px 70px rgba(233, 97, 77, 0.16);
}

.skip-card {
  border-color: rgba(141, 167, 180, 0.34);
  background: rgba(141, 167, 180, 0.12);
  color: #496372;
}

.cook-card {
  border-color: rgba(22, 24, 23, 0.1);
  background: rgba(255, 255, 255, 0.54);
}

.cook-card > img {
  filter: saturate(1.04) contrast(1.02);
}

.cook-card .meta,
.detail-content .meta,
.history-dish-card .meta {
  background: rgba(22, 24, 23, 0.07);
  color: var(--paper-muted);
}

.cook-card .pill,
.detail-content .pill,
.history-dish-card .pill,
.menu-category-preview span,
.meal-photo-tags span,
.confidence,
.photo-count {
  border-color: rgba(22, 24, 23, 0.08);
  background: rgba(22, 24, 23, 0.07);
  color: #5a765f;
}

.mini-section strong {
  color: var(--paper-ink);
}

.shopping-group-title h3 {
  color: #496e58;
}

.group-toggle,
.feedback-button,
.checkbox-pill,
.form-field input,
.form-field textarea,
.form-field select,
.photo-target-field select {
  border-color: rgba(22, 24, 23, 0.12);
  background: rgba(255, 255, 255, 0.64);
  color: var(--paper-ink);
}

.shopping-group-empty {
  border-color: rgba(22, 24, 23, 0.12);
  background: rgba(255, 255, 255, 0.42);
}

.form-field label,
.photo-target-field span {
  color: var(--paper-muted);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(104, 113, 109, 0.72);
}

.photo-upload-card {
  min-height: 88px;
  border-color: rgba(22, 24, 23, 0.18);
  background:
    linear-gradient(135deg, rgba(214, 170, 109, 0.16), rgba(117, 173, 138, 0.12)),
    rgba(255, 255, 255, 0.48);
  color: var(--paper-ink);
}

.meal-photo-frame > img {
  aspect-ratio: 4 / 5;
}

.meal-photo-frame.share-preview-frame > img {
  aspect-ratio: auto;
}

.calorie-summary {
  border-color: rgba(233, 97, 77, 0.2);
  background: rgba(233, 97, 77, 0.08);
}

.calorie-summary strong,
.calorie-list strong {
  color: var(--coral);
}

.share-image-block img,
.step-note-image {
  border-color: rgba(22, 24, 23, 0.12);
}

.menu-summary-grid {
  border-top: 1px solid rgba(22, 24, 23, 0.09);
  border-bottom: 1px solid rgba(22, 24, 23, 0.09);
}

.menu-drawer-backdrop,
.detail-backdrop {
  background: rgba(5, 7, 7, 0.64);
  backdrop-filter: blur(18px);
}

.menu-drawer {
  border-left-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(245, 242, 234, 0.96), rgba(232, 230, 222, 0.96)),
    var(--paper);
  box-shadow: -34px 0 100px rgba(0, 0, 0, 0.36);
}

.drawer-header h2 {
  color: var(--paper-ink);
}

.drawer-header p {
  color: var(--paper-muted);
}

.drawer-tabs {
  border-bottom: 1px solid rgba(22, 24, 23, 0.08);
}

.drawer-tabs button {
  border-color: rgba(22, 24, 23, 0.12);
  background: rgba(255, 255, 255, 0.5);
  color: var(--paper-muted);
}

.drawer-tabs button.active {
  background: #141716;
  color: var(--stage-ink);
}

.drawer-body .search {
  border-color: rgba(22, 24, 23, 0.12);
  background: rgba(255, 255, 255, 0.64);
  color: var(--paper-ink);
}

.drawer-body .search::placeholder {
  color: rgba(104, 113, 109, 0.72);
}

.drawer-body .chip {
  border-color: rgba(22, 24, 23, 0.1);
  background: rgba(255, 255, 255, 0.54);
  color: var(--paper-muted);
}

.drawer-body .chip.active {
  background: #141716;
  color: var(--stage-ink);
}

.detail-sheet {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45);
}

.detail-media {
  height: 310px;
}

.detail-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.24));
}

.detail-close {
  z-index: 1;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(10, 12, 12, 0.48);
  color: var(--stage-ink);
  backdrop-filter: blur(16px);
}

.detail-content {
  padding: 20px;
}

.toast {
  border: 1px solid var(--stage-line);
  border-radius: 8px;
  background: rgba(9, 11, 12, 0.84);
  color: var(--stage-ink);
  box-shadow: var(--deep-shadow);
  backdrop-filter: blur(18px);
}

@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .side-column {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1240px);
    padding-top: 10px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .brand h1 {
    font-size: 28px;
  }

  .top-actions,
  .role-switch,
  .date-controls {
    width: 100%;
  }

  .date-strip {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 22px;
  }

  .date-strip strong {
    font-size: 36px;
  }

  .date-controls {
    grid-template-columns: 38px minmax(0, 1fr) 38px 54px;
  }

  .sync-strip {
    grid-template-columns: 1fr;
  }

  .control-strip {
    padding: 12px;
  }

  .decision-row,
  .search-row,
  .wish-form,
  .wish-input-row,
  .dish-actions,
  .calorie-actions,
  .source-import-row {
    grid-template-columns: 1fr;
  }

  .wish-form textarea {
    grid-column: 1;
  }

  .dish-grid {
    grid-template-columns: 1fr;
  }

  .dish-card,
  .dish-card:first-child {
    grid-column: auto;
    grid-template-rows: minmax(326px, auto);
    min-height: 326px;
  }

  .dish-card:first-child .dish-body {
    max-width: none;
    padding: 20px;
  }

  .dish-card:first-child .dish-title-row h2,
  .dish-title-row h2 {
    font-size: 28px;
  }

  .day-summary,
  .menu-summary-grid,
  .checkbox-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat {
    padding: 10px 6px;
  }

  .stat strong {
    font-size: 21px;
  }

  .cook-card,
  .history-dish-card,
  .menu-list-item {
    grid-template-columns: 1fr;
  }

  .cook-card > img,
  .history-dish-card img {
    height: 204px;
    min-height: 204px;
  }

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

  .menu-item-actions .button {
    flex: 1 1 auto;
  }

  .menu-drawer {
    width: 100vw;
  }
}

@media (max-width: 420px) {
  .brand h1 {
    font-size: 25px;
  }

  .date-strip strong {
    font-size: 32px;
  }

  .day-summary,
  .menu-summary-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid rgba(22, 24, 23, 0.09);
  }

  .stat:last-child {
    border-bottom: 0;
  }
}

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

/* Reference-driven carousel refresh */
body {
  color: #151816;
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 240, 220, 0.86), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(205, 230, 215, 0.76), transparent 32%),
    radial-gradient(circle at 75% 78%, rgba(239, 192, 205, 0.58), transparent 34%),
    linear-gradient(135deg, #efeee8 0%, #dbe7dc 48%, #f1d9d7 100%);
}

body::before {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.68), transparent 19%),
    radial-gradient(circle at 68% 35%, rgba(255, 255, 255, 0.48), transparent 18%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: auto, auto, 96px 96px;
  filter: blur(18px);
  mask-image: none;
  opacity: 0.9;
}

.topbar {
  position: static;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 24px 70px rgba(52, 55, 49, 0.13);
  backdrop-filter: blur(28px) saturate(150%);
}

.brand h1 {
  color: #101211;
}

.brand-eyebrow,
.stage-eyebrow {
  color: rgba(42, 46, 41, 0.58);
}

.subtle,
.sync-strip span {
  color: rgba(32, 36, 33, 0.62);
}

.role-switch {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.24);
}

.role-tab {
  color: rgba(25, 27, 25, 0.66);
}

.role-tab.active {
  background: rgba(8, 9, 9, 0.9);
  color: #fff;
}

.date-strip {
  min-height: 88px;
  padding: 15px 22px;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 24px 70px rgba(52, 55, 49, 0.12);
  backdrop-filter: blur(24px) saturate(150%);
}

.date-strip strong {
  font-size: clamp(30px, 4.3vw, 48px);
}

.date-controls {
  background: rgba(255, 255, 255, 0.6);
}

.sync-strip {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.2);
  color: #151816;
}

.sync-strip strong {
  color: #151816;
}

.control-strip {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.24);
  color: #141715;
  box-shadow: 0 24px 70px rgba(52, 55, 49, 0.12);
}

.pick-bar {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
  padding: 12px;
}

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

.wife-workspace {
  grid-template-columns: 1fr;
}

.wife-workspace .side-column {
  position: static;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.pick-bar .meal-tabs {
  min-width: 0;
}

.skip-meal-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(8, 9, 9, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: rgba(20, 23, 21, 0.78);
  font-weight: 900;
  padding: 0 18px;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 12px 26px rgba(42, 44, 39, 0.1);
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.skip-meal-button:hover {
  transform: translateY(-1px);
}

.skip-meal-button.active {
  background: rgba(8, 9, 9, 0.9);
  color: #fff;
}

.pick-bar .decision-row {
  min-height: 58px;
  padding: 10px 12px;
}

.meal-status-row {
  display: block;
}

.pick-bar .decision-row strong {
  font-size: 18px;
}

.filter-drawer {
  margin-top: 14px;
}

.tab,
.chip {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.3);
  color: rgba(24, 27, 24, 0.68);
}

.tab.active,
.chip.active {
  background: rgba(8, 9, 9, 0.9);
  color: #fff;
}

.tab span {
  background: rgba(255, 255, 255, 0.6);
  color: #324339;
}

.decision-row {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.28);
  color: #141715;
}

.decision-row span,
.wish-copy span {
  color: rgba(24, 27, 24, 0.62);
}

.search,
.wish-form input,
.wish-form textarea {
  border-color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.42);
  color: #151816;
}

.search::placeholder,
.wish-form input::placeholder,
.wish-form textarea::placeholder {
  color: rgba(24, 27, 24, 0.48);
}

.wish-form {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.22);
}

.wish-copy strong {
  color: #141715;
}

.dish-grid {
  display: block;
}

.dish-carousel {
  position: relative;
  grid-column: 1 / -1;
  min-height: 590px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 34%, var(--dish-wash), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.12)),
    #eeeae1;
  color: var(--dish-ink);
  box-shadow: 0 34px 100px rgba(41, 43, 38, 0.18);
  touch-action: pan-y;
}

.dish-carousel::before {
  content: "";
  position: absolute;
  inset: -44px;
  background-image: var(--dish-image);
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  filter: blur(32px) saturate(1.35);
  transform: scale(1.12);
}

.dish-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 38%, rgba(255, 255, 255, 0.52), transparent 22%),
    radial-gradient(circle at 8% 100%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(105deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.18));
  pointer-events: none;
}

.carousel-glass {
  position: absolute;
  inset: 48px;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.88fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px 24px;
  min-height: 484px;
  padding: 42px 46px 34px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 24px 80px rgba(50, 52, 47, 0.15);
  backdrop-filter: blur(24px) saturate(145%);
}

.dish-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  max-width: 470px;
}

.carousel-eyebrow {
  color: rgba(20, 23, 21, 0.58);
  font-size: 13px;
  font-weight: 900;
}

.dish-copy h2 {
  margin: 0;
  font-size: clamp(46px, 6vw, 78px);
  font-weight: 920;
  line-height: 0.95;
}

.dish-copy p {
  max-width: 420px;
  margin: 0;
  color: rgba(20, 23, 21, 0.68);
  font-size: 16px;
  line-height: 1.6;
}

.dish-copy .meta {
  max-width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.38);
  color: rgba(20, 23, 21, 0.66);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.carousel-actions .button {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 20px;
}

.carousel-actions .button.primary {
  background: #080909;
  color: #fff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.carousel-actions .button.ghost {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.26);
  color: #141715;
}

.dish-showpiece {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
}

.dish-showpiece::before {
  content: "";
  position: absolute;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--dish-accent), transparent 58%);
  filter: blur(8px);
  opacity: 0.5;
}

.plate-orbit {
  position: relative;
  display: grid;
  width: clamp(250px, 30vw, 390px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.15), transparent 24%),
    #080909;
  box-shadow:
    inset 0 0 0 12px rgba(255, 255, 255, 0.04),
    0 30px 54px rgba(0, 0, 0, 0.34);
  animation: plate-sweep 420ms cubic-bezier(0.2, 0.82, 0.22, 1);
}

.plate-orbit img {
  width: 82%;
  height: 82%;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.plate-orbit::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-right: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  opacity: 0.72;
  transform: rotate(22deg);
}

.carousel-rail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: end;
  gap: 16px;
  min-width: 0;
}

.dish-thumbs {
  display: flex;
  min-width: 0;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  overflow-x: auto;
  overflow-y: visible;
  padding: 30px 8px 6px;
  scrollbar-width: none;
}

.dish-thumbs::-webkit-scrollbar {
  display: none;
}

.dish-thumb {
  position: relative;
  display: grid;
  flex: 0 0 72px;
  gap: 8px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: rgba(20, 23, 21, 0.74);
  font-size: 11px;
  font-weight: 860;
  transform: translateY(var(--arc-y)) scale(0.94);
  transition:
    transform 220ms ease,
    opacity 220ms ease;
}

.dish-thumb img {
  width: 58px;
  height: 58px;
  border: 5px solid #080909;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.dish-thumb span {
  display: block;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-thumb.active {
  transform: translateY(var(--arc-y)) scale(1.12);
}

.dish-thumb.active::before {
  content: "";
  position: absolute;
  inset: 12px 5px -6px;
  z-index: -1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.dish-thumb.active span {
  color: #080909;
}

.carousel-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  color: #080909;
  font-size: 30px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.54);
  transform: translateY(-2px);
}

.panel {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.52);
}

.site-footer {
  padding: 18px 12px 6px;
  text-align: center;
  font-size: 12px;
}

.site-footer a {
  color: rgba(8, 9, 9, 0.58);
  text-decoration: none;
}

.site-footer a:hover {
  color: #080909;
  text-decoration: underline;
}

@keyframes plate-sweep {
  from {
    opacity: 0;
    transform: translateX(84px) rotate(12deg) scale(0.86);
    clip-path: circle(22% at 0% 50%);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0deg) scale(1);
    clip-path: circle(72% at 50% 50%);
  }
}

@media (max-width: 860px) {
  .wife-workspace .side-column {
    grid-template-columns: 1fr;
  }

  .dish-carousel {
    min-height: 720px;
  }

  .carousel-glass {
    inset: 20px;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(168px, auto) auto auto;
    min-height: calc(100% - 40px);
    padding: 28px 22px 24px;
  }

  .dish-showpiece {
    grid-row: 1;
    min-height: 178px;
  }

  .dish-copy {
    grid-row: 2;
    max-width: none;
    align-content: start;
    gap: 10px;
  }

  .dish-copy h2 {
    font-size: clamp(40px, 12vw, 60px);
  }

  .plate-orbit {
    width: min(54vw, 230px);
  }

  .carousel-rail {
    grid-row: 3;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
  }

  .dish-thumbs {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .topbar .subtle {
    display: none;
  }

  .date-strip {
    padding: 13px 14px;
  }

  .date-strip strong {
    font-size: 32px;
  }

  .date-strip span:not(.stage-eyebrow) {
    font-size: 12px;
  }

  .pick-bar {
    padding: 10px;
  }

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

  .skip-meal-button {
    width: 100%;
  }

  .pick-bar .decision-row {
    min-height: 48px;
  }

  .dish-carousel {
    min-height: 700px;
  }

  .carousel-glass {
    inset: 12px;
    padding: 22px 16px 18px;
  }

  .dish-copy p {
    font-size: 14px;
  }

  .carousel-actions {
    display: grid;
  }

  .carousel-actions .button {
    width: 100%;
  }

  .dish-thumb {
    flex-basis: 64px;
  }

  .dish-thumb img {
    width: 52px;
    height: 52px;
  }
}
