:root {
  --bg: #f4f1eb;
  --phone-bg: #fbfaf7;
  --card: rgba(255, 255, 255, 0.82);
  --card-strong: #ffffff;
  --line: rgba(42, 40, 35, 0.1);
  --border-subtle: rgba(42, 40, 35, 0.08);
  --border-strong: rgba(42, 40, 35, 0.16);
  --text: #23221f;
  --text-strong: #171613;
  --muted: #827f77;
  --subtle: #b7b1a6;
  --text-disabled: #98938a;
  --tomato: #d85c45;
  --tomato-soft: #fff0eb;
  --sage: #6d8c74;
  --sage-soft: #edf5ee;
  --egg: #d6a83d;
  --blue: #668aa0;
  --shadow: 0 18px 50px rgba(38, 32, 22, 0.14);
  --shadow-card: 0 6px 18px rgba(48, 43, 34, 0.08);
  --shadow-action: 0 8px 18px rgba(216, 92, 69, 0.22);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --font-12: 12px;
  --font-14: 14px;
  --font-16: 16px;
  --font-20: 20px;
  --font-28: 28px;
  --tap-target: 44px;
  --radius-card: 8px;
  --radius-row: 6px;
  --radius-control: 8px;
  --radius-pill: 999px;
  --radius-lg: var(--radius-card);
  --radius: var(--radius-card);
  --radius-sm: var(--radius-row);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(251, 250, 247, 0.96), rgba(244, 241, 235, 0.94)),
    #f4f1eb;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overscroll-behavior-y: none;
}

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

button {
  border: 0;
  cursor: pointer;
}

.prototype-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}

.phone-frame {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--phone-bg);
  box-shadow: none;
  isolation: isolate;
}

.status-bar {
  display: none;
}

.system-icons {
  display: flex;
  gap: 5px;
  align-items: center;
}

.system-icons span {
  display: block;
  background: #1e1e1e;
}

.system-icons span:nth-child(1) {
  width: 17px;
  height: 10px;
  clip-path: polygon(0 100%, 22% 72%, 44% 48%, 66% 24%, 88% 0, 100% 0, 100% 100%);
}

.system-icons span:nth-child(2) {
  width: 15px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.85;
}

.system-icons span:nth-child(3) {
  width: 22px;
  height: 10px;
  border-radius: 3px;
}

.mini-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: calc(58px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: end;
  padding: calc(8px + env(safe-area-inset-top)) 18px 10px;
  border-bottom: 1px solid rgba(42, 40, 35, 0.06);
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: blur(26px);
}

.mini-header h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.ghost-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(35, 34, 31, 0.14);
  transition: opacity 160ms ease;
}

.header-action {
  justify-self: end;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 34, 31, 0.12);
}

.header-settings-icon {
  position: relative;
  width: 18px;
  height: 16px;
  background:
    linear-gradient(currentColor, currentColor) 0 2px / 18px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 0 7px / 18px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 0 12px / 18px 1.5px no-repeat;
}

.header-settings-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 4px;
  height: 4px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: var(--card);
  box-shadow:
    7px 5px 0 -1.5px var(--card),
    7px 5px 0 0 currentColor,
    1px 10px 0 -1.5px var(--card),
    1px 10px 0 0 currentColor;
}

.ghost-icon.is-muted {
  opacity: 0.38;
}

.chevron-left {
  width: 11px;
  height: 11px;
  border-left: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg);
}

.wechat-capsule {
  display: none;
}

.wechat-capsule span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1b1b1b;
  box-shadow: 7px 0 0 #1b1b1b, 14px 0 0 #1b1b1b;
}

.wechat-capsule span:last-child {
  width: 14px;
  height: 14px;
  box-shadow: none;
  background: transparent;
  border: 2px solid #1b1b1b;
}

.wechat-capsule i {
  height: 18px;
  width: 1px;
  background: rgba(30, 30, 30, 0.14);
}

.app-scroll {
  height: calc(100dvh - 58px - env(safe-area-inset-top) - 78px - env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 14px 18px calc(96px + env(safe-area-inset-bottom));
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.app-scroll::-webkit-scrollbar {
  display: none;
}

.pull-refresh-indicator {
  height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: height 160ms ease, opacity 160ms ease, transform 160ms ease, color 160ms ease;
}

.app-scroll.is-pulling-refresh .pull-refresh-indicator,
.app-scroll.is-refreshing-room .pull-refresh-indicator {
  height: 42px;
  opacity: 1;
  transform: translateY(0);
}

.app-scroll.is-pull-refresh-ready .pull-refresh-indicator {
  color: var(--tomato);
}

.app-scroll.is-refreshing-room .pull-refresh-indicator {
  color: var(--sage);
}

.page {
  display: none;
  animation: fadeIn 180ms ease-out;
}

.page.is-active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-panel,
.random-card,
.tonight-summary,
.room-card,
.recommend-card,
.combo-card,
.cook-summary,
.cook-section,
.prep-hero,
.prep-panel,
.recipe-hero,
.combination-hero,
.combination-panel,
.recipe-panel,
.dish-form,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 8px 28px rgba(48, 43, 34, 0.07);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: 26px 22px 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 249, 240, 0.78)),
    radial-gradient(circle at 92% 14%, rgba(216, 92, 69, 0.14), transparent 34%);
}

.home-meal-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 28px rgba(48, 43, 34, 0.07);
}

.home-meal-card.is-room {
  background: rgba(255, 248, 242, 0.9);
}

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

.home-meal-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.22;
}

.home-meal-card p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.home-meal-card .primary-btn {
  width: 100%;
}

.home-meal-card .menu-context-badge.is-confirmed {
  color: var(--sage);
  background: rgba(237, 245, 238, 0.92);
}

.home-meal-card .menu-context-badge.is-modified,
.home-meal-card.is-room .menu-context-badge {
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.1);
}

.home-meal-history {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.74);
}

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

.meal-history-head h3 {
  margin: 0;
  font-size: 20px;
}

.meal-history-range {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.meal-history-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.meal-history-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.meal-history-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-top: 7px;
}

.meal-history-day {
  min-height: 46px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 5px 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(42, 40, 35, 0.04);
}

.meal-history-day em {
  font-size: 10px;
  font-style: normal;
  line-height: 1.1;
}

.meal-history-day .meal-history-meal-count {
  width: auto;
  min-width: 0;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  color: var(--tomato);
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.meal-history-day strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
}

.meal-history-day.has-meals {
  border-color: rgba(216, 92, 69, 0.2);
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.09);
}

.meal-history-day.has-meals strong {
  color: var(--tomato);
}

.meal-history-day.is-today {
  border-color: rgba(109, 140, 116, 0.52);
}

.meal-history-day.is-today strong {
  color: var(--sage);
}

.meal-history-day.is-outside {
  opacity: 0.45;
}

.meal-history-day.is-future:not(.has-meals) {
  background: transparent;
}

.meal-history-day:disabled {
  cursor: default;
}

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

.home-room-members {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.home-member-avatars {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.home-member-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  color: #fff;
  background: var(--avatar-color, var(--sage));
  font-size: 12px;
  font-weight: 900;
}

.home-member-avatar + .home-member-avatar {
  margin-left: -8px;
}

.home-room-members > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--sage);
  font-size: 12px;
  font-weight: 750;
}

.hero-panel h2,
.random-card h2,
.tonight-summary h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
  line-height: 1.12;
}

.hero-panel p:not(.eyebrow),
.tonight-summary p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.hero-actions,
.tonight-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.tonight-actions.is-single-primary {
  grid-template-columns: 1fr;
}

.tonight-actions.is-single-primary .primary-btn {
  width: 100%;
}

#tonightPage .tonight-actions.is-single-primary {
  position: static;
  margin-top: 14px;
  padding: 0;
  background: transparent;
}

.tonight-actions.is-hidden {
  display: none;
}

.tonight-actions.has-merge {
  grid-template-columns: 1fr 1fr 1.2fr;
}

.tonight-actions .is-hidden {
  display: none;
}

.primary-btn,
.secondary-btn,
.quiet-btn {
  min-height: 46px;
  border-radius: 999px;
  font-weight: 750;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(180deg, #df705d 0%, var(--tomato) 100%);
  box-shadow: 0 8px 18px rgba(216, 92, 69, 0.24);
}

.primary-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.secondary-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.quiet-btn {
  grid-column: 1 / -1;
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.08);
  border: 1px solid rgba(216, 92, 69, 0.12);
}

.section-block {
  margin-top: 26px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.text-btn {
  color: var(--tomato);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.recent-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 0 18px 4px;
  scrollbar-width: none;
}

.recent-scroller::-webkit-scrollbar {
  display: none;
}

.recent-card {
  flex: 0 0 132px;
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.recent-card .dish-photo {
  width: 100%;
  height: 68px;
  border-radius: 14px;
}

.recent-card strong {
  color: var(--text);
  font-size: 14px;
}

.recent-card span {
  color: var(--muted);
  font-size: 12px;
}

.compact-row,
.selected-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.dish-photo {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(35, 34, 31, 0.08);
  object-fit: cover;
  background: #eee7dc;
  box-shadow: 0 6px 14px rgba(48, 43, 34, 0.1);
}

.dish-card .dish-photo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.tab-home,
.tab-menu,
.tab-add,
.tab-my,
.search-icon,
.line-bowl {
  content: "";
  display: block;
}

.dish-title {
  min-width: 0;
  flex: 1;
}

.dish-title strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0;
}

.dish-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.055);
  font-size: 11px;
  font-weight: 700;
}

.status-pill.is-want {
  color: var(--tomato);
  background: var(--tomato-soft);
}

.status-pill.is-done {
  color: var(--blue);
  background: #edf5f9;
}

.status-pill.is-regular {
  color: var(--sage);
  background: var(--sage-soft);
}

.search-row {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(235, 232, 226, 0.78);
}

.search-icon {
  width: 16px;
  height: 16px;
  border: 2px solid var(--subtle);
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--subtle);
  transform: rotate(45deg);
}

.search-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.menu-search-row {
  padding-right: 6px;
}

.menu-filter-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(35, 34, 31, 0.1);
}

.menu-filter-button .header-settings-icon {
  transform: scale(0.82);
}

.menu-filter-button.is-active {
  color: var(--tomato);
  border-color: rgba(224, 91, 67, 0.26);
  background: var(--tomato-soft);
}

.menu-filter-summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(35, 34, 31, 0.08);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.menu-filter-summary[hidden] {
  display: none;
}

.menu-filter-summary button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 9px;
  color: var(--tomato);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.dimension-tabs {
  display: grid;
  grid-template-columns: repeat(var(--dimension-count, 4), minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--phone-bg);
}

.dimension-tabs[hidden] {
  display: none;
}

.dimension-tabs button {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dimension-tabs button.is-active {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.dimension-tabs button.is-active::after {
  position: absolute;
  right: 22%;
  bottom: 0;
  left: 22%;
  height: 2px;
  border-radius: 2px;
  background: var(--tomato);
  content: "";
}

.menu-room-status {
  margin-top: 10px;
}

.menu-room-status.is-hidden {
  display: none;
}

.menu-room-status button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(112, 141, 116, 0.18);
  border-radius: 18px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(244, 249, 244, 0.96), rgba(255, 251, 244, 0.9));
  box-shadow: 0 8px 22px rgba(52, 45, 34, 0.06);
}

.menu-room-status span {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.menu-room-status strong {
  color: #5e8a68;
  font-size: 12px;
  font-weight: 900;
}

.menu-room-status em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-room-status small {
  flex: 0 0 auto;
  color: var(--tomato);
  font-size: 12px;
  font-weight: 900;
}

.menu-order-layout {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
  align-items: start;
}

.category-rail {
  position: sticky;
  top: 46px;
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.category-rail::-webkit-scrollbar {
  display: none;
}

.category-rail.is-hidden {
  display: none;
}

.category-rail button {
  min-height: 42px;
  padding: 0 8px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 750;
}

.category-rail button.is-active {
  color: #fff;
  background: var(--text);
  box-shadow: 0 8px 18px rgba(35, 34, 31, 0.14);
}

.dish-column {
  min-width: 0;
}

.menu-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.menu-section-title strong {
  color: var(--tomato);
  font-size: 12px;
  font-weight: 800;
}

.dish-list,
.selected-list {
  display: grid;
  gap: 12px;
}

.dish-list.is-grouped {
  gap: 18px;
}

.dish-group-section {
  display: grid;
  gap: 12px;
  scroll-margin-top: 14px;
}

.dish-group-section + .dish-group-section {
  margin-top: 6px;
  padding-top: 10px;
}

.dish-group-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.dish-group-divider::before,
.dish-group-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(42, 40, 35, 0.1));
}

.dish-group-divider::after {
  background: linear-gradient(90deg, rgba(42, 40, 35, 0.1), transparent);
}

.dish-group-divider span {
  color: var(--text);
}

.dish-group-divider em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.special-entry-list {
  gap: 12px;
}

.special-entry-card {
  width: 100%;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 238, 0.8)),
    radial-gradient(circle at 92% 10%, rgba(216, 92, 69, 0.12), transparent 32%);
  text-align: left;
}

.special-entry-card.is-disabled {
  opacity: 0.56;
}

.special-entry-visual,
.special-entry-mark,
.special-entry-image {
  width: 68px;
  height: 68px;
  border-radius: 6px;
  flex: 0 0 auto;
}

.special-entry-visual {
  position: relative;
  display: block;
  overflow: hidden;
}

.special-entry-visual .special-entry-mark,
.special-entry-visual .special-entry-image {
  position: absolute;
  inset: 0;
}

.special-entry-mark {
  display: grid;
  place-items: center;
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.1);
  font-size: 22px;
  font-weight: 900;
}

.special-entry-image {
  display: block;
  object-fit: cover;
  border: 1px solid rgba(35, 34, 32, 0.08);
  background: #f4eee7;
}

.special-entry-card strong,
.special-entry-card em,
.special-entry-card small {
  display: block;
}

.special-entry-copy {
  min-width: 0;
}

.special-entry-card strong {
  font-size: 18px;
  letter-spacing: 0;
}

.special-entry-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.special-entry-go {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  color: var(--tomato);
}

.special-entry-go .lucide-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.special-entry-card small {
  color: var(--tomato);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.dish-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) max-content;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.dish-open {
  margin-top: 7px;
  padding: 0;
  color: var(--tomato);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.dish-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.add-btn,
.remove-btn,
.mini-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--tomato);
}

.add-btn::before,
.add-btn::after,
.mini-add-btn::before,
.mini-add-btn::after {
  content: "";
  grid-area: 1 / 1;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.add-btn::after {
  transform: rotate(90deg);
}

.mini-add-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  background: rgba(216, 92, 69, 0.92);
}

