:root{--bg:#DCC5A9;--card:#EFE1CC;--card2:#E4D3BB;--field:#F6EDDF;--green:#2B2724;--on-green:#F7EEE0;--shu:#B5452D;--sub:#5A4E3C;--warn:#9A4A1E;--line:#DCCBB2}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg) url(/img/home/wall.webp) center top/480px auto repeat;color:var(--green);font-family:'Noto Sans JP',system-ui,sans-serif;-webkit-text-size-adjust:100%}
body{min-height:100vh}
#app{max-width:480px;margin:0 auto;min-height:100vh;position:relative;overflow-x:hidden}
a{color:var(--green)}
button,input,select{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation}
:focus-visible{outline:3px solid #B5651D;outline-offset:2px}
h1,h2,.mincho{font-family:'Shippori Mincho',serif;font-weight:700}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--sub)}
.warn{color:var(--warn);font-weight:700}

/* ホーム（ChatGPT の見本②をもとにした1枚の背景に、ボタンを重ねる） */
.home{position:relative;container-type:inline-size}
.home-stage{position:relative;width:100%;aspect-ratio:718/1627;background:url(/img/home/home-bg.webp) center top/100% 100% no-repeat}
.home-title{position:absolute;left:5%;top:17.2%;font-family:'Shippori Mincho',serif;font-weight:700;font-size:5.4cqw;margin:0;color:var(--green)}
.home-date{position:absolute;right:5%;top:18%;font-size:3.4cqw;color:var(--sub)}
.big{position:absolute;left:3.2%;width:93.87%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.2cqw;text-decoration:none;color:var(--green);border-radius:6cqw}
.big.b1{top:21.63%;height:18.44%;color:var(--on-green)}.big.b2{top:42.22%;height:15.86%}.big.b3{top:60.05%;height:15.98%}
.big img{height:44%;width:auto}
.big .t{font-size:6.2cqw;font-weight:700;letter-spacing:.06em;line-height:1.2}
.big .s{font-size:3.6cqw;line-height:1.3;color:var(--sub)}
.big.b1 .s{color:#F3DED3}
.big:focus-visible{outline-offset:-4px}
.home-links{display:flex;justify-content:center;flex-wrap:wrap;gap:6px 18px;padding:10px 16px 28px}
.home-links a{min-height:44px;display:flex;align-items:center;font-size:14px;color:var(--sub)}

/* 画面の上 */
.top{position:relative;height:130px}
.top img{display:block;width:100%;height:130px;object-fit:cover;-webkit-mask-image:linear-gradient(#000 75%,transparent);mask-image:linear-gradient(#000 75%,transparent)}
.back{position:absolute;left:16px;top:16px;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:rgba(239,225,204,.92);border:0}
.head{padding:4px 24px 0}
.head h1{margin:0;font-size:28px}
.head p{margin:6px 0 0;font-size:15px;color:var(--sub);line-height:1.6}
.page{padding:16px 20px 40px;display:flex;flex-direction:column;gap:14px}
.card{background:var(--card);border-radius:18px;padding:4px 16px}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:58px;width:100%;border:0;border-radius:18px;background:var(--shu);color:var(--on-green);font-size:18px;font-weight:700;text-decoration:none}
.btn.sub{background:var(--card);color:var(--green);border:2px solid var(--green);min-height:52px;font-size:16px}
.link{display:flex;align-items:center;gap:6px;min-height:44px;font-size:15px;background:none;border:0;padding:0;text-decoration:underline}

/* 一覧の行 */
.row{display:flex;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid var(--line)}
.row:last-child{border-bottom:0}
.row .ic{width:40px;height:40px;flex:none}
.row .ic.blank{border-radius:50%;background:var(--card2)}
.row .main{flex:1;min-width:0}
.row .name{font-size:18px;font-weight:700;background:none;border:0;padding:0;text-align:left;text-decoration:none}
.row .sub{font-size:14px;color:var(--sub)}
.round{width:46px;height:46px;border-radius:50%;border:2px solid var(--green);background:transparent;font-size:22px;line-height:1;flex:none}
.qty{min-width:56px;text-align:center;font-size:18px;font-weight:700}
.qty small{font-size:13px;font-weight:500}
.pill{min-height:46px;padding:0 16px;border-radius:999px;border:2px solid var(--green);background:transparent;font-size:15px;font-weight:700;flex:none}
.tag{display:inline-block;margin:4px 4px 0 0;font-size:13px;font-weight:700;border-radius:999px;padding:1px 10px}
.tag.good{background:var(--green);color:var(--on-green)}
.addline button{background:var(--shu)!important}
.tag.high{background:var(--warn);color:#FFF6EA}
.tag.have{background:var(--field);border:1px solid #CDB998}

/* タイル（食材を選ぶ） */
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:96px;border-radius:16px;border:2px solid transparent;background:var(--card);font-size:15px;font-weight:500;padding:6px}
.tile img{width:44px;height:44px}
.tile[aria-pressed="true"]{border:3px solid var(--green);background:var(--field);font-weight:700}
.tile[aria-pressed="true"]::after{content:"✓";position:absolute;top:6px;right:9px;font-size:14px}
.tile.text{min-height:56px}
.seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;background:#CDB998;padding:4px;border-radius:14px}
.seg button{min-height:46px;border:0;border-radius:11px;background:transparent;font-size:16px}
.seg button[aria-selected="true"]{background:var(--green);color:var(--on-green);font-weight:700}
.people{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.people button{min-height:60px;border-radius:16px;border:2px solid transparent;background:var(--card);font-size:18px;font-weight:700}
.people button[aria-pressed="true"]{border:3px solid var(--green);background:var(--field)}

/* 入力 */
.addline{display:flex;gap:8px}
.addline input{flex:1;min-width:0;min-height:54px;border:0;border-radius:16px;padding:0 16px;font-size:17px;background:var(--field)}
.addline button{min-width:84px;min-height:54px;border:0;border-radius:16px;background:var(--green);color:var(--on-green);font-size:17px;font-weight:700}
.check{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--line);cursor:pointer}
.check:last-child{border-bottom:0}
.check input{width:30px;height:30px;margin:0;accent-color:var(--green);flex:none}
.check .ic{width:36px;height:36px;flex:none}
.done-box{background:var(--card2);border-radius:18px;padding:8px 16px 16px}
.done-box .check{border-bottom:0;padding:8px 0}
.done-box .nm{text-decoration:line-through;color:#6F624E}

/* 料理 */
.rcard{display:block;background:var(--card);border-radius:18px;overflow:hidden;text-decoration:none;color:var(--green)}
.rcard img{display:block;width:100%;aspect-ratio:5/3;object-fit:cover}
.rcard .body{padding:14px 16px 16px}
.rrow{display:flex;gap:14px;align-items:center;background:var(--card);border-radius:18px;padding:10px;text-decoration:none;color:var(--green)}
.rrow img,.rrow .noimg{width:88px;height:88px;object-fit:cover;border-radius:12px;flex:none}
.rrow .noimg{background:var(--card2);display:flex;align-items:center;justify-content:center}
.rname{font-family:'Shippori Mincho',serif;font-weight:700;font-size:19px}
.meta{font-size:14px;color:var(--sub);margin-top:4px}
.ok{font-size:13px;font-weight:700;margin-top:2px}
.ing{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:16px}
.ing:last-child{border-bottom:0}
.steps{margin:0;padding-left:1.4em;font-size:17px;line-height:1.8}
.choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px}
.choice button{min-height:46px;border-radius:12px;border:2px solid transparent;background:var(--field);font-size:14px}
.choice button[aria-pressed="true"]{border-color:var(--green);font-weight:700}

/* お知らせ */
#toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);width:min(440px,calc(100% - 32px));display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--green);color:var(--on-green);border-radius:14px;padding:8px 8px 8px 16px;z-index:10;box-shadow:0 6px 20px rgba(0,0,0,.18)}
#toast[hidden]{display:none}
#toast span{font-size:15px;padding:8px 0}
#toast button{min-height:44px;padding:0 14px;border:0;border-radius:10px;background:var(--on-green);color:var(--green);font-weight:700;font-size:15px;flex:none}
.sheet{border:0;border-radius:20px;padding:20px;width:min(440px,calc(100% - 24px));background:var(--card);color:var(--green)}
.sheet::backdrop{background:rgba(30,30,20,.4)}
.sheet h2{margin:0 0 12px;font-size:22px}
.sheet label{display:block;font-size:15px;margin:12px 0 4px}
.sheet input{width:100%;min-height:50px;border:0;border-radius:12px;padding:0 12px;background:var(--field);font-size:17px}
.sheet .row2{display:flex;gap:8px;margin-top:16px}
.sheet .row2>*{flex:1}
.prose{font-size:16px;line-height:1.8}
.prose h2{font-size:20px;margin:18px 0 4px}
/* レシート */
.receipt-btn{cursor:pointer;margin-bottom:4px}
.receipt-note{margin:0 0 6px;font-size:14px;line-height:1.6;text-align:center}
.spinner{width:40px;height:40px;margin:18px auto 6px;border-radius:50%;border:4px solid var(--field);border-top-color:var(--shu);animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:3s}}
.receipt-list{list-style:none;margin:0 0 14px;padding:0;max-height:52vh;overflow:auto;display:flex;flex-direction:column;gap:6px}
.receipt-list li{display:flex;align-items:center;gap:8px;background:var(--field);border-radius:12px;padding:4px 8px}
.sheet .receipt-list label.rc{display:flex;margin:0;padding:8px 2px}
.sheet .receipt-list input[type=checkbox]{width:26px;height:26px;min-height:0;accent-color:var(--shu)}
.sheet .receipt-list input.rn{flex:1;min-width:0;min-height:44px;background:transparent;padding:0 4px}
.receipt-list .ic{width:32px;height:32px;flex:none}
.receipt-list .rq{flex:none;text-align:right;font-size:15px;font-weight:700;line-height:1.2}
.receipt-list .rq small{display:block;font-weight:400;color:var(--sub);font-size:13px}
