.weekly-plan-panel { margin-bottom: 1rem; }
.weekly-plan-heading { align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.weekly-plan-heading .panel-heading h3 { margin: .25rem 0 .4rem; color: #304535; font: 500 clamp(1.6rem, 1.4rem + .6vw, 2rem)/1.15 Georgia,serif; letter-spacing: -.025em; }
.weekly-plan-heading .panel-heading p,.weekly-plan-heading p { max-width: 48rem; font-size: .96rem; line-height: 1.55; }
.weekly-plan-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.weekly-week-tabs { display: flex; gap: .4rem; overflow-x: auto; margin: 0 0 1rem; padding: .2rem .1rem .55rem; border-bottom: 1px solid #e9eee6; scrollbar-width: thin; }
.weekly-week-tab { flex: none; min-height: 40px; padding: .55rem .85rem; border: 1px solid #dfe7dc; border-radius: 9px; background: #fffefa; color: #647563; font: 650 .9rem/1.25 "DM Sans",sans-serif; cursor: pointer; }
.weekly-week-tab:hover { border-color: #a8bba2; background: #f7faf4; }
.weekly-week-tab.active { border-color: #688566; background: #e9f0e5; color: #3d5b42; box-shadow: inset 0 -2px #718d6e; }
.weekly-note-editor { display: grid; gap: .3rem; margin: -.3rem 0 1rem; color: #617262; font: 700 .82rem/1.35 "DM Sans",sans-serif; }
.weekly-note-editor textarea { min-height: 58px; resize: vertical; padding: .65rem .7rem; border: 1px solid #dfe6db; border-radius: 9px; background: #fff; color: #354537; font: 450 .9rem/1.5 "DM Sans",sans-serif; }
.weekly-note-editor textarea:focus-visible { outline: 3px solid #6d8d6b24; border-color: #779374; }
.weekly-plan-notice { margin: -.2rem 0 1rem; padding: .65rem .8rem; border-left: 3px solid #8c9f73; border-radius: 0 8px 8px 0; background: #f3f6ed; color: #647260; font: 500 .88rem/1.55 "DM Sans",sans-serif; }
.weekly-plan-kicker { color: #70876f; font: 750 .72rem/1.4 "DM Sans",sans-serif; letter-spacing: .13em; }
.weekly-plan-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.weekly-day-card { min-width: 0; overflow: hidden; border: 1px solid #e0e8dc; border-radius: 13px; background: #fffefa; }
.weekly-day-heading { display: flex; align-items: center; gap: .65rem; padding: .85rem 1rem .7rem; border-bottom: 1px solid #edf0e9; background: #f8faf5; }
.weekly-day-number { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: #e5eddf; color: #557258; font: 750 .8rem/1 "DM Sans",sans-serif; }
.weekly-day-heading h4 { margin: 0; color: #344a38; font: 600 1.15rem/1.2 Georgia,serif; }
.weekly-day-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; padding: .85rem; }
.weekly-day-fields label { display: grid; align-content: start; gap: .3rem; color: #617262; font: 700 .82rem/1.35 "DM Sans",sans-serif; }
.weekly-day-fields label:last-child { grid-column: 1/-1; }
.weekly-day-fields textarea { width: 100%; min-height: 76px; resize: vertical; padding: .65rem .7rem; border: 1px solid #dfe6db; border-radius: 9px; background: #fff; color: #354537; font: 450 .9rem/1.5 "DM Sans",sans-serif; }
.weekly-day-fields textarea:focus-visible { outline: 3px solid #6d8d6b24; border-color: #779374; }
.weekly-plan-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid #edf0e9; }
.weekly-plan-actions > span { color: #7b887b; font: 450 .86rem/1.5 "DM Sans",sans-serif; }
.weekly-plan-actions .button,.weekly-plan-heading .button { flex: none; min-height: 42px; font-size: .92rem; }
.weekly-day-read summary { display: flex; align-items: center; gap: .7rem; padding: .85rem .95rem; list-style: none; cursor: pointer; }
.weekly-day-read summary::-webkit-details-marker { display: none; }
.weekly-day-read summary strong { color: #344a38; font: 600 1.1rem/1.2 Georgia,serif; }
.weekly-day-read summary small { margin-left: auto; color: #7d8a7e; font: 500 .8rem/1.4 "DM Sans",sans-serif; text-align: right; }
.weekly-day-read[open] summary { border-bottom: 1px solid #edf0e9; background: #f8faf5; }
.weekly-day-entries { display: grid; gap: .2rem; padding: .65rem .95rem .8rem; }
.weekly-day-entries > div { display: grid; grid-template-columns: 96px 1fr; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid #f0f2ed; }
.weekly-day-entries > div:last-child { border-bottom: 0; }
.weekly-day-entries strong { color: #67816a; font: 700 .84rem/1.5 "DM Sans",sans-serif; }
.weekly-day-entries p,.weekly-empty { margin: 0; color: #455749; font: 450 .91rem/1.6 "DM Sans",sans-serif; overflow-wrap: anywhere; }
.weekly-empty { padding: .3rem 0; color: #889287; }
.legacy-diet-sections { margin-top: 1rem; }
.legacy-diet-sections > summary { color: #506650; cursor: pointer; font: 700 .96rem/1.5 "DM Sans",sans-serif; }
.legacy-diet-sections[open] > .panel-heading { margin-top: 1rem; }
@media(max-width:720px) {
  .weekly-plan-heading { align-items: flex-start; flex-direction: column; }
  .weekly-plan-header-actions { justify-content: flex-start; }
  .weekly-plan-grid { grid-template-columns: minmax(0,1fr); }
  .weekly-day-fields { grid-template-columns: minmax(0,1fr); }
  .weekly-day-fields label:last-child { grid-column: auto; }
}
@media(max-width:430px) {
  .weekly-plan-header-actions { width: 100%; }
  .weekly-plan-header-actions .button { flex: 1; }
  .weekly-plan-actions { align-items: stretch; flex-direction: column; }
  .weekly-plan-actions .button { width: 100%; }
  .weekly-day-read summary { gap: .5rem; padding-inline: .7rem; }
  .weekly-day-read summary small { max-width: 46%; font-size: .72rem; }
  .weekly-day-entries { padding-inline: .75rem; }
  .weekly-day-entries > div { grid-template-columns: 83px 1fr; gap: .45rem; }
}
