:root{color-scheme:light;--bg:#faf8f1;--paper:#fffefb;--ink:#253126;--muted:#586254;--green:#305139;--green-dark:#23412b;--line:#e5e5d8;--soft:#eaf0e3;--amber:#f5e9d1;--gold:#865c2d;--radius:22px;font-family:"Hiragino Sans","Yu Gothic",Meiryo,system-ui,sans-serif;font-size:16px}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);line-height:1.65}
h1,h2,h3,h4,p{margin:0}
button,input,textarea{font:inherit}
button{cursor:pointer;touch-action:manipulation}
button:disabled{opacity:.55;cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #77985e;outline-offset:3px}
[hidden]{display:none!important}
svg{flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.wrap{width:min(1080px,calc(100% - 72px));margin-inline:auto}
.site-header{border-bottom:1px solid var(--line);background:var(--bg)}
.header-inner{display:flex;align-items:center;justify-content:space-between;min-height:72px;gap:12px}
.brand{display:inline-flex;align-items:center;gap:11px;color:var(--ink);font-weight:800;letter-spacing:.05em;text-decoration:none;white-space:nowrap}
.brand img{border-radius:12px;display:block}
.quiet,.text-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:4px 0;border:none;background:none;color:var(--green);font-size:.83rem;font-weight:750}
.quiet:hover,.text-button:hover{text-decoration:underline;text-underline-offset:4px}
.quiet svg{width:18px;height:18px}
.hero{display:grid;grid-template-columns:.94fr 1.06fr;isolation:isolate;position:relative;overflow:hidden;margin:29px 0 28px;border-radius:28px;background:#eee9d7;min-height:318px}
.hero-copy{z-index:1;padding:35px clamp(28px,4.7vw,67px);align-self:center}
.hero-kicker{margin-bottom:13px;color:var(--gold);font-size:.84rem;font-weight:800;letter-spacing:.11em}
.hero h1{font-family:"Yu Mincho","Hiragino Mincho ProN","BIZ UDPMincho",serif;font-size:clamp(36px,5.2vw,67px);line-height:1.17;letter-spacing:-.025em;font-weight:800;white-space:nowrap}
.hero h1 em{color:var(--green);font-style:normal}
.hero-copy>p:last-child{margin-top:17px;color:#4f5949;font-size:.94rem;line-height:1.7}
.hero-photo{position:absolute;inset:0 0 0 auto;width:55%;height:100%;object-fit:cover;object-position:58% 52%;mask-image:linear-gradient(90deg,transparent,#000 19%)}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.section-heading h2{font-size:1.34rem;letter-spacing:.025em;line-height:1.35}
.input-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:0 2px 5px #45390706}
.input-grid>.card{min-height:228px}
.card-heading{display:flex;gap:12px;align-items:center;margin-bottom:15px}
.card-heading h3{font-size:1.02rem;font-weight:800;letter-spacing:.035em}
.card-heading p,.small{color:var(--muted);font-size:.81rem;line-height:1.6}
.tile-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:13px;background:var(--soft);color:var(--green)}
.tile-icon.amber{background:var(--amber);color:var(--gold)}
.tile-icon svg{width:21px;height:21px}
.photo-picker{background:#f5f7ef;border:1px dashed #becbb6;border-radius:15px;padding:13px 12px 10px}
.photo-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:46px;padding:9px 15px;border:1px solid transparent;border-radius:12px;font-size:.88rem;font-weight:800;line-height:1.3;text-align:center}
.button svg{width:18px;height:18px}
.primary{background:var(--green);color:#fff}
.primary:hover:not(:disabled){background:var(--green-dark)}
.secondary{background:var(--paper);color:var(--green);border-color:#d8dfd0}
.secondary:hover{background:var(--soft)}
.fineprint{font-size:.72rem;line-height:1.55;color:var(--muted);margin-top:9px}
.photo-picker .fineprint{text-align:center}
.photo-review{border-top:1px solid var(--line);margin-top:16px;padding-top:15px}
.preview-row{display:flex;align-items:center;gap:13px}
.preview-row img{width:86px;height:76px;object-fit:cover;border-radius:10px;background:var(--soft)}
.photo-label{font-weight:750;font-size:.9rem}
.photo-status{font-size:.81rem;line-height:1.6;color:var(--muted);margin:9px 0}
progress{display:block;width:100%;height:10px;margin:10px 0;accent-color:var(--green)}
#suggestion-panel{padding-top:9px}
#suggestion-panel h4{font-size:.9rem}
#suggestions{margin:9px 0 12px}
textarea,input[type=text]{width:100%;min-width:0;border:1px solid #dfdfd2;border-radius:12px;background:#fcfbf6;color:var(--ink);font-size:16px;padding:10px 12px}
textarea{display:block;resize:vertical;min-height:65px;line-height:1.5}
::placeholder{color:#687364;opacity:1}
.chips{display:flex;flex-wrap:wrap;gap:7px}
.preference-chips{margin-top:10px}
.chip{min-height:44px;max-width:100%;display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid #e0e4d7;border-radius:999px;background:#f8f8f1;color:var(--green);font-size:.77rem;font-weight:750;overflow-wrap:anywhere}
.chip:hover,.chip[aria-pressed=true]{background:var(--soft);border-color:#96ac8d}
.chip[aria-pressed=true]::before{content:"✓";font-weight:850}
.pantry{margin:16px 0}
.pantry-list{padding:0;margin:0 0 11px;list-style:none}
.pantry-list:empty{display:none}
.pantry-list .chip{background:var(--soft);border-color:#d2dec9}
.ingredient-remove{font-size:1.15em;margin-left:2px}
.add-form{display:flex;gap:8px}
.add-form button{flex:none;min-width:82px}
.action-bar{margin:16px 0 0}
.action-inner{background:#eaf0e3;border:1px solid #dce7d5;border-radius:17px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px 10px 18px}
#inventory-count{color:var(--green);font-size:.84rem;font-weight:750}
.search-button{min-width:224px;min-height:51px;font-size:.97rem}
.results{margin-top:27px;scroll-margin-top:16px}
.results-note{font-size:.9rem;color:var(--muted);margin:0 0 13px}
.result-count{font-size:.83rem;font-weight:750;color:var(--green);white-space:nowrap}
.recipe-list{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.recipe-card{width:100%;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--ink)}
.recipe-card:hover{border-color:#9bb28d;background:#fdfdf7}
.recipe-card h3{font-size:1.02rem;margin:5px 0 2px}
.recipe-card p{font-size:.83rem;color:var(--muted)}
.duration{display:inline-flex;align-items:center;gap:5px;color:var(--green);border-radius:20px;background:var(--soft);padding:3px 10px;font-weight:800;font-size:.8rem}
.duration svg{width:14px;height:14px}
.recipe-card .missing,.missing{color:#895018}
.arrow{color:var(--green);font-size:1.5rem}
.external{margin-top:16px}
.external h3{font-size:1.02rem}
.external .small{margin-top:4px}
.external-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.external-links .button{text-decoration:none}
.site-footer{margin-top:24px;padding:16px 0 24px;border-top:1px solid var(--line);font-size:.78rem;color:var(--muted)}
dialog{border:1px solid var(--line);padding:0;width:min(540px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;border-radius:23px;background:var(--paper);color:var(--ink);box-shadow:0 15px 80px #1c261c53}
dialog::backdrop{background:#222e22a0}
body:has(dialog[open]){overflow:hidden}
.sheet{padding:20px 24px 25px}
.sheet-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.icon-button{background:var(--soft);border:0;color:var(--green);font-size:1.5rem;width:44px;height:44px;border-radius:50%;line-height:1;flex:none}
.sheet h2{font-size:1.46rem;line-height:1.4;margin:3px 0 5px}
.sheet p{font-size:.89rem;color:var(--muted)}
.sheet h3{font-size:1rem;margin:17px 0 5px}
.servings{color:var(--muted);font-size:.78rem;font-weight:600;margin-left:6px}
.ingredient-list{padding:0;margin:0;list-style:none}
.ingredient-list li{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid var(--line);font-size:.9rem}
.ingredient-list small{margin-left:7px}
.steps{padding-left:1.55em;margin:6px 0 18px;font-size:.91rem}
.steps li{padding:4px 0 4px 4px}
.steps li::marker{color:var(--green);font-weight:800}
#recipe-safety{margin:-6px 0 14px;font-size:.78rem}
.wide{width:100%}
#mark-cooked{margin-bottom:8px}
.sheet-compact .steps{margin-bottom:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:860px){
  .wrap{width:calc(100% - 40px)}
  .hero{min-height:270px}
  .hero-copy{padding-left:28px}
  .card{padding:17px}
}
@media(max-width:640px){
  body{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  .wrap{width:calc(100% - 28px)}
  .header-inner{min-height:60px}
  .brand{gap:7px;font-size:.94rem;letter-spacing:.015em}
  .brand img{width:33px;height:33px;border-radius:10px}
  .quiet{font-size:.72rem;gap:3px;white-space:nowrap}
  .quiet svg{width:15px;height:15px}
  .hero{min-height:218px;margin:14px 0 17px;border-radius:20px;grid-template-columns:1fr}
  .hero-copy{padding:20px 0 20px 17px}
  .hero h1{font-size:clamp(31px,8.4vw,51px)}
  .hero-kicker{font-size:.7rem;margin-bottom:9px}
  .hero-copy>p:last-child{font-size:.75rem;margin-top:11px;max-width:53%}
  .hero-photo{width:58%;object-position:56% 50%;mask-image:linear-gradient(90deg,transparent,#000 32%)}
  .desktop-break{display:none}
  .section-heading h2{font-size:1.15rem}
  .section-heading{margin-bottom:5px}
  .input-grid,.recipe-list{grid-template-columns:1fr;gap:10px}
  .input-grid>.card{min-height:0}
  .card{padding:15px;border-radius:17px}
  .card-heading{margin-bottom:12px}
  .pantry{margin:10px 0}
  .action-bar{position:fixed;z-index:3;inset:auto 0 0;margin:0;border-top:1px solid #dfe5d7;background:#faf8f1f5;padding:8px 14px calc(8px + env(safe-area-inset-bottom));backdrop-filter:blur(10px)}
  .action-inner{max-width:560px;margin:auto;background:none;border:0;padding:0;gap:8px}
  #inventory-count{font-size:.72rem;line-height:1.35}
  .search-button{min-width:0;width:66%;min-height:49px}
  .site-footer{padding-bottom:10px}
  dialog{margin:auto auto 0;width:100%;max-width:none;max-height:calc(100dvh - 22px - env(safe-area-inset-top));border-radius:22px 22px 0 0}
  .sheet{padding:18px 17px calc(20px + env(safe-area-inset-bottom))}
}
@media(max-width:345px){
  .brand{font-size:.84rem}.quiet{font-size:.65rem}
  .photo-actions .button{padding-inline:5px;gap:4px}
}

.near-heading{grid-column:1/-1;margin:10px 0 0;font-size:.95rem;font-weight:800;color:var(--green)}
.photo-fallback{display:flex;flex-wrap:wrap;gap:4px 18px;margin:6px 0 2px}
.search-only{font-size:.66rem;font-weight:700;color:var(--muted);border:1px solid #d9d9cc;border-radius:999px;padding:0 6px;background:#fffefb}
