/* ============================================================================
   AGENDA — the chosen single-day view (design/day/02-agenda) + the shared day-bar
   and the full-screen recipe-detail popup. Ported from design/day/assets/day.css;
   its full-page `.modal` is renamed `.recipe-view` so it coexists with the board's
   centered add-menu `.modal` (system.css). Reuses the Warm Slab tokens.
   ========================================================================== */
:root {
  --radius-lg: 11px;
  --bar-max: 820px;
  --space-6: 30px;
}

/* base button (used by the recipe popup's "Volver"); .btn-primary lives in system.css */
.btn {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: var(--radius);
  padding: 10px 16px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px; transition: border-color .14s, color .14s, background .14s;
}
.btn:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.btn svg { display: block; }
.meal-note { font-size: .78rem; color: var(--ink-soft); }

/* ---- Day-bar (shared header) ------------------------------------------- */
.daybar {
  max-width: var(--bar-max); margin: 0 auto; display: flex; align-items: center; justify-content: center;
  gap: var(--space-4); padding: 18px 26px 14px;
}
.daybar-nav { display: flex; align-items: center; gap: 16px; }
.step {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer;
  border-radius: var(--radius); text-decoration: none;
}
.step:hover { border-color: var(--accent); color: var(--accent); }
.daybar-day { display: flex; flex-direction: column; line-height: 1.05; min-width: 160px; text-align: center; }
.dow-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.daybar-day .dow { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; }
.daybar-day .date { font-size: .84rem; color: var(--ink-soft); margin-top: 2px; }
.daybar.is-today .daybar-day .dow { color: var(--accent-strong); }
.today-pill {
  font-family: var(--font-body); font-weight: 700; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--today-head); padding: 4px 9px; border-radius: 99px; line-height: 1;
}

