:root {
  --bg: #fff8ef;
  --surface: #ffffff;
  --surface-2: #fff1df;
  --text: #30261f;
  --muted: #7a6d62;
  --accent: #d86f42;
  --accent-2: #f3b66e;
  --line: #eadfd4;
  --ok: #5f8e65;
  --shadow: 0 10px 30px rgba(72, 47, 27, .08);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Yu Gothic", sans-serif;
  background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 760px; margin: 0 auto; min-height: 100dvh; padding-bottom: 96px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: max(22px, env(safe-area-inset-top)) 20px 12px; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 28px; letter-spacing: -.02em; }
h2 { margin-bottom: 0; font-size: 25px; }
h3 { margin: 24px 0 10px; font-size: 18px; }
.eyebrow { margin-bottom: 5px; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--accent); }
.subtle { color: var(--muted); font-size: 13px; margin-bottom: 0; line-height: 1.6; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 24px; box-shadow: var(--shadow); }
main { padding: 0 16px; }
.view { display: none; }
.view.active { display: block; }
.section-head { display:flex; align-items:flex-end; justify-content:space-between; margin:12px 4px 16px; }
.pill { background:var(--surface-2); border:1px solid var(--line); padding:6px 10px; border-radius:999px; font-size:12px; color:var(--muted); }

.week-maker {
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin:0 0 10px; padding:15px 16px;
  background:linear-gradient(135deg,#fff0dd,#fff8ef);
  border:1px solid #efcfaa; border-radius:20px; box-shadow:var(--shadow);
}
.week-maker strong { display:block; font-size:17px; margin:2px 0 4px; }
.week-maker p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.maker-kicker { color:var(--accent); font-size:10px; font-weight:900; letter-spacing:.14em; }
.maker-btn {
  flex:0 0 auto; border:0; border-radius:15px; background:var(--accent); color:white;
  font-weight:900; padding:12px 14px; box-shadow:0 6px 18px rgba(216,111,66,.22);
}
.maker-btn:active { transform:scale(.98); }
.plan-meta { min-height:30px; display:flex; align-items:center; justify-content:space-between; padding:0 4px 8px; }

.menu-grid { display:grid; gap:12px; }
.menu-card {
  position:relative; display:grid; grid-template-columns:60px 1fr auto; align-items:center; gap:12px;
  width:100%; border:1px solid var(--line); border-radius:20px; padding:14px; background:var(--surface);
  text-align:left; box-shadow:var(--shadow);
}
.day-badge { width:60px; height:60px; border-radius:17px; display:grid; place-items:center; background:var(--surface-2); }
.day-badge strong { font-size:18px; }
.card-title { display:block; font-weight:800; font-size:16px; margin-bottom:4px; }
.card-sub { display:block; color:var(--muted); font-size:12px; line-height:1.5; }
.card-arrow { color:var(--muted); font-size:20px; }
.star { position:absolute; right:14px; top:10px; color:var(--accent); font-size:16px; }

.shopping-group,.settings-card { background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:14px 16px; margin-bottom:12px; box-shadow:var(--shadow); }
.shopping-group h3 { margin:2px 0 8px; }
.shopping-item { display:grid; grid-template-columns:28px 1fr auto; align-items:center; min-height:46px; border-top:1px solid var(--line); }
.shopping-item:first-of-type { border-top:0; }
.shopping-item input[type="checkbox"] { width:19px; height:19px; accent-color:var(--ok); }
.shopping-item.checked .item-name { text-decoration:line-through; color:var(--muted); }
.item-qty { color:var(--muted); font-size:13px; margin-left:8px; }
.progress-wrap { margin:0 4px 14px; }
.progress-track { height:8px; border-radius:999px; background:#eadfd5; overflow:hidden; margin-bottom:6px; }
.progress-bar { height:100%; width:0; background:var(--ok); transition:width .2s ease; }
.text-btn { border:0; background:transparent; color:var(--accent); font-weight:700; }
.add-item { display:grid; grid-template-columns:1fr auto; gap:8px; margin:16px 0 8px; }
.add-item input { border:1px solid var(--line); border-radius:14px; padding:13px 14px; background:var(--surface); }
.add-item button,.primary-btn { border:0; border-radius:14px; padding:12px 18px; background:var(--accent); color:white; font-weight:800; }
.settings-card label { display:grid; grid-template-columns:1fr 120px; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.settings-card select { width:100%; padding:10px; border:1px solid var(--line); border-radius:12px; background:white; }
.settings-card .primary-btn { margin-top:14px; width:100%; }

.bottom-nav {
  position:fixed; left:50%; transform:translateX(-50%); bottom:0; width:min(760px,100%);
  display:grid; grid-template-columns:repeat(4,1fr); padding:8px 8px max(8px,env(safe-area-inset-bottom));
  background:rgba(255,255,255,.94); backdrop-filter:blur(18px); border-top:1px solid var(--line); z-index:20;
}
.nav-btn { border:0; background:transparent; color:var(--muted); display:grid; place-items:center; gap:2px; padding:6px 2px; border-radius:12px; }
.nav-btn span { font-size:20px; }
.nav-btn small { font-size:11px; }
.nav-btn.active { color:var(--accent); font-weight:800; background:var(--surface-2); }

.overlay { position:fixed; inset:0; background:rgba(42,31,24,.38); z-index:50; display:flex; align-items:flex-end; justify-content:center; }
.overlay[hidden] { display:none; }
.recipe-sheet { width:min(760px,100%); max-height:88dvh; overflow-y:auto; background:var(--surface); border-radius:26px 26px 0 0; padding:10px 20px calc(30px + env(safe-area-inset-bottom)); box-shadow:0 -20px 60px rgba(0,0,0,.12); }
.sheet-handle { width:44px; height:5px; border-radius:999px; background:#d7cec7; margin:2px auto 14px; }
.sheet-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.favorite-btn { border:1px solid var(--line); background:var(--surface-2); border-radius:999px; padding:8px 13px; color:var(--text); font-weight:700; }
.ingredient-list,.steps-list { padding-left:22px; line-height:1.8; }
.ingredient-list li { padding:4px 0; }
.steps-list li { padding:5px 0; }
.note { margin-top:20px; padding:14px; border-radius:16px; background:var(--surface-2); color:var(--muted); line-height:1.6; }
.empty { border:1px dashed var(--line); border-radius:18px; padding:28px 18px; text-align:center; color:var(--muted); }
.toast { position:fixed; left:50%; transform:translateX(-50%); bottom:92px; z-index:80; background:#30261f; color:white; padding:10px 15px; border-radius:999px; opacity:0; pointer-events:none; transition:opacity .2s ease; font-size:13px; }
.toast.show { opacity:1; }
@media (min-width:620px) {
  .menu-grid { grid-template-columns:1fr 1fr; }
  .topbar { padding-left:24px; padding-right:24px; }
  main { padding-left:20px; padding-right:20px; }
}
