html:has(.cook-dialog[open]) { overflow: hidden; }
.cook-dialog { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: var(--ink); background: var(--paper); }
.cook-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.cook-dialog::backdrop { background: var(--paper); }
.cook-width { width: min(100%, 850px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 42px); }
.cook-header { padding: max(12px, env(safe-area-inset-top)) 0 15px; background: #283b24; color: #fbfaf5; }
.cook-heading, .cook-brand, .cook-progress, .cook-nav, .cook-options, .cook-clock { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cook-heading { align-items: flex-start; }
.cook-brand { justify-content: flex-start; gap: 8px; font-weight: 800; letter-spacing: -.04em; }
.cook-brand .brand-icon { width: 30px; height: 30px; border-radius: 9px; }
.cook-brand > span:last-child { margin-left: 3px; padding-left: 10px; border-left: 1px solid #87997d; color: #e1e9da; font-size: .8rem; font-weight: 600; letter-spacing: normal; }
.cook-header h2 { margin: 12px 0 3px; font-size: clamp(1.15rem, 3.8vw, 2rem); overflow-wrap: anywhere; }
.cook-facts { color: #dbe4d4; font-size: .83rem; }
.cook-close { width: 44px; height: 44px; flex: none; background: #3f503a; color: white; border-color: #65765f; }
.cook-scroll { overflow-y: auto; overscroll-behavior: contain; }
.cook-body { padding-block: clamp(22px, 4.4vh, 44px); }
.cook-progress { margin-bottom: clamp(16px, 3vh, 30px); color: #536247; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .085em; }
.cook-progress progress { width: clamp(72px, 23vw, 170px); height: 6px; overflow: hidden; appearance: none; border: 0; border-radius: 6px; color: #56703e; background: #dde4d4; }
.cook-progress progress::-webkit-progress-bar { background: #dde4d4; }
.cook-progress progress::-webkit-progress-value { background: #56703e; }
.cook-progress progress::-moz-progress-bar { background: #56703e; }
.cook-instruction h3, .cook-finished h3 { margin-bottom: 12px; font-size: clamp(1.75rem, 5vw, 2.9rem); }
.cook-step { font-size: clamp(1.18rem, 2.4vw, 1.6rem); line-height: 1.55; overflow-wrap: anywhere; }
.cook-point { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 14px 16px; border-radius: 13px; background: #eaf0df; }
.cook-point svg { margin-top: 3px; color: #4e673a; }
.cook-point strong { display: block; color: #435736; font-size: .82rem; }
.cook-point p { margin-top: 3px; }
.cook-start { margin-top: 20px; white-space: normal; text-align: left; }
.cook-clocks { max-height: min(26vh, 180px); overflow: auto; margin-bottom: 8px; }
.cook-clocks h3 { font-size: 1rem; }
.cook-clock { justify-content: flex-start; flex-wrap: wrap; padding-block: 5px; border-bottom: 1px solid var(--line); }
.cook-clock strong { font-size: .9rem; }
.cook-clock time { font-size: 1.27rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cook-clock button { margin-left: auto; }
.cook-clock.is-due time { color: #8a370f; }
.cook-pantry { margin-top: 20px; border-block: 1px solid #cdd5c2; }
.cook-pantry summary { display: flex; align-items: center; gap: 9px; min-height: 52px; cursor: pointer; font-weight: 800; }
.cook-pantry summary::-webkit-details-marker { display: none; }
.cook-pantry summary svg:last-child { margin-left: auto; transform: rotate(90deg); }
.cook-pantry[open] summary svg:last-child { transform: rotate(-90deg); }
.cook-pantry .stepper button, .cook-dialog .plain-button { min-height: 44px; min-width: 44px; }
.cook-pantry .ingredient-list label { align-items: center; min-height: 44px; font-size: 1rem; }
.cook-pantry .ingredient-list input { align-self: center; margin: 0; }
.cook-pantry h4 { margin: 15px 0 0; font-size: .9rem; }
.cook-pantry .ingredient-list { margin: 4px 0 12px; }
.cook-options { margin-top: 10px; }
.cook-options p { max-width: 43ch; }
.cook-footer { padding: 10px 0 max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.cook-confirm strong { display: block; margin-bottom: 8px; }
.cook-confirm > div { display: flex; gap: 8px; flex-wrap: wrap; }
.cook-finished .brand-icon { margin-bottom: 14px; }
@media (max-height: 480px) {
  .cook-brand, .cook-facts { display: none; }
  .cook-header { padding-block: 5px; }
  .cook-header h2 { margin-block: 8px; }
  .cook-footer { padding-block: 5px; }
}
.cook-heading > div { flex: 1; min-width: 0; }
.cook-photo { margin: 0; align-self: center; flex: 0 0 clamp(62px, 12vw, 112px); }
.cook-photo img { width: 100%; height: clamp(46px, 8vw, 68px); object-fit: cover; border-radius: 10px; }
.cook-photo figcaption { margin-top: 2px; text-align: center; color: #e1e9da; font-size: .65rem; }
@media (max-width: 520px) {
  .cook-header .cook-heading { gap: 8px; }
  .cook-brand { flex-wrap: wrap; gap: 5px; }
  .cook-brand > span:last-child { margin: 0; padding-left: 6px; }
}
@media (max-width: 370px), (max-height: 480px) { .cook-photo { display: none; } }
@media (max-width: 520px) {
  .cook-options { flex-wrap: wrap; gap: 0 12px; }
  .cook-options p { flex: 1 1 160px; }
  .cook-photo figcaption { white-space: nowrap; }
}

.cook-timer-guide { margin-top: 18px; padding-left: 14px; border-left: 3px solid #9bb660; }
.cook-timer-guide strong { display: block; color: #435736; font-size: .82rem; }
.cook-timer-guide [data-running-cue] { margin-bottom: 8px; }
.cook-clock-check { flex-basis: 100%; font-size: .93rem; }
