.recipe-layout { display:grid; grid-template-columns:minmax(230px,.9fr) minmax(0,1.15fr); gap:20px; align-items:start; }
.recipe-cover,.recipe-sections { display:grid; min-width:0; gap:12px; }
.recipe-sections>.panel+.panel,.stack>.panel+.panel,.week-grid>.panel+.panel,.chef-meal>.panel { margin-top:0; }
.recipe-owner,.recipe-actions,.meal-actions,.check-head,.selected-recipe { display:flex; align-items:center; gap:10px; }
.recipe-actions,.meal-actions,.check-head { flex-wrap:wrap; }
.recipe-cover { background:white; border:1px solid var(--line); border-radius:12px; padding:16px; }
.recipe-cover img.detail-photo { border-radius:8px; }
.photo-empty.detail-photo { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; aspect-ratio:auto; min-height:64px; border:1px dashed #c1a1ad; border-radius:7px; background:#fbf6f7; color:var(--wine); }
.recipe-facts { margin:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(100px,1fr)); gap:12px; }
.recipe-facts dt { color:var(--muted); }
.recipe-facts dd { margin:3px 0 0; color:var(--wine); font-weight:700; }
.recipe-sections .link { margin-top:8px; }
.recipe-index { margin-top:14px; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr)); gap:9px; }
.recipe-index .food-info { padding:12px 14px; }
.recipe-index-card { justify-content:center; }
.recipe-index-card .food-info>span { color:var(--muted); font-size:.9375rem; }
.meal-image-link { padding:0; border:0; border-radius:8px; background:none; flex:none; }
.meal-row .dish-link { margin-right:0; }
.meal-actions .link { font-size:.9375rem; }
.week-day small { text-align:right; }
.week-paging { display:none; }
.week-meal { padding:12px 0; border-bottom:1px solid var(--line); }
.week-meal:first-child { padding-top:0; }
.week-meal:last-child { border-bottom:0; padding-bottom:0; }
.week-meal header { display:flex; justify-content:space-between; gap:8px; margin-bottom:8px; }
.week-meal time,.plan-line time,.check-head b { color:var(--wine); font-weight:700; }
.week-recipe { width:100%; display:flex; gap:12px; align-items:center; padding:4px 0; text-align:left; border:0; background:transparent; }
.week-recipe>span:last-child { min-width:0; overflow-wrap:anywhere; }
.mini-photo { width:62px; height:48px; flex:0 0 62px; object-fit:cover; border-radius:6px; }
.week-recipe small,.assign-row small { display:block; color:var(--muted); }
.week-recipe b { font-size:1.0625rem; }
.chef-meal { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; align-items:start; margin-bottom:15px; }
.plan-line { align-items:flex-start; }
.plan-line>div { min-width:0; }
.plan-line p { margin:3px 0; }
.plan-note { color:var(--wine); }
.check-head { justify-content:flex-end; }
.guest-serving { display:grid; justify-items:end; text-align:right; }
.guest-serving .link { font-size:.9375rem; }
.history-year { margin:12px 0 5px; color:var(--wine); }
.history-year:first-child { margin-top:0; }
.modal { overflow:hidden; }
.modal-inner { display:flex; flex-direction:column; width:100%; max-height:min(88dvh,780px); padding:0; }
.modal-inner h2 { flex:none; margin:0; padding:17px 20px 12px; border-bottom:1px solid var(--line); }
.modal-body { overflow-y:auto; overscroll-behavior:contain; min-height:0; padding:16px 20px; }
.modal-body>.selected-recipe,.modal-body>h3,.modal-body>p { margin-bottom:12px; }
.modal-inner .modal-actions { flex:none; margin:0; padding:10px 20px; background:white; border-top:1px solid var(--line); }
dialog.modal { width:min(540px,calc(100% - 24px)); }
.ingredient-edit { padding:10px 12px; margin:8px 0; min-width:0; border:1px solid var(--line); border-radius:8px; }
.ingredient-edit legend { color:var(--wine); font-weight:700; }
.assign-list { border-top:1px solid var(--line); }
.assign-row span { min-width:0; }
.edit-dishes { margin:14px 0 0; }
.edit-dishes b { overflow-wrap:anywhere; }
.edit-dishes .link { flex:none; }
.journal-row,.history-day { display:grid; grid-template-columns:auto minmax(0,1fr) auto; }
.journal-row:has([data-act="diary.edit"]) { grid-template-columns:auto minmax(0,1fr) auto auto; }
.journal-row .meal-photo,.guest-line .meal-photo { width:60px; height:46px; }
.journal-row>div,.guest-line>div { overflow-wrap:anywhere; }
.stock-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; }
.stock-row .state { justify-self:start; }
.week-day .week-long,.week-meal header,.calendar-head { text-transform:none; }
@media(max-width:760px) {
 .recipe-layout,.chef-meal { grid-template-columns:minmax(0,1fr); gap:12px; }
 .recipe-actions .btn { flex:1; }
 .recipe-index { grid-template-columns:minmax(0,1fr); gap:6px; }
 .recipe-index .food-info { display:grid; grid-template-columns:minmax(0,1fr); gap:3px; padding:10px 13px; }
 .meal-card .card-foot { align-items:flex-start; }
 .meal-actions { justify-content:space-between; width:100%; }
 .modal-inner { max-height:88dvh; }
 .modal-body { padding:14px; }
 .modal-inner h2 { padding:14px; }
 .modal-inner .modal-actions { padding:8px 14px; }
 .plan-line { gap:8px; }
 .plan-line time { font-size:.9375rem; }
 .journal-row,.history-day,.journal-row:has([data-act="diary.edit"]) { grid-template-columns:48px minmax(0,1fr) auto; align-items:center; }
 .journal-row .meal-photo,.guest-line .meal-photo { width:48px; height:42px; }
 .journal-row>strong { font-size:.9375rem; max-width:82px; white-space:normal; text-align:right; }
 .journal-row>[data-act="diary.edit"] { grid-column:2/-1; justify-self:start; }
 .stock-row { grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; }
 .stock-row .link { justify-self:end; }
 .guest-line { display:grid; grid-template-columns:48px minmax(0,1fr) auto; }
 .guest-serving { max-width:84px; }
 .week-grid>.panel:first-child .panel-head { background:var(--wine); color:white; }
 .week-nav { display:none; }
 .week-grid>.panel:first-child .panel-head { padding:0; }
 .week-grid>.panel:first-child .panel-head h2 { display:none; }
 .week-paging { display:flex; width:100%; align-items:center; justify-content:space-between; }
 .week-paging button { background:transparent; border:0; color:white; padding:6px 12px; }
 .week-grid>.panel:first-child .week-day { min-width:0; }
 .week-day .week-mobile em { font-size:.875rem; }
 .check-head { gap:3px 8px; }
}

