:root{--bg:#faf6f1;--card:#fff;--ink:#2b2420;--muted:#7a6e66;--accent:#d9480f;--line:#eadfd5;--radius:14px}
@media (prefers-color-scheme:dark){:root{--bg:#1b1715;--card:#26201d;--ink:#f3ebe4;--muted:#a89b92;--line:#3a312c;--accent:#ff8a4c}}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:18px/1.55 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
a{color:inherit}
.top{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;padding:.7rem 1rem;background:var(--bg);border-bottom:1px solid var(--line)}
.brand{font-weight:800;font-size:1.3rem;text-decoration:none}
main{max-width:1000px;margin:0 auto;padding:1rem}
.btn{display:inline-block;border:1px solid var(--line);background:var(--card);color:var(--ink);padding:.6rem 1rem;border-radius:999px;font:inherit;font-size:.95rem;cursor:pointer;text-decoration:none;min-height:44px}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.btn.danger{color:#c92a2a}
.btn[aria-pressed=true]{background:var(--accent);color:#fff;border-color:var(--accent)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:1rem}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;text-decoration:none;display:flex;flex-direction:column;transition:transform .15s}
.card:hover{transform:translateY(-3px)}
.card .img{aspect-ratio:4/3;background:var(--line) center/cover;display:grid;place-items:center;font-size:3rem}
.card .body{padding:.8rem 1rem}
.card h3{margin:0 0 .25rem;font-size:1.1rem;line-height:1.3}
.meta{color:var(--muted);font-size:.9rem}
.search{width:100%;margin-bottom:1rem}
input,textarea{width:100%;padding:.7rem .9rem;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);font:inherit}
label{display:block;font-weight:600;margin:1rem 0 .3rem}
.row{display:flex;gap:.6rem;flex-wrap:wrap}.row>input{flex:1;min-width:200px;width:auto}
.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1rem 1.2rem;margin-bottom:1rem}
.err{color:#c92a2a;margin:.6rem 0}
.empty{text-align:center;color:var(--muted);padding:3rem 1rem}
/* recipe */
.hero{width:100%;max-height:340px;object-fit:cover;border-radius:var(--radius)}
h1{font-size:1.9rem;line-height:1.2;margin:.8rem 0 .3rem}
.toolbar{display:flex;gap:.5rem;flex-wrap:wrap;margin:.8rem 0}
.facts{display:flex;gap:1.5rem;flex-wrap:wrap;margin:.8rem 0}
.facts b{display:block;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.cols{display:grid;gap:1rem;grid-template-columns:1fr}
@media(min-width:800px){.cols{grid-template-columns:340px 1fr;align-items:start}.cols .ing{position:sticky;top:70px}}
h2{margin:0 0 .6rem;font-size:1.25rem}
h4{margin:1rem 0 .3rem;color:var(--accent)}
.ing ul{list-style:none;margin:0;padding:0}
.ing li{padding:.5rem 0;border-bottom:1px solid var(--line)}
.ing label,.steps label{display:flex;gap:.7rem;align-items:flex-start;margin:0;font-weight:400;cursor:pointer}
.ing input[type=checkbox]{width:1.35rem;height:1.35rem;flex:none;margin-top:.2rem;accent-color:var(--accent)}
.ing input:checked+span,.steps li.done p{text-decoration:line-through;color:var(--muted)}
ol.steps{list-style:none;counter-reset:s;margin:0;padding:0}
.steps li{counter-increment:s;display:flex;gap:.9rem;padding:.8rem 0;border-bottom:1px solid var(--line);cursor:pointer}
.steps li:focus-visible{outline:2px solid var(--accent);border-radius:6px;outline-offset:2px}
.steps li::before{content:counter(s);flex:none;width:2rem;height:2rem;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:700;font-size:.95rem}
.steps li.done::before{opacity:.4}
.steps p{margin:0;font-size:1.1rem;line-height:1.6}
.steps .sec{display:block;list-style:none;padding:.8rem 0 0;border:0;cursor:default}.steps .sec::before{display:none}
.src{color:var(--muted);font-size:.9rem;margin-top:1rem}

.nav{display:flex;gap:.5rem}
.filters select{padding:.6rem;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);font:inherit}
.filters .search{flex:1;min-width:180px;width:auto;margin:0}
.chips{display:flex;gap:.4rem;flex-wrap:wrap;margin:.6rem 0 1rem}
.chip{border:1px solid var(--line);background:var(--card);color:var(--ink);padding:.4rem .9rem;border-radius:999px;font:inherit;font-size:.9rem;cursor:pointer;min-height:40px}
.chip[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#fff}
.badge{display:inline-block;background:var(--accent);color:#fff;border-radius:999px;padding:0 .5rem;font-size:.8rem;font-weight:700;margin-right:.3rem}
.catlist{list-style:none;padding:0;margin:1rem 0 0}
.catlist li{display:flex;gap:.5rem;margin-bottom:.6rem;flex-wrap:wrap}
.catlist input{flex:1;min-width:150px;width:auto}
[hidden]{display:none!important}

dialog.review{max-width:min(700px,94vw);max-height:90vh;border:1px solid var(--line);border-radius:var(--radius);background:var(--card);color:var(--ink);padding:1rem 1.2rem}
dialog.review::backdrop{background:rgba(0,0,0,.55)}
.reviewbody{max-height:55vh;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:.5rem 1rem;font-size:.95rem}
.reviewbody li{margin:.2rem 0}

.rate{margin:.6rem 0;max-width:560px}
.ratehead{display:flex;align-items:baseline;gap:.5rem;font-size:.95rem}
.rateval{color:var(--accent);font-weight:700}
.linkbtn{margin-left:auto;background:none;border:0;color:var(--muted);font:inherit;font-size:.85rem;text-decoration:underline;cursor:pointer;padding:.2rem}
.rating{display:flex;gap:3px;margin:.35rem 0;padding:3px;background:var(--card);border:1px solid var(--line);border-radius:12px}
.rb{flex:1;min-width:0;height:2.1rem;border:0;border-radius:9px;background:transparent;color:var(--muted);font:inherit;font-size:.85rem;font-weight:600;cursor:pointer;padding:0}
.rb:hover{background:var(--line)}
.rb[aria-checked=true]{background:var(--accent);color:#fff}
.rate .chips{margin:.3rem 0 0;gap:.3rem}
.rate .chip{padding:.15rem .7rem;min-height:30px;font-size:.85rem}

.seg{display:flex;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.seg button{background:var(--card);color:var(--ink);border:0;padding:.5rem .9rem;font-size:1.1rem;cursor:pointer;min-height:44px}
.seg button[aria-pressed=true]{background:var(--accent);color:#fff}
.tablewrap{overflow-x:auto;background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}
.rtable{width:100%;border-collapse:collapse;font-size:.95rem}
.rtable th,.rtable td{text-align:left;padding:.6rem .9rem;border-bottom:1px solid var(--line);vertical-align:middle}
.rtable tbody tr:last-child td{border-bottom:0}
.rtable tbody tr{cursor:pointer}.rtable tbody tr:hover,.rtable tbody tr:focus{background:var(--bg);outline:0}
.thbtn{background:none;border:0;color:var(--muted);font:inherit;font-weight:700;font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;cursor:pointer;padding:0}
.rtable th:not(:has(.thbtn)){color:var(--muted);font-size:.8rem;text-transform:uppercase;letter-spacing:.05em}
.t-title a{font-weight:600;text-decoration:none}.t-title a:hover{text-decoration:underline}
.tag{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:0 .6rem;margin:0 .25rem .15rem 0;font-size:.8rem}
@media(max-width:640px){.hide-sm{display:none}}

/* Servings Scaler */
.servings-fact{display:flex;flex-direction:column}
.servings-ctrl{display:inline-flex;align-items:center;background:var(--card);border:1px solid var(--line);border-radius:999px;padding:2px 4px;margin-top:.2rem}
.btn-step{border:0;background:transparent;color:var(--ink);font-weight:700;font-size:1.1rem;width:1.7rem;height:1.7rem;border-radius:50%;cursor:pointer;display:grid;place-items:center;padding:0}
.btn-step:hover{background:var(--line)}
.serv-val{font-weight:700;padding:0 .5rem;min-width:1.5rem;text-align:center}

/* Timers in Instructions */
.timer-badge{display:inline-flex;align-items:center;gap:4px;background:var(--card);border:1px solid var(--accent);color:var(--accent);font:inherit;font-size:.9rem;font-weight:600;padding:.15rem .55rem;border-radius:999px;cursor:pointer;margin:0 2px;vertical-align:baseline;transition:background .15s, color .15s, transform .1s}
.timer-badge:hover{background:var(--accent);color:#fff}
.timer-badge.is-running{background:var(--accent);color:#fff;border-color:var(--accent);font-variant-numeric:tabular-nums;cursor:pointer;box-shadow:0 0 0 2px rgba(217, 72, 15, 0.25)}
.timer-badge.is-running:hover{opacity:.92}
.timer-badge.is-done{background:#2f9e44;border-color:#2f9e44;color:#fff;box-shadow:0 0 0 2px rgba(47, 158, 68, 0.3);animation:timerDonePulse 1.5s infinite ease-in-out}
.timer-badge.is-done:hover{background:#2b8a3e}
.t-badge-x{display:inline-flex;align-items:center;justify-content:center;margin-left:2px;font-size:.78em;opacity:.85;border-radius:50%;width:1.2em;height:1.2em;line-height:1}
.timer-badge:hover .t-badge-x{opacity:1;background:rgba(255,255,255,0.25)}
@keyframes timerDonePulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}

/* Global Floating Timer Bar */
.timer-bar{position:fixed;bottom:1.2rem;right:1.2rem;z-index:999;display:flex;flex-direction:column;gap:.5rem;max-width:calc(100vw - 2.4rem);pointer-events:none}
.t-pill{pointer-events:auto;background:var(--card);color:var(--ink);border:1px solid var(--line);box-shadow:0 6px 20px rgba(0,0,0,0.12);border-radius:999px;padding:.5rem 1rem;display:flex;align-items:center;gap:.75rem;font-size:.95rem;animation:popIn .25s cubic-bezier(0.16, 1, 0.3, 1)}
.t-pill.done{border-color:#2f9e44;color:#2f9e44;box-shadow:0 0 10px rgba(47,158,68,0.25)}
.t-num{font-variant-numeric:tabular-nums;font-weight:700;display:inline-block;min-width:3.2ch}
.t-close{background:transparent;border:0;color:var(--muted);font-weight:700;cursor:pointer;padding:0 .2rem;font-size:1rem;border-radius:50%;width:1.5rem;height:1.5rem;display:grid;place-items:center}
.t-close:hover{color:var(--ink);background:var(--line)}

/* Notes Section */
.notes-bottom{margin-top:1.2rem;border-left:4px solid var(--accent)}
.notes-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.6rem;font-size:1rem}
.notes-status{font-size:.85rem;color:var(--muted);font-weight:normal;transition:color .2s}
.notes-bottom textarea{width:100%;resize:vertical;font-family:inherit;font-size:.95rem;line-height:1.5;min-height:90px}

/* Edit Modal */
.edit-modal{max-width:min(800px,94vw)}
.editbody{max-height:70vh}
.editbody label{margin:.7rem 0 .2rem}
.editbody textarea{font-family:inherit;font-size:.95rem}

@keyframes popIn{from{opacity:0;transform:translateY(8px) scale(0.96)}to{opacity:1;transform:translateY(0) scale(1)}}


/* Disabled button styling */
.btn:disabled, .btn-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =========================================
   Cooking Mode (Matlagningsläge)
   ========================================= */
body.in-cooking-mode {
  overflow: hidden !important;
}

.cooking-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  color: var(--ink);
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  animation: popIn .2s ease-out;
}

.cook-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
  padding: .5rem 1rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  max-width: 100vw;
  box-sizing: border-box;
}

.cook-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  width: 100%;
}

.cook-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
  overflow: hidden;
}

.cook-heading {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cook-wake-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
}

.cook-wake-badge.wake-on {
  background: #ebfbee;
  color: #2b8a3e;
  border: 1px solid #b2f2bb;
}

@media (prefers-color-scheme: dark) {
  .cook-wake-badge.wake-on {
    background: #193822;
    color: #69db7c;
    border-color: #2b8a3e;
  }
}

.cook-wake-badge.wake-off {
  background: var(--line);
  color: var(--muted);
  border: 1px solid var(--line);
}

.cook-actions-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: none;
}

.cook-controls-desktop {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cook-actions-mobile {
  display: none;
  align-items: center;
  gap: .4rem;
}

.cook-ctrl-group {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 999px;
}

.cook-ctrl-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: 2px;
}

.cook-exit-btn {
  padding: .4rem .75rem;
  min-height: 38px;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}

.cook-tab-toggle {
  padding: .35rem .7rem;
  min-height: 36px;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}

.cook-opts-btn {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.1rem;
  border: 1px solid var(--line);
  background: var(--card);
}

/* Mobile options tray */
.cook-options-tray {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .5rem 0 .2rem;
  border-top: 1px solid var(--line);
  margin-top: .4rem;
  animation: popIn .15s ease-out;
}

.cook-progress-container {
  margin-top: .4rem;
}

.cook-progress-track {
  height: 5px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.cook-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width .3s ease;
  border-radius: 999px;
}

.cook-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--muted);
  margin-top: .2rem;
}

@media (max-width: 850px) {
  .cook-bar {
    padding: .4rem .65rem;
  }
  .cook-heading {
    font-size: 1.05rem;
  }
  .cook-controls-desktop {
    display: none !important;
  }
  .cook-actions-mobile {
    display: flex !important;
  }
  .hide-sm {
    display: none !important;
  }
}

.cook-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1.5rem;
  max-width: 1250px;
  width: 100%;
  margin: 0 auto;
  padding: 1.2rem;
  align-items: start;
  flex: 1;
  box-sizing: border-box;
}

@media (max-width: 850px) {
  .cook-layout {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: .6rem;
    overflow-x: hidden;
  }
  .cook-ingredients-panel.cook-hidden-mobile,
  .cook-steps-panel.cook-hidden-mobile {
    display: none !important;
  }
}

.cook-ingredients-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.cook-ingredients-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .8rem;
}

.cook-ingredients-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.cook-ing-list {
  list-style: none;
  padding: 0;
  margin: 0 0 .8rem;
}

.cook-ing-list li {
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
}

.cook-ing-label {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin: 0;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1.45;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background .25s ease;
}

.cook-ing-label.just-checked {
  background: rgba(47, 158, 68, 0.22);
}

.cook-ing-chk {
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
  margin-top: .15rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.cook-ing-chk:checked + span {
  text-decoration: line-through;
  color: var(--muted);
}

.cook-steps-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.cook-step-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  transition: all .2s ease;
  position: relative;
  display: flex;
  gap: 1.1rem;
  cursor: pointer;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.cook-step-card:hover {
  border-color: var(--muted);
}

.cook-step-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(217, 72, 15, 0.16);
  background: linear-gradient(to right, rgba(217, 72, 15, 0.04), transparent);
}

.cook-step-card.is-done {
  opacity: .75;
  border-color: #2f9e44;
}

/* Folded / Collapsed Completed Step */
.cook-step-card.is-folded {
  padding: .55rem .85rem;
  margin-bottom: .45rem;
  align-items: center;
  gap: .7rem;
  opacity: .85;
  cursor: pointer;
  background: var(--card);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.cook-step-card.is-folded:hover {
  opacity: 1;
  border-color: #2f9e44;
}

.cook-step-card.is-folded .cook-step-num {
  width: 1.9rem;
  height: 1.9rem;
  font-size: .95rem;
  margin-top: 0;
  flex: none;
}

.cook-step-folded-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  overflow: hidden;
}

.cook-step-folded-info {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.cook-step-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  flex: none;
}

.cook-step-preview {
  font-size: .95rem;
  color: var(--muted);
  text-decoration: line-through;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cook-step-folded-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: none;
}

.cook-unfold-btn {
  font-size: 1rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink);
  transition: all .15s;
}

.cook-unfold-btn:hover {
  background: var(--line);
  color: var(--accent);
}


.cook-step-num {
  flex: none;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  margin-top: .2rem;
  transition: all .2s ease;
}

.cook-step-card.is-active .cook-step-num {
  background: var(--accent);
  color: #fff;
  transform: scale(1.06);
}

.cook-step-card.is-done .cook-step-num {
  background: #2f9e44;
  color: #fff;
}

.cook-step-body {
  flex: 1;
}

.cook-step-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .3rem;
  flex-wrap: wrap;
}

.cook-step-section-hdr {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 0 0 .4rem;
  font-weight: 700;
}

.cook-step-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cook-active-tag {
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
}

.cook-done-tag {
  background: #2f9e44;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}

.cook-step-text {
  font-size: 1.35rem;
  line-height: 1.65;
  margin: .4rem 0 .9rem;
  color: var(--ink);
}

[data-cook-font="large"] .cook-step-text {
  font-size: 1.55rem;
  line-height: 1.7;
}

[data-cook-font="xlarge"] .cook-step-text {
  font-size: 1.8rem;
  line-height: 1.75;
}

.cook-step-card.is-done .cook-step-text {
  text-decoration: line-through;
  color: var(--muted);
}

.cook-step-footer {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
}

.cook-kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: .75rem;
  font-family: inherit;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  .cook-kbd {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 850px) {
  .cook-kbd {
    display: none !important;
  }
}

.cooking-overlay .timer-badge {
  font-size: 1.05rem;
  padding: .35rem .75rem;
  border-width: 2px;
  margin: 2px 4px;
}

.cook-celebration {
  background: var(--card);
  border: 2px solid #2f9e44;
  border-radius: var(--radius);
  padding: 1.8rem;
  text-align: center;
  margin-top: .5rem;
  margin-bottom: 2rem;
  animation: popIn .3s ease;
}

.cook-celebration h3 {
  color: #2f9e44;
  font-size: 1.7rem;
  margin: 0 0 .5rem;
}

.cook-celebration p {
  color: var(--muted);
  margin: 0 0 1rem;
}


/* Timer Alert Modal Window */
.timer-alert-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  animation: fadeIn .18s ease-out;
}

.timer-alert-card {
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  animation: popIn .25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.timer-alert-icon {
  font-size: 3.4rem;
  line-height: 1;
  margin-bottom: .8rem;
  display: inline-block;
  animation: ringBell .6s ease-in-out infinite alternate;
}

.timer-alert-title {
  margin: 0 0 .4rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.timer-alert-label {
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 1.5rem;
  line-height: 1.35;
}

.timer-alert-actions {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.timer-alert-dismiss-btn {
  width: 100%;
  font-size: 1.15rem;
  font-weight: 700;
  padding: .8rem 1.4rem;
  min-height: 52px;
  box-shadow: 0 4px 14px rgba(217, 72, 15, 0.28);
}

.timer-alert-footer {
  margin-top: 1.2rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: var(--muted);
}

.timer-alert-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  margin: 0;
  font-weight: normal;
  user-select: none;
}

.timer-alert-toggle-label input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  margin: 0;
  cursor: pointer;
}

@keyframes ringBell {
  0% { transform: rotate(-14deg) scale(1); }
  50% { transform: rotate(14deg) scale(1.15); }
  100% { transform: rotate(-14deg) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
