.cs-planner { margin: 0 auto; max-width: 1320px; padding: 38px clamp(16px, 4vw, 56px) 72px; }
.cs-planner [hidden], .cs-plan-dialog [hidden] { display: none !important; }
.cs-planner :is(h1, h2), .cs-plan-dialog h2 { margin: 0; color: var(--cs-oxblood, #5a1a22); }
.cs-planner h1 { font-size: clamp(2.35rem, 5vw, 3.8rem); line-height: 1.05; }
.cs-planner h2, .cs-plan-dialog h2 { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.17; }
.cs-plan-intro > p:last-child, .cs-plan-fridge > p { color: #665e56; margin: 10px 0 0; }
.cs-plan-columns { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); margin-top: 26px; }
.cs-plan-weekbar, .cs-plan-weeknav, .cs-plan-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs-plan-weekbar { justify-content: space-between; padding: 14px 0; border-block: 1px solid #d7cbbd; gap: 12px; }
.cs-plan-weeknav h2 { font-size: clamp(1.12rem, 2vw, 1.65rem); }
.cs-plan-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 7px 13px; background: #fcf9f2; color: #5a1a22; border: 1px solid #8a8074; border-radius: 6px; font: inherit; font-size: .9rem; line-height: 1.22; text-align: center; cursor: pointer; }
.cs-plan-button:hover { background: #eee5d9; }
.cs-plan-button:disabled { opacity: .55; cursor: default; }
.cs-plan-button:focus-visible, .cs-planner :is(a, input, select):focus-visible, .cs-plan-dialog :is(a, input, select):focus-visible { outline: 2px solid #5a1a22; outline-offset: 3px; }
.cs-plan-button .cs-icon { flex: none; width: 17px; height: 17px; }
.cs-plan-icon { width: 44px; padding: 0; }
.cs-plan-primary { background: #5a1a22; border-color: #5a1a22; color: #fff; }
.cs-plan-primary:hover { background: #431319; }
.cs-plan-primary .cs-icon { filter: brightness(0) invert(1); }
.cs-plan-days, .cs-plan-grocery-rows { list-style: none; margin: 0; padding: 0; }
.cs-plan-day { display: grid; grid-template-columns: 63px minmax(0, 1fr); align-items: start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #d7cbbd; }
.cs-plan-date { margin-top: 10px; font-weight: 700; font-size: .79rem; letter-spacing: .035em; text-transform: uppercase; }
.cs-plan-date[aria-current] { color: #5a1a22; text-decoration: underline; text-underline-offset: 3px; }
.cs-plan-meals { min-width: 0; }
.cs-plan-meal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 48px; }
.cs-plan-meal + .cs-plan-meal { margin-top: 8px; }
.cs-plan-meal img { width: 72px; height: 50px; border-radius: 6px; object-fit: cover; }
.cs-plan-meal .cs-plan-recipe-name, .cs-plan-special { flex: 1 1 140px; min-width: 0; color: #5a1a22; font: 1.2rem/1.2 Georgia, serif; }
.cs-plan-special { color: #5f6848; font-style: italic; }
.cs-plan-portion { color: #665e56; font-size: .84rem; }
.cs-plan-meal .cs-plan-button, .cs-plan-small { border-color: transparent; background: transparent; text-decoration: underline; }
.cs-plan-small { padding-left: 0; color: #5f6848; }
.cs-plan-sidebar { border-left: 1px solid #d7cbbd; padding-left: clamp(16px, 3vw, 32px); }
.cs-plan-sidebar section + section { margin-top: 26px; padding-top: 23px; border-top: 1px solid #d7cbbd; }
.cs-plan-sidebar [data-grocery-status] { margin: 10px 0; font-size: .9rem; }
.cs-plan-sidebar [data-grocery-status]:empty { display: none; }
.cs-plan-aisle { margin: 15px 0 2px; color: #5f6848; font: 700 .78rem/1.3 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.cs-plan-grocery-rows li { display: flex; align-items: center; gap: 5px; border-bottom: 1px solid #e7ded1; }
.cs-plan-check { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; flex: 1; min-height: 44px; font-size: .92rem; }
.cs-plan-check input { width: 17px; height: 17px; margin: 0; accent-color: #5a1a22; }
.cs-plan-check input:checked + span { text-decoration: line-through; color: #665e56; }
.cs-plan-amount { text-align: right; color: #665e56; }
.cs-plan-add-grocery { margin: 16px 0; }
.cs-plan-add-grocery > div { display: flex; gap: 6px; align-items: center; }
.cs-plan-add-grocery input, .cs-plan-dialog :is(input, select) { width: 100%; min-width: 0; min-height: 44px; padding: 7px 9px; color: #292724; background: #fff; border: 1px solid #8a8074; border-radius: 5px; font: inherit; }
.cs-plan-add-grocery label, .cs-plan-dialog label { display: block; margin-bottom: 4px; color: #292724; font-size: .9rem; font-weight: 600; }
.cs-plan-qr-preview { display: flex; gap: 10px; margin: 14px 0; }
.cs-plan-qr-preview:empty { margin: 0 0 14px; }
.cs-plan-qr-preview a { flex: 1; min-width: 0; padding: 6px 4px; background: #fff; border: 1px solid #e7ded1; border-radius: 6px; text-align: center; font-size: .77rem; line-height: 1.25; }
.cs-plan-qr img { display: block; margin: 0 auto 3px; width: 64px; height: 64px; max-width: 100%; object-fit: contain; }
.cs-plan-dialog { width: min(calc(100% - 28px), 460px); max-height: min(85vh, 720px); padding: 22px; border: 1px solid #d7cbbd; border-radius: 8px; background: #fcf9f2; color: #292724; }
.cs-plan-dialog::backdrop { background: rgb(41 39 36 / .52); }
.cs-plan-dialog form, .cs-plan-dialog > div { display: grid; gap: 12px; margin: 0; }
.cs-plan-dialog p { margin: 0; }
.cs-plan-dialog label :is(input, select) { display: block; margin-top: 4px; }
.cs-planner [data-shop-dialog] .cs-shopping-header h2 { font: 400 clamp(1.7rem, 4vw, 2.25rem)/1.15 Georgia, serif; }
.cs-plan-feedback { margin: 7px 0 0; color: #5a1a22; font-size: .9rem; }
.cs-plan-feedback:empty { display: none; }
.cs-recipe-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cs-recipe-journal .cs-recipe-plan-row > .cs-eyebrow { margin: 0; }
.cs-recipe-plan { flex-shrink: 0; background: transparent; }
.cs-plan-mobile-nav, .cs-plan-print { display: none; }
.cs-header-planner[aria-current] .cs-header-box-label { text-decoration: underline; text-underline-offset: 6px; }

@media (min-width: 761px) {
    .cs-plan-sidebar [data-grocery-list] { max-height: 350px; overflow-y: auto; padding: 0 5px 4px; }
}
@media (max-width: 760px) {
    .cs-planner { padding-top: 24px; }
    .cs-plan-columns { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
    .cs-plan-sidebar { border-left: 0; padding-left: 0; }
    .cs-plan-mobile-nav { display: flex; gap: 14px; margin-top: 14px; }
    .cs-plan-mobile-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #5a1a22; }
    .cs-plan-day { grid-template-columns: 49px minmax(0, 1fr); }
    .cs-plan-meal img { width: 56px; height: 40px; }
    .cs-recipe-plan { width: 44px; padding: 0; }
    .cs-recipe-plan .cs-icon { width: 21px; height: 21px; }
    .cs-recipe-plan > span { display: none; }
}
@media print {
    html, body.cs-view-planner, .cs-view-planner .cs-main { display: block !important; width: auto; max-width: none; background: #fff; color: #000; }
    body.cs-view-planner .cs-header, body.cs-view-planner .cs-footer,
    .cs-planner > :not(.cs-plan-print), .cs-recipe-plan, [data-recipe-plan-feedback], .cs-plan-dialog { display: none !important; }
    .cs-view-planner .cs-planner { max-width: none; margin: 0; padding: 0; }
    .cs-plan-print { display: block; color: #000; font: 10pt/1.2 system-ui, sans-serif; }
    .cs-plan-print :is(h1, h2, a) { color: #000; }
    .cs-plan-print h1 { margin: 1mm 0; font-size: 24pt; }
    .cs-plan-print h2 { font-size: 13pt; }
    .cs-plan-print-logo { display: block; width: 42mm; height: auto; }
    .cs-plan-print [data-print-range] { margin: 0 0 3mm; }
    .cs-plan-print [data-print-days] { list-style: none; margin: 0; padding: 0; }
    .cs-plan-print [data-print-days] > li { border-top: .25mm solid #aaa; display: grid; grid-template-columns: 37mm minmax(0, 1fr); gap: 3mm; align-items: center; break-inside: avoid; min-height: 10mm; padding: 1mm 0; }
    .cs-plan-print-meal { grid-column: 2; display: flex; justify-content: space-between; gap: 4mm; align-items: center; }
    .cs-plan-print-meal p { margin: 1mm 0; }
    .cs-plan-print-meal .cs-plan-qr img { width: 28mm; height: 28mm; margin: 0; }
    .cs-plan-print-grocery { break-before: page; }
    .cs-plan-print-grocery > h2 { font-size: 24pt; }
    .cs-plan-print .cs-plan-aisle { break-after: avoid; color: #000; margin: 4mm 0 1mm; }
    .cs-plan-print .cs-plan-grocery-rows li { break-inside: avoid; }
    .cs-plan-print .cs-plan-check { min-height: 6mm; font-size: 10pt; }
    .cs-plan-print .cs-plan-print-check { width: 3mm; height: 3mm; border: .25mm solid #000; }
}
