:root{
  --bg:#EEEEEE;
  --surface:#FFFFFF;
  --mint:#6FCF97;
  --green:#2FA084;
  --teal:#1F6F5F;
  --ink:#1c2a26;
  --ink-soft:#5b6b66;
  --line: rgba(31,111,95,0.14);
  --tape: rgba(111,207,151,0.55);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20,40,35,0.04), 0 8px 24px -12px rgba(20,40,35,0.18);
}
*{box-sizing:border-box;}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:'Karla', sans-serif;
  -webkit-font-smoothing:antialiased;
}
.display{ font-family:'Fraunces', serif; }
a{ color:inherit; }
button{ font-family:inherit; }

/* ---------- header ---------- */
header{
  position:sticky; top:0; z-index:20;
  background:rgba(238,238,238,0.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:1180px; margin:0 auto;
  display:flex; align-items:center; gap:24px;
  padding:14px 28px;
}
.logo-mark{ height:52px; display:block; }
.logo-link{ display:flex; align-items:center; text-decoration:none; }
.search{
  flex:1; max-width:460px;
  display:flex; align-items:center; gap:10px;
  background:var(--surface); border:1px solid var(--line);
  border-radius:100px; padding:10px 18px;
  color:var(--ink-soft); font-size:14.5px;
}
.search svg{ flex:none; opacity:.6; }
.search input{
  border:none; background:transparent; outline:none; flex:1;
  font-family:'Karla',sans-serif; font-size:14.5px; color:var(--ink);
}
.search input::placeholder{ color:var(--ink-soft); }
.header-actions{ margin-left:auto; display:flex; align-items:center; gap:6px; }
.icon-btn{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:var(--teal); background:transparent; border:none; cursor:pointer;
  transition: background .15s ease;
}
.icon-btn:hover{ background:rgba(47,160,132,0.10); }
.icon-btn.active-badge{ position:relative; }
.icon-btn .dot-badge{
  position:absolute; top:6px; right:6px; width:7px; height:7px; border-radius:50%;
  background:#e8556b;
}
.avatar{
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg,var(--mint),var(--green));
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces',serif; font-weight:600; font-size:14px;
  margin-left:6px; border:none; cursor:pointer;
}
.back-link{
  display:flex; align-items:center; gap:6px;
  font-size:13.5px; font-weight:600; color:var(--teal); text-decoration:none;
  padding:8px 14px; border-radius:100px; border:1px solid var(--line); background:var(--surface);
  cursor:pointer;
}
.back-link:hover{ border-color:var(--green); }