/* shared section tag + ingredient line (agenda flavor) */
.meal-tag { font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.ings { margin: 0; display: flex; flex-wrap: wrap; font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }
.ings span { white-space: nowrap; }
.ings span:not(:last-child)::after { content: '·'; margin: 0 .42em; color: var(--line-strong); }
.dish-title { font-family: var(--font-display); font-weight: 600; line-height: 1.16; margin: 0; color: var(--ink); }

/* ---- Agenda layout (design/day/02-agenda) ------------------------------ */
.sheet { max-width: 760px; margin: 0 auto; padding: 8px 26px 96px; }
.meal-group { margin-bottom: 28px; }
.meal-group:last-child { margin-bottom: 0; }
.group-head { display: flex; align-items: center; margin: 0 0 13px; }
.group-head .meal-tag { flex: none; font-size: .74rem; }
.group-head::after { content: ''; flex: 1; border-bottom: 2px dotted var(--accent); opacity: .4; margin-left: 12px; }

.dish {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: stretch; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: border-color .15s ease; margin-bottom: 12px; text-decoration: none; color: inherit;
}
.dish:last-child { margin-bottom: 0; }
.dish:hover, .dish:focus-visible { border-color: var(--accent); outline: none; }
.dish .thumb {
  position: relative; height: auto; min-height: 124px; border-bottom: none;
  background: var(--tint); overflow: hidden; display: block;
}
.dish .ph-icon { width: 38%; max-width: 128px; }
.dish-body { padding: 14px 16px 14px 2px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.dish .dish-title { font-size: 1.16rem; margin-bottom: 5px; }
.dish:hover .dish-title, .dish:focus-visible .dish-title { color: var(--accent-strong); }
.dish-foot { margin-top: 10px; }
.see { font-weight: 700; font-size: .82rem; color: var(--accent); }
.dish:hover .see { color: var(--accent-strong); }

@media (max-width: 560px) {
  .dish { grid-template-columns: 96px 1fr; gap: 13px; }
  .dish .thumb { min-height: 96px; }
}

/* play badge for the day's video thumbnails (centered) */
.play-badge {
  position: absolute; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(53, 44, 36, .5); color: #fff; backdrop-filter: blur(2px);
}
.play-badge svg { width: 14px; height: 14px; margin-left: 1px; }
.thumb-play { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ---- Recipe detail — full-page; two columns at width ------------------- */
.recipe-view { position: fixed; inset: 0; background: var(--surface); display: none; z-index: 80; }
.recipe-view.open { display: block; }
.recipe-view-card { position: relative; width: 100%; height: 100%; overflow: auto; background: var(--surface); }
.rv-close {
  position: fixed; top: 16px; right: 18px; z-index: 12; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(252, 247, 236, .92); color: var(--ink); cursor: pointer;
  font-size: 1.05rem; display: grid; place-items: center; backdrop-filter: blur(3px);
}
.rv-close:hover { border-color: var(--accent); color: var(--accent); }

.rv-grid { display: flex; flex-direction: column; min-height: 100%; }
.rv-left { display: flex; flex-direction: column; justify-content: flex-start; gap: 22px; padding: 26px 26px 30px; }
.rv-right { display: flex; flex-direction: column; padding: 26px 30px 30px; min-width: 0; }

.rv-media {
  position: relative; aspect-ratio: 16/10; background: var(--tint); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; flex: none;
}
.rv-media .thumb-ph { position: absolute; inset: 0; }
.rv-media .ph-icon { width: 30%; max-width: 140px; }
.rv-play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; width: 100%; }
.rv-play-ring {
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center;
  border: 3px solid rgba(255, 255, 255, .85); transition: transform .14s, background .14s;
}
.rv-play:hover .rv-play-ring { transform: scale(1.06); background: var(--accent-strong); }
.rv-play-ring svg { width: 30px; height: 30px; margin-left: 3px; }
.rv-vlabel {
  position: absolute; left: 14px; bottom: 12px; display: flex; align-items: center; gap: 8px;
  background: rgba(53, 44, 36, .62); color: #fff; font-size: .78rem; font-weight: 700; padding: 5px 11px;
  border-radius: 99px; backdrop-filter: blur(2px);
}
.rv-vlabel svg { width: 12px; height: 12px; }
.rv-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rv-desc { margin: 0 0 26px; line-height: 1.66; font-size: 1.04rem; max-width: 64ch; }

.rv-cat { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rv-title { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1.13; margin: 0 0 22px; max-width: 30ch; }
.rv-source { display: inline-block; margin: -14px 0 22px; font-size: .82rem; color: var(--ink-soft); text-decoration: none; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-source:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.rv-h {
  font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; margin: 0 0 12px;
}
.rv-h::after { content: ''; flex: 1; border-bottom: 2px dotted var(--accent); opacity: .4; margin-left: 10px; }
.rv-ings { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rv-ing { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; font-size: .86rem; padding: 7px 13px; border-radius: var(--radius); }

/* preparation steps — a numbered list in place of the design's prose paragraph */
.rv-steps { margin: 0 0 26px; padding-left: 1.2em; max-width: 64ch; }
.rv-steps li { line-height: 1.6; font-size: 1.02rem; margin-bottom: 9px; padding-left: 4px; }
.rv-steps li::marker { color: var(--accent); font-weight: 700; font-family: var(--font-display); }

.rv-back { align-self: stretch; justify-content: center; margin-top: auto; }
.rv-foot { margin-top: auto; padding-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.rv-nav { display: flex; gap: 10px; }
.rv-step {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line-strong);
  background: var(--surface); border-radius: var(--radius); padding: 10px 14px; cursor: pointer; color: var(--ink);
  font: inherit; text-align: left; transition: border-color .14s, color .14s; text-decoration: none;
}
.rv-step:hover { border-color: var(--accent); }
.rv-step-chev { font-size: 1.4rem; line-height: 1; color: var(--accent); flex: none; }
.rv-step-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.22; }
.rv-step-cat { font-family: var(--font-display); font-weight: 700; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.rv-step-name { font-family: var(--font-display); font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
.rv-step:hover .rv-step-name { color: var(--accent-strong); }
.rv-next { flex-direction: row-reverse; }
.rv-next .rv-step-txt { text-align: right; align-items: flex-end; }

@media (min-width: 860px) {
  .recipe-view-card { overflow: hidden; }
  .rv-grid { flex-direction: row; height: 100%; }
  .rv-left { flex: 0 0 44%; max-width: 44%; overflow: auto; border-right: 1px solid var(--line); }
  .rv-right { flex: 1; overflow: auto; }
  .rv-back { align-self: flex-start; justify-content: flex-start; }
}
