:root {
  color-scheme: light;
  --green: #2b5b1c;
  --green-soft: #eaf0e3;
  --cream: #f8f7ef;
  --line: #aeb597;
  --ink: #24251f;
  font-family: "Segoe UI", Calibri, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #ece9dd; color: var(--ink); }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 28px; background: rgba(248,247,239,.97); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; box-shadow: 0 4px 18px rgba(37,48,25,.12);
}
h1,h2,p { margin-top: 0; }
h1 { margin-bottom: 4px; color: var(--green); font-size: clamp(1.45rem, 3vw, 2.25rem); }
.hint { margin-bottom: 0; color: #59604e; }
.today-info { margin: 6px 0 0; color: var(--green); font-weight: 800; }
.eyebrow { margin-bottom: 4px; color: var(--green); text-transform: uppercase; font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.controls { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
button {
  border: 1px solid #789064; border-radius: 10px; padding: 9px 13px; background: white; color: var(--green);
  font: inherit; font-weight: 750; cursor: pointer; box-shadow: 0 2px 6px rgba(43,91,28,.08);
}
button:hover { background: var(--green-soft); }
.controls button:not(.wide) { width: 42px; font-size: 1.25rem; }
#zoomValue { min-width: 62px; text-align: center; font-weight: 750; color: var(--green); }
.today-button { color: white; background: var(--green); border-color: var(--green); }
.today-button:hover { background: #397426; }
main { padding: 20px; }
.viewer {
  height: calc(100vh - 132px); min-height: 520px; overflow: hidden; position: relative;
  border: 2px solid var(--green); border-radius: 18px; background: #d7d1c0; cursor: grab;
  box-shadow: 0 14px 36px rgba(40,42,31,.18); touch-action: none;
}
.viewer.dragging { cursor: grabbing; }
.stage { position: absolute; transform-origin: 0 0; user-select: none; }
.stage > img { display: block; width: 100%; height: 100%; pointer-events: none; }
.hotspots { position: absolute; inset: 0; }
.hotspot {
  position: absolute; border: 2px solid transparent; border-radius: 7px; background: transparent;
  padding: 0; box-shadow: none; transition: background .15s, border-color .15s;
}
.hotspot:hover, .hotspot:focus-visible { border-color: #fff; background: rgba(43,91,28,.20); outline: 2px solid var(--green); }
.hotspot::after {
  content: attr(aria-label); position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  white-space: nowrap; padding: 4px 7px; border-radius: 6px; color: white; background: rgba(35,72,24,.92);
  font-size: 12px; opacity: 0; pointer-events: none;
}
.hotspot:hover::after, .hotspot:focus-visible::after { opacity: 1; }
.viewer-help { position: absolute; right: 12px; bottom: 12px; padding: 7px 10px; border-radius: 8px; background: rgba(27,44,20,.82); color: white; font-size: .82rem; pointer-events: none; }
dialog { width: min(94vw, 1420px); height: min(94vh, 980px); border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--cream); box-shadow: 0 24px 80px rgba(0,0,0,.42); }
dialog::backdrop { background: rgba(20,28,17,.78); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin-bottom: 0; color: var(--green); }
.close { width: 44px; height: 44px; padding: 0; font-size: 1.8rem; }
.recipe-frame { height: calc(100% - 142px); display: grid; place-items: center; padding: 14px; overflow: auto; background: #e8e4d8; }
.recipe-frame img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 8px 26px rgba(0,0,0,.22); }
.dialog-actions { display: flex; justify-content: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.meal-tab { min-width: 170px; }
.meal-tab.active { color: white; background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
@media (max-width: 760px) {
  .topbar { align-items: flex-start; padding: 12px; flex-direction: column; gap: 10px; }
  .hint { font-size: .86rem; }
  main { padding: 8px; }
  .viewer { height: calc(100vh - 188px); min-height: 440px; border-radius: 12px; }
  .controls { width: 100%; justify-content: center; }
  .viewer-help { display: none; }
  .dialog-actions { flex-wrap: wrap; }
  .meal-tab { min-width: 0; flex: 1 1 105px; padding-inline: 8px; }
}
