/* Zen Maru Gothic は接続時のみ取得。オフラインでは日本語丸ゴシック／標準フォントにフォールバック。 */
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700;900&display=swap');
:root{font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-synthesis:none;color:#23332d;background:#f7f8f4;font-size:15px;line-height:1.55;--green:#123d34;--green2:#1f6151;--muted:#708078;--line:#e4e9e3;--cream:#f7f8f4;--orange:#f3a45a;--shadow:0 14px 45px rgba(26,63,49,.06)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:var(--green2)}.hide{display:none!important}
.layout{min-height:100vh;display:grid;grid-template-columns:252px minmax(0,1fr)}.sidebar{background:var(--green);color:#fff;padding:34px 21px;display:flex;flex-direction:column;gap:30px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:10px;padding:0 2px}.brandmark{display:grid;place-items:center;width:43px;height:43px;border-radius:14px;background:#ebce91;color:var(--green);font-size:22px}.brand strong{display:block;font-size:17px;letter-spacing:0;white-space:nowrap}.brand small{font-size:10px;color:#c1d5cb;letter-spacing:.1em}.sidebar nav{display:grid;gap:9px}.sidebar nav button{width:100%;display:flex;align-items:center;gap:13px;border:none;background:transparent;color:#d5e2dc;border-radius:12px;padding:13px 15px;text-align:left;font-weight:650}.sidebar nav button.active{background:#f0f6ed;color:#163f34}.side-icon{font-size:19px;width:24px;text-align:center}.side-note{margin-top:auto;padding:16px;background:#225143;border-radius:15px;color:#e0eae4;font-size:12px}.side-note b{display:block;color:white;font-size:14px;margin-bottom:3px}
.content{min-width:0;padding:40px clamp(22px,5vw,70px) 110px;max-width:1430px;width:100%;margin:0 auto}.topline{display:flex;gap:12px;justify-content:space-between;align-items:start;margin-bottom:28px}.eyebrow{color:#648173;font-size:12px;font-weight:750;letter-spacing:.13em;text-transform:uppercase;margin:0 0 4px}.page-title{font-family:Georgia,serif;font-size:clamp(28px,3.4vw,43px);letter-spacing:-.035em;color:var(--green);margin:0;font-weight:800}.subtitle{color:#64776a;margin:5px 0 0}.actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:end}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 17px;border:1px solid #dce5dd;border-radius:12px;background:#fff;color:var(--green);font-weight:720;min-height:42px;text-decoration:none;white-space:nowrap}.btn:hover{background:#f0f7f0}.btn.primary{background:var(--green);border-color:var(--green);color:white}.btn.primary:hover{background:#286051}.btn.soft{background:#e5f0e5;border-color:#e5f0e5}.btn.danger{color:#b52c35;background:#fff8f7;border-color:#f4d4d0}.btn.small{padding:6px 10px;min-height:33px;font-size:12px;border-radius:9px}.btn:focus-visible,.nav button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #e4bc76;outline-offset:2px}
.hero{background:linear-gradient(112deg,#153e34,#2d6550);padding:29px 35px;color:white;border-radius:22px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:var(--shadow);margin-bottom:25px}.hero h2{margin:0 0 7px;font-family:Georgia,serif;font-size:24px}.hero p{margin:0;color:#d4e5d8;font-size:13px}.hero-decoration{font-size:64px;opacity:.75;transform:rotate(-10deg)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:24px}.stat{border:1px solid var(--line);background:white;padding:17px 20px;border-radius:17px}.stat strong{display:block;font-size:26px;line-height:1.3;color:var(--green)}.stat span{font-size:12px;color:var(--muted)}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 13px}.section-head h2{font-size:19px;margin:0;color:var(--green)}.week-arrows{display:flex;align-items:center;gap:8px}.week-label{font-weight:750;color:var(--green);text-align:center;min-width:135px}.pill{border-radius:999px;display:inline-flex;align-items:center;padding:4px 9px;font-size:11px;font-weight:750;background:#e7f2e9;color:#357256}.pill.amber{background:#fff0d9;color:#996323}.pill.gray{background:#f0f2ef;color:#69766d}
.week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.day-card{background:#fff;border:1px solid var(--line);border-radius:17px;padding:13px 10px;min-height:245px;display:flex;flex-direction:column;gap:9px}.day-card.today{border-color:#88bba8;box-shadow:inset 0 0 0 1px #9ac4b3}.day-head{text-align:center;padding-bottom:8px;border-bottom:1px solid #edf0ed}.day-head strong{display:block;font-size:22px;color:var(--green)}.day-head small{color:var(--muted);font-size:11px}.day-food{background:#f2f6f1;border-radius:10px;padding:8px 7px;font-size:11px;display:grid;gap:4px}.day-food .meal{font-size:10px;font-weight:800;color:#6a917a}.day-food button{font-weight:700;text-align:left;display:block;padding:0;border:0;background:transparent;color:#254d3d;word-break:break-word;line-height:1.4}.day-add{margin-top:auto;border:1px dashed #c9d6ce;background:#fbfcf9;color:#6a8072;border-radius:9px;min-height:29px;font-size:12px}
.panel{background:#fff;border:1px solid var(--line);border-radius:20px;padding:20px;box-shadow:var(--shadow)}.panel + .panel{margin-top:16px}.empty{padding:34px 18px;text-align:center;color:var(--muted)}.empty .emoji{display:block;font-size:40px;margin:0 0 10px}.empty h3{margin:0;color:var(--green);font-size:17px}.empty p{margin:6px 0 17px;font-size:13px}.quick-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.quick-step{background:white;border:1px solid var(--line);border-radius:14px;padding:18px;display:flex;align-items:start;gap:12px}.quick-step b{display:block;color:var(--green);font-size:13px}.quick-step p{font-size:12px;margin:4px 0 0;color:#708076}.quick-step .num{background:#e4f1e6;color:#275c49;border-radius:50%;width:28px;height:28px;display:grid;place-items:center;font-weight:800;flex-shrink:0}
.recipe-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:18px}.input,.textarea,.select{width:100%;padding:11px 12px;border-radius:11px;background:#fff;border:1px solid #d9e1db;color:#254136;min-height:42px}.textarea{min-height:88px;resize:vertical}.search{max-width:390px;flex:1;min-width:190px}.recipe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:15px}.recipe-card{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden;display:flex;flex-direction:column}.recipe-cover{height:105px;background:linear-gradient(135deg,#e4eedd,#f2ecdc);display:grid;place-items:center;font-size:42px;position:relative}.recipe-cover .tag{position:absolute;top:12px;left:12px}.recipe-body{padding:14px;display:flex;flex-direction:column;gap:8px;flex:1}.recipe-body strong{font-size:17px;color:var(--green)}.recipe-info{color:var(--muted);font-size:12px}.recipe-buttons{display:flex;gap:7px;margin-top:auto;padding-top:7px}.recipe-buttons .btn{flex:1}
.shopping-layout{display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:16px;align-items:start}.shopping-row{display:grid;grid-template-columns:26px minmax(0,1fr) 115px 112px;gap:13px;align-items:center;border-bottom:1px solid var(--line);padding:13px 1px}.shopping-row:last-child{border-bottom:0}.shopping-row label{font-weight:700;color:var(--green);line-height:1.2}.shopping-row label.done{text-decoration:line-through;color:#a5aea7}.shopping-row .source{color:#94a399;font-size:10px;margin-top:3px}.shopping-row .quantity{font-weight:750;color:#345448;font-size:13px}.shopping-row .mini{width:64px;min-height:32px;text-align:right;padding:6px 7px;border-radius:8px;border:1px solid #d8e2d8}.shopping-row .tiny{font-size:10px;color:var(--muted)}input[type=checkbox]{accent-color:#20664f;width:17px;height:17px}.note{color:#718076;font-size:12px;line-height:1.7}.summary-line{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}.summary-line:last-child{border:none}.summary-line strong{color:var(--green)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:grid;gap:6px}.field.full{grid-column:1 / -1}.field label{font-size:12px;font-weight:750;color:#576b60}.field small{color:#8b978d;font-size:11px}.modal-shade{position:fixed;inset:0;background:rgba(15,39,32,.54);z-index:20;display:grid;place-items:center;padding:14px}.modal{background:#fff;border-radius:20px;width:min(660px,100%);max-height:min(91vh,900px);overflow:auto;box-shadow:0 22px 80px #0d2c224c}.modal-header{position:sticky;top:0;background:#fff;display:flex;justify-content:space-between;align-items:start;gap:10px;padding:21px 23px 17px;border-bottom:1px solid var(--line);z-index:2}.modal-header h2{margin:0;font-size:21px;color:var(--green)}.modal-body{padding:22px 23px}.modal-footer{display:flex;gap:10px;justify-content:flex-end;align-items:center;border-top:1px solid var(--line);padding:16px 23px;flex-wrap:wrap}.iconbtn{border:0;background:#f0f4ee;border-radius:10px;width:35px;height:35px;display:grid;place-items:center;color:var(--green);font-size:20px}.ingred-row{display:grid;grid-template-columns:minmax(0,2fr) 80px 85px 36px;gap:7px;margin-top:8px}.ingred-row input{min-width:0}.help{background:#f1f6ef;padding:12px 14px;border-radius:11px;font-size:12px;color:#597060}.hr{border:0;border-top:1px solid var(--line);margin:20px 0}.error{color:#b22931;font-size:12px}.modal .toggle{display:flex;align-items:center;gap:8px;font-size:13px}
.settings-stack{display:grid;gap:17px;max-width:800px}.settings-panel{background:white;border:1px solid var(--line);border-radius:17px;padding:23px}.settings-panel h3{color:var(--green);margin:0 0 8px}.settings-panel p{font-size:13px;color:var(--muted);margin:0 0 17px}.settings-panel .btn{margin-top:10px}.settings-panel a{word-break:break-all}.inline-form{display:flex;gap:8px;align-items:center}.inline-form input{flex:1;min-width:100px}
#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%) translateY(15px);background:#173d33;color:white;padding:12px 20px;border-radius:12px;z-index:100;box-shadow:0 8px 30px #122b2244;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:calc(100vw - 25px)}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.mobile-nav{display:none}
@media(max-width:1050px){.week-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.day-card{min-height:175px}.shopping-layout{grid-template-columns:1fr}.hero-decoration{font-size:47px}}
@media(max-width:760px){.layout{display:block}.sidebar{display:none}.content{padding:22px 16px calc(102px + env(safe-area-inset-bottom));}.topline{align-items:start;flex-direction:column;gap:13px;margin-bottom:20px}.topline .actions{justify-content:start;width:100%}.page-title{font-size:32px}.hero{padding:22px;border-radius:18px}.hero-decoration{font-size:37px}.stats{gap:8px}.stat{padding:12px}.stat strong{font-size:22px}.stat span{font-size:10px}.week-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.day-card{min-height:180px}.quick-steps{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.mobile-nav{display:grid;position:fixed;bottom:0;left:0;right:0;z-index:10;grid-template-columns:repeat(4,1fr);background:#fff;padding:8px 6px calc(9px + env(safe-area-inset-bottom));box-shadow:0 -6px 24px #173c3419;border-top:1px solid var(--line)}.mobile-nav button{display:grid;gap:1px;place-items:center;background:transparent;border:0;color:#819088;font-size:10px;padding:5px 0}.mobile-nav button.active{color:var(--green);font-weight:800}.mobile-nav .side-icon{font-size:21px}.shopping-row{grid-template-columns:22px minmax(0,1fr) 88px;gap:9px}.shopping-row .stockcell{grid-column:2 / 4;display:flex;gap:8px;align-items:center;padding-left:0}.shopping-row .mini{width:76px}.modal{max-height:94vh}.modal-body{padding:16px}.modal-header{padding:17px 16px}.modal-footer{padding:14px 16px}.ingred-row{grid-template-columns:minmax(0,1fr) 64px 67px 32px;gap:5px}.ingred-row input{padding:8px 5px;font-size:12px}.week-label{min-width:110px}.inline-form{flex-wrap:wrap}}

@media(max-width:760px){.section-head{flex-wrap:wrap}.section-head h2{white-space:nowrap}.section-head .week-arrows{width:100%;justify-content:flex-end}}

/* v2: ほんのりポップな丸文字と、やわらかいカード・ボタン */
:root{font-family:'Zen Maru Gothic','Hiragino Maru Gothic ProN','Hiragino Kaku Gothic ProN','Yu Gothic',sans-serif;--green:#22594a;--green2:#257c62;--orange:#f6ac64;--line:#e6eee4;--shadow:0 12px 32px rgba(52,99,80,.08)}
button,input,select,textarea{font-family:inherit}
.page-title,.hero h2,.section-head h2,.modal-header h2,.brand strong{font-family:'Zen Maru Gothic','Hiragino Maru Gothic ProN','Yu Gothic',sans-serif;letter-spacing:.01em;font-weight:900}
.page-title{font-size:clamp(30px,3.6vw,44px)}
.hero{border-radius:27px;background:linear-gradient(110deg,#2f7f65,#83ad79);position:relative}
.hero h2{font-size:clamp(20px,2.2vw,28px)}
.brandmark{border-radius:17px;transform:rotate(-5deg);background:#ffd7a0}
.btn{border-radius:999px;font-weight:800;transition:transform .12s ease,background .12s ease;box-shadow:0 2px 0 rgba(25,77,58,.05)}
.btn:active{transform:translateY(2px)}
.btn.primary{background:#277e63;border-color:#277e63}
.btn.primary:hover{background:#1e6951}
.btn.soft{background:#fff0db;border-color:#f5dfbd;color:#87502b}
.day-card,.recipe-card,.panel,.stat,.settings-panel,.quick-step{border-radius:22px}
.day-add{border-radius:13px;background:#fff6ec;color:#95603a;border-color:#efcfaf;font-weight:800}
.day-card.today{border-color:#e9b66d;box-shadow:inset 0 0 0 1px #f4d5a2}
.stat strong,.day-head strong{font-weight:900}
.shopping-range{margin:0 0 20px;background:linear-gradient(125deg,#fffdf6,#f1faf1);border-color:#e1ebdb}
.range-intro{display:flex;justify-content:space-between;align-items:start;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.range-intro h2{font-size:20px;color:var(--green);margin:2px 0 4px;font-weight:900}
.range-intro p{margin:0;font-size:12px;color:var(--muted)}
.range-kicker{font-size:12px;color:#c07c39;font-weight:900}
.range-shortcuts{display:flex;gap:8px}
.range-controls{display:flex;align-items:end;flex-wrap:wrap;gap:11px}
.range-controls .field{min-width:156px;flex:1}
.range-controls .field label{font-size:12px}
.range-controls .input{background:#fff}
.range-controls .btn{white-space:nowrap}
.range-wave{align-self:center;color:#c38446;font-size:24px;font-weight:900;margin-top:17px}
.range-selected{color:#2e8061;font-size:12px;font-weight:800;margin:14px 0 0}
.import-next{background:#fff4e3;border-radius:15px;padding:12px}
.import-next .note{margin:0}
@media(max-width:760px){.range-controls{display:grid;grid-template-columns:1fr 18px 1fr;gap:8px}.range-controls .field{min-width:0}.range-controls .btn{grid-column:1/-1;width:100%}.range-wave{font-size:17px;text-align:center;margin-top:14px}.range-intro h2{font-size:17px}.range-intro{gap:10px}.page-title{font-size:32px}}

/* v3: 日付7つの横並びと選択日だけの献立詳細 */
.cal-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.cal-top h2{font-size:17px;color:var(--green);margin:0;font-weight:900}
.calendar-main{padding:25px 25px 28px;background:linear-gradient(160deg,#fffdf9 0%,#fff 48%,#f8fdf8 100%)}
.date-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-bottom:23px}
.date-pill{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;border:1px solid #e8ede6;background:#f6f8f3;color:#5c7168;border-radius:18px;padding:10px 2px 7px;cursor:pointer;transition:all .15s}
.date-pill .date-weekday{font-size:12px;font-weight:700;line-height:1}
.date-pill strong{font-size:24px;font-weight:900;line-height:1.2;font-variant-numeric:tabular-nums}
.date-pill .date-dot{width:5px;height:5px;border-radius:50%;background:transparent}
.date-pill .date-dot.has-menu{background:#df9861}
.date-pill.today:not(.selected){border-color:#f1ca89}
.date-pill.selected{color:#fff;background:linear-gradient(160deg,#298464,#216951);border-color:#216951;box-shadow:0 9px 18px #2c86552b;transform:translateY(-2px)}
.date-pill.selected .date-dot.has-menu{background:#fff1ae}
.selected-day{border-top:1px dashed #e3eadd;padding-top:23px}
.selected-day-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.selected-day-title h2{font-size:25px;line-height:1.4;margin:0;color:var(--green);font-weight:900}
.mini-kicker{font-size:10px;letter-spacing:.11em;color:#d99750;font-weight:900}
.daily-meal{border-radius:18px;border:1px solid #e6eee5;background:#fff;margin-top:11px;overflow:hidden}
.daily-meal-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 15px;background:#f7faf6}
.meal-type{font-size:14px;font-weight:900;color:#315947}
.meal-plus{border:1px solid #ddede3;border-radius:10px;background:#fff;color:#287352;font-size:19px;line-height:1;min-width:36px;min-height:32px;cursor:pointer;font-weight:800}
.daily-recipes{padding:4px 15px}
.daily-recipe{display:flex;justify-content:space-between;text-align:left;gap:12px;align-items:center;min-height:49px;width:100%;border:0;border-bottom:1px solid #edf1eb;background:#fff;padding:11px 0;cursor:pointer}
.daily-recipe:last-child{border-bottom:0}
.daily-recipe-name{color:#254e3e;font-weight:900;font-size:15px;min-width:0;overflow-wrap:anywhere}
.daily-recipe-qty{color:#779084;font-weight:700;font-size:12px;white-space:nowrap}
.daily-empty{margin:0;padding:12px 0;font-size:12px;color:#9ba9a2}
.shopping-mini-summary{font-weight:800;color:#54836c;font-size:12px;border-bottom:1px solid var(--line);padding:3px 0 13px;margin:0 0 4px}
.shopping-head{margin:0 0 8px!important;display:flex;align-items:center;justify-content:space-between;gap:10px}
.import-sections .hr{margin:18px 0}
.import-sections .field .note{margin:2px 0 9px}
.import-sections button[type=submit]{justify-self:start}
@media(max-width:760px){.calendar-main{padding:18px 13px 21px}.cal-top{margin-bottom:12px}.date-strip{gap:4px;margin-bottom:17px}.date-pill{border-radius:13px;padding:10px 0 6px;gap:5px}.date-pill .date-weekday{font-size:10px}.date-pill strong{font-size:19px}.selected-day-title h2{font-size:22px}.selected-day{padding-top:18px}.week-arrows{gap:5px!important}.week-arrows .btn{padding:7px 9px}.week-label{min-width:0;font-size:12px}.cal-top h2{display:none}.shopping-head{flex-wrap:wrap!important}.import-sections button[type=submit]{width:100%;justify-self:stretch}}