.mini-add-btn::before,
.mini-add-btn::after {
  display: block;
}

.mini-add-btn::after {
  transform: rotate(90deg);
}

.add-btn.is-selected,
.mini-add-btn.is-selected {
  background: var(--sage);
}

.add-btn.is-selected::after,
.mini-add-btn.is-selected::after {
  display: none;
}

.remove-btn {
  background: rgba(35, 34, 31, 0.09);
  color: var(--muted);
}

.remove-btn.is-locked,
.remove-btn:disabled {
  opacity: 0.38;
}

.remove-btn::before {
  content: "";
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.random-card,
.tonight-summary,
.room-card,
.recommend-card,
.cook-summary,
.cook-section,
.prep-hero,
.prep-panel,
.recipe-hero,
.recipe-panel {
  padding: 20px;
}

.mood-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.mood-grid button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 750;
}

.recommend-panel {
  margin-top: 16px;
}

.empty-recommend,
.empty-state {
  min-height: 188px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.line-bowl {
  width: 46px;
  height: 30px;
  border: 2px solid var(--subtle);
  border-top: 0;
  border-radius: 0 0 26px 26px;
}

.recommend-card {
  display: grid;
  gap: 16px;
}

.recommend-card .dish-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.tonight-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.tonight-summary-side {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.tonight-summary-more {
  width: var(--tap-target);
  height: var(--tap-target);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  color: var(--muted);
  background: transparent;
}

.tonight-summary-more .lucide-icon {
  width: 20px;
  height: 20px;
}

.personal-finish-btn {
  min-height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(216, 92, 69, 0.28);
  border-radius: var(--radius-control);
  color: var(--tomato);
  background: var(--tomato-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.personal-finish-btn .lucide-icon {
  display: block;
  width: 15px;
  height: 15px;
}

.tonight-summary h2 {
  font-size: 25px;
  line-height: 1.16;
}

.tonight-summary p:not(.eyebrow) {
  margin-top: 8px;
  font-size: 13px;
}

.menu-context-badge {
  max-width: 96px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.92);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tonight-summary.is-room-context .menu-context-badge {
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.1);
}

.tonight-status.is-confirmed {
  color: var(--sage);
  background: rgba(237, 245, 238, 0.92);
}

.tonight-status.is-modified {
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.1);
}

.room-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 244, 0.78)),
    radial-gradient(circle at 94% 0%, rgba(109, 140, 116, 0.14), transparent 34%);
}

.room-card.is-hidden,
.room-card[hidden] {
  display: none;
}

.profile-room-card {
  margin: 14px 0 0;
  border: 1px solid rgba(109, 140, 116, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(48, 43, 34, 0.07);
}

.room-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.22;
}

.room-card span,
.room-note,
.room-message {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

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

.room-code-btn {
  min-width: 78px;
  padding: 9px 12px;
  border: 1px solid rgba(109, 140, 116, 0.16);
  border-radius: 999px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.86);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.room-join-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.room-join-grid input {
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-weight: 700;
}

.room-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.room-actions .primary-btn,
.room-actions .secondary-btn {
  min-height: 42px;
}

.room-message {
  margin: 0;
  color: var(--sage);
}

.room-card.is-active {
  border-color: rgba(109, 140, 116, 0.2);
}

.selected-row {
  padding-right: 10px;
  cursor: pointer;
}

.combo-card {
  margin-top: 14px;
  padding: 16px;
}

.combo-card.is-supporting {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

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

.combo-grid div {
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.8);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.combo-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.combo-grid strong {
  color: var(--text);
  font-size: 22px;
}

.combo-card p {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.confirmed-card {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(109, 140, 116, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(237, 245, 238, 0.76);
  box-shadow: 0 8px 28px rgba(48, 43, 34, 0.06);
}

.confirmed-card.is-visible {
  display: grid;
}

.confirmed-card strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.confirmed-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.selected-list.is-confirmed-focus {
  display: block;
}

.selected-group-card {
  display: grid;
  gap: 0;
  padding: 8px 0;
  border: 1px solid rgba(42, 40, 35, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(48, 43, 34, 0.06);
  overflow: hidden;
}

.selected-group-card.is-draft-round {
  margin-top: 12px;
}

.selected-group-card.is-round-adjustment {
  margin-top: 14px;
  border-color: rgba(92, 128, 103, 0.24);
}

.round-adjustment-focus {
  padding: 16px;
  border: 1px solid rgba(92, 128, 103, 0.22);
  border-radius: 28px;
  background: rgba(246, 250, 244, 0.88);
  box-shadow: 0 16px 36px rgba(48, 43, 34, 0.06);
}

.round-management-focus,
.total-menu-focus {
  padding: 16px;
  border: 1px solid rgba(92, 128, 103, 0.22);
  border-radius: 28px;
  background: rgba(246, 250, 244, 0.88);
  box-shadow: 0 16px 36px rgba(48, 43, 34, 0.06);
}

.personal-menu-focus {
  padding: 16px;
  border: 1px solid rgba(92, 128, 103, 0.22);
  border-radius: 28px;
  background: rgba(246, 250, 244, 0.88);
  box-shadow: 0 16px 36px rgba(48, 43, 34, 0.06);
}

.room-menu-focus {
  border-color: rgba(216, 92, 69, 0.18);
  background: rgba(255, 250, 245, 0.9);
}

.room-menu-list {
  margin-top: 14px;
}

.room-confirm-note {
  margin: 12px 0 0;
  color: var(--sage);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.personal-menu-list {
  margin-top: 14px;
}

.personal-menu-row {
  grid-template-columns: 54px minmax(0, 1fr) max-content;
}

.personal-quantity-stepper,
.selected-sheet-quantity-stepper {
  display: inline-grid;
  grid-template-columns: 26px 22px 26px;
  align-items: center;
  text-align: center;
}

.menu-quantity-stepper {
  display: inline-grid;
  grid-template-columns: 30px 22px 30px;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.menu-quantity-stepper button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(42, 40, 35, 0.12);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 18px;
  font-weight: 850;
}

.menu-quantity-stepper span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.combo-menu-edit {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(92, 128, 103, 0.2);
  border-radius: 14px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.86);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.personal-quantity-stepper button,
.selected-sheet-quantity-stepper button {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(42, 40, 35, 0.12);
  border-radius: 50%;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-weight: 850;
}

.personal-quantity-stepper span,
.selected-sheet-quantity-stepper span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.personal-combination-actions {
  grid-column: 3 / -1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.personal-combination-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.personal-combination-actions .remove-btn {
  flex: 0 0 32px;
}

.personal-add-btn,
.round-history-back {
  width: 100%;
  margin-top: 14px;
}

.personal-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.personal-menu-actions.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.personal-menu-actions .personal-add-btn,
.personal-menu-actions .personal-finish-btn {
  width: 100%;
  margin-top: 0;
}

.personal-undo-btn {
  width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(92, 128, 103, 0.25);
  border-radius: 12px;
  color: var(--sage);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.personal-more-actions {
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.round-management-focus > p,
.total-menu-focus > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.round-management-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.round-management-card,
.archived-rounds {
  overflow: hidden;
  border: 1px solid rgba(42, 40, 35, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.round-management-head,
.archived-rounds > div,
.total-menu-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.round-management-head {
  padding: 12px;
}

.round-management-head strong,
.round-management-head span,
.round-readonly {
  display: block;
}

.round-management-head span,
.round-readonly,
.archived-rounds span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.round-management-items {
  border-top: 1px solid rgba(42, 40, 35, 0.075);
}

.danger-text-btn {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  padding: 8px 0;
  border: 0;
  border-top: 1px solid rgba(216, 92, 69, 0.16);
  color: var(--tomato);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.round-adjustment-focus .danger-text-btn {
  margin: 14px 0 0;
  width: 100%;
}

.round-adjustment-add {
  width: 100%;
  margin-top: 14px;
}

.archived-rounds {
  margin-top: 14px;
  padding: 12px;
}

.archived-rounds .eyebrow {
  margin: 0 0 8px;
}

.archived-rounds > div + div {
  margin-top: 8px;
}

.archived-rounds span {
  margin: 0;
}

.total-menu-draft-note {
  color: var(--sage) !important;
  font-weight: 800;
}

.total-menu-actions {
  margin-top: 14px;
}

.round-adjustment-focus > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.round-adjustment-empty,
.round-adjustment-message {
  margin: 12px 0 0;
  color: var(--sage);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 750;
}

.draft-round-label {
  margin: 8px 12px 0;
  color: var(--sage);
  font-size: 12px;
  font-weight: 850;
}

.selected-group-card .selected-row {
  margin: 0 12px;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.selected-group-card .selected-row + .selected-row {
  border-top: 1px solid rgba(42, 40, 35, 0.075);
}

.selected-group-card .dish-photo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.confirmed-dish-focus {
  padding: 16px;
  border: 1px solid rgba(216, 92, 69, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 236, 0.9)),
    radial-gradient(circle at 92% 8%, rgba(216, 92, 69, 0.12), transparent 30%);
  box-shadow: 0 16px 36px rgba(48, 43, 34, 0.08);
}

.confirmed-dish-focus-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.confirmed-dish-focus-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  letter-spacing: 0;
  line-height: 1.05;
}

.confirmed-dish-focus-head span {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.1);
  font-size: 12px;
  font-weight: 850;
}

.confirmed-dish-stack {
  display: grid;
  gap: 0;
  margin-top: 14px;
  padding: 8px 0;
  border: 1px solid rgba(42, 40, 35, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.confirmed-round-label {
  margin: 8px 12px 0;
  color: var(--sage);
  font-size: 12px;
  font-weight: 850;
}

.confirmed-round-label + .confirmed-dish-card {
  border-top: 0;
}

.confirmed-dish-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 74px;
  margin: 0 12px;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.confirmed-dish-card + .confirmed-dish-card {
  border-top: 1px solid rgba(42, 40, 35, 0.075);
}

.confirmed-dish-card .dish-photo {
  width: 54px;
  height: 54px;
}

.cook-summary {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 235, 0.82)),
    radial-gradient(circle at 85% 16%, rgba(216, 92, 69, 0.12), transparent 32%);
}

.cook-summary h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.cook-summary p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.cook-section,
.prep-panel {
  margin-top: 14px;
}

.cook-section .section-heading,
.prep-panel .section-heading {
  margin-bottom: 12px;
}

.cook-section .section-heading span,
.prep-panel .section-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cook-dish-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 0 20px 4px;
  scrollbar-width: none;
}

.cook-dish-list::-webkit-scrollbar {
  display: none;
}

.cook-dish {
  flex: 0 0 112px;
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.cook-dish .dish-photo {
  width: 100%;
  height: 62px;
  border-radius: 14px;
}

.cook-dish span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.cook-dish em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

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

.ingredient-card-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 0 20px 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.ingredient-card-scroller::-webkit-scrollbar {
  display: none;
}

.ingredient-card {
  flex: 0 0 286px;
  scroll-snap-align: start;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.ingredient-card.is-total {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 240, 0.88)),
    radial-gradient(circle at 92% 10%, rgba(216, 92, 69, 0.1), transparent 34%);
}

.ingredient-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ingredient-card-head strong,
.ingredient-card-head span {
  display: block;
}

.ingredient-card-head strong {
  color: var(--text);
  font-size: 16px;
}

.ingredient-card-head span,
.ingredient-card-head em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.ingredient-group {
  padding: 13px;
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.ingredient-group > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--tomato);
  font-size: 13px;
}

.ingredient-group div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(42, 40, 35, 0.06);
  color: var(--text);
  font-size: 14px;
}

.ingredient-group div:first-of-type {
  border-top: 0;
}

.ingredient-group em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.recipe-ingredients-panel .ingredient-list,
.prep-panel .ingredient-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78%, 1fr);
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.recipe-ingredients-panel .ingredient-list::-webkit-scrollbar,
.prep-panel .ingredient-list::-webkit-scrollbar {
  display: none;
}

.recipe-ingredients-panel .ingredient-group,
.prep-panel .ingredient-group {
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
}

.recipe-ingredients-panel .ingredient-group > strong,
.prep-panel .ingredient-group > strong {
  display: block;
}

.recipe-ingredients-panel .ingredient-group div,
.prep-panel .ingredient-group div {
  min-width: 0;
  padding: 7px 0;
}

.recipe-ingredients-panel .ingredient-group div span,
.prep-panel .ingredient-group div span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cook-order {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: cook-step;
}

.cook-order li {
  counter-increment: cook-step;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.cook-order li::before {
  content: counter(cook-step);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--tomato);
  font-weight: 900;
}

.cook-order strong,
.cook-order span {
  display: block;
}

.cook-order strong {
  color: var(--text);
  font-size: 14px;
}

.cook-order span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.cook-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.meal-completion-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(92, 128, 103, 0.22);
  border-radius: 18px;
  background: rgba(246, 250, 244, 0.88);
}

.meal-completion-card.is-hidden {
  display: none;
}

.meal-completion-card h3 {
  margin: 0;
  font-size: 18px;
}

.meal-completion-card > p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.shopping-summary h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

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

.shopping-section-label {
  margin: 4px 2px 0;
  color: var(--sage);
  font-size: 12px;
  font-weight: 900;
}

.shopping-edit-row {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.shopping-edit-row.is-have {
  background: rgba(237, 245, 238, 0.72);
}

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

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

.shopping-row-main strong {
  font-size: 15px;
  color: var(--text);
}

.shopping-row-main span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.shopping-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--sage);
  background: var(--sage-soft);
  font-size: 12px;
  font-weight: 800;
}

.shopping-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--sage);
}

.shopping-amount {
  display: grid;
  grid-template-columns: 1fr 78px auto;
  align-items: end;
  gap: 7px;
}

.shopping-amount label {
  display: grid;
  gap: 4px;
}

.shopping-amount label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.shopping-amount input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 750;
}

.shopping-amount em {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.shopping-home-note {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--sage);
  background: rgba(109, 140, 116, 0.09);
  font-size: 12px;
  font-weight: 800;
}

.prep-hero {
  overflow: hidden;
  padding: 0;
}

.prep-hero .recipe-cover {
  height: 188px;
  border-radius: 0;
}

.prep-hero .recipe-hero-text {
  padding: 17px 18px 18px;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-list span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(35, 34, 31, 0.055);
  font-size: 13px;
  font-weight: 750;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recipe-hero {
  overflow: hidden;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.combination-hero {
  overflow: hidden;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 236, 0.88)),
    radial-gradient(circle at 88% 12%, rgba(216, 92, 69, 0.12), transparent 34%);
}

.recipe-cover {
  width: 100%;
  height: 92px;
  display: block;
  object-fit: cover;
  border-radius: 18px;
}

.recipe-hero-text {
  min-width: 0;
  padding: 0;
}

.recipe-hero-text h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.recipe-hero-text p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.recipe-panel {
  margin-top: 14px;
  min-height: 454px;
}

.recipe-ingredients-panel,
.recipe-flow-panel,
.combination-panel {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 8px 28px rgba(48, 43, 34, 0.07);
  backdrop-filter: blur(18px);
}

.combination-heading {
  align-items: start;
}

#combinationSummary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.combination-search-row {
  margin-top: 14px;
}

