:root {
  --ground: #F4F2EE; --card: #FFFFFF; --soft: #F7F5F1; --line: #E6E2DA; --line-edge: #DDD7CB;
  --ink: #1B2230; --ink-edge: #070A10; --muted: #5E6573;
  --meat: #B5452E; --meat-edge: #7E2C1C; --meat-soft: #FBE7E1;
  --veg: #D6EFC8; --veg-edge: #9CC98A; --veg-text: #1E4A23; --veg-strong: #2F7A45;
  --sun: #FFD66B; --sun-edge: #D9A92C; --cream: #FFF1C7; --cream-edge: #E7C866; --cream-text: #6B4E00;
  --err: #B3261E;
  --shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(27,34,48,.05), 0 1px 2px rgba(60,50,30,.06), 0 14px 30px -14px rgba(60,50,30,.28);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body { font-family: 'Assistant', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
.h { font-family: 'Fredoka', 'Assistant', sans-serif; }
.wrap { max-width: 480px; margin: 0 auto; padding: 24px 18px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; min-height: 100vh; }
.card { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 16px; }
.muted { color: var(--muted); }
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 30vh; color: var(--muted); font-weight: 600; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--ink); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* logo */
.logo { width: 42px; height: 42px; border-radius: 14px; background: var(--sun); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 4px 0 var(--sun-edge); flex-shrink: 0; }
.logo.big { width: 88px; height: 88px; border-radius: 28px; font-size: 42px; transform: rotate(-6deg); box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -5px 0 rgba(120,80,0,.12), 0 8px 0 var(--sun-edge), 0 22px 30px -12px rgba(120,80,0,.5); }

/* buttons */
.btn { border: 0; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 17px; height: 56px; width: 100%; border-radius: 18px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 5px 0 var(--ink-edge), 0 14px 22px -8px rgba(27,34,48,.5); transition: transform .08s, box-shadow .08s; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 0 var(--ink-edge); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.saved, .btn.saved:disabled { opacity: 1; background: var(--veg); color: var(--veg-text); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 5px 0 var(--veg-edge, #9CC98A); }
.link { background: none; border: 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); min-height: 44px; cursor: pointer; padding: 0 4px; }
.link:hover { color: var(--ink); }

/* login */
.blob { position: absolute; z-index: 0; }
.blob.a { top: -90px; left: -70px; width: 240px; height: 240px; border-radius: 80px; background: #FFE8A3; transform: rotate(18deg); }
.blob.b { top: 150px; right: -60px; width: 150px; height: 150px; border-radius: 52px; background: #DDF1D2; transform: rotate(-14deg); }
.login-head { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding-top: 32px; }
.login-head h1 { margin: 0; font-size: 30px; font-weight: 600; line-height: 1.15; }
form.card { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; padding: 22px 18px; border-radius: 26px; }
label.field { display: flex; flex-direction: column; gap: 7px; font-size: 15px; font-weight: 700; }
.field input { height: 54px; border: 0; outline: none; border-radius: 16px; padding: 0 16px; font-family: inherit; font-size: 17px; font-weight: 600; color: var(--ink); background: var(--soft); box-shadow: inset 0 2px 4px rgba(60,50,30,.1), inset 0 0 0 1.5px var(--line); }
.field input:focus { box-shadow: inset 0 2px 4px rgba(60,50,30,.1), inset 0 0 0 2px var(--ink); }
.field input::placeholder { color: #7A808C; font-weight: 500; }
.error { color: var(--err); font-weight: 700; font-size: 14px; margin: 0; }
.privacy { position: relative; z-index: 1; display: flex; gap: 10px; align-items: flex-start; padding: 0 6px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.privacy svg { flex-shrink: 0; margin-top: 2px; }

/* week */
.topbar { display: flex; align-items: center; gap: 12px; }
.topbar .brand { flex-grow: 1; font-size: 15px; font-weight: 700; }
.hello h1 { margin: 0; font-size: 28px; font-weight: 600; }
.hello p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--cream); color: var(--cream-text); box-shadow: 0 3px 0 var(--cream-edge); font-size: 14px; font-weight: 700; line-height: 1.4; }
.note svg { flex-shrink: 0; }
.day { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.day.closed { background: #FAF8F4; }
.day-head { display: flex; align-items: center; gap: 8px; }
.day-head .name { flex-grow: 1; font-size: 20px; font-weight: 600; }
.day-head .date { font-size: 14px; font-weight: 500; color: var(--muted); font-family: 'Assistant', sans-serif; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); background: #F0ECE5; padding: 5px 10px; border-radius: 99px; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { border: 0; font-family: inherit; text-align: right; min-height: 96px; padding: 12px; border-radius: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; cursor: pointer; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), 0 4px 0 var(--line-edge), 0 10px 16px -10px rgba(60,50,30,.35); transition: transform .08s, box-shadow .08s, background .15s; }
.opt .t { font-size: 16px; font-weight: 800; }
.opt .d { font-size: 13px; font-weight: 600; line-height: 1.35; }
.opt.meat.on { background: var(--meat); color: #fff; transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255,255,255,.2), 0 3px 0 var(--meat-edge), 0 10px 18px -8px rgba(126,44,28,.55); }
.opt.full { grid-column: 1 / -1; min-height: 72px; }
.opt.veg.on { background: var(--veg); color: var(--veg-text); transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--veg-strong), 0 3px 0 #7FB26B, 0 10px 18px -8px rgba(60,120,60,.45); }
.opt:disabled { cursor: not-allowed; opacity: .62; }
.opt:focus-visible, .btn:focus-visible, .link:focus-visible { outline: 3px solid #3056D3; outline-offset: 2px; }
.summary { display: flex; flex-direction: column; gap: 12px; }
.summary .row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; gap: 8px; }
.status { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; font-size: 14px; font-weight: 700; }
.status.ok { background: var(--veg); color: var(--veg-text); }
.status.warn { background: var(--cream); color: var(--cream-text); }
.status.err { background: var(--meat-soft); color: #8A2F1D; }
.empty { text-align: center; padding: 28px 18px; }
.empty h2 { margin: 0 0 6px; font-size: 20px; }