.form-optional,.recipe-fold,.kitchen-fold {
 min-width:0; border:1px solid var(--line); border-radius:16px; background:#fff;
}
.form-optional { margin:10px 0; }
.form-optional>summary,.recipe-fold>summary,.kitchen-fold>summary {
 display:flex; align-items:center; gap:12px; padding:12px 16px; min-height:50px;
 color:var(--ink); font-size:1rem; font-weight:600; cursor:pointer; list-style:none;
}
.form-optional>summary::-webkit-details-marker,.recipe-fold>summary::-webkit-details-marker,.kitchen-fold>summary::-webkit-details-marker { display:none; }
.form-optional>summary>svg,.recipe-fold>summary>svg,.kitchen-fold>summary>svg { margin-left:auto; flex:none; transform:rotate(90deg); color:var(--muted); }
:is(.form-optional,.recipe-fold,.kitchen-fold)[open]>summary>svg { transform:rotate(-90deg); }
.fold-content { padding:0 16px 12px; }
.fold-content>.text-block { margin:0; }
.recipe-owner small { color:var(--muted); margin-left:auto; text-align:right; }
.schedule-days { display:flex; gap:4px; align-items:stretch; padding:4px; border-radius:18px; background:var(--rose); margin:12px 0; }
.schedule-days .btn,.schedule-date { display:flex; align-items:center; justify-content:center; gap:5px; flex:1; min-height:44px; min-width:0; padding:5px; border:0; border-radius:14px; background:transparent; color:var(--wine); font:inherit; font-weight:600; }
.schedule-days .btn[aria-pressed=true],.schedule-date.selected { color:var(--wine); background:#fff; box-shadow:0 1px 4px #31131e15; }
.schedule-date { position:relative; cursor:pointer; }
.schedule-date input { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; opacity:0; cursor:pointer; }
.schedule-date input::-webkit-calendar-picker-indicator { position:absolute; inset:0; width:100%; height:100%; margin:0; cursor:pointer; }
.schedule-date:focus-within { outline:2px solid var(--wine); outline-offset:2px; }
.schedule-date:focus-within input { opacity:1; width:100%; min-width:0; font-size:16px; padding:4px; border-radius:12px; border:0; }
.schedule-date:focus-within :is(span,svg) { visibility:hidden; }
@media(max-width:760px){
 .recipe-cover { border:0; border-radius:22px; padding:0; overflow:hidden; background:transparent; }
 .recipe-cover img.detail-photo { width:100%; height:auto; max-height:300px; aspect-ratio:1.65; object-fit:cover; border-radius:22px; }
 .recipe-owner { gap:7px; padding:2px 3px; font-size:.95rem; }
 .recipe-actions .btn { padding:8px 10px; min-height:46px; }
 .recipe-sections { gap:8px; }
 .recipe-cover .recipe-actions { width:100%; }
 .recipe-layout { margin-top:12px; gap:16px; }
 .form-optional>summary,.recipe-fold>summary,.kitchen-fold>summary { font-size:1rem; }
}
.page-head:has(.date-control) .subtitle {display:none}
.date-control {
  position:relative;display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-height:44px;min-width:10.2em;padding:8px 17px;
  border:1px solid #dac8c7;border-radius:24px;background:#fffaf4;
  color:var(--wine);font:610 1rem/1.35 var(--font);cursor:pointer;
}
.date-control:hover {background:var(--rose)}
.date-control input {
  position:absolute;inset:0;min-width:0;width:100%;height:100%;margin:0;
  border:0;border-radius:inherit;padding:0 14px 0 42px;background:transparent;
  color:inherit;font:inherit;opacity:0;cursor:pointer;
}
.date-control input::-webkit-calendar-picker-indicator {
  position:absolute;inset:0;margin:0;width:100%;height:100%;opacity:0;cursor:pointer;
}
.date-control:has(input:focus-visible) {outline:2px solid var(--wine);outline-offset:3px;justify-content:flex-start}
.date-control:has(input:focus-visible) .date-caption {visibility:hidden}
.date-control input:focus-visible {opacity:1;outline:0}
@media (max-width:760px) {
  .page-head:has(.date-control) .actions {width:auto}
  .actions .date-control {min-width:8em;padding-inline:13px}
}