.combination-order-layout {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 14px;
}

.combination-category-rail {
  position: sticky;
  top: 0;
  display: grid;
  gap: 8px;
  max-height: 470px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.combination-category-rail::-webkit-scrollbar {
  display: none;
}

.combination-category-rail button {
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 800;
}

.combination-category-rail button.is-active {
  color: #fff;
  background: var(--text);
  box-shadow: 0 8px 18px rgba(35, 34, 31, 0.14);
}

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

.combination-product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.combination-product-card:active {
  transform: scale(0.985);
}

.combination-product-card:focus-visible {
  outline: 3px solid rgba(221, 91, 70, 0.22);
  outline-offset: 2px;
}

.combination-product-card strong,
.combination-product-card span {
  display: block;
}

.combination-product-info {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.combination-product-image {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  background: #f3eee7;
  border: 1px solid rgba(33, 31, 28, 0.08);
}

.combination-product-card strong {
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0;
}

.combination-product-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quantity-stepper {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 7px;
}

.quantity-stepper button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--tomato);
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}

.quantity-stepper span {
  min-width: 18px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.combination-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin: 16px 0 max(136px, calc(108px + env(safe-area-inset-bottom)));
  padding: 16px;
  border: 1px solid rgba(42, 40, 35, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(52, 45, 34, 0.1);
  backdrop-filter: blur(18px);
}

.combination-actions.is-visible {
  display: grid;
}

.combination-actions.is-empty {
  grid-template-columns: 1fr;
}

.combination-actions.is-empty > button {
  grid-column: 1 / -1;
}

.combination-actions.has-reusable-config #reuseCombinationSelection {
  border-color: rgba(109, 140, 116, 0.28);
  color: var(--sage);
}

.combination-actions-summary {
  grid-column: 1 / -1;
}

.combination-actions-summary p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
}

.combination-actions button {
  min-height: 52px;
}

.combination-product-list.has-action {
  padding-bottom: 0;
}

.selected-row.is-combination,
.confirmed-dish-card.is-combination {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto 32px;
  align-items: center;
}

.confirmed-dish-card.is-combination {
  grid-template-columns: 62px minmax(0, 1fr) auto;
}

.combo-expand-label {
  color: var(--tomato);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.combination-selected-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(237, 245, 238, 0.72);
}

.combination-selected-detail div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.combination-selected-detail span {
  color: var(--sage);
  font-size: 12px;
  font-weight: 850;
}

.combination-selected-detail strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.recipe-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.recipe-prep-time {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  width: fit-content;
  margin-bottom: 12px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--sage);
  background: var(--sage-soft);
  font-size: 12px;
  font-weight: 850;
}

.recipe-tool-row span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(35, 34, 31, 0.055);
  font-size: 12px;
  font-weight: 800;
}

.recipe-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.recipe-progress strong {
  color: var(--tomato);
}

.recipe-step-card {
  margin-top: 14px;
  min-height: 336px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.88);
  border: 1px solid rgba(216, 92, 69, 0.12);
}

.recipe-ingredients-panel.is-hidden {
  display: none;
}

.recipe-flow-panel.is-empty-recipe .recipe-flow-heading {
  display: none;
}

.recipe-flow-panel.is-empty-recipe .recipe-step-card {
  min-height: 0;
  background: transparent;
  border: 0;
  padding: 0;
}

.recipe-empty-card,
.edit-empty-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid rgba(216, 92, 69, 0.14);
}

.recipe-empty-card h3,
.edit-empty-card strong {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 900;
}

.recipe-empty-card p,
.edit-empty-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 650;
}

.recipe-empty-card button,
.edit-empty-card button {
  margin-top: 4px;
}

.vertical-step-list {
  display: grid;
  gap: 14px;
}

.vertical-step-card {
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid rgba(216, 92, 69, 0.12);
}

.vertical-step-card .step-visual {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(58vh, 460px);
  object-fit: contain;
  object-position: center;
  margin-inline: auto;
  background: rgba(42, 40, 35, 0.035);
}

.vertical-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.vertical-step-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.vertical-step-head em {
  color: var(--tomato);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.vertical-step-card h3 {
  margin: 14px 0 0;
  font-size: 25px;
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 850;
}

.vertical-step-card p {
  margin: 10px 0 0;
  color: rgba(35, 34, 31, 0.86);
  line-height: 1.56;
  font-size: 16px;
  font-weight: 560;
  white-space: pre-line;
}

.step-visual {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(58vh, 460px);
  display: block;
  object-fit: contain;
  border-radius: 18px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 18px rgba(48, 43, 34, 0.08);
}

.recipe-step-card h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
  font-weight: 850;
}

.recipe-step-card p {
  margin: 10px 0 0;
  color: rgba(35, 34, 31, 0.86);
  line-height: 1.56;
  font-size: 16px;
  font-weight: 560;
  white-space: pre-line;
}

.recipe-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.vertical-step-card .tag-pill {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.recipe-flow-heading {
  align-items: center;
}

.view-mode-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 10px;
  background: rgba(35, 34, 31, 0.06);
}

.view-mode-toggle button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.view-mode-toggle button.is-active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 2px 8px rgba(48, 43, 34, 0.09);
}

.view-mode-toggle.is-hidden {
  display: none;
}

.vertical-step-list.is-card-mode {
  display: block;
}

.vertical-step-list.is-card-mode .vertical-step-card {
  min-height: min(66vh, 600px);
  display: flex;
  flex-direction: column;
}

.vertical-step-list.is-card-mode .step-visual {
  max-height: min(36vh, 320px);
}

.vertical-step-list.is-card-mode .recipe-chip-row {
  margin-top: auto;
  padding-top: 16px;
}

.step-card-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin-top: 12px;
}

.step-card-actions button:disabled {
  opacity: 0.42;
}

.recipe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.prep-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.recipe-actions .primary-btn,
.recipe-actions .secondary-btn,
.prep-actions .primary-btn,
.prep-actions .secondary-btn {
  min-height: 62px;
  font-size: 18px;
}

.dish-form,
.recipe-compose,
.edit-form {
  display: grid;
  gap: 14px;
}

.dish-form,
.recipe-compose {
  padding: 0;
}

.edit-form {
  padding: 0 0 8px;
}

.add-hero,
.edit-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 8px 28px rgba(48, 43, 34, 0.07);
}

.add-hero h2 {
  margin: 0;
  font-size: 28px;
}

.dish-form label,
.edit-form label {
  display: grid;
  gap: 7px;
}

.dish-form label > span,
.edit-form label > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auto-suggest {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--sage-soft);
  border: 1px solid rgba(109, 140, 116, 0.16);
}

.auto-suggest span {
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
}

.auto-suggest strong {
  color: var(--text);
  font-size: 14px;
}

.dish-form input,
.dish-form select,
.dish-form textarea,
.edit-form input,
.edit-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 0 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
}

.dish-form textarea,
.edit-form textarea {
  min-height: 78px;
  resize: none;
  padding-top: 12px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.slot-card {
  min-height: 62px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.8);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.slot-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.slot-card strong {
  color: var(--text);
  font-size: 16px;
}

.choice-groups {
  display: grid;
  gap: 12px;
}

.choice-group > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.choice-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-group button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.055);
  font-size: 13px;
  font-weight: 800;
}

.choice-group button.is-active {
  color: #fff;
  background: var(--tomato);
}

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

.edit-ingredient-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.edit-ingredient-group {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(226, 93, 73, 0.12);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.68);
}

.edit-ingredient-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.edit-ingredient-group-head strong {
  color: var(--tomato);
  font-size: 13px;
}

.edit-ingredient-group-head button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--tomato);
  background: rgba(226, 93, 73, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.edit-ingredient-group-list {
  display: grid;
  gap: 8px;
}

.edit-ingredient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.4fr) 34px;
  align-items: center;
  gap: 8px;
}

.edit-ingredient-row input {
  min-width: 0;
  padding-inline: 12px;
}

.edit-ingredient-empty {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.edit-ingredient-row .quantity-input {
  text-align: center;
  font-weight: 750;
}

.edit-row-remove {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.055);
  font-size: 16px;
  font-weight: 850;
}

.edit-form-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
  margin-top: 4px;
}

.edit-form-actions .submit-btn {
  margin-top: 0;
}

@media (max-width: 360px) {
  .edit-ingredient-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .edit-ingredient-row .quantity-input {
    grid-column: 1 / 2;
  }

  .edit-ingredient-row .edit-row-remove {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }
}

/* Foodlight keeps meal memories lightweight: the calendar discovers, details explain. */
.menu-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-create-recipe {
  min-height: 30px;
  padding: 0 4px;
  font-size: 12px;
}

#myPage .foodlight-section {
  display: grid;
  margin-top: 14px;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 28px rgba(48, 43, 34, 0.06);
  backdrop-filter: blur(18px);
}

#myPage .foodlight-section[hidden] {
  display: none;
}

.foodlight-calendar {
  display: grid;
  gap: var(--space-3);
}

.foodlight-hero {
  padding: 0;
}

.foodlight-hero h2,
.foodlight-hero p {
  margin: 0;
}

.foodlight-hero h2 {
  margin-top: 4px;
  color: var(--text-strong);
  font-size: var(--font-20);
  font-weight: 850;
}

.foodlight-month-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.foodlight-month-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.foodlight-month-head > div {
  display: grid;
  gap: 2px;
}

.foodlight-month-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.foodlight-month-head h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--font-18);
  font-weight: 850;
}

.quiet-icon-btn {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
}

.quiet-icon-btn .lucide-icon {
  width: 18px;
  height: 18px;
}

.foodlight-weekdays,
.foodlight-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.foodlight-weekdays {
  margin-top: var(--space-4);
}

.foodlight-weekdays span {
  color: var(--subtle);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.foodlight-days {
  margin-top: 7px;
}

.foodlight-day {
  min-height: 68px;
  display: grid;
  grid-template-rows: 16px minmax(25px, 1fr) 14px;
  place-items: center;
  gap: 2px;
  padding: 5px 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(42, 40, 35, 0.035);
}

.foodlight-day > strong {
  color: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.foodlight-day.is-outside {
  opacity: 0.28;
}

.foodlight-day.is-today {
  border-color: rgba(109, 140, 116, 0.5);
}

.foodlight-day.has-meals {
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.07);
}

.foodlight-day-visual {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
}

.foodlight-day-visual img,
.meal-history-day em img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.foodlight-day em {
  min-height: 14px;
  display: block;
  color: var(--tomato);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 14px;
  overflow: visible;
  white-space: nowrap;
}

.meal-history-day em {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
}

.meal-history-period-dot,
.foodlight-day-visual .meal-history-period-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sage);
}

.meal-history-period-dot.is-breakfast { background: #d7a84d; }
.meal-history-period-dot.is-lunch { background: var(--sage); }
.meal-history-period-dot.is-dinner { background: var(--tomato); }
.meal-history-period-dot.is-supper { background: #7b77a7; }

.foodlight-insight {
  margin: var(--space-3) 0 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  color: var(--muted);
  font-size: var(--font-12);
  line-height: 1.5;
}

.record-action-list {
  display: grid;
  gap: 10px;
  margin-top: var(--space-4);
}

.record-action-card {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.68);
}

.record-action-card.is-primary {
  border-color: rgba(216, 92, 69, 0.24);
  background: rgba(255, 248, 244, 0.9);
}

.record-action-card > .lucide-icon {
  width: 18px;
  height: 18px;
  color: var(--subtle);
}

.record-action-card > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.record-action-card strong {
  color: var(--text-strong);
  font-size: var(--font-15);
  font-weight: 850;
}

.record-action-card em,
.record-action-hint span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--font-12);
  font-style: normal;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--tomato);
  background: var(--tomato-soft);
}

.record-action-icon.is-sage {
  color: var(--sage);
  background: var(--sage-soft);
}

.record-action-icon .lucide-icon {
  width: 20px;
  height: 20px;
}

.record-action-hint {
  display: grid;
  gap: 3px;
  padding: 4px 2px 6px;
}

.record-action-hint strong {
  color: var(--text);
  font-size: var(--font-14);
}

.record-action-hint span {
  white-space: normal;
}

.manual-meal-form {
  display: grid;
  gap: var(--space-3);
  min-height: 0;
  margin-top: var(--space-3);
  padding: 0 1px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.manual-meal-form::-webkit-scrollbar { display: none; }

.manual-meal-form label {
  display: grid;
  gap: 6px;
}

.manual-meal-form label > span,
.manual-meal-choice legend {
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 800;
}

.manual-meal-form input,
.manual-meal-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
}

.manual-meal-form textarea {
  min-height: 76px;
  resize: vertical;
}

.manual-meal-choice {
  margin: 0;
  padding: 0;
  border: 0;
}

.manual-meal-choice legend { margin-bottom: 7px; }

.manual-meal-choice > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.manual-meal-choice button {
  min-height: 38px;
  padding: 0 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  font-size: var(--font-12);
  font-weight: 800;
}

.manual-meal-choice button.is-active {
  border-color: rgba(216, 92, 69, 0.32);
  color: var(--tomato);
  background: var(--tomato-soft);
}

.manual-meal-image-button {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px dashed rgba(109, 140, 116, 0.42);
  border-radius: var(--radius-control);
  color: var(--sage);
  text-align: left;
  background: rgba(237, 245, 238, 0.56);
}

.manual-meal-image-button > span,
.manual-meal-image-button img {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
}

.manual-meal-image-button img { object-fit: cover; }

.manual-meal-image-button .lucide-icon {
  width: 19px;
  height: 19px;
}

.manual-meal-image-button strong { font-size: var(--font-13); }

.manual-meal-more {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-2);
}

.manual-meal-more summary {
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 800;
}

.manual-meal-more > div {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.manual-meal-actions {
  padding-bottom: 2px;
}

.meal-archive-record-manual {
  display: grid;
  gap: 10px;
}

.meal-archive-manual-image {
  width: 100%;
  max-height: 168px;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-row);
}

.meal-archive-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-13);
  line-height: 1.55;
}

.meal-archive-comments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.meal-archive-comment-list {
  display: grid;
  gap: 5px;
}

.meal-archive-comment-list p {
  display: flex;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: var(--font-12);
  line-height: 1.45;
}