/* ---------- filter bar ---------- */
.filters{
  max-width:1180px; margin:0 auto;
  padding:12px 28px 16px;
  display:flex; gap:10px; overflow-x:auto;
}
.chip{
  flex:none;
  display:flex; align-items:center; gap:6px;
  padding:8px 16px; border-radius:100px;
  border:1px solid var(--line); background:var(--surface);
  font-size:13.5px; font-weight:600; color:var(--teal);
  cursor:pointer; white-space:nowrap;
  transition: all .15s ease;
}
.chip:hover{ border-color:var(--green); }
.chip.active{ background:var(--teal); border-color:var(--teal); color:#fff; }
.chip svg{ width:13px; height:13px; opacity:.7; }
.chip select{
  border:none; background:transparent; font:inherit; color:inherit; cursor:pointer; outline:none;
}
.chip.active select{ color:#fff; }
.chip.active select option{ color:var(--ink); }

/* ---------- greeting / hero strip ---------- */
.greeting{
  max-width:1180px; margin:0 auto;
  padding:34px 28px 6px;
  display:flex; align-items:flex-end; justify-content:space-between; gap:20px;
}
.greeting h1{
  font-family:'Fraunces', serif; font-weight:600; font-style:italic;
  font-size:clamp(26px,3.4vw,36px); margin:0; color:var(--teal); line-height:1.15;
}
.greeting p{ margin:6px 0 0; color:var(--ink-soft); font-size:14.5px; }
.stat-pill{
  flex:none;
  background:var(--surface); border:1px solid var(--line);
  border-radius:14px; padding:10px 18px;
  text-align:center; box-shadow:var(--shadow);
}
.stat-pill b{ display:block; font-family:'Fraunces',serif; font-size:20px; color:var(--green); }
.stat-pill span{ font-size:11.5px; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.04em; }

/* ---------- sections ---------- */
section.row{ max-width:1180px; margin:0 auto; padding:30px 28px 6px; }
.row-head{
  display:flex; align-items:baseline; justify-content:space-between; margin-bottom:16px;
}
.row-head h2{
  font-family:'Fraunces', serif; font-weight:600; font-size:21px; margin:0; color:var(--ink);
  display:flex; align-items:center; gap:9px;
}
.row-head .eyebrow{
  display:block; font-family:'Karla',sans-serif; font-weight:700; font-size:11px;
  letter-spacing:.10em; text-transform:uppercase; color:var(--green); margin-bottom:3px;
}
.row-link{
  font-size:13.5px; font-weight:600; color:var(--teal); text-decoration:none;
  border-bottom:1.5px solid var(--mint); padding-bottom:1px; white-space:nowrap;
  background:none; border-left:none; border-top:none; border-right:none; cursor:pointer;
}
.refresh-btn{
  display:inline-flex; align-items:center; gap:6px;
  font-size:13.5px; font-weight:600; color:var(--teal);
  background:none; border:none; cursor:pointer; padding:0;
}
.refresh-btn svg{ transition: transform .4s ease; }
.refresh-btn:hover svg{ transform: rotate(140deg); }

.card-track{
  display:grid; grid-auto-flow:column; grid-auto-columns:236px;
  gap:18px; overflow-x:auto; padding-bottom:10px; scroll-snap-type:x proximity;
}
.card-track::-webkit-scrollbar{ height:6px; }
.card-track::-webkit-scrollbar-thumb{ background:var(--line); border-radius:10px; }

.card-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:18px;
}

/* ---------- recipe card ---------- */
.card{
  scroll-snap-align:start;
  background:var(--surface); border-radius:var(--radius);
  box-shadow:var(--shadow); overflow:hidden; position:relative;
  transition: transform .18s ease, box-shadow .18s ease;
  cursor:pointer;
}
.card:hover{ transform:translateY(-3px); box-shadow:0 14px 30px -14px rgba(20,40,35,0.30); }

.photo{
  position:relative; height:150px;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.photo svg{ width:34px; height:34px; opacity:.55; }
.photo img{ width:100%; height:100%; object-fit:cover; }

.tape{
  position:absolute; top:-9px; left:18px;
  width:64px; height:22px;
  background: var(--tape);
  border:1px solid rgba(255,255,255,0.5);
  transform:rotate(-7deg);
  box-shadow:0 2px 4px rgba(20,40,35,0.12);
}

.heart-btn{
  position:absolute; top:10px; right:10px;
  width:32px; height:32px; border-radius:50%;
  background:rgba(255,255,255,0.88); border:none;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; color:var(--teal);
  transition: transform .15s ease;
}
.heart-btn:hover{ transform:scale(1.08); }
.heart-btn.on{ color:#e8556b; }
.heart-btn svg{ width:16px; height:16px; }

.badge{
  position:absolute; bottom:10px; left:10px;
  background:rgba(28,42,38,0.72); color:#fff;
  font-size:10.5px; font-weight:700; letter-spacing:.03em;
  padding:4px 9px; border-radius:100px; text-transform:uppercase;
}

.card-body{ padding:13px 15px 15px; }
.card-body h3{
  font-family:'Fraunces', serif; font-weight:600; font-size:16px;
  margin:0 0 7px; color:var(--ink); line-height:1.25;
}
.meta-row{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-size:11.5px; color:var(--ink-soft); margin-bottom:8px;
}
.meta-row .dot{ opacity:.5; }
.tag{
  font-size:10.5px; font-weight:700; color:var(--green);
  background:rgba(47,160,132,0.10); padding:3px 8px; border-radius:100px;
}
.stars{ display:flex; gap:2px; }
.stars svg{ width:13px; height:13px; }
.star-on{ fill:var(--green); stroke:var(--green); }
.star-off{ fill:none; stroke:var(--line); }
.card-footer{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:9px; margin-top:9px; border-top:1px solid var(--line);
}
.time-chip{
  display:flex; align-items:center; gap:5px;
  font-size:11.5px; color:var(--ink-soft); font-weight:600;
}
.time-chip svg{ width:12px; height:12px; opacity:.7; }

.placeholder-note{
  text-align:center; font-size:12px; color:var(--ink-soft);
  margin:6px 0 0; font-style:italic;
}
.empty-note{
  text-align:center; font-size:13.5px; color:var(--ink-soft);
  padding:30px 0;
}

footer{
  max-width:1180px; margin:44px auto 0; padding:20px 28px 40px;
  display:flex; align-items:center; justify-content:space-between;
  border-top:1px solid var(--line); color:var(--ink-soft); font-size:12px;
}
footer .ver{ font-family:'Fraunces',serif; font-style:italic; color:var(--teal); }
.ai-btn.active{ background:var(--teal); color:#fff; }

/* ---------- AI chat panel ---------- */
.ai-overlay{
  position:fixed; inset:0; background:rgba(20,30,27,0.28);
  opacity:0; pointer-events:none; transition:opacity .25s ease; z-index:49;
}
.ai-overlay.open{ opacity:1; pointer-events:auto; }

.ai-panel{
  position:fixed; top:0; right:0; height:100%; width:380px; max-width:92vw;
  background:var(--surface); z-index:50;
  box-shadow:-16px 0 40px -18px rgba(20,40,35,0.35);
  display:flex; flex-direction:column;
  transform:translateX(100%); transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.ai-panel.open{ transform:translateX(0); }

.ai-head{
  display:flex; align-items:center; gap:11px;
  padding:20px 20px 16px; border-bottom:1px solid var(--line);
  background:linear-gradient(135deg, rgba(111,207,151,0.14), rgba(47,160,132,0.05));
}
.ai-head .ai-icon{
  width:38px; height:38px; border-radius:50%; flex:none;
  background:linear-gradient(135deg,var(--mint),var(--teal));
  display:flex; align-items:center; justify-content:center; color:#fff;
}
.ai-head h3{ font-family:'Fraunces',serif; font-weight:600; font-size:16px; margin:0; color:var(--teal); }
.ai-head p{ margin:2px 0 0; font-size:12px; color:var(--ink-soft); }
.ai-close{
  margin-left:auto; width:30px; height:30px; border-radius:50%;
  border:none; background:transparent; color:var(--ink-soft); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.ai-close:hover{ background:rgba(31,111,95,0.08); }

.ai-body{ flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; gap:14px; }
.msg{ max-width:88%; font-size:13.5px; line-height:1.5; white-space:pre-wrap; }
.msg.bot{
  align-self:flex-start; background:var(--bg); border-radius:14px 14px 14px 4px;
  padding:11px 14px; color:var(--ink);
}
.msg.user{
  align-self:flex-end; background:var(--teal); color:#fff;
  border-radius:14px 14px 4px 14px; padding:11px 14px;
}
.msg.typing{ display:flex; gap:4px; align-items:center; }
.msg.typing span{ width:6px; height:6px; border-radius:50%; background:var(--ink-soft); opacity:.5; animation:blink 1.2s infinite; }
.msg.typing span:nth-child(2){ animation-delay:.2s; }
.msg.typing span:nth-child(3){ animation-delay:.4s; }
@keyframes blink{ 0%,80%,100%{opacity:.3;} 40%{opacity:1;} }
.msg.bot .recipe-hit{
  display:flex; align-items:center; gap:10px; margin-top:10px; cursor:pointer;
  background:var(--surface); border:1px solid var(--line); border-radius:11px; padding:8px 10px;
}
.recipe-hit .thumb{
  width:36px; height:36px; border-radius:8px; flex:none;
  background:linear-gradient(135deg,#DCEFE6,#B9E0CC);
}
.recipe-hit .info b{ display:block; font-size:12.5px; font-weight:700; color:var(--ink); }
.recipe-hit .info span{ font-size:11px; color:var(--ink-soft); }

.ai-suggest{ display:flex; flex-wrap:wrap; gap:7px; padding:0 20px 14px; }
.ai-suggest button{
  font-size:12px; font-weight:600; color:var(--teal);
  background:rgba(47,160,132,0.09); border:1px solid transparent;
  border-radius:100px; padding:6px 12px; cursor:pointer;
}
.ai-suggest button:hover{ border-color:var(--green); }

.ai-input{ display:flex; align-items:center; gap:8px; padding:14px 16px; border-top:1px solid var(--line); }
.ai-input input{
  flex:1; border:1px solid var(--line); border-radius:100px;
  padding:10px 16px; font-size:13.5px; font-family:'Karla',sans-serif;
  background:var(--bg); color:var(--ink);
}
.ai-input input:focus{ outline:none; border-color:var(--green); }
.ai-send{
  width:38px; height:38px; border-radius:50%; flex:none; border:none;
  background:var(--green); color:#fff; display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.ai-send:hover{ background:var(--teal); }

@media (max-width:760px){
  .header-inner{ padding:12px 16px; gap:12px; }
  .search{ display:none; }
  .greeting{ flex-direction:column; align-items:flex-start; padding:24px 16px 4px; }
  section.row{ padding:22px 16px 4px; }
  footer{ padding:16px 16px 32px; flex-direction:column; gap:8px; align-items:flex-start; }
}

/* ================= RECEPTPAGINA ================= */
.browse{ max-width:1180px; margin:0 auto; padding:22px 28px 6px; }
.browse-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:12px; }
.browse-head h2{ font-family:'Fraunces',serif; font-weight:600; font-size:16.5px; margin:0; color:var(--ink); }
.browse-head span{ font-size:12px; color:var(--ink-soft); }
.browse-track{ display:grid; grid-auto-flow:column; grid-auto-columns:118px; gap:12px; overflow-x:auto; padding-bottom:8px; }
.browse-track::-webkit-scrollbar{ height:5px; }
.browse-track::-webkit-scrollbar-thumb{ background:var(--line); border-radius:10px; }
.mini-card{
  scroll-snap-align:start; cursor:pointer; border-radius:13px; overflow:hidden;
  background:var(--surface); box-shadow:var(--shadow); transition:transform .15s ease;
}
.mini-card:hover{ transform:translateY(-2px); }
.mini-card .thumb{ height:78px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.mini-card .thumb svg{ width:20px; height:20px; opacity:.5; }
.mini-card .thumb img{ width:100%; height:100%; object-fit:cover; }
.mini-card p{ margin:0; padding:8px 9px 10px; font-size:11.5px; font-weight:700; line-height:1.3; color:var(--ink); }
.mini-card.current{ outline:2px solid var(--green); outline-offset:2px; }

.recipe-wrap{
  max-width:1180px; margin:0 auto; padding:26px 28px 60px;
  display:grid; grid-template-columns:1.15fr 1fr; gap:44px; align-items:start;
}
.left-col{ min-width:0; }
.eyebrow-row{ display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.eyebrow{ font-family:'Karla',sans-serif; font-weight:700; font-size:11px; letter-spacing:.09em; text-transform:uppercase; color:var(--green); }
.dot-sep{ color:var(--line); }
h1.recipe-title{
  font-family:'Fraunces',serif; font-weight:600; font-size:clamp(28px,3.2vw,38px);
  line-height:1.1; margin:0 0 14px; color:var(--ink);
}

.top-actions{ display:flex; align-items:center; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
.stars-row{ display:flex; gap:3px; }
.stars-row svg{ width:19px; height:19px; cursor:pointer; }
.heart-toggle{
  display:flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--teal);
  background:none; border:none; cursor:pointer; padding:0;
}
.heart-toggle svg{ width:18px; height:18px; }
.heart-toggle.on{ color:#e8556b; }
.print-link{
  display:flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--ink-soft);
  background:none; border:none; cursor:pointer; margin-left:auto; padding:0;
}
.print-link svg{ width:16px; height:16px; }

.meta-strip{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:24px; }
.meta-chip{
  display:flex; align-items:center; gap:6px;
  font-size:12px; font-weight:600; color:var(--ink-soft);
  background:var(--surface); border:1px solid var(--line);
  padding:7px 12px; border-radius:100px;
}
.meta-chip svg{ width:13px; height:13px; opacity:.7; }
.meta-chip.diet{ color:var(--green); background:rgba(47,160,132,0.08); border-color:transparent; }

.servings-box{
  display:flex; align-items:center; justify-content:space-between;
  background:var(--surface); border:1px solid var(--line); border-radius:14px;
  padding:14px 18px; margin-bottom:26px;
}
.servings-box .label{ font-size:13px; font-weight:700; color:var(--ink); }
.servings-box .label small{ display:block; font-weight:500; color:var(--ink-soft); font-size:11.5px; margin-top:2px; }
.stepper{ display:flex; align-items:center; gap:14px; }
.stepper button{
  width:32px; height:32px; border-radius:50%; border:1px solid var(--line);
  background:var(--bg); color:var(--teal); font-size:17px; font-weight:700; cursor:pointer;
  display:flex; align-items:center; justify-content:center; line-height:1;
}
.stepper button:hover{ border-color:var(--green); color:var(--green); }
.stepper .count{ font-family:'Fraunces',serif; font-weight:600; font-size:19px; min-width:20px; text-align:center; }

.section-label{
  font-family:'Fraunces',serif; font-weight:600; font-size:17px; color:var(--ink);
  margin:0 0 12px; display:flex; align-items:center; gap:8px;
}

.ingredients{ list-style:none; margin:0 0 32px; padding:0; }
.ingredients li{
  display:flex; align-items:center; gap:11px;
  padding:9px 0; border-bottom:1px solid var(--line);
  font-size:14px;
}
.ingredients li .chk{
  width:17px; height:17px; border-radius:5px; border:1.5px solid var(--line); flex:none; cursor:pointer;
}
.ingredients li .chk.on{ background:var(--green); border-color:var(--green); }
.ingredients li .amt{ font-weight:700; color:var(--green); min-width:64px; font-variant-numeric:tabular-nums; }
.ingredients li .name{ color:var(--ink); }
.ingredients li.checked .name{ text-decoration:line-through; color:var(--ink-soft); }

.steps{ list-style:none; margin:0; padding:0; counter-reset:step; }
.steps li{ counter-increment:step; display:flex; gap:16px; padding:18px 0; border-bottom:1px solid var(--line); }
.steps li:last-child{ border-bottom:none; }
.steps li::before{
  content:counter(step);
  flex:none; width:34px; height:34px; border-radius:50%;
  background:var(--teal); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces',serif; font-weight:600; font-size:15px;
}
.steps li .step-text{ padding-top:4px; font-size:14.5px; line-height:1.6; color:var(--ink); }
.steps li .step-timer{
  display:inline-flex; align-items:center; gap:5px; margin-top:8px;
  font-size:12px; font-weight:700; color:var(--green);
  background:rgba(47,160,132,0.08); padding:4px 10px; border-radius:100px;
}
.steps li .step-timer svg{ width:12px; height:12px; }

.note-box{ margin-top:32px; background:var(--surface); border:1px dashed var(--line); border-radius:14px; padding:16px 18px; }
.note-box .section-label{ font-size:14.5px; margin-bottom:8px; }
.note-box textarea{
  width:100%; border:none; background:transparent; resize:vertical; min-height:56px;
  font-family:'Karla',sans-serif; font-size:13.5px; color:var(--ink); padding:0;
}
.note-box textarea:focus{ outline:none; }
.note-box textarea::placeholder{ color:var(--ink-soft); font-style:italic; }

.right-col{ position:sticky; top:88px; }
.photo-main{
  position:relative; border-radius:var(--radius); overflow:hidden;
  box-shadow:var(--shadow); cursor:zoom-in; margin-bottom:12px;
  background:linear-gradient(135deg,#DCEFE6,#B9E0CC);
  aspect-ratio:4/5; display:flex; align-items:center; justify-content:center;
}
.photo-main img{ width:100%; height:100%; object-fit:cover; }
.photo-main svg{ width:46px; height:46px; opacity:.4; }
.photo-main .tape{
  position:absolute; top:14px; left:28px; width:70px; height:24px;
  background:var(--tape); border:1px solid rgba(255,255,255,0.5);
  transform:rotate(-6deg); box-shadow:0 2px 4px rgba(20,40,35,0.12);
}
.zoom-hint{
  position:absolute; bottom:12px; right:12px;
  background:rgba(28,42,38,0.72); color:#fff; font-size:11px; font-weight:600;
  padding:5px 10px; border-radius:100px; display:flex; align-items:center; gap:5px;
}
.zoom-hint svg{ width:12px; height:12px; }

.photo-thumbs{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.photo-thumbs .thumb{
  aspect-ratio:1; border-radius:11px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow); transition:transform .15s ease; position:relative; overflow:hidden;
}
.photo-thumbs .thumb:hover{ transform:translateY(-2px); }
.photo-thumbs .thumb svg{ width:18px; height:18px; opacity:.4; }
.photo-thumbs .thumb img{ width:100%; height:100%; object-fit:cover; }
.photo-thumbs .thumb.active{ outline:2px solid var(--green); outline-offset:2px; }
.photo-caption{ text-align:center; font-size:11.5px; color:var(--ink-soft); font-style:italic; margin-top:10px; }

.lightbox{
  position:fixed; inset:0; background:rgba(15,24,21,0.92); z-index:60;
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .2s ease;
}
.lightbox.open{ opacity:1; pointer-events:auto; }
.lightbox-img{
  width:min(560px,84vw); aspect-ratio:4/5; border-radius:14px;
  background:linear-gradient(135deg,#DCEFE6,#B9E0CC);
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  box-shadow:0 30px 60px -20px rgba(0,0,0,0.5);
}
.lightbox-img img{ width:100%; height:100%; object-fit:cover; }
.lightbox-img svg{ width:64px; height:64px; opacity:.45; }
.lightbox-close{
  position:absolute; top:26px; right:32px;
  width:42px; height:42px; border-radius:50%; border:none;
  background:rgba(255,255,255,0.12); color:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.lightbox-close:hover{ background:rgba(255,255,255,0.22); }
.lightbox-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%; border:none;
  background:rgba(255,255,255,0.12); color:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.lightbox-nav:hover{ background:rgba(255,255,255,0.22); }
.lightbox-nav.prev{ left:26px; } .lightbox-nav.next{ right:26px; }

@media (max-width:880px){
  .recipe-wrap{ grid-template-columns:1fr; gap:30px; }
  .right-col{ position:static; order:-1; }
  .photo-main{ aspect-ratio:16/10; }
  .header-inner{ padding:10px 16px; gap:12px; }
  .logo-mark{ height:34px; }
  .back-link span.long{ display:none; }
  .browse{ padding:16px 16px 4px; }
  .recipe-wrap{ padding:20px 16px 44px; }
}

/* ================= LOGIN ================= */
.login-wrap{
  min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:24px; text-align:center; gap:26px;
}
.login-wrap .logo-mark{ height:64px; }
.login-card{
  background:var(--surface); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:32px 36px; max-width:360px; width:100%;
}
.login-card h1{ font-family:'Fraunces',serif; font-style:italic; font-weight:600; font-size:22px; color:var(--teal); margin:0 0 8px; }
.login-card p{ font-size:13.5px; color:var(--ink-soft); margin:0 0 22px; }
#googleBtnSlot{ display:flex; justify-content:center; margin-bottom:16px; }
.remember-row{ display:flex; align-items:center; gap:8px; justify-content:center; font-size:12.5px; color:var(--ink-soft); }
.login-error{ color:#c0394f; font-size:12.5px; margin-top:14px; }
.login-loading{ font-size:12.5px; color:var(--ink-soft); }

/* ================= MODALS (upload / settings / notities) ================= */
.modal-overlay{
  position:fixed; inset:0; background:rgba(20,30,27,0.4); z-index:70;
  display:flex; align-items:center; justify-content:center; padding:20px;
  opacity:0; pointer-events:none; transition:opacity .2s ease;
}
.modal-overlay.open{ opacity:1; pointer-events:auto; }
.modal-box{
  background:var(--surface); border-radius:var(--radius); box-shadow:var(--shadow);
  width:100%; max-width:620px; max-height:88vh; overflow-y:auto; padding:26px 28px;
}
.modal-box.wide{ max-width:820px; }
.modal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.modal-head h2{ font-family:'Fraunces',serif; font-weight:600; font-size:19px; margin:0; color:var(--ink); }
.modal-close{
  width:32px; height:32px; border-radius:50%; border:none; background:transparent;
  color:var(--ink-soft); cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.modal-close:hover{ background:rgba(31,111,95,0.08); }

.field{ margin-bottom:16px; }
.field label{ display:block; font-size:12px; font-weight:700; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.04em; margin-bottom:6px; }
.field input[type=text], .field input[type=number], .field select, .field textarea{
  width:100%; border:1px solid var(--line); border-radius:10px; padding:9px 12px;
  font-family:'Karla',sans-serif; font-size:14px; color:var(--ink); background:var(--bg);
}
.field textarea{ min-height:70px; resize:vertical; }
.field-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; }
.tag-input-list{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.tag-input-list .tag-item{
  display:flex; align-items:center; gap:5px; background:rgba(47,160,132,0.1); color:var(--green);
  font-size:12px; font-weight:700; padding:4px 8px 4px 10px; border-radius:100px;
}
.tag-item button{ border:none; background:none; color:var(--green); cursor:pointer; font-size:13px; line-height:1; }

.ingr-edit-row, .step-edit-row{ display:flex; gap:8px; margin-bottom:8px; align-items:flex-start; }
.ingr-edit-row input:nth-child(1){ width:70px; }
.ingr-edit-row input:nth-child(2){ width:90px; }
.ingr-edit-row input:nth-child(3){ flex:1; }
.step-edit-row textarea{ flex:1; min-height:44px; }
.step-edit-row input{ width:80px; }
.row-remove{
  border:none; background:none; color:var(--ink-soft); cursor:pointer; width:26px; height:26px; flex:none;
}
.row-remove:hover{ color:#c0394f; }
.add-row-btn{
  font-size:12.5px; font-weight:700; color:var(--teal); background:rgba(47,160,132,0.08);
  border:none; border-radius:100px; padding:6px 12px; cursor:pointer; margin-top:4px;
}

.upload-drop{
  border:2px dashed var(--line); border-radius:14px; padding:28px; text-align:center;
  color:var(--ink-soft); font-size:13.5px; cursor:pointer; margin-bottom:18px;
}
.upload-drop.drag{ border-color:var(--green); background:rgba(47,160,132,0.06); }
.upload-thumbs{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.upload-thumb{ position:relative; width:90px; height:90px; border-radius:10px; overflow:hidden; box-shadow:var(--shadow); }
.upload-thumb img{ width:100%; height:100%; object-fit:cover; }
.upload-thumb button{
  position:absolute; top:3px; right:3px; width:20px; height:20px; border-radius:50%; border:none;
  background:rgba(0,0,0,0.55); color:#fff; cursor:pointer; font-size:11px; line-height:1;
}
.btn-primary{
  background:var(--teal); color:#fff; border:none; border-radius:100px;
  padding:11px 22px; font-size:13.5px; font-weight:700; cursor:pointer;
}
.btn-primary:hover{ background:var(--green); }
.btn-primary:disabled{ opacity:.5; cursor:not-allowed; }
.btn-secondary{
  background:transparent; color:var(--teal); border:1px solid var(--line); border-radius:100px;
  padding:10px 20px; font-size:13.5px; font-weight:700; cursor:pointer;
}
.btn-secondary:hover{ border-color:var(--green); }
.btn-danger{
  background:transparent; color:#c0394f; border:1px solid rgba(192,57,79,0.3); border-radius:100px;
  padding:10px 20px; font-size:13.5px; font-weight:700; cursor:pointer;
}
.btn-danger:hover{ background:rgba(192,57,79,0.06); }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }

.settings-list{ list-style:none; padding:0; margin:0; }
.settings-list li{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0; border-bottom:1px solid var(--line); font-size:14px;
}
.settings-list li:last-child{ border-bottom:none; }
.settings-version{ font-size:11.5px; color:var(--ink-soft); margin-top:14px; text-align:center; }

.log-list{ list-style:none; margin:0; padding:0; font-size:12.5px; }
.log-list li{ padding:8px 0; border-bottom:1px solid var(--line); color:var(--ink-soft); }
.log-list li b{ color:var(--ink); }

@media print{
  header, .browse, footer, .ai-panel, .ai-overlay, .modal-overlay, .right-col, .top-actions .heart-toggle,
  .top-actions .print-link, .note-box, .servings-box small{ display:none !important; }
  body{ background:#fff; }
  .recipe-wrap{ grid-template-columns:1fr; padding:0; max-width:none; }
}

.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%);
  background:var(--teal); color:#fff; padding:12px 20px; border-radius:100px;
  font-size:13px; font-weight:600; box-shadow:var(--shadow); z-index:80;
  opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(-6px); }

/* ---------- debug log panel (geport van LexVidi) ---------- */
#mkLogPanel{
  display:none; position:fixed; right:16px; bottom:16px; width:420px; max-width:calc(100vw - 32px);
  height:360px; max-height:60vh; background:#1c2422; color:#e8ece9; border-radius:14px;
  box-shadow:0 20px 50px rgba(0,0,0,0.4); z-index:200; flex-direction:column; overflow:hidden;
  font-family:'Karla',sans-serif;
}
#mkLogPanel.open{ display:flex; }
.log-panel-head{
  background:#0f1614; padding:10px 14px; display:flex; align-items:center; justify-content:space-between;
  font-size:12.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; flex-shrink:0;
}
.log-panel-head button{ background:none; border:none; color:#e8ece9; cursor:pointer; font-size:16px; opacity:.7; padding:0; }
.log-panel-head button:hover{ opacity:1; }
.log-panel-filters{ display:flex; gap:4px; padding:8px; flex-wrap:wrap; flex-shrink:0; border-bottom:1px solid #33403c; }
.log-panel-filters button{
  background:#28332f; border:1px solid #3a4844; color:#e8ece9; border-radius:100px;
  padding:4px 10px; font-size:11.5px; cursor:pointer; font-family:'Karla',sans-serif;
}
.log-panel-filters button.active{ background:var(--green); border-color:var(--green); color:#fff; }
.log-panel-list{ flex:1; overflow-y:auto; padding:8px; font-family:'SF Mono',Menlo,monospace; font-size:11px; }
.log-entry{ padding:5px 2px; border-bottom:1px solid #2a3531; display:flex; gap:7px; align-items:baseline; }
.log-entry .log-ts{ color:#8a9691; flex-shrink:0; }
.log-entry .log-cat{ color:var(--mint); flex-shrink:0; font-weight:700; min-width:36px; }
.log-entry .log-text{ word-break:break-word; white-space:pre-wrap; }
.log-entry.log-warn .log-text{ color:#f0c85a; }
.log-entry.log-error .log-text{ color:#ff8a80; }
.log-panel-actions{ display:flex; gap:8px; padding:8px; border-top:1px solid #33403c; flex-shrink:0; }
.log-panel-actions button{
  background:#28332f; border:1px solid #3a4844; color:#e8ece9; border-radius:100px;
  padding:5px 14px; font-size:11.5px; cursor:pointer; font-family:'Karla',sans-serif;
}
.log-panel-actions button:hover{ border-color:var(--mint); }

@media (max-width:700px){
  /* Schermvullend i.p.v. in een hoek gepind: op mobiel Safari kan een vast
     'bottom:16px'-element onder de in-/uitklappende adresbalk verdwijnen,
     waardoor het paneel wel opent maar onzichtbaar/onbereikbaar is. */
  #mkLogPanel{
    top:0; right:0; bottom:0; left:0; width:auto; height:100%; max-height:none;
    border-radius:0; z-index:300;
  }
}
