:root {
  --cream: #FAF6F0; --peach: #F5E6D3; --brown: #4E2A14; --green: #1B5E20; --red: #B71C1C;
  --ink: #222; --muted: #7a6a5c; --line: #e8dccb;
  --c-red: #E53935; --c-green: #43A047; --c-yellow: #F6B400; --c-ivory: #D9CBB0;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 "Pretendard", "Malgun Gothic", system-ui, sans-serif; padding-bottom: 76px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--brown); color: #fff; }
.top h1 { margin: 0; font-size: 20px; }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px; }
h2 { color: var(--brown); font-size: 18px; margin: 18px 0 8px; }
.muted { color: var(--muted); font-size: 14px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--brown); color: #fff; border-color: var(--brown); }
.chip.ghost { background: transparent; color: #fff; border-color: #ffffff66; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: 0; border-radius: 12px; padding: 12px 16px; font-size: 16px; font-weight: 700; background: var(--brown); color: #fff; cursor: pointer; width: 100%; }
.btn.sub { background: var(--peach); color: var(--brown); }
.day { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin: 10px 0; }
.day.out { opacity: .55; }
.dayhead { display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: var(--brown); }
.dish { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.dish:first-of-type { border-top: 0; }
.dish img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; background: var(--peach); }
.dish .name { flex: 1; cursor: pointer; }
.dish .cat { font-size: 12px; color: var(--muted); display: block; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.빨강 { background: var(--c-red); } .dot.초록 { background: var(--c-green); } .dot.노랑\/주황 { background: var(--c-yellow); } .dot.아이보리 { background: var(--c-ivory); }
.swap { border: 0; background: var(--peach); border-radius: 10px; padding: 6px 8px; cursor: pointer; }
.badge { display: inline-block; font-size: 12px; background: #E8F5E9; color: var(--green); border-radius: 8px; padding: 2px 8px; margin: 6px 4px 0 0; }
.memo { font-size: 14px; color: var(--brown); background: var(--cream); border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; border: 0; background: none; padding: 14px 0; font-size: 15px; color: var(--muted); cursor: pointer; }
.tabs button.on { color: var(--brown); font-weight: 800; }
dialog { border: 0; border-radius: 20px 20px 0 0; width: 100%; max-width: 640px; max-height: 92vh; margin: auto auto 0; padding: 0; }
dialog::backdrop { background: #0006; }
#sheetBody { padding: 16px; }
.amt { color: var(--red); font-weight: 800; }
.rows { width: 100%; border-collapse: collapse; }
.rows td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.rows td:nth-child(2) { text-align: right; }
.kid { background: #FFF8E1; border: 2px solid var(--c-yellow); border-radius: 12px; padding: 10px; margin: 8px 0; }
.step { display: flex; gap: 8px; margin: 8px 0; }
.step b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brown); color: #fff; display: grid; place-items: center; font-size: 14px; }
.buy { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.buy.done .what { opacity: 0.45; text-decoration: line-through; }
.buy .what { flex: 1; }
.buy a { font-size: 12px; text-decoration: none; border-radius: 999px; padding: 5px 10px; border: 1px solid var(--line); color: var(--brown); white-space: nowrap; font-weight: 600; }
.buy a.cp-btn { background: #E53935; color: #fff; border-color: #E53935; }
.cp-mini { font-size: 11px; text-decoration: none; border-radius: 999px; padding: 3px 8px; background: #FFF3E0; border: 1px solid #FFB74D; color: #E65100; font-weight: 700; white-space: nowrap; }
.affiliate-note { font-size: 11px; color: var(--muted); margin-top: 14px; line-height: 1.4; text-align: center; }
.member { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.member select { flex: 1; padding: 8px; border-radius: 10px; border: 1px solid var(--line); font-size: 15px; }
.ffbox { background: var(--peach); border-radius: 12px; padding: 10px; margin: 12px 0; color: var(--brown); font-weight: 700; }
details summary { cursor: pointer; color: var(--brown); font-weight: 700; padding: 8px 0; }
.row2 { display: flex; gap: 8px; } .row2 > * { flex: 1; }