.meal-archive-comment-list strong {
  flex: 0 0 auto;
  color: var(--sage);
  font-weight: 850;
}

.meal-archive-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.meal-archive-comment-form input {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: var(--font-12);
}

.meal-archive-comment-form button {
  min-width: 52px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-control);
  color: var(--sage);
  background: var(--sage-soft);
  font-size: var(--font-12);
  font-weight: 850;
}

.meal-archive-period.meal-period-早餐 { color: #9e6b18; background: rgba(244, 220, 166, 0.52); }
.meal-archive-period.meal-period-午餐 { color: var(--sage); background: var(--sage-soft); }
.meal-archive-period.meal-period-晚餐 { color: var(--tomato); background: var(--tomato-soft); }
.meal-archive-period.meal-period-夜宵 { color: #67638f; background: rgba(123, 119, 167, 0.12); }

@media (max-width: 360px) {
  #myPage .foodlight-section { padding: var(--space-3); }
  .foodlight-day { min-height: 64px; }
  .manual-meal-choice > div { gap: 5px; }
  .manual-meal-choice button { padding-inline: 3px; }
}

.edit-cover-editor {
  margin-top: 2px;
}

.edit-cover-button,
.edit-step-image-button {
  width: 100%;
  display: grid;
  align-items: center;
  border: 1px solid rgba(42, 40, 35, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.edit-cover-button {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 9px;
  border-radius: 18px;
  text-align: left;
}

.edit-cover-button img {
  width: 86px;
  height: 68px;
  border-radius: 14px;
  object-fit: cover;
}

.edit-cover-button span,
.edit-cover-button strong,
.edit-cover-button em {
  display: block;
}

.edit-cover-button strong {
  color: var(--text);
  font-size: 15px;
}

.edit-cover-button em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
}

.step-edit-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.step-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.step-edit-head span {
  color: var(--tomato);
  font-size: 12px;
  font-weight: 900;
}

.step-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.step-edit-head button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.step-edit-head button[data-insert-step-after] {
  color: rgba(42, 40, 35, 0.72);
  background: rgba(42, 40, 35, 0.06);
}

.edit-step-image-button {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: 16px;
}

.edit-step-image-button img {
  width: 100%;
  max-height: 210px;
  display: block;
  object-fit: contain;
  background: rgba(42, 40, 35, 0.035);
}

.edit-step-image-button em {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(35, 34, 31, 0.72);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.step-chip-editor {
  display: grid;
  gap: 8px;
}

.step-chip-toggle {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  text-align: left;
  background: rgba(42, 40, 35, 0.045);
}

.step-chip-toggle span {
  color: var(--text);
  font-size: 13px;
}

.step-chip-toggle em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-chip-editor-body {
  display: none;
}

.step-chip-editor.is-expanded .step-chip-editor-body {
  display: grid;
  gap: 10px;
}

.custom-step-tags {
  display: grid;
  gap: 8px;
}

.custom-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.custom-tag-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--tomato);
  background: rgba(230, 95, 71, 0.08);
  font-size: 12px;
  font-weight: 800;
  cursor: grab;
}

.custom-tag-pill em {
  font-style: normal;
}

.custom-tag-pill button {
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}

.custom-tag-pill:active {
  cursor: grabbing;
}

.custom-tag-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.custom-tag-entry button {
  min-width: 58px;
  border-radius: 12px;
  color: #fff;
  background: var(--text);
  font-weight: 800;
}

@media (min-width: 560px) {
  .recipe-ingredients-panel .ingredient-list,
  .prep-panel .ingredient-list {
    grid-auto-flow: initial;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    overflow: visible;
  }
}

.submit-btn {
  margin-top: 4px;
}

.recipe-compose {
  padding-bottom: 18px;
}

.compose-title-block {
  display: grid;
  gap: 14px;
  padding: 10px 8px 18px;
  border-bottom: 1px solid rgba(42, 40, 35, 0.08);
}

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

.compose-actions .secondary-btn {
  min-height: 42px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(48, 43, 34, 0.08);
}

.recipe-title-input,
.recipe-story-input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.recipe-title-input {
  width: 100%;
  min-height: 52px;
  padding: 0;
  font-size: 30px;
  font-weight: 850;
}

.recipe-title-input::placeholder,
.recipe-story-input::placeholder {
  color: rgba(35, 34, 31, 0.36);
}

.recipe-story-input {
  min-height: 76px;
  resize: none;
  padding: 0;
  font-size: 20px;
  line-height: 1.45;
}

.cover-uploader {
  width: 100%;
  min-height: 154px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  overflow: hidden;
  border-radius: 24px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.045);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.cover-uploader span,
.cover-uploader strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.cover-uploader em {
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}

.cover-uploader.has-image {
  position: relative;
  display: block;
}

.cover-uploader.has-image img {
  width: 100%;
  height: 190px;
  display: block;
  object-fit: cover;
}

.cover-uploader.has-image strong {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(35, 34, 31, 0.72);
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.compose-section,
.advanced-settings,
.profile-section,
.profile-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 28px rgba(48, 43, 34, 0.06);
  backdrop-filter: blur(18px);
}

.compose-section {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.compose-ingredient-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 46px 48px 28px;
  gap: 6px;
  align-items: center;
  padding: 9px;
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.compose-ingredient-card input,
.compose-ingredient-card select,
.compose-step-title-input,
.tag-custom-input {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(42, 40, 35, 0.08);
  outline: 0;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 750;
}

.compose-ingredient-card input,
.compose-ingredient-card select {
  min-height: 32px;
  padding: 0 7px;
  font-size: 12px;
}

.compose-ingredient-card .ingredient-name-input {
  font-size: 14px;
  font-weight: 850;
}

.compose-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.07);
  font-size: 20px;
  font-weight: 700;
}

.mini-inline-btn {
  justify-self: start;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(42, 40, 35, 0.08);
  font-size: 13px;
  font-weight: 850;
}

.compose-ingredient-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(42, 40, 35, 0.08);
}

.compose-ingredient-row input,
.compose-step-card textarea,
.advanced-settings select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.compose-ingredient-row input {
  min-height: 38px;
  font-size: 16px;
}

.compose-ingredient-row input::placeholder,
.compose-step-card textarea::placeholder {
  color: rgba(35, 34, 31, 0.38);
}

.compose-two-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.compose-step-tools {
  display: flex;
  gap: 8px;
}

.compose-step-tools button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(35, 34, 31, 0.055);
  font-size: 12px;
  font-weight: 800;
}

.compose-step-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.62);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.compose-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compose-step-card > strong {
  font-size: 16px;
}

.compose-step-head strong {
  color: var(--text);
  font-size: 16px;
}

.compose-step-head button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.06);
  font-size: 12px;
  font-weight: 800;
}

.step-image-placeholder {
  width: 100%;
  min-height: 178px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.045);
  overflow: hidden;
}

.step-image-placeholder.has-image {
  display: block;
  padding: 0;
}

.step-image-placeholder img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 340px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.step-image-placeholder span,
.step-image-placeholder em {
  display: block;
}

.step-image-placeholder span {
  font-size: 15px;
  font-weight: 800;
}

.step-image-placeholder em {
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.compose-step-card textarea {
  min-height: 74px;
  resize: none;
  padding: 0;
  font-size: 18px;
  line-height: 1.45;
}

.compose-step-title-input {
  min-height: 40px;
  padding: 0 12px;
  font-size: 16px;
}

.step-tag-picker,
.step-chip-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(35, 34, 31, 0.035);
}

.compose-tag-toggle {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 13px;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
}

.compose-tag-toggle strong {
  color: var(--text);
  font-size: 13px;
}

.compose-tag-toggle span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-tag-picker-body {
  display: none;
  gap: 10px;
}

.step-tag-picker.is-expanded .step-tag-picker-body {
  display: grid;
}

.step-chip-group {
  display: grid;
  gap: 7px;
}

.step-chip-group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.step-chip-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.step-chip-group button {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(42, 40, 35, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.step-chip-group button.is-active {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}

.step-chip-inline-custom {
  width: 68px;
  min-height: 30px;
  border: 1px dashed rgba(42, 40, 35, 0.16);
  border-radius: 999px;
  outline: 0;
  padding: 0 9px;
  color: var(--text);
  background: rgba(35, 34, 31, 0.035);
  font-size: 12px;
  font-weight: 780;
  text-align: center;
}

.step-chip-inline-custom::placeholder {
  color: rgba(127, 121, 110, 0.72);
}

.step-chip-inline-custom:focus {
  border-style: solid;
  border-color: rgba(216, 92, 69, 0.38);
  background: rgba(255, 255, 255, 0.82);
}

.step-chip-editor .custom-tag-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.step-chip-editor .custom-tag-list {
  display: flex;
}

.step-chip-editor .custom-tag-entry button {
  min-width: 58px;
  border-radius: 12px;
  color: #fff;
  background: var(--text);
}

.step-chip-editor .custom-tag-list .custom-tag-pill {
  color: var(--tomato);
  background: rgba(230, 95, 71, 0.08);
  border-color: rgba(230, 95, 71, 0.12);
}

.step-chip-group .custom-tag-pill button {
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}

.tag-custom-input {
  min-height: 34px;
  margin-top: 2px;
  padding: 0 10px;
  font-size: 13px;
}

.advanced-settings {
  padding: 0 18px;
}

.taxonomy-manager {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.taxonomy-sheet-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.taxonomy-sheet-head > div {
  display: grid;
  gap: 4px;
}

.taxonomy-edit-button {
  min-width: 58px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--tomato);
  background: rgba(230, 95, 71, 0.09);
  font-size: 13px;
  font-weight: 850;
}

.taxonomy-manager-group {
  display: grid;
  gap: 13px;
  padding: 15px;
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.taxonomy-manager-group.is-viewing {
  gap: 10px;
  padding-block: 14px;
}

.taxonomy-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.taxonomy-view-head strong {
  color: var(--text);
  font-size: 15px;
}

.taxonomy-view-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.taxonomy-view-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(238, 237, 233, 0.94);
  font-size: 12px;
  font-weight: 800;
}

.taxonomy-group-head {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.taxonomy-group-head label {
  display: grid;
  flex: 1;
  gap: 5px;
}

.taxonomy-group-head label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.taxonomy-group-head input {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(42, 40, 35, 0.09);
  border-radius: 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  font-weight: 850;
}

.taxonomy-remove-dimension {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  border-radius: 50%;
  color: #fff;
  background: var(--tomato);
  font-size: 18px;
  line-height: 1;
}

.taxonomy-remove-dimension:disabled {
  opacity: 0.25;
}

.taxonomy-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.taxonomy-pill {
  position: relative;
  display: inline-flex;
  min-width: 64px;
  min-height: 34px;
  padding: 0 22px 0 11px;
  border-radius: 999px;
  background: rgba(238, 237, 233, 0.94);
}

.taxonomy-pill input {
  width: max(42px, calc((var(--label-length, 2) + 1) * 1em));
  max-width: 92px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.taxonomy-pill button {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--tomato);
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(190, 65, 44, 0.22);
}

.taxonomy-pill button::before {
  content: "×";
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-0.5px);
}

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

.taxonomy-add-row input {
  min-width: 0;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(42, 40, 35, 0.09);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  font-weight: 750;
}

.taxonomy-add-row button {
  min-width: 48px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  color: #fff;
  background: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.taxonomy-hidden-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 15px;
  border-top: 1px solid var(--line);
}

.taxonomy-hidden-section > div:first-child {
  display: grid;
  gap: 4px;
}

.taxonomy-hidden-section strong {
  color: var(--text);
  font-size: 14px;
}

.taxonomy-hidden-section span {
  color: var(--muted);
  font-size: 12px;
}

.taxonomy-hidden-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.taxonomy-hidden-list button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.taxonomy-hidden-list button span {
  margin-right: 4px;
  color: var(--tomato);
  font-size: 15px;
}

.taxonomy-edit-actions {
  position: sticky;
  bottom: -1px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin: 18px -4px -4px;
  padding: 12px 4px 4px;
  background: linear-gradient(180deg, rgba(251, 250, 247, 0), var(--phone-bg) 24%);
}

.confirm-sheet-panel {
  min-height: 0;
  padding: 22px;
  border-radius: 24px 24px 0 0;
}

.confirm-sheet-panel h3 {
  margin: 6px 0 8px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
}

.confirm-sheet-panel > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.confirm-sheet-extra:empty {
  display: none;
}

.meal-period-picker {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  background: var(--card-strong);
}

.meal-period-picker > span {
  color: var(--muted);
  font-size: var(--font-14);
  font-weight: 700;
}

.meal-period-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.meal-period-options button {
  min-width: 0;
  min-height: var(--tap-target);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  color: var(--text);
  background: #fff;
  font-size: var(--font-14);
  font-weight: 700;
}

.meal-period-options button.is-active {
  border-color: var(--tomato);
  color: var(--tomato);
  background: rgba(227, 93, 69, 0.1);
}

.confirm-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-top: 22px;
}

.danger-btn {
  min-height: 46px;
  border-radius: 14px;
  color: #fff;
  background: var(--tomato);
  font-size: 14px;
  font-weight: 850;
}

@media (max-width: 340px) {
  .meal-period-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.advanced-settings summary {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
  cursor: pointer;
}

.advanced-settings summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--subtle);
  border-bottom: 3px solid var(--subtle);
  transform: rotate(-45deg);
}

.advanced-settings[open] summary::after {
  transform: rotate(45deg);
}

.advanced-hint {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.advanced-label-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.advanced-label-row span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.advanced-label-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
  line-height: 1.35;
}

.advanced-settings label {
  display: grid;
  gap: 7px;
  padding-bottom: 14px;
}

.advanced-settings label > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.advanced-settings select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.advanced-settings .slot-grid,
.advanced-settings .choice-groups {
  margin-bottom: 14px;
}

.compose-submit {
  min-height: 56px;
  border-radius: 18px;
  font-size: 17px;
}

.profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: start;
  gap: 14px;
  padding: 20px 20px 58px;
  cursor: pointer;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 240, 0.84)),
    radial-gradient(circle at 88% 16%, rgba(109, 140, 116, 0.14), transparent 34%);
}

.profile-hero h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.profile-hero p:not(.eyebrow) {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-member-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
}

.profile-member-strip em {
  margin-left: 3px;
  color: var(--sage);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.profile-avatar {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  background: var(--text);
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(35, 34, 31, 0.14);
}

.profile-party-btn {
  position: absolute;
  right: 18px;
  bottom: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--tomato);
  box-shadow: 0 10px 22px rgba(216, 92, 69, 0.18);
  font-size: 12px;
  font-weight: 900;
}

.profile-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  padding: 14px 4px;
  border-top: 1px solid rgba(42, 40, 35, 0.08);
  border-bottom: 1px solid rgba(42, 40, 35, 0.08);
}

