:root {
  --paper: #f7f0e4;
  --page: #fffaf1;
  --ink: #3b2c22;
  --muted: #7a6858;
  --line: #e6d6c4;
  --terracotta: #c45c26;
  --terracotta-dark: #9a4318;
  --sage: #4f6f54;
  --gold: #c8892a;
  --danger: #b42318;
  --shadow: 0 18px 40px rgba(80, 48, 20, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -80px, #efe2cc 0%, transparent 60%),
    #e8dcc8;
}
button, .dish-card, .recipe-item {
  -webkit-tap-highlight-color: transparent;
}

#app {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px 8px;
  gap: 16px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--terracotta); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 20px;
  box-shadow: 0 8px 16px rgba(196, 92, 38, 0.28);
}
.brand h1 { margin: 0; font-size: 22px; letter-spacing: 0.04em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.mode-nav {
  display: flex;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}
.mode-btn {
  border: 0;
  background: transparent;
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
}
.mode-btn.on { background: var(--terracotta); color: #fff; }

.order-layout, .cook-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  margin: 8px 20px 20px;
  min-height: 0;
}
.cook-layout { grid-template-columns: 1fr; }

.order-main, .tray, .cook-plan, .cook-library, .lib-side, .detail {
  background: var(--page);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 16px;
  min-height: 0;
}
.order-main, .tray, .cook-plan, .cook-library { display: flex; flex-direction: column; }
.order-main, .cook-plan { overflow: auto; }

.search-row { display: flex; gap: 10px; align-items: center; }
.search-row input[type="search"] {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  background: #fff;
}
.fav-toggle { font-size: 13px; color: var(--muted); white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.filter-btn { display: none; flex: none; }
.filter-btn.on { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.filters { display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.chip-k { font-style: normal; font-size: 12px; color: var(--muted); min-width: 28px; flex: none; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
}
.chip.alt { background: #f4eee4; }
.chip.on { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.chip.alt.on { background: var(--sage); border-color: var(--sage); color: #fff; }
.chip.taste { background: #f7edd4; }
.chip.taste.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.chip.who { background: #fde8e4; }
.chip.who.on { background: #c45c6a; border-color: #c45c6a; color: #fff; }

.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.dish-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  position: relative;
  box-shadow: 0 8px 16px rgba(80, 48, 20, 0.06);
}
.dish-card:hover { transform: translateY(-2px); }
.dish-card.picked { outline: 2px solid var(--terracotta); }
.dish-card img, .dish-fallback {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: #efe4d4;
}
.dish-fallback {
  display: grid;
  place-items: center;
  font-size: 42px;
  color: var(--terracotta);
  font-weight: 700;
}
.dish-fallback.sm { width: 56px; height: 56px; border-radius: 12px; font-size: 22px; flex: none; }
.dish-card strong {
  display: block;
  padding: 10px 12px 4px;
  font-size: 18px;
}
.dish-card:not(:has(.who-line)) strong { padding-bottom: 12px; }
.who-line {
  display: block;
  padding: 0 12px 10px;
  font-size: 12px;
  color: var(--terracotta);
}
.dish-card em {
  position: absolute;
  top: 8px; right: 10px;
  color: #fff;
  font-style: normal;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
}

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.page-head h2 { margin: 0; font-size: 18px; }
.readonly-flag {
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0.1em;
}
.page-head input[type="date"], .plan-bar input[type="date"] {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--ink);
  font-size: 13px;
}
.date-row { display: flex; gap: 6px; margin-bottom: 8px; }
.history { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hist {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
}
.hist.on { background: var(--sage); color: #fff; border-color: var(--sage); }
.menu-lead { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.tray { overflow: auto; }
.tray-mask, .tray-handle, .tray-dock, .back-btn { display: none; }

.menu-board {
  flex: 1;
  background: linear-gradient(#fffdf8, #fbf3e6);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.menu-meta { display: flex; justify-content: space-between; margin-bottom: 8px; }
.menu-meta strong { font-size: 18px; }
.slot { margin-top: 12px; }
.slot-head { display: flex; justify-content: space-between; align-items: baseline; }
.slot h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--terracotta);
}
.slot ul { list-style: none; margin: 6px 0 0; padding: 0; }
.slot li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.pick { font-size: 16px; }
.menu-thumb {
  width: 36px; height: 36px; border-radius: 8px; object-fit: cover;
}
.x, .text-btn {
  border: 0; background: transparent; cursor: pointer; color: var(--muted);
}
.none { color: var(--muted); font-size: 13px; border: 0 !important; }

.cook-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}
.tab {
  border: 1px solid var(--line);
  background: #fffaf1;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.tab.on { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.cook-tabs .btn { margin-left: auto; }

.vocab-page {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  min-height: 0;
}
.vocab-col {
  background: var(--page);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 16px;
  overflow: auto;
}
.vocab-col h3 { margin: 0 0 6px; font-size: 18px; }
.vocab-col p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.vocab-col ul { list-style: none; margin: 0; padding: 0; }
.vocab-col li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.vocab-col li strong { flex: 1; font-size: 16px; }
.danger-mini { color: var(--danger); }
.vocab-add { display: flex; gap: 8px; margin-top: 14px; }
.vocab-add input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
}

.plan-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.plan-empty { display: flex; gap: 12px; align-items: center; }

.prep-board {
  background: #fff4e8;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.prep-board h3 { margin: 0 0 8px; font-size: 16px; }
.prep-board ul { margin: 0; padding: 0; list-style: none; }
.prep-board li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.prep-board strong { margin-right: 8px; }

.cook-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fffdf8;
}
.cook-card header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.cook-card header img {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
}
.cook-card header > div { min-width: 0; flex: 1; }
.cook-card header h3 { margin: 0; font-size: 22px; }
.cook-card header em {
  font-style: normal;
  font-size: 12px;
  color: var(--terracotta);
  letter-spacing: 0.2em;
}
.cook-card header .btn { margin-left: auto; }

.cook-library {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  overflow: hidden;
}
.lib-side { box-shadow: none; padding: 0; display: flex; flex-direction: column; min-height: 0; }
.recipe-list { overflow: auto; margin-top: 10px; flex: 1; }
.recipe-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
}
.recipe-item:hover { background: #f3e8d8; }
.recipe-item.active { background: #fbe6d4; font-weight: 700; }
.recipe-item .heart { color: var(--terracotta); }
.thumb {
  width: 40px; height: 40px; border-radius: 8px;
  object-fit: cover; background: #efe4d4;
}
.empty-thumb {
  display: grid; place-items: center;
  font-size: 11px; color: var(--muted);
  background: #f3e8d8;
}

.detail { overflow: auto; box-shadow: none; }
.detail-title { display: flex; align-items: center; gap: 8px; }
.detail-title h3 { margin: 0; font-size: 26px; }
.icon-btn {
  border: 0; background: transparent; cursor: pointer;
  font-size: 22px; color: var(--muted); line-height: 1;
}
.icon-btn.loved { color: var(--terracotta); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag {
  background: #f3e4d4; color: var(--terracotta-dark);
  border-radius: 999px; padding: 2px 8px; font-size: 12px;
}
.tag.dish { background: #e4eee4; color: var(--sage); }
.tag.taste { background: #f7edd4; color: #8a5a12; }
.tag.who { background: #fde8e4; color: #9a3344; }
.tags.slim { margin: 4px 0 0; }
.notes {
  background: #fff4d6;
  border-left: 3px solid var(--gold);
  padding: 8px 10px;
  margin: 0 0 12px;
  font-size: 13px;
}
.block h4 { margin: 0 0 6px; font-size: 14px; color: var(--sage); }
.block.sauce h4 { color: var(--terracotta-dark); }
.block.sauce pre {
  background: #fff4e8;
  border-radius: 8px;
  padding: 8px 10px;
}
.block pre {
  margin: 0 0 14px;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.75;
  font-size: 15px;
}
.detail-actions { display: flex; gap: 8px; padding-bottom: 8px; }
.empty, .placeholder { color: var(--muted); padding: 16px 8px; }
.muted { color: var(--muted); }

.cover {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #efe4d4;
}
.cover.empty { background: transparent; overflow: visible; }
.cover img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.cover-placeholder {
  width: 100%;
  min-height: 140px;
  border: 2px dashed var(--line);
  background: #fffaf1;
  border-radius: 14px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.cover-placeholder strong { color: var(--ink); font-size: 15px; }
.cover-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
}

.form-cover {
  margin-top: 4px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}
.form-cover img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin-bottom: 8px;
}
.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}
.form-row > span { flex: none; width: 36px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.mini {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
}
.mini:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}
.btn.primary { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.btn.danger { background: #fff; color: var(--danger); border-color: #f0c8c4; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.modal-mask {
  position: fixed; inset: 0;
  background: rgba(40, 24, 12, 0.35);
  display: grid; place-items: center;
  padding: 16px;
  z-index: 20;
}
.modal, .sheet {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--page);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.sheet { text-align: center; }
.sheet-meals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.sheet-meals .btn { padding: 14px; font-size: 18px; }
.modal h3, .sheet h3 { margin: 0 0 12px; }
.modal label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.modal input, .modal textarea {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.gate {
  flex: 1;
  display: grid;
  place-items: center;
  margin: 8px 20px 20px;
}
.gate-card {
  width: min(380px, 100%);
  background: var(--page);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
}
.gate-card h2 { margin: 0 0 8px; }
.gate-card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.gate-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  margin-bottom: 12px;
}
.gate-card .btn { width: 100%; padding: 10px; }

.form-error { color: var(--danger); font-size: 13px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #3b2c22;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 30;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

@media (hover: none) {
  .dish-card:hover { transform: none; }
  .recipe-item:hover { background: transparent; }
  .recipe-item.active:hover { background: #fbe6d4; }
  .mini:hover { border-color: var(--line); color: inherit; }
}

@media (max-width: 980px) {
  .topbar {
    padding: 10px 12px 6px;
    padding-top: max(10px, env(safe-area-inset-top));
    gap: 10px;
  }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; }
  .brand h1 { font-size: 18px; }
  .brand p { display: none; }
  .mode-btn { padding: 8px 16px; font-size: 15px; min-height: 40px; }

  .order-layout, .cook-layout {
    display: flex;
    flex-direction: column;
    margin: 0 10px 10px;
    gap: 10px;
    min-height: 0;
  }
  .order-layout {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
  }
  .filters { display: none; }
  .filters.open { display: block; }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-top: 8px;
    padding-bottom: 2px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip-k { min-width: auto; }
  .chip {
    flex: none;
    padding: 8px 14px;
    font-size: 14px;
    min-height: 36px;
    white-space: nowrap;
  }
  .search-row {
    flex-wrap: wrap;
  }
  .search-row input[type="search"] {
    font-size: 16px;
    min-height: 44px;
    flex: 1 1 100%;
  }
  .fav-toggle { font-size: 14px; min-height: 40px; }
  .filter-btn { margin-left: auto; }

  .dish-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
  }
  .dish-card img, .dish-fallback {
    height: 42vw;
    max-height: 180px;
  }
  .dish-card strong { font-size: 16px; padding: 10px 10px 4px; }

  .tray-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(40, 24, 12, 0.4);
    z-index: 40;
  }
  .tray {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 41;
    width: auto;
    max-height: min(82vh, 640px);
    margin: 0;
    border-radius: 20px 20px 0 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(80, 48, 20, 0.18);
  }
  .tray.open { display: flex; }
  .order-layout:has(.tray.open) .tray-dock { visibility: hidden; }
  .x {
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
  }
  .tray-handle {
    display: block;
    width: 40px;
    height: 5px;
    background: #d8c8b4;
    border-radius: 999px;
    margin: 2px auto 10px;
    flex: none;
  }
  .tray-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 30;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    background: var(--terracotta);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 10px 24px rgba(196, 92, 38, 0.35);
  }
  .tray-dock strong { font-size: 18px; letter-spacing: 0.04em; }
  .page-head h2 { font-size: 16px; }
  .page-head input[type="date"], .plan-bar input[type="date"] {
    font-size: 16px;
    min-height: 40px;
  }
  .date-row { gap: 8px; }
  .date-row .mini {
    flex: 1;
    min-height: 40px;
    font-size: 14px;
  }
  .history {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .history::-webkit-scrollbar { display: none; }
  .hist { flex: none; padding: 8px 12px; font-size: 13px; }

  .cook-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -2px 4px;
    padding-bottom: 2px;
  }
  .cook-tabs::-webkit-scrollbar { display: none; }
  .cook-tabs .tab, .cook-tabs .btn { flex: none; margin-left: 0; }
  .tab { padding: 10px 14px; white-space: nowrap; font-size: 14px; }
  .add-recipe { padding: 10px 12px; font-size: 13px; }

  .vocab-page { grid-template-columns: 1fr; }
  .vocab-col li { flex-wrap: wrap; }
  .vocab-col li .mini { min-height: 36px; }
  .vocab-add { flex-wrap: wrap; }
  .vocab-add input, .vocab-add .btn { min-height: 44px; font-size: 16px; }

  .plan-bar { align-items: stretch; }
  .plan-bar input[type="date"] { width: 100%; }
  .plan-empty { flex-direction: column; align-items: stretch; }
  .cook-card header { flex-wrap: wrap; }
  .cook-card header h3 { font-size: 20px; }
  .cook-card header .btn { margin-left: 0; width: 100%; min-height: 44px; }

  .cook-library {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .cook-library > .detail { display: none; }
  .cook-library.show-detail .lib-side { display: none; }
  .cook-library.show-detail .detail:not(.placeholder) {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .back-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: var(--terracotta);
    font-size: 15px;
    padding: 4px 0 10px;
    cursor: pointer;
  }
  .recipe-item {
    padding: 10px 8px;
    min-height: 56px;
    font-size: 16px;
  }
  .thumb { width: 48px; height: 48px; }

  .modal-mask {
    align-items: end;
    place-items: end center;
    padding: 0;
    z-index: 50;
  }
  .modal, .sheet {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .modal input, .modal textarea, .gate-card input {
    font-size: 16px;
    padding: 10px 12px;
  }
  .form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .form-row > span { width: auto; }
  .sheet-meals .btn { min-height: 48px; }
  .modal-actions .btn { min-height: 44px; min-width: 88px; }
  .gate { margin: 8px 12px 20px; }
  .gate-card { padding: 24px 18px; }

  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media print {
  .topbar, .cook-tabs, .plan-bar, .lib-side { display: none !important; }
  .cook-layout { display: block; margin: 0; }
}