.profile-overview div {
  display: grid;
  gap: 4px;
  text-align: center;
  border-left: 1px solid rgba(42, 40, 35, 0.08);
}

.profile-overview div:first-child {
  border-left: 0;
}

.profile-overview strong {
  color: var(--text);
  font-size: 21px;
}

.profile-overview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.profile-section {
  margin-top: 14px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 28px rgba(48, 43, 34, 0.055);
}

.profile-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0;
  border-top: 1px solid rgba(42, 40, 35, 0.08);
  color: inherit;
  background: transparent;
  text-align: left;
}

.profile-row:first-child {
  border-top: 0;
}

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

.profile-row strong {
  color: var(--text);
  font-size: 16px;
}

.profile-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.profile-row:active {
  opacity: 0.72;
}

.settings-account-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 20px 2px 22px;
  border-bottom: 1px solid rgba(42, 40, 35, 0.08);
}

.settings-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.settings-account-card .eyebrow {
  margin-bottom: 3px;
}

.settings-account-card h2 {
  margin: 0;
  font-size: 20px;
}

.settings-account-card p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.settings-group {
  margin-top: 26px;
}

.settings-group-title {
  margin: 0 0 8px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-row {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px;
  border-top: 1px solid rgba(42, 40, 35, 0.08);
  color: inherit;
  background: transparent;
  text-align: left;
}

.settings-row > .lucide-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.settings-row:first-of-type {
  border-top: 0;
}

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

.settings-row strong {
  color: var(--text);
  font-size: 15px;
}

.settings-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.settings-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.settings-row:active {
  opacity: 0.68;
}

.profile-sheet-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(42, 40, 35, 0.05);
  font-size: 12px;
  font-weight: 750;
}

.account-nickname-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-nickname-card > div {
  min-width: 0;
  flex: 1;
}

.account-nickname-card span,
.account-nickname-rule,
.family-invite-join > span,
.family-login-required > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-nickname-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.account-nickname-card > .text-btn {
  flex: 0 0 auto;
  min-height: 44px;
}

.account-nickname-card.is-editing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.account-nickname-card.is-editing > div:first-child,
.account-nickname-card.is-editing .account-nickname-edit-field {
  grid-column: 1 / -1;
}

.account-nickname-card.is-editing .account-nickname-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.account-nickname-edit-field {
  flex: 1;
}

.account-nickname-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-nickname-actions .secondary-btn {
  min-height: 44px;
}

.account-nickname-rule {
  margin: 8px 0 0;
}

.sync-local-summary,
.sync-preview-card,
.backup-tools {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(42, 40, 35, 0.08);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.68);
}

.sync-local-summary span,
.sync-preview-card span,
.backup-tools span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.sync-local-summary strong,
.sync-preview-card strong,
.backup-tools strong {
  color: var(--text);
  font-size: 15px;
}

.sync-preview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sync-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.sync-action-grid button {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 12px;
}

.quiet-danger-btn {
  border: 1px solid rgba(216, 92, 69, 0.18);
  border-radius: 999px;
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.06);
  font-weight: 800;
}

.sync-preview-card {
  border-color: rgba(109, 140, 116, 0.22);
  background: rgba(237, 245, 238, 0.7);
}

.sync-warning {
  padding-top: 6px;
  color: #8a5c39 !important;
}

.sync-message {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--sage);
  background: rgba(109, 140, 116, 0.1);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.backup-tools {
  margin-top: 20px;
}

.profile-sheet-panel {
  max-height: 72%;
  overflow: auto;
}

.profile-sheet-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.profile-sheet-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
}

.sync-conflict-head {
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: start;
}

.sync-conflict-head .icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--card-strong);
}

.sync-conflict-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.sync-conflict-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-strong);
}

.sync-conflict-card h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.sync-conflict-versions article {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
}

.sync-conflict-versions span,
.sync-conflict-versions small {
  color: var(--muted);
  font-size: 12px;
}

.sync-conflict-versions strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.sync-conflict-versions button {
  min-height: 44px;
  margin-top: 4px;
  padding: 0 10px;
  border: 1px solid rgba(109, 140, 116, 0.28);
  border-radius: 6px;
  color: var(--sage);
  background: var(--sage-soft);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 430px) {
  .sync-conflict-versions {
    grid-template-columns: 1fr;
  }
}

.room-history-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.room-history-head button {
  min-height: 32px;
  padding: 0 2px;
  color: var(--tomato);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.party-identity-card,
.party-join-card,
.party-code-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-strong);
}

.party-identity-card,
.party-code-card,
.party-room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.party-identity-card span,
.party-join-card > span,
.party-code-card span,
.party-room-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.party-identity-card strong,
.party-room-head h3 {
  display: block;
  margin: 3px 0 0;
  color: var(--text);
}

.party-identity-card > div {
  min-width: 0;
  flex: 1;
}

.party-identity-card input {
  width: 100%;
  min-width: 0;
  margin-top: 3px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
}

.party-identity-card button,
.party-code-card button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.party-identity-card.is-readonly {
  justify-content: flex-start;
}

.party-identity-card.is-readonly > .room-member-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-size: 15px;
}

.party-action-grid {
  display: grid;
  margin-top: 14px;
}

.party-action-grid .primary-btn {
  min-height: 52px;
}

.party-join-card div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 9px;
}

.party-join-card input {
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-weight: 800;
}

.party-room-head {
  margin-top: 10px;
}

.party-room-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.party-share-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--tomato);
  box-shadow: 0 10px 22px rgba(216, 92, 69, 0.18);
  padding: 0;
}

.party-share-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.party-code-card button {
  color: var(--text);
  background: rgba(237, 245, 238, 0.9);
  letter-spacing: 0.08em;
}

.party-room-actions {
  margin-top: 14px;
}

.leave-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.profile-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-choice-grid button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.055);
  border: 1px solid rgba(42, 40, 35, 0.08);
  font-size: 13px;
  font-weight: 850;
}

.profile-choice-grid button.is-active {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}

.is-large-reading-font .vertical-step-card h3 {
  font-size: 30px;
}

.is-large-reading-font .vertical-step-card p {
  font-size: 20px;
  line-height: 1.52;
  font-weight: 580;
}

.selected-dock {
  position: absolute;
  left: var(--space-3);
  right: auto;
  width: auto;
  bottom: calc(90px + env(safe-area-inset-bottom));
  z-index: 12;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.selected-dock.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.selected-dock button {
  width: auto;
  min-height: var(--tap-target);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--card-strong);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 160ms ease;
}

.selected-dock-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  color: var(--tomato);
}

.selected-dock span {
  color: var(--text);
  font-size: var(--font-12);
  font-weight: 800;
  white-space: nowrap;
}

.dish-sheet {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.dish-sheet[aria-hidden="true"] {
  display: none;
}

.dish-sheet.is-visible {
  pointer-events: auto;
  opacity: 1;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 34, 31, 0.18);
}

.sheet-panel {
  position: relative;
  margin: 0 14px calc(82px + env(safe-area-inset-bottom));
  padding: 10px 16px 16px;
  border-radius: 26px;
  background: rgba(255, 253, 250, 0.96);
  border: 1px solid rgba(42, 40, 35, 0.1);
  box-shadow: 0 18px 42px rgba(35, 34, 31, 0.18);
  backdrop-filter: blur(26px);
  transform: translateY(18px);
  transition: transform 180ms ease;
}

.dish-sheet.is-visible .sheet-panel {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(35, 34, 31, 0.18);
}

.sheet-dish {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet-dish .dish-photo {
  width: 62px;
  height: 62px;
  border-radius: 18px;
}

.sheet-panel > p {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.combo-item-sheet-panel {
  padding: 10px 16px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 244, 0.96)),
    rgba(255, 253, 250, 0.96);
}

.combo-item-sheet-hero {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.combo-item-sheet-hero img {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  object-fit: cover;
  background: #f3eee7;
  border: 1px solid rgba(33, 31, 28, 0.08);
  box-shadow: 0 12px 26px rgba(35, 34, 31, 0.12);
}

.combo-item-sheet-hero h3 {
  margin: 4px 0 4px;
  color: var(--text);
  font-size: 22px;
  letter-spacing: 0;
}

.combo-item-sheet-hero span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--tomato);
  background: rgba(221, 91, 70, 0.1);
  font-size: 12px;
  font-weight: 850;
}

.combo-item-sheet-desc {
  margin: 16px 2px 0;
  padding: 14px;
  border-radius: 20px;
  color: #554d43;
  background: rgba(243, 238, 231, 0.68);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.combo-item-sheet-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.combo-item-sheet-foot button {
  min-width: 88px;
}

.selected-sheet-panel {
  margin-bottom: calc(96px + env(safe-area-inset-bottom));
  max-height: min(82dvh, calc(100% - 116px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.selected-sheet-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  letter-spacing: 0;
}

.selected-sheet-head-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.selected-sheet-head-actions > span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--tomato);
  background: var(--tomato-soft);
  font-size: 12px;
  font-weight: 900;
}

.selected-sheet-close {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 900;
}

.selected-sheet-scroll {
  min-height: 0;
  margin-top: 14px;
  padding: 0 2px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.selected-sheet-scroll::-webkit-scrollbar {
  display: none;
}

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

.selected-sheet-list article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.selected-sheet-list article.is-combination {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 32px;
  align-items: center;
}

.selected-sheet-list article.is-combination .combination-selected-detail {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.meal-archive-deck {
  position: relative;
  height: clamp(340px, 52dvh, 430px);
  min-height: 0;
  margin: 2px 4px 0;
  touch-action: pan-y;
  user-select: none;
}

.meal-archive-deck-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(42, 40, 35, 0.12);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 253, 250, 0.9);
  box-shadow: 0 6px 16px rgba(48, 43, 34, 0.1);
  transform: translateY(-50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.meal-archive-deck-nav.is-previous { left: -18px; }
.meal-archive-deck-nav.is-next { right: -18px; }

.meal-archive-deck-nav .lucide-icon {
  width: 18px;
  height: 18px;
}

.meal-archive-deck-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.meal-archive-record {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card-strong);
  box-shadow: 0 14px 28px rgba(48, 43, 34, 0.08);
}

.meal-archive-record.is-turning-forward {
  animation: meal-archive-turn-forward 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.meal-archive-record.is-turning-backward {
  animation: meal-archive-turn-backward 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes meal-archive-turn-forward {
  from { opacity: 0; transform: perspective(900px) rotateY(-11deg) translateX(22px); }
  to { opacity: 1; transform: perspective(900px) rotateY(0) translateX(0); }
}

@keyframes meal-archive-turn-backward {
  from { opacity: 0; transform: perspective(900px) rotateY(11deg) translateX(-22px); }
  to { opacity: 1; transform: perspective(900px) rotateY(0) translateX(0); }
}

.meal-archive-record-top,
.meal-archive-record-title {
  display: flex;
  align-items: flex-start;
}

.meal-archive-record-top {
  justify-content: space-between;
  gap: 12px;
}

.meal-archive-record-title > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.meal-archive-record-body {
  min-height: 0;
  flex: 1 1 auto;
  margin-top: 14px;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 40, 35, 0.18) transparent;
}

.meal-archive-record-body::after {
  content: "";
  position: sticky;
  bottom: 0;
  width: 100%;
  height: 18px;
  display: block;
  margin-top: -18px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 253, 250, 0), var(--card-strong));
}

.meal-archive-record-body:focus-visible {
  outline: 2px solid rgba(109, 140, 116, 0.48);
  outline-offset: 2px;
}

.meal-archive-record-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-archive-period {
  width: fit-content;
  padding: 3px 6px;
  border-radius: var(--radius-pill);
  color: var(--sage);
  background: var(--sage-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.1;
}

.meal-archive-record-title span {
  color: var(--muted);
  font-size: 12px;
}

.meal-archive-place {
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.meal-archive-edit-btn {
  min-width: 44px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: var(--radius-control);
  color: var(--sage);
  background: var(--sage-soft);
  font-size: 12px;
  font-weight: 850;
}

.meal-archive-edit-btn .lucide-icon {
  width: 15px;
  height: 15px;
}

.meal-archive-dish-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meal-archive-dish-list li {
  min-height: 48px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
}

.meal-archive-dish-list li:first-child {
  border-top: 0;
}

.meal-archive-dish-list img {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

.meal-archive-dish-list strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-archive-manual-context {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.meal-archive-record-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.meal-archive-record-actions.is-single {
  justify-content: flex-end;
}

.meal-archive-repeat-btn {
  min-height: var(--tap-target);
  padding: 0 11px;
  border-radius: var(--radius-control);
  font-size: 12px;
}

.meal-archive-inline-close {
  min-width: 64px;
  min-height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}

.meal-archive-inline-close .lucide-icon {
  width: 15px;
  height: 15px;
}

.meal-archive-record.is-editing .meal-archive-comments {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.meal-archive-pager {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 3px;
}

.meal-archive-pager button {
  width: 18px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
}

.meal-archive-pager button span {
  width: 4px;
  height: 4px;
  display: block;
  border-radius: 50%;
  background: rgba(42, 40, 35, 0.2);
}

.meal-archive-pager button.is-active span {
  width: 12px;
  border-radius: 999px;
  background: var(--tomato);
}

.meal-archive-scroll {
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .meal-archive-deck-nav:not(:disabled):hover {
    transform: translateY(-50%) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .meal-archive-record.is-turning-forward,
  .meal-archive-record.is-turning-backward {
    animation: none;
  }
}

.combo-edit-btn {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.9);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.mini-combo-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.mini-combo-row span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.055);
  font-size: 12px;
  font-weight: 850;
}

.sheet-full-btn {
  width: 100%;
  margin-top: 14px;
}

.selected-sheet-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 10px;
  margin-top: 14px;
}

.selected-sheet-actions .sheet-full-btn {
  margin-top: 0;
}

.selected-sheet-foot {
  flex: 0 0 auto;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.96) 22%);
}

.shopping-sheet-panel {
  max-height: calc(100% - 58px);
  margin: 0 14px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 28px;
  scrollbar-width: none;
}

.shopping-sheet-panel::-webkit-scrollbar {
  display: none;
}

.shopping-sheet-panel .sheet-handle {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 14px;
}

.export-card {
  padding: 6px 2px 0;
}

.export-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

.export-list {
  margin-top: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid rgba(42, 40, 35, 0.08);
}

.export-list.is-muted {
  background: rgba(237, 245, 238, 0.72);
}

.export-list strong {
  display: block;
  margin-bottom: 8px;
  color: var(--tomato);
  font-size: 13px;
}

.export-list.is-muted strong {
  color: var(--sage);
}

.export-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(42, 40, 35, 0.06);
  font-size: 14px;
}

.export-list div:first-of-type {
  border-top: 0;
}

.export-list em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.export-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.tab-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(78px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(42, 40, 35, 0.08);
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(24px);
}

.tab-bar button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.tab-bar button.is-active {
  color: var(--tomato);
}

.back-to-top,
.scroll-to-bottom {
  position: absolute;
  right: 18px;
  z-index: 18;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(42, 40, 35, 0.1);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(48, 43, 34, 0.16);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.92);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
}

.exit-preview {
  position: absolute;
  left: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 18;
  min-width: 86px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(42, 40, 35, 0.1);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(48, 43, 34, 0.16);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.96);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
}

.exit-preview.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top {
  bottom: calc(142px + env(safe-area-inset-bottom));
}

.scroll-to-bottom {
  bottom: calc(92px + env(safe-area-inset-bottom));
}

.back-to-top.is-visible,
.scroll-to-bottom.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top span,
.scroll-to-bottom span {
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
}

.back-to-top span {
  transform: translateY(3px) rotate(45deg);
}

.scroll-to-bottom span {
  transform: translateY(-3px) rotate(225deg);
}

#menuPage .dimension-tabs {
  position: sticky;
  top: calc(-1 * var(--space-3));
  z-index: 12;
  margin-inline: calc(-1 * var(--space-3));
  padding-inline: var(--space-3);
  margin-top: 0;
  background: var(--phone-bg);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.tab-home,
.tab-menu,
.tab-add,
.tab-my {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
}

.tab-home {
  border-radius: 6px;
  clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%);
}

.tab-menu {
  border: 0;
  position: relative;
}

.tab-menu::before,
.tab-menu::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 9px;
  border: 1.8px solid currentColor;
  background: transparent;
}

.tab-menu::before {
  left: 1px;
  border-radius: 5px 2px 2px 5px;
  transform: skewY(5deg);
}

.tab-menu::after {
  right: 1px;
  border-radius: 2px 5px 5px 2px;
  transform: skewY(-5deg);
}

.tab-add {
  border-radius: 50%;
  position: relative;
}

.tab-add::before,
.tab-add::after {
  content: "";
  position: absolute;
  inset: 9px 5px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.tab-add::after {
  transform: rotate(90deg);
}

.tab-create-button {
  transform: translateY(-15px);
}

.tab-create-button .tab-add {
  width: 54px;
  height: 54px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, #df705d 0%, var(--tomato) 100%);
  box-shadow: 0 12px 24px rgba(216, 92, 69, 0.28);
}

.tab-create-button .tab-add::before,
.tab-create-button .tab-add::after {
  inset: 26px 17px;
  background: currentColor;
}

.tab-create-button.is-active {
  color: var(--tomato);
}

.tab-my {
  border: 0;
  position: relative;
}

.tab-my::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 7px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.tab-my::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 2px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 11px 11px 5px 5px;
  border-bottom: 0;
}

.design-notes {
  display: none;
}

.design-notes p {
  margin: 0 0 12px;
  color: var(--sage);
  font-size: 13px;
  font-weight: 750;
}

.design-notes h2 {
  margin: 0 0 18px;
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
}

.design-notes ul {
  margin: 0;
  padding-left: 18px;
  color: #5f5a52;
  line-height: 1.8;
}

@media (min-width: 700px) {
  .prototype-shell {
    align-items: center;
    padding: 24px;
    background:
      radial-gradient(circle at 30% 14%, rgba(216, 92, 69, 0.08), transparent 28%),
      linear-gradient(135deg, #f7f3ec 0%, #ece7dd 100%);
  }

  .phone-frame {
    width: 430px;
    height: min(900px, calc(100vh - 48px));
    min-height: 0;
    border: 1px solid rgba(42, 40, 35, 0.08);
    border-radius: 32px;
    box-shadow:
      0 28px 80px rgba(38, 32, 22, 0.14),
      inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  }

  .app-scroll {
    height: calc(100% - 58px - 78px - env(safe-area-inset-bottom));
  }
}

@media (display-mode: standalone) {
  body {
    background: var(--phone-bg);
  }
}

/* Current iteration overrides */
.combo-card.is-hidden {
  display: none;
}

.selected-list.is-empty-tonight {
  gap: 0;
}

.tonight-empty-state {
  min-height: min(34dvh, 280px);
  display: grid;
  align-content: center;
  place-items: center;
  gap: 14px;
  padding: 28px 18px;
  text-align: center;
  box-shadow: 0 10px 26px rgba(48, 43, 34, 0.045);
}

.tonight-empty-state p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 760;
}

.tonight-empty-state .primary-btn {
  width: auto;
  min-width: 118px;
  padding: 12px 18px;
  box-shadow: 0 12px 24px rgba(216, 92, 69, 0.18);
}

.recipe-hero {
  position: relative;
}

.recipe-hero-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.recipe-source-btn,
.recipe-save-btn {
  max-width: 92px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(42, 40, 35, 0.08);
  border-radius: 999px;
  color: #b95a49;
  background: rgba(255, 248, 243, 0.78);
  box-shadow: 0 6px 18px rgba(48, 43, 34, 0.06);
  font-size: 12px;
  font-weight: 850;
}

.recipe-source-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
}

.recipe-source-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.recipe-save-btn {
  color: var(--sage);
  background: rgba(237, 245, 238, 0.88);
}

.recipe-hero .recipe-hero-text {
  padding-right: 90px;
}

.prep-actions.is-single {
  grid-template-columns: 1fr;
}

.recipe-ingredients-panel [data-edit-current].is-hidden,
#editRecipe.is-hidden {
  display: none;
}

.source-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 14px;
}

.source-sheet-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  letter-spacing: 0;
}

.source-sheet-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.source-add-toggle {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(104, 139, 111, 0.18);
  border-radius: 999px;
  color: var(--sage);
  background: rgba(236, 246, 238, 0.82);
  font-size: 13px;
  font-weight: 850;
}

.source-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 12px 13px 14px;
  border-bottom: 1px solid rgba(42, 40, 35, 0.07);
}

.source-row:last-child {
  border-bottom: 0;
}

.source-row.is-editing {
  background: rgba(237, 245, 238, 0.52);
}

.source-row-main {
  min-width: 0;
}

.source-row-main strong,
.source-row-main span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-row-main strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.source-row-main span:not(.source-platform-pill) {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.source-platform-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--sage);
  background: rgba(236, 246, 238, 0.9);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.source-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-icon-btn,
.source-edit-btn {
  min-height: 34px;
  border: 1px solid rgba(42, 40, 35, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.source-icon-btn {
  width: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--tomato);
  font-size: 0;
}

.source-icon-btn .lucide-icon {
  display: block;
  width: 17px;
  height: 17px;
}

.source-edit-btn {
  padding: 0 11px;
  color: var(--muted);
}

.source-empty {
  padding: 16px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.045);
  font-size: 13px;
  font-weight: 750;
}

.source-editor {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.source-editor.is-expanded {
  padding: 14px;
  border: 1px solid rgba(42, 40, 35, 0.08);
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.9);
}

.source-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-editor-head strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.source-editor input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 750;
}

.source-danger-btn {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(216, 92, 69, 0.18);
  border-radius: 16px;
  color: #c85445;
  background: rgba(255, 241, 238, 0.88);
  font-size: 14px;
  font-weight: 850;
}

.source-undo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.05);
  font-size: 13px;
  font-weight: 800;
}

.source-undo-bar button {
  border: 0;
  color: #c85445;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.source-editor .primary-btn,
.source-editor .secondary-btn {
  width: 100%;
}

#tonightPage .tonight-summary {
  display: grid;
}


.combination-editing-label {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  color: var(--sage);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.combination-editing-label.is-confirmed {
  color: var(--muted);
}

.order-toast {
  position: absolute;
  left: 50%;
  top: calc(72px + env(safe-area-inset-top));
  z-index: 42;
  max-width: calc(100% - 44px);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px 8px 9px;
  border: 1px solid rgba(42, 40, 35, 0.08);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(52, 45, 34, 0.13);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.order-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.personal-undo-toast {
  z-index: 43;
}

.phone-frame.has-personal-undo .order-toast:not(.personal-undo-toast) {
  top: calc(128px + env(safe-area-inset-top));
}

.order-toast-avatar,
.room-member-avatar,
.room-family-avatar,
.profile-avatar,
.settings-avatar {
  background: var(--avatar-color, var(--sage));
}

.order-toast-avatar,
.room-member-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.order-toast strong,
.order-toast em,
.order-toast-dish,
.order-toast-message {
  min-width: 0;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1;
}

.order-toast strong {
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 900;
}

.order-toast em {
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}

.order-toast-dish {
  max-width: 122px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #c95645;
  font-weight: 900;
}

.order-toast-message {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 800;
}

.order-toast-undo {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  margin: -9px -8px -9px -4px;
  border: 0;
  color: var(--tomato);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.room-family-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

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

.room-identity-row.is-readonly {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 10px 0;
}

.room-identity-row.is-readonly > div {
  min-width: 0;
}

.room-identity-row.is-readonly > div > span,
.room-identity-row.is-readonly > div > strong {
  display: block;
}

.room-identity-row.is-readonly > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.room-identity-row.is-readonly > div > strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-identity-row label,
.profile-inline-field {
  display: grid;
  gap: 6px;
}

.room-identity-row label span,
.profile-inline-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.room-identity-row input,
.profile-inline-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-weight: 800;
}

.room-random-btn,
.room-qr-btn {
  min-height: 42px;
  border: 1px solid rgba(109, 140, 116, 0.16);
  border-radius: 15px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.82);
  font-size: 13px;
  font-weight: 900;
}

.room-qr-btn:disabled {
  opacity: 0.58;
}

.room-member-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
}

.room-member-avatars {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.room-member-avatar + .room-member-avatar {
  margin-left: -7px;
}

.room-member-strip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-context-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(35, 34, 31, 0.055);
}

.room-context-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.room-context-switch button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 14px rgba(42, 40, 35, 0.08);
}

.room-share-box {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(109, 140, 116, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.room-share-box img {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  background: #fff;
}

.room-share-box strong,
.room-share-box span {
  display: block;
  min-width: 0;
}

.room-share-box strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.room-share-box span {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.room-share-box .text-btn {
  margin-top: 8px;
  padding: 0;
}

.room-card.is-active .room-actions,
.party-room-actions {
  grid-template-columns: 1fr;
}

.room-leave-copy {
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

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

.room-leave-actions .primary-btn,
.room-leave-actions .secondary-btn {
  min-height: 50px;
}

.save-personal-btn {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid rgba(109, 140, 116, 0.16);
  border-radius: 999px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.family-space-list,
.family-member-list,
.room-history-list,
.favorite-menu-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.family-space-list article,
.family-member-list article,
.room-history-card,
.favorite-menu-list article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.bistro-settings-section .family-member-list {
  gap: 0;
  margin-top: 0;
}

.bistro-settings-section .family-member-list article {
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.bistro-settings-section .family-member-list article:last-child {
  border-bottom: 0;
}

.family-space-list article.is-active {
  border-color: rgba(109, 140, 116, 0.24);
  background: rgba(237, 245, 238, 0.72);
}

.favorite-menu-list article.is-active {
  border-color: rgba(109, 140, 116, 0.24);
  background: rgba(237, 245, 238, 0.72);
}

.family-space-list article > div,
.family-member-list article > div,
.room-history-card > div,
.favorite-menu-list article > div {
  min-width: 0;
  flex: 1;
}

.family-space-list strong,
.family-member-list strong,
.room-history-list strong,
.favorite-menu-list strong,
.family-space-list span,
.family-member-list em,
.room-history-list span,
.favorite-menu-list span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-space-list strong,
.family-member-list strong,
.room-history-list strong,
.favorite-menu-list strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.family-space-list span,
.family-member-list em,
.room-history-list span,
.favorite-menu-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.family-space-list button,
.room-history-card button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid rgba(109, 140, 116, 0.16);
  border-radius: 999px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.room-history-swipe {
  display: grid;
  grid-template-columns: minmax(100%, 1fr) 64px;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.room-history-swipe::-webkit-scrollbar {
  display: none;
}

.room-history-card,
.room-history-delete {
  scroll-snap-align: end;
}

.room-history-delete {
  min-height: 100%;
  border-radius: 18px;
  color: #fff;
  background: var(--tomato);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(216, 92, 69, 0.16);
}

.favorite-menu-list em {
  flex: 0 0 auto;
  color: var(--sage);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.favorite-menu-actions {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 4px;
}

.favorite-menu-actions .secondary-btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.favorite-menu-actions .text-btn {
  min-height: 24px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.favorite-menu-room-note,
.favorite-menu-save-copy {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.favorite-menu-name-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.favorite-menu-name-field input {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.favorite-menu-save-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

.family-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.bistro-member-create-row {
  grid-template-columns: minmax(0, 1fr) minmax(108px, auto) auto;
}

.bistro-member-role,
.bistro-member-create-row select {
  min-width: 0;
  min-height: 42px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--card-strong);
  font: inherit;
  font-size: var(--font-12);
  font-weight: 800;
}

.bistro-member-role {
  min-height: 34px;
  max-width: 116px;
}

.bistro-member-actions {
  flex: 0 0 auto !important;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.bistro-member-icon-action {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--card-strong);
}

.bistro-member-icon-action .lucide-icon {
  width: 18px;
  height: 18px;
}

.bistro-member-icon-action.is-danger {
  color: var(--tomato);
  border-color: rgba(216, 92, 69, 0.2);
  background: rgba(255, 239, 234, 0.72);
}

.bistro-leave-button {
  min-height: 44px;
  margin-top: 12px;
  padding: 0;
  color: var(--tomato);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.bistro-invite-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bistro-invite-code button {
  min-height: 36px;
  padding: 0 8px;
  color: var(--tomato);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.bistro-member-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 700;
  line-height: 1.55;
}

@media (max-width: 390px) {
  .bistro-member-create-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bistro-member-create-row select {
    grid-column: 1 / -1;
  }

  .bistro-settings-section .family-member-list article {
    flex-wrap: wrap;
  }

  .bistro-member-actions {
    width: 100%;
    margin-left: 52px;
  }

  .bistro-member-actions .bistro-member-role {
    max-width: none;
    flex: 1;
  }
}

.family-create-row input,
.nickname-word-editor input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-weight: 800;
}

.family-create-row button,
.nickname-word-editor button {
  min-height: 42px;
  border: 1px solid rgba(109, 140, 116, 0.16);
  border-radius: 8px;
  color: var(--sage);
  background: rgba(237, 245, 238, 0.82);
  font-size: 13px;
  font-weight: 900;
}

.family-permission-card,
.nickname-word-editor {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.bistro-settings-section {
  margin-top: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.bistro-settings-section .section-heading {
  min-height: 28px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.bistro-settings-section .family-create-row {
  margin-top: 12px;
}

.bistro-invite-card .profile-sheet-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
}

.family-invite-join,
.family-login-required {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.family-login-required .secondary-btn {
  min-height: 44px;
}

.family-tool-grid {
  margin-top: 14px;
}

.nickname-word-editor {
  display: grid;
  gap: 10px;
}

.nickname-word-editor > strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.nickname-word-editor > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 138px;
  overflow: hidden;
}

.nickname-word-editor > div span {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(35, 34, 31, 0.055);
  font-size: 12px;
  font-weight: 800;
}

.nickname-word-editor label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

/* Core meal-flow design system: compact surfaces and a single action hierarchy. */
body {
  background: var(--bg);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(216, 92, 69, 0.38);
  outline-offset: 2px;
}

.lucide-icon,
.tab-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.mini-header {
  grid-template-columns: var(--tap-target) minmax(0, 1fr) var(--tap-target);
  padding-inline: var(--space-3);
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: none;
}

.mini-header h1 {
  margin-bottom: 0;
  color: var(--text-strong);
  font-size: var(--font-20);
  font-weight: 800;
}

.ghost-icon,
.header-action,
.menu-filter-button {
  width: var(--tap-target);
  height: var(--tap-target);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--card-strong);
}

.ghost-icon,
.header-action {
  color: var(--text);
}

.menu-filter-button {
  color: var(--muted);
}

.menu-filter-button .lucide-icon {
  width: 19px;
  height: 19px;
}

.app-scroll {
  padding: var(--space-3) var(--space-3) calc(116px + env(safe-area-inset-bottom));
}

.primary-btn,
.secondary-btn,
.quiet-btn {
  min-height: var(--tap-target);
  border-radius: var(--radius-control);
  font-size: var(--font-14);
  font-weight: 800;
}

.primary-btn {
  background: var(--tomato);
  box-shadow: var(--shadow-action);
}

.secondary-btn {
  border-color: var(--border-strong);
  background: var(--card-strong);
}

.quiet-btn {
  border-radius: var(--radius-control);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.quiet-btn:disabled {
  color: var(--text-disabled);
  background: #ece9e2;
  border-color: #ded9d0;
  opacity: 1;
}

.tab-bar {
  padding-inline: var(--space-2);
  background: rgba(253, 251, 247, 0.98);
  backdrop-filter: none;
}

.tab-bar button {
  min-height: var(--tap-target);
  font-size: var(--font-12);
}

.tab-icon {
  width: 21px;
  height: 21px;
}

.tab-create-button .tab-icon-add {
  width: 32px;
  height: 32px;
  margin-bottom: 0;
  padding: 7px;
  border-radius: 50%;
  color: #fff;
  background: var(--tomato);
  box-shadow: var(--shadow-action);
}

.selected-dock button em {
  color: var(--tomato);
  font-size: var(--font-12);
  font-style: normal;
  font-weight: 800;
}

#selectedSheet .selected-sheet-panel:has(.meal-panel-head) {
  width: min(100%, 720px);
  max-height: min(88dvh, 820px);
  padding: var(--space-3) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.meal-panel-head {
  align-items: flex-start;
  gap: var(--space-3);
}

.meal-panel-head h3 {
  margin: 0;
  font-size: var(--font-20);
}

.meal-panel-head-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.meal-panel-head-actions > button {
  width: var(--tap-target);
  height: var(--tap-target);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--card-strong);
}

.meal-panel-head-actions .lucide-icon {
  width: 20px;
  height: 20px;
}

.meal-panel-head-actions .menu-context-badge.is-confirmed {
  color: var(--sage-dark);
  background: var(--sage-soft);
}

.meal-panel-head-actions .menu-context-badge.is-modified {
  color: var(--tomato);
  background: var(--tomato-soft);
}

.meal-panel-summary {
  margin: var(--space-2) 0 var(--space-1);
  font-size: var(--font-16);
  font-weight: 800;
}

.meal-panel-scroll {
  min-height: 0;
  padding: 0;
}

.meal-panel-list {
  border-top: 1px solid var(--border);
}

.meal-panel-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

.meal-panel-row.is-combination {
  grid-template-columns: 54px minmax(0, 1fr) auto 44px;
}

.meal-panel-row .dish-photo {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-control);
  object-fit: cover;
}

.meal-panel-row .dish-title {
  min-width: 0;
}

.meal-panel-row .dish-title strong,
.meal-panel-row .dish-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-panel-row .dish-title strong {
  font-size: var(--font-16);
}

.meal-panel-row .dish-title span {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--font-12);
}

.meal-panel-row .combo-edit-btn {
  min-width: 56px;
  min-height: var(--tap-target);
}

.meal-panel-row .remove-btn {
  width: var(--tap-target);
  height: var(--tap-target);
}

.meal-panel-foot {
  position: static;
  padding-top: var(--space-3);
  background: var(--surface);
}

.meal-panel-clear {
  min-height: var(--tap-target);
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: var(--font-12);
  font-weight: 800;
}

.meal-panel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.meal-panel-actions.is-single {
  grid-template-columns: 1fr;
}

.meal-panel-actions > button {
  min-width: 0;
}

.meal-panel-finish-btn {
  min-height: var(--tap-target);
  border: 1px solid rgba(216, 92, 69, 0.3);
  border-radius: var(--radius-control);
  color: var(--tomato);
  background: var(--tomato-soft);
  font-size: var(--font-14);
  font-weight: 800;
}

@media (max-width: 430px) {
  .meal-panel-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: var(--space-2);
  }

  .meal-panel-row.is-combination {
    grid-template-columns: 48px minmax(0, 1fr) auto 44px;
  }

  .meal-panel-row .dish-photo {
    width: 48px;
    height: 48px;
  }

  .meal-panel-row .personal-quantity-stepper {
    gap: 4px;
  }
}

.search-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  color: var(--subtle);
  position: static;
}

.search-icon::after {
  content: none;
}

.add-btn.has-lucide-icon::before,
.add-btn.has-lucide-icon::after,
.mini-add-btn.has-lucide-icon::before,
.mini-add-btn.has-lucide-icon::after {
  display: none;
}

.add-btn .lucide-icon,
.mini-add-btn .lucide-icon {
  width: 18px;
  height: 18px;
}

.stepper-icon {
  width: 16px;
  height: 16px;
}

#homePage .home-meal-card,
#homePage .home-meal-history,
#tonightPage .personal-menu-focus,
#tonightPage .room-menu-focus,
#tonightPage .selected-group-card,
#combinationPage .combination-hero,
#combinationPage .combination-panel,
#combinationPage .combination-actions {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: none;
}

#homePage .home-meal-card,
#homePage .home-meal-history,
#tonightPage .personal-menu-focus,
#tonightPage .room-menu-focus,
#combinationPage .combination-panel,
#combinationPage .combination-actions {
  padding: var(--space-4);
}

#homePage .home-meal-card {
  gap: var(--space-2);
  background: var(--card-strong);
}

.home-meal-card-link {
  width: 100%;
  min-height: var(--tap-target);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.home-meal-card-link.has-meal-preview {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: var(--space-3);
}

.home-meal-thumbnail {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

.home-meal-card-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-meal-card-copy .eyebrow {
  margin: 0;
}

.home-meal-card-copy strong {
  color: var(--text-strong);
  font-size: var(--font-16);
  font-weight: 800;
}

.home-meal-card-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-meal-card-copy small .meal-counts {
  font-size: var(--font-12);
}

.home-meal-card-end {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.home-meal-chevron {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.home-meal-decider {
  min-height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: fit-content;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  color: var(--tomato);
  background: transparent;
  font-size: var(--font-14);
  font-weight: 800;
}

.home-meal-decider .lucide-icon {
  width: 18px;
  height: 18px;
}

#homePage .home-meal-history[hidden],
#homePage .home-quick-decider[hidden] {
  display: none !important;
}

.home-meal-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
}

.home-meal-card-actions .secondary-btn {
  min-width: 88px;
}

#homePage .home-meal-card h2,
#tonightPage .tonight-summary h2,
#combinationPage .recipe-hero-text h2 {
  color: var(--text-strong);
  font-size: var(--font-20);
  font-weight: 800;
}

#homePage .home-meal-card p:not(.eyebrow) {
  margin-top: var(--space-2);
  font-size: var(--font-14);
}

#tonightPage .tonight-summary {
  border-radius: var(--radius-card);
  padding: var(--space-4);
  background: var(--card-strong);
  box-shadow: var(--shadow-card);
}

#tonightPage .tonight-actions.is-single-primary {
  margin-top: var(--space-3);
  padding: 0 0 calc(92px + env(safe-area-inset-bottom));
  background: transparent;
}

#menuPage .menu-order-layout {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-2);
}

#menuPage .menu-order-layout.is-special-view {
  grid-template-columns: minmax(0, 1fr);
}

#menuPage .menu-order-layout.is-special-view .special-entry-list {
  gap: var(--space-3);
}

#menuPage .menu-order-layout.is-special-view .special-entry-card {
  grid-template-columns: 72px minmax(0, 1fr) 68px;
  min-height: 96px;
  padding: var(--space-3);
  border-radius: var(--radius-card);
  background: var(--card-strong);
}

#menuPage .menu-order-layout.is-special-view .special-entry-visual,
#menuPage .menu-order-layout.is-special-view .special-entry-mark,
#menuPage .menu-order-layout.is-special-view .special-entry-image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-row);
}

#menuPage .menu-order-layout.is-special-view .special-entry-go {
  justify-content: flex-end;
}

#menuPage .category-rail,
#combinationPage .combination-category-rail {
  gap: var(--space-2);
}

#menuPage .category-rail button,
#combinationPage .combination-category-rail button {
  min-height: var(--tap-target);
  border-radius: var(--radius-row);
  font-size: var(--font-12);
}

#menuPage .dish-list,
#combinationPage .combination-product-list {
  gap: var(--space-2);
}

#menuPage .dish-card {
  grid-template-columns: 52px minmax(0, 1fr) max-content;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-row);
  background: var(--card-strong);
}

#menuPage .dish-card .dish-photo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-row);
}

#menuPage .menu-quantity-stepper {
  grid-template-columns: 28px 18px 28px;
  gap: 2px;
}

#menuPage .menu-quantity-stepper button {
  width: 28px;
  height: 28px;
}

#menuPage .menu-quantity-stepper span {
  font-size: var(--font-12);
}

#tonightPage .selected-group-card {
  border-color: var(--border-subtle);
  background: var(--card-strong);
}

#tonightPage .selected-group-card .selected-row {
  margin-inline: var(--space-3);
}

#combinationPage .combination-hero {
  padding: var(--space-3);
  background: var(--card-strong);
}

#combinationPage .recipe-cover,
#combinationPage .combination-product-image,
#combinationPage .combination-product-card {
  border-radius: var(--radius-row);
}

#combinationPage .combination-product-card {
  min-height: 68px;
  padding: var(--space-3);
  background: var(--card-strong);
}

#combinationPage .combination-actions {
  margin-bottom: max(144px, calc(116px + env(safe-area-inset-bottom)));
  background: var(--card-strong);
}

#homePage .home-quick-decider,
#randomPage .random-card,
#randomPage .recommend-card,
#randomPage .empty-recommend {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--card-strong);
  box-shadow: var(--shadow-card);
  backdrop-filter: none;
}

#homePage .home-quick-decider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.home-quick-decider-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-3);
}

.home-quick-decider-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.1);
}

.home-quick-decider-icon .lucide-icon {
  width: 20px;
  height: 20px;
}

.home-quick-decider h3,
.home-quick-decider p {
  margin: 0;
}

.home-quick-decider h3 {
  color: var(--text-strong);
  font-size: var(--font-16);
  font-weight: 800;
}

.home-quick-decider p:not(.eyebrow) {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--font-12);
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-quick-decider .secondary-btn {
  width: auto;
  min-width: 88px;
  padding-inline: var(--space-3);
  font-size: var(--font-12);
}

#randomPage .random-card,
#randomPage .recommend-card {
  padding: var(--space-4);
}

#randomPage .random-card h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--font-20);
  font-weight: 800;
}

#randomPage .mood-grid {
  gap: var(--space-2);
  margin-top: var(--space-4);
}

#randomPage .mood-grid button {
  display: inline-flex;
  min-height: var(--tap-target);
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  color: var(--text);
  background: var(--card-strong);
  font-size: var(--font-14);
  font-weight: 800;
}

#randomPage .mood-grid button.is-active {
  border-color: var(--tomato);
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.08);
}

#randomPage .mood-icon {
  width: 18px;
  height: 18px;
}

#randomPage .recommend-panel {
  margin-top: var(--space-3);
}

#randomPage .empty-recommend {
  min-height: 180px;
  gap: var(--space-3);
  color: var(--muted);
}

#randomPage .empty-recommend-icon {
  width: 28px;
  height: 28px;
  color: var(--tomato);
}

#randomPage .recommend-card {
  display: grid;
  gap: var(--space-3);
}

.recommend-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.recommend-card-head .text-btn {
  min-height: var(--tap-target);
  padding-inline: var(--space-2);
  color: var(--tomato);
  font-size: var(--font-14);
  font-weight: 800;
}

.recommend-dish {
  display: grid;
  width: 100%;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.recommend-dish .dish-photo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-row);
}

.recommend-dish .dish-title {
  min-width: 0;
}

.recommend-dish .dish-title strong {
  color: var(--text-strong);
  font-size: var(--font-16);
}

.recommend-dish .dish-title > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--font-12);
}

.recommend-add {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.recommend-add .lucide-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 380px) {
  #homePage .home-quick-decider {
    align-items: flex-start;
  }

  .home-quick-decider .secondary-btn {
    min-width: 76px;
    padding-inline: var(--space-2);
  }
}

/* New-recipe flow: write the dish first; images, tags and classification stay optional. */
#addPage .recipe-compose {
  gap: var(--space-4);
  padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom));
}

#addPage .compose-title-block {
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-4);
}

#addPage .recipe-title-input {
  min-height: 48px;
  font-size: var(--font-28);
}

#addPage .cover-uploader {
  min-height: 118px;
  gap: var(--space-2);
  border-radius: var(--radius-card);
  background: var(--card-strong);
  box-shadow: var(--shadow-card);
}

#addPage .compose-cover-action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

#addPage .compose-cover-action .lucide-icon {
  width: 20px;
  height: 20px;
  color: var(--tomato);
}

#addPage .cover-uploader .compose-cover-action > span,
#addPage .cover-uploader strong {
  color: var(--text-strong);
  font-size: var(--font-16);
}

#addPage .cover-uploader em {
  color: var(--muted);
  font-size: var(--font-12);
}

#addPage .cover-uploader.has-image img {
  height: 176px;
}

#addPage .compose-utility-menu,
#addPage .compose-media-tools,
#addPage .compose-step-options {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  background: var(--card-strong);
}

#addPage .compose-utility-menu summary,
#addPage .compose-media-tools summary,
#addPage .compose-step-options summary {
  min-height: var(--tap-target);
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  color: var(--muted);
  cursor: pointer;
  font-size: var(--font-14);
  font-weight: 800;
  list-style: none;
}

#addPage .compose-utility-menu summary::-webkit-details-marker,
#addPage .compose-media-tools summary::-webkit-details-marker,
#addPage .compose-step-options summary::-webkit-details-marker {
  display: none;
}

#addPage .compose-utility-menu summary::after,
#addPage .compose-media-tools summary::after,
#addPage .compose-step-options summary::after {
  content: "+";
  margin-left: auto;
  color: var(--subtle);
  font-size: 18px;
  line-height: 1;
}

#addPage .compose-utility-menu[open] summary::after,
#addPage .compose-media-tools[open] summary::after,
#addPage .compose-step-options[open] summary::after {
  content: "−";
}

#addPage .compose-utility-menu-body,
#addPage .compose-media-tools-body,
#addPage .compose-step-options-body {
  display: grid;
  gap: var(--space-3);
  padding: 0 var(--space-3) var(--space-3);
}

#addPage .compose-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

#addPage .compose-actions .secondary-btn {
  min-height: var(--tap-target);
  padding-inline: var(--space-2);
  box-shadow: none;
}

#addPage .compose-note-field {
  display: grid;
  gap: var(--space-2);
}

#addPage .compose-note-field > span,
#addPage .compose-media-tools-body p {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 750;
  line-height: 1.45;
}

#addPage .recipe-story-input {
  min-height: 64px;
  padding: var(--space-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  background: #fff;
  font-size: var(--font-14);
}

#addPage .compose-section {
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--card-strong);
  box-shadow: var(--shadow-card);
  backdrop-filter: none;
}

#addPage .compose-section .section-heading h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--font-16);
  font-weight: 800;
}

#addPage .compose-list {
  gap: 0;
}

#addPage .compose-ingredient-card {
  grid-template-columns: 62px minmax(90px, 1fr) 42px 40px 32px;
  gap: var(--space-1);
  padding: var(--space-2) 0;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  background: transparent;
}

#addPage .compose-ingredient-card input,
#addPage .compose-ingredient-card select {
  min-height: 36px;
  border-radius: var(--radius-row);
  font-size: var(--font-12);
}

#addPage .compose-ingredient-card .ingredient-name-input {
  font-size: var(--font-14);
}

#addPage .compose-remove-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-row);
}

#addPage .mini-inline-btn {
  min-height: var(--tap-target);
  padding-inline: var(--space-3);
  border-radius: var(--radius-row);
  font-size: var(--font-14);
}

#addPage .compose-step-card {
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  background: transparent;
}

#addPage .compose-step-card textarea {
  min-height: 90px;
  padding: var(--space-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  background: #fff;
  font-size: var(--font-14);
}

#addPage .compose-step-head strong {
  color: var(--text-strong);
  font-size: var(--font-14);
}

#addPage .compose-step-head button {
  min-height: 32px;
  border-radius: var(--radius-row);
}

#addPage .compose-step-options-body {
  padding-top: 0;
}

#addPage .compose-step-options .step-image-placeholder {
  min-height: 112px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-row);
  background: rgba(35, 34, 31, 0.025);
}

#addPage .compose-step-options .step-image-placeholder img {
  max-height: 220px;
}

#addPage .compose-step-title-input {
  min-height: var(--tap-target);
  border-radius: var(--radius-row);
  font-size: var(--font-14);
}

#addPage .step-tag-picker {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

#addPage .compose-tag-toggle {
  min-height: var(--tap-target);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
}

#addPage .compose-media-tools-body .secondary-btn {
  justify-self: start;
  min-height: var(--tap-target);
  padding-inline: var(--space-3);
}

#addPage .advanced-settings {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: none;
}

#addPage .advanced-settings summary {
  min-height: 56px;
  font-size: var(--font-14);
}

#addPage .compose-submit {
  min-height: 52px;
  border-radius: var(--radius-card);
  font-size: var(--font-16);
}

/* Shared meal counters use labels instead of an ambiguous single sentence. */
.meal-counts {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.meal-counts > span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.meal-counts b {
  color: var(--text-strong);
  font-size: 1em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.meal-counts em {
  color: var(--muted);
  font-size: 0.62em;
  font-style: normal;
  font-weight: 800;
}

.meal-counts > i {
  width: 3px;
  height: 3px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--subtle);
  transform: translateY(-0.18em);
}

#homePage .home-meal-card-copy strong .meal-counts {
  font-size: var(--font-16);
}

#tonightPage .tonight-summary h2.has-meal-counts {
  line-height: 1;
}

#tonightPage .tonight-summary h2 .meal-counts {
  font-size: var(--font-20);
}

/* Make every quantity control share an explicit 32px icon baseline. */
.menu-quantity-stepper,
.personal-quantity-stepper,
.selected-sheet-quantity-stepper,
.quantity-stepper {
  align-items: center;
}

.menu-quantity-stepper button,
.personal-quantity-stepper button,
.selected-sheet-quantity-stepper button,
.quantity-stepper button,
.add-btn.has-lucide-icon,
.mini-add-btn.has-lucide-icon {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
}

.menu-quantity-stepper .lucide-icon,
.personal-quantity-stepper .lucide-icon,
.selected-sheet-quantity-stepper .lucide-icon,
.quantity-stepper .lucide-icon,
.add-btn.has-lucide-icon .lucide-icon,
.mini-add-btn.has-lucide-icon .lucide-icon {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}

.menu-quantity-stepper span,
.personal-quantity-stepper span,
.selected-sheet-quantity-stepper span,
.quantity-stepper span {
  display: grid;
  min-height: 32px;
  place-items: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#menuPage .menu-quantity-stepper,
.personal-quantity-stepper,
.selected-sheet-quantity-stepper {
  grid-template-columns: 32px 24px 32px;
  gap: 4px;
}

#menuPage .menu-quantity-stepper button,
.personal-quantity-stepper button,
.selected-sheet-quantity-stepper button {
  width: 32px;
  height: 32px;
}

/* Mood selection is a compact choice card, not a loose icon plus label. */
#randomPage .mood-grid button {
  min-height: 72px;
  justify-content: flex-start;
  padding: 10px 12px;
  gap: 10px;
  text-align: left;
}

#randomPage .mood-icon-wrap {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--sage);
  background: var(--sage-soft);
}

#randomPage .mood-grid button:nth-child(2) .mood-icon-wrap,
#randomPage .mood-grid button:nth-child(4) .mood-icon-wrap {
  color: var(--tomato);
  background: var(--tomato-soft);
}

#randomPage .mood-icon {
  display: block;
  width: 20px;
  height: 20px;
}

#randomPage .mood-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#randomPage .mood-copy strong {
  color: var(--text-strong);
  font-size: var(--font-14);
  font-weight: 800;
  line-height: 1.15;
}

#randomPage .mood-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

#randomPage .mood-grid button.is-active .mood-icon-wrap {
  color: var(--tomato);
  background: rgba(216, 92, 69, 0.14);
}

#randomPage .mood-grid button.is-active .mood-copy strong {
  color: var(--tomato);
}

@media (max-width: 360px) {
  #addPage .compose-ingredient-card {
    grid-template-columns: 54px minmax(72px, 1fr) 38px 36px 28px;
  }

  #addPage .compose-remove-btn {
    width: 28px;
    height: 28px;
  }
}

/* Next Demo: each top-level page owns one clear job. */
#homePage,
#myPage {
  width: 100%;
}

#homePage .home-meal-card.home-meal-hero {
  position: relative;
  min-height: clamp(310px, 45dvh, 380px);
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: #d7d0c5;
  box-shadow: 0 12px 28px rgba(38, 32, 22, 0.16);
}

.home-meal-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.home-meal-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(180deg, rgba(23, 22, 19, 0.02) 20%, rgba(23, 22, 19, 0.84) 100%);
}

.home-meal-hero-status {
  align-self: flex-start;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  color: #fff;
  background: rgba(23, 22, 19, 0.58);
  font-size: var(--font-12);
  font-weight: 800;
}

.home-meal-hero-status.is-confirmed {
  color: #f8fff9;
  background: rgba(89, 123, 97, 0.9);
}

.home-meal-hero-status.is-modified {
  background: rgba(216, 92, 69, 0.94);
}

#homePage .home-meal-hero-copy h2 {
  margin: 0;
  color: #fff;
  font-size: var(--font-28);
  line-height: 1.1;
}

#homePage .home-meal-hero-copy p {
  max-width: 100%;
  overflow: hidden;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--font-14);
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.home-hero-primary,
.home-hero-secondary {
  min-height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-control);
  font-size: var(--font-14);
  font-weight: 800;
}

.home-hero-primary {
  padding: 0 14px;
  color: #fff;
  background: var(--tomato);
  box-shadow: 0 8px 18px rgba(89, 28, 17, 0.28);
}

.home-hero-secondary {
  padding: 0 8px;
  color: #fff;
  background: transparent;
}

.home-hero-primary .lucide-icon,
.home-hero-secondary .lucide-icon,
.home-hero-member-row .lucide-icon {
  width: 18px;
  height: 18px;
}

.home-hero-member-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--font-12);
}

.home-hero-member-row > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#homePage .home-meal-history {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.meal-history-title {
  width: 100%;
  min-height: var(--tap-target);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.meal-history-title strong {
  color: var(--text-strong);
  font-size: var(--font-16);
}

.meal-history-title span {
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 700;
}

.meal-history-title .lucide-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

#homePage .meal-history-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
}

#homePage .meal-history-day {
  position: relative;
  min-height: 62px;
  display: grid;
  grid-template-rows: 16px 34px;
  place-items: center;
  gap: 4px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
}

#homePage .meal-history-day > span {
  font-size: 10px;
  font-weight: 750;
}

#homePage .meal-history-day em {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-subtle);
  background: rgba(42, 40, 35, 0.035);
}

#homePage .meal-history-day em i {
  width: 5px;
  height: 5px;
  display: block;
  border-radius: 50%;
  background: var(--subtle);
}

#homePage .meal-history-day.has-meals em {
  border-color: rgba(216, 92, 69, 0.24);
}

#homePage .meal-history-day.is-today em {
  outline: 2px solid rgba(109, 140, 116, 0.55);
  outline-offset: 2px;
}

#homePage .meal-history-day small {
  position: absolute;
  right: 0;
  bottom: 1px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid var(--phone-bg);
  border-radius: 50%;
  color: #fff;
  background: var(--tomato);
  font-size: 9px;
  font-weight: 850;
}

#homePage .home-recent-section {
  margin-top: 22px;
}

#homePage .home-recent-section .section-heading {
  margin-bottom: 10px;
}

#homePage .home-recent-section .section-heading h3 {
  font-size: var(--font-16);
}

#homePage .recent-scroller {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  margin: 0;
  padding: 0;
}

#homePage .recent-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-row);
  background: rgba(255, 255, 255, 0.68);
}

#homePage .recent-card .dish-photo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-row);
}

.recent-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#homePage .recent-card-copy strong,
#homePage .recent-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#homePage .recent-card-copy strong {
  font-size: var(--font-14);
}

#homePage .recent-card-copy small {
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 700;
}

#myPage {
  display: none;
}

#myPage.is-active {
  display: grid;
  gap: 22px;
}

.profile-identity {
  min-height: 64px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.profile-identity .profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: none;
}

.profile-identity h2,
.profile-identity p {
  margin: 0;
}

.profile-identity h2 {
  color: var(--text-strong);
  font-size: var(--font-20);
}

.profile-identity p {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 700;
}

.profile-personal-list {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.profile-personal-list button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.profile-personal-list button:first-child {
  border-top: 0;
}

.profile-personal-list button span {
  font-size: var(--font-14);
  font-weight: 800;
}

.profile-personal-list .lucide-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

#myPage .foodlight-section {
  margin: 0;
  padding: 0 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.foodlight-summary-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.foodlight-summary-head h2,
.foodlight-summary-head p {
  margin: 0;
}

.foodlight-summary-head h2 {
  margin-top: 2px;
  color: var(--text-strong);
  font-size: var(--font-20);
}

.foodlight-summary-head .text-btn {
  min-height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.foodlight-summary-head .lucide-icon {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.foodlight-month-summary,
.foodlight-empty {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 700;
}

.foodlight-recent-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.foodlight-recent-list button {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.foodlight-recent-list img,
.foodlight-recent-placeholder {
  width: 100%;
  aspect-ratio: 1.25 / 1;
  display: grid;
  place-items: center;
  object-fit: cover;
  border-radius: var(--radius-row);
  background: var(--sage-soft);
}

.foodlight-recent-placeholder .lucide-icon {
  width: 20px;
  height: 20px;
  color: var(--sage);
}

.foodlight-recent-list strong,
.foodlight-recent-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foodlight-recent-list strong {
  color: var(--text-strong);
  font-size: var(--font-12);
}

.foodlight-recent-list small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

#myPage .foodlight-month-card {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

#myPage .foodlight-day {
  min-height: 56px;
  grid-template-rows: 15px minmax(20px, 1fr) 13px;
}

.profile-collaboration-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-collaboration-actions > button {
  position: relative;
  min-width: 0;
  min-height: 104px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  color: inherit;
  background: var(--card-strong);
  text-align: left;
  box-shadow: var(--shadow-card);
}

.profile-collaboration-actions .profile-action-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sage-dark);
  background: var(--sage-soft);
}

.profile-collaboration-actions .profile-action-icon .lucide-icon {
  width: 20px;
  height: 20px;
}

.profile-collaboration-actions button > span:not(.profile-action-icon) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-collaboration-actions strong,
.profile-collaboration-actions small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-collaboration-actions strong {
  color: var(--text-strong);
  font-size: var(--font-14);
}

.profile-collaboration-actions small {
  color: var(--muted);
  font-size: var(--font-12);
  font-weight: 700;
}

.profile-collaboration-actions > button > .lucide-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

@media (max-width: 390px) {
  #homePage .home-meal-card.home-meal-hero {
    min-height: 320px;
  }

  .home-meal-hero-overlay {
    padding: 16px;
  }

  .home-meal-hero-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .home-hero-secondary span {
    max-width: 80px;
  }

  #homePage .recent-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  #homePage .recent-card .dish-photo {
    width: 48px;
    height: 48px;
  }
}
