@charset "UTF-8";

:root {
  --paper: #faf8f3;
  --white: #fffefa;
  --ink: #293e32;
  --muted: #646d63;
  --green: #42634f;
  --green-dark: #304b3a;
  --sage: #e8eddf;
  --line: #e0e3d8;
  --peach: #f5d4bc;
  --error: #993e31;
  --serif: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 1rem/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); text-underline-offset: 4px; }
a:hover { color: var(--green-dark); }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -.045em; }
em { font-weight: 400; }
main { flex: 1; width: 100%; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid #b96c42; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 1rem; padding: .75rem 1rem; z-index: 10; background: var(--white); border: 1px solid var(--green); border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.site-header { width: min(1240px, 100%); margin: 0 auto; padding: 30px 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.7rem; font-weight: 650; letter-spacing: -.065em; line-height: 1.1; white-space: nowrap; }
.brand-dot { color: #bd7256; }
.header-note { font-size: .875rem; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: .875rem; }
.main-nav > a { text-decoration: none; color: var(--muted); padding: .5rem 0; }
.main-nav a[aria-current] { color: var(--ink); border-bottom: 2px solid var(--green); }
.main-nav form { margin: 0; }
.site-footer { width: min(1160px, 100%); padding: 28px 32px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: .8125rem; }
.footer-flower { color: #a76b4c; font-size: 1.4rem; }
.eyebrow { display: block; font: 600 .75rem/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: .15em; color: var(--green); }
.auth-shell { width: min(1100px, calc(100% - 80px)); margin: 22px auto 35px; display: grid; grid-template-columns: 1fr 1.04fr; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: var(--white); box-shadow: 0 14px 50px #34483106; }
.auth-story { position: relative; display: flex; flex-direction: column; background: var(--sage); padding: 46px 44px 26px; overflow: hidden; }
.story-intro { position: relative; z-index: 1; }
.auth-story .eyebrow { display: flex; align-items: center; gap: 9px; font-size: .6875rem; }
.tiny-flower { font-size: 1.5rem; font-weight: 400; line-height: 1; color: #a96847; }
.auth-story h1 { font-size: clamp(2.8rem, 4.3vw, 3.85rem); margin: 27px 0 21px; }
.auth-story h1 em { color: #58765a; }
.auth-story p { font-size: .9375rem; line-height: 1.7; color: #53624f; }
.home-illustration { display: block; width: calc(100% + 36px); max-width: none; margin: 2px -18px -4px; flex: 1; min-height: 200px; object-fit: contain; }
.story-caption { margin-top: auto; border-top: 1px solid #cbd4c0; padding-top: 18px; display: flex; justify-content: center; align-items: center; gap: 9px; font-size: .75rem; color: #50654d; }
.heart { font-size: 1.5rem; line-height: 1; }
.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 48px 56px; }
.auth-form-content { width: 100%; max-width: 380px; }
.form-badge { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; margin-bottom: 28px; border-radius: 16px; background: #f9e8dc; color: #9a573e; font-size: 1.8rem; }
.auth-form-content > .eyebrow { font-size: .6875rem; margin-bottom: 12px; }
.auth-form-content h1 { font-size: clamp(2rem, 3vw, 2.65rem); margin-bottom: 14px; }
.form-description { color: var(--muted); font-size: .9375rem; line-height: 1.7; margin-bottom: 28px; }
.account-form { margin-top: 26px; }
.form-field { margin-bottom: 19px; }
.form-field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: .875rem; font-weight: 550; }
.input-wrap { position: relative; }
.form-field input { display: block; width: 100%; height: 49px; padding: 10px 13px; border: 1px solid #cdd3c7; border-radius: 9px; background: #fffefa; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.form-field input:focus { outline: 2px solid var(--green); outline-offset: 2px; border-color: var(--green); }
.form-field input.has-toggle { padding-right: 68px; }
.password-toggle { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 3px 7px; border: 0; border-radius: 4px; background: transparent; font-size: .75rem; font-weight: 600; color: var(--green); }
.password-toggle:hover { background: var(--sage); }
.help-text { margin-top: 7px; font-size: .75rem; color: var(--muted); line-height: 1.55; }
.help-text ul { margin: 6px 0 0; padding-left: 17px; }
.help-text li + li { margin-top: 3px; }
.field-errors, .form-errors { color: var(--error); font-size: .8125rem; }
.field-errors { margin-top: 7px; }
.field-errors ul, .form-errors ul { list-style: none; margin: 0; padding: 0; }
.has-error input { border-color: var(--error); }
.form-errors { padding: 12px 14px; background: #fff1eb; border: 1px solid #ebc4b7; border-radius: 9px; margin-bottom: 20px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: 10px 22px; border: 1px solid transparent; border-radius: 9px; font-size: .875rem; font-weight: 600; line-height: 1.5; text-decoration: none; transition: background .15s, border-color .15s; }
.button-primary { background: var(--green); color: #fff; border-color: var(--green); }
.button-primary:hover { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
.button-outline { border-color: #c9d1c2; background: transparent; color: var(--green); }
.button-outline:hover { background: var(--sage); }
.button-full { width: 100%; }
.button-small { min-height: 38px; padding: 7px 15px; font-size: .8125rem; }
.form-switch { text-align: center; color: var(--muted); margin-top: 24px; font-size: .8125rem; }
.form-switch a { font-weight: 600; margin-left: 3px; }
.form-footnote { display: flex; gap: 8px; justify-content: center; align-items: center; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 22px; color: var(--muted); font-size: .75rem; }
.form-footnote span { color: #ac7654; font-size: 1.1rem; }
.messages { width: min(1100px, calc(100% - 80px)); margin: 12px auto; }
.notice { padding: 12px 18px; border: 1px solid #c9d8c1; background: #e8efdf; color: var(--green-dark); border-radius: 10px; font-size: .9375rem; }
.dashboard { width: min(1100px, calc(100% - 80px)); margin: 24px auto 38px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.date-pill { border: 1px solid var(--line); border-radius: 30px; padding: 6px 14px; font-size: .8125rem; color: var(--muted); }
.welcome-card { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; overflow: hidden; border-radius: 22px; background: var(--sage); padding: 46px 48px; }
.welcome-copy { position: relative; z-index: 1; min-width: 0; }
.welcome-copy h1 { margin: 19px 0; font-size: clamp(2.5rem, 4.5vw, 3.8rem); overflow-wrap: anywhere; }
.welcome-copy h1 em { color: #58765a; }
.welcome-copy > p:not(.eyebrow) { color: #53624f; font-size: .9375rem; }
.welcome-copy .button { margin-top: 26px; }
.welcome-art { width: 100%; }
.section-heading { display: flex; align-items: center; gap: 16px; margin-top: 36px; }
.section-heading h2 { font-size: 1.85rem; }
.coming-label { background: #eee9e0; color: #6f6254; padding: 4px 9px; border-radius: 5px; font-size: .625rem; letter-spacing: .08em; font-weight: 650; white-space: nowrap; }
.section-description { color: var(--muted); font-size: .9375rem; margin-top: 10px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 23px; }
.feature-card { background: var(--white); padding: 25px; border: 1px solid var(--line); border-radius: 15px; }
.feature-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 20px; }
.icon-peach { background: #f9e7da; color: #97603e; }
.icon-sage { background: #e7eddf; color: #5c7251; }
.icon-lilac { background: #eeebf4; color: #7c6988; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .875rem; line-height: 1.7; }
.account-page { width: min(720px, calc(100% - 80px)); margin: 22px auto 60px; }
.back-link { display: inline-block; margin-bottom: 35px; font-size: .875rem; }
.account-page h1 { margin-top: 12px; font-size: 3rem; }
.profile-card { margin-top: 28px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.profile-heading { display: flex; align-items: center; gap: 17px; }
.avatar { width: 58px; height: 58px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 20px; background: var(--sage); color: var(--green); font: 1.8rem var(--serif); }
.profile-heading h2 { font-size: 1.8rem; overflow-wrap: anywhere; }
.profile-heading p { font-size: .8125rem; color: var(--muted); margin-top: 4px; }
.profile-details { margin: 26px 0; }
.profile-details > div { display: grid; grid-template-columns: 150px 1fr; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.profile-details dt { font-size: .875rem; color: var(--muted); }
.profile-details dd { margin: 0; font-size: .9375rem; overflow-wrap: anywhere; }
.account-security { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.account-security h3 { font-size: .9375rem; font-weight: 600; }
.account-security p { margin-top: 4px; font-size: .8125rem; color: var(--muted); }

@media (min-width: 1400px) {
  .auth-shell { margin-top: 40px; }
}
@media (max-width: 1000px) {
  .auth-story { padding: 36px 28px 25px; }
  .auth-form-panel { padding: 38px 32px; }
  .auth-story h1 { font-size: 3rem; }
  .desktop-break { display: none; }
  .story-caption { font-size: .6875rem; }
  .welcome-card { padding: 36px; }
}
@media (max-width: 740px) {
  .site-header { padding: 22px 24px; }
  .brand { font-size: 1.5rem; }
  .brand img { width: 34px; height: 34px; }
  .header-note { max-width: 145px; text-align: right; font-size: .75rem; }
  .auth-shell { width: calc(100% - 40px); grid-template-columns: 1fr; margin: 12px auto 15px; border-radius: 20px; }
  .auth-story { display: none; }
  .auth-story h1 { font-size: 2.3rem; margin: 17px 0 12px; }
  .auth-story h1 br:first-child { display: none; }
  .auth-story h1 br:first-child::after { content: ' '; }
  .auth-story p { max-width: 75%; font-size: .8125rem; }
  .home-illustration { position: absolute; width: 210px; right: -60px; bottom: -30px; min-height: 0; margin: 0; opacity: .6; }
  .story-caption { display: none; }
  .auth-form-panel { padding: 32px 28px 36px; }
  .auth-form-content { max-width: none; }
  .form-badge { display: none; }
  .auth-form-content h1 { font-size: 2.2rem; }
  .site-footer { padding: 24px; justify-content: center; flex-wrap: wrap; gap: 6px 12px; font-size: .6875rem; text-align: center; }
  .site-footer > span:last-child { width: 100%; }
  .footer-flower { font-size: 1rem; }
  .main-nav { gap: 15px; font-size: .8125rem; }
  .main-nav .button-small { padding: 6px 10px; }
  .dashboard, .messages { width: calc(100% - 40px); }
  .welcome-card { padding: 32px 28px; grid-template-columns: 1fr; }
  .welcome-copy h1 { font-size: 2.7rem; }
  .welcome-art { position: absolute; width: 290px; right: -55px; bottom: -35px; opacity: .22; }
  .feature-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature-card { padding: 23px; }
  .feature-icon { float: left; width: 44px; height: 44px; margin-right: 18px; margin-bottom: 0; }
  .feature-card p { margin-left: 62px; }
  .section-heading { gap: 12px; }
  .section-heading h2 { font-size: 1.7rem; }
  .account-page { width: calc(100% - 40px); }
  .profile-card { padding: 24px; }
  .profile-details > div { grid-template-columns: 1fr; gap: 4px; }
  .account-security { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 440px) {
  .site-header { flex-wrap: wrap; padding: 20px; }
  .main-nav { width: 100%; justify-content: space-between; }
  .auth-story { padding: 25px 24px; }
  .auth-story h1 { font-size: 2rem; }
  .auth-form-panel { padding: 29px 24px; }
  .header-note { max-width: 120px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* The family recipe book */
.recipe-page { width: min(1100px, calc(100% - 80px)); margin: 30px auto 60px; }
.recipe-heading { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin: 12px 0 30px; }
.recipe-heading > div:first-child { min-width: 0; }
.recipe-heading h1, .recipe-edit-page > h1 { font-size: clamp(2.4rem, 4vw, 3.5rem); margin-top: 12px; overflow-wrap: anywhere; }
.recipe-heading > .button { flex-shrink: 0; }
.recipe-filters { display: flex; gap: 14px; align-items: flex-end; background: var(--sage); padding: 22px; border-radius: 16px; margin: 30px 0 22px; }
.recipe-filters > div:first-child { flex: 1; }
.recipe-filters label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 550; }
.recipe-filters input, .recipe-filters select, .recipe-form input:not([type=checkbox]):not([type=hidden]), .recipe-form textarea { width: 100%; padding: 11px 13px; border: 1px solid #cdd3c7; border-radius: 8px; background: var(--white); color: var(--ink); font: inherit; }
.recipe-filters select { min-height: 48px; appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2342634f' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.recipe-form textarea { resize: vertical; }
.recipe-form input[type=file] { font-size: .875rem; }
.recipe-form input[type=file]::file-selector-button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--sage); color: var(--green); margin-right: 12px; cursor: pointer; }
.recipe-form .has-error input, .recipe-form .has-error textarea { border-color: var(--error); }
.recipe-form input[type=checkbox] { accent-color: var(--green); width: 17px; height: 17px; flex-shrink: 0; }
.clear-filters { align-self: center; font-size: .875rem; }
.results-count { color: var(--muted); font-size: .875rem; margin-bottom: 18px; }
.recipe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.recipe-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--white); transition: box-shadow .15s, border-color .15s; }
.recipe-card:hover { color: var(--ink); border-color: #9cab91; box-shadow: 0 8px 26px #3448310c; }
.recipe-cover { display: block; width: 100%; height: 210px; object-fit: cover; }
.recipe-cover-placeholder { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px; background: #e7eddf; color: #6b805b; font: italic 1.3rem var(--serif); }
.recipe-card:nth-child(3n+2) .recipe-cover-placeholder { background: #f4e6da; color: #956e50; }
.recipe-card:nth-child(3n+3) .recipe-cover-placeholder { background: #eeebf4; color: #7c6988; }
.recipe-cover-placeholder svg { width: 44px; height: 44px; }
.recipe-card-content { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.recipe-card h2 { font-size: 1.65rem; letter-spacing: -.035em; margin: 13px 0 9px; overflow-wrap: anywhere; }
.recipe-card p { font-size: 1rem; color: var(--muted); line-height: 1.6; }
.recipe-card-meta { display: flex; gap: 18px; font-size: .8125rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: auto; padding-top: 15px; }
.recipe-card-content > p { margin-bottom: 20px; }
.recipe-card-content > h2 { margin-bottom: 20px; }
.category-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.category-tags > span { padding: 3px 9px; border-radius: 20px; background: #edf0e5; color: #52654b; font-size: .75rem; font-weight: 550; }
.recipe-empty { text-align: center; padding: 65px 22px; border: 1px dashed #c9d1be; border-radius: 18px; }
.recipe-empty .feature-icon { margin: 0 auto 24px; float: none; }
.recipe-empty h2 { font-size: 2.3rem; }
.recipe-empty p { color: var(--muted); margin: 15px 0 25px; }
.recipe-empty h2 + .button { margin-top: 24px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 35px 0; font-size: .875rem; }
.recipe-edit-page { max-width: 960px; }
.recipe-form { margin-top: 32px; }
.editor-section { padding: 30px; border: 1px solid var(--line); background: var(--white); border-radius: 16px; margin-bottom: 23px; }
.editor-section-heading { margin-bottom: 26px; }
.editor-section-heading h2 { font-size: 1.9rem; margin-bottom: 9px; }
.editor-section-heading p { color: var(--muted); font-size: 1rem; }
.required-mark { color: #a7684d; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.category-field { border: 0; padding: 0; margin: 22px 0 0; }
.category-field legend { font-size: .875rem; font-weight: 550; }
.category-field .help-text { margin: 5px 0 12px; }
#id_categories { display: flex; flex-wrap: wrap; gap: 9px; }
#id_categories label { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); padding: 8px 12px; border-radius: 9px; font-size: .875rem; cursor: pointer; }
#id_categories label:has(input:checked) { background: var(--sage); border-color: #9cac90; }
.ingredient-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .7fr) minmax(0, .85fr); gap: 0 14px; padding: 20px 0 10px; border-top: 1px solid var(--line); }
.ingredient-row input { min-width: 0; }
.ingredient-row .form-field { margin-bottom: 12px; }
.ingredient-match { margin: -5px 0 12px; color: var(--green); }
.ingredient-choices { margin-bottom: 14px; }
.ingredient-choice { border: 1px solid #c9d1c2; border-radius: 6px; background: var(--sage); color: var(--green); padding: 5px 9px; margin: 6px 5px 0 0; font-size: .8125rem; }
.ingredient-choice:hover { border-color: var(--green); }
.planner-page, .shopping-page { max-width: 1000px; }
.planner-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.planner-tabs a { padding: 12px 0; color: var(--muted); }
.planner-tabs a[aria-current] { color: var(--green); border-bottom: 3px solid var(--green); font-weight: 600; }
.menu-status { margin: 20px 0; }
.menu-meals, .shopping-items { list-style: none; padding: 0; margin: 24px 0; }
.menu-meal { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 12px; }
.meal-number { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--sage); color: var(--green); flex-shrink: 0; }
.menu-meal-title { flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.menu-meal h2 { font-size: 1.4rem; }
.menu-meal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-replace { width: 100%; padding-left: 54px; }
.menu-replace summary, .shopping-bought summary { cursor: pointer; color: var(--green); padding: 8px 0; }
.menu-choice-form { display: flex; align-items: flex-end; gap: 14px; margin: 16px 0; }
.menu-choice-form > select, .menu-choice-form > .form-field { flex: 1; min-width: 0; margin: 0; }
.menu-choice-form select { width: 100%; min-height: 49px; padding: 10px 13px; border: 1px solid #cdd3c7; border-radius: 9px; background: var(--white); color: var(--ink); font: inherit; }
.menu-add h2, .shopping-add h2 { font-size: 1.6rem; margin-bottom: 16px; }
.menu-lock { display: flex; align-items: center; gap: 24px; border-radius: 16px; padding: 28px; background: var(--sage); }
.menu-lock > div { flex: 1; }
.menu-lock h2 { font-size: 1.6rem; margin-bottom: 8px; }
.menu-lock p { color: var(--muted); font-size: .9375rem; }
.button:disabled { opacity: .5; cursor: default; }
.shopping-add-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 14px; }
.shopping-add-form .form-field { margin-bottom: 0; }
.shopping-add-form > .errorlist { grid-column: 1 / -1; }
.shopping-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); background: var(--white); border-radius: 12px; margin-bottom: 9px; }
.shopping-check { display: flex; justify-content: center; align-items: center; width: 48px; height: 48px; border: 0; background: transparent; color: var(--green); }
.shopping-check span { display: flex; justify-content: center; align-items: center; width: 28px; height: 28px; border: 2px solid #90a088; border-radius: 8px; font-size: 1.2rem; }
.shopping-item-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shopping-name { display: block; font-weight: 600; }
.shopping-amount { display: block; color: var(--muted); font-size: .875rem; margin-top: 3px; }
.shopping-item-actions { display: flex; align-items: center; flex-wrap: wrap; }
.shopping-item-checked .shopping-name { text-decoration: line-through; color: var(--muted); }
.shopping-item-checked .shopping-check span { background: var(--sage); }
.shopping-bought { border-top: 1px solid var(--line); padding-top: 18px; }
@media (max-width: 740px) {
  .menu-meal { padding: 18px; gap: 12px; }
  .menu-meal-actions { width: 100%; padding-left: 50px; }
  .menu-replace { padding-left: 0; }
  .menu-lock { align-items: flex-start; flex-direction: column; padding: 22px; }
  .shopping-add-form { grid-template-columns: 1fr 1fr; }
  .shopping-add-form > .form-field:first-of-type { grid-column: 1 / -1; }
  .shopping-add-form > button { grid-column: 1 / -1; }
  .shopping-item { gap: 8px; padding: 12px 8px; }
  .shopping-item-actions { flex-direction: column; }
  .menu-choice-form { flex-wrap: wrap; }
}
.ingredient-note { grid-column: 1 / 3; }
.ingredient-remove { display: flex; align-items: center; justify-content: flex-end; }
.delete-checkbox { display: flex; align-items: center; gap: 7px; font-size: .875rem; }
.text-button { background: transparent; border: 0; color: #91533e; text-decoration: underline; text-underline-offset: 3px; font-size: .875rem; padding: 8px; }
.rich-text-toolbar { display: flex; flex-wrap: wrap; gap: 5px; border: 1px solid #cdd3c7; border-bottom: 0; border-radius: 9px 9px 0 0; padding: 8px; background: #f3f4ec; }
.rich-text-toolbar button { border: 1px solid transparent; background: transparent; color: var(--green); padding: 6px 9px; font-size: .8125rem; border-radius: 5px; }
.rich-text-toolbar button:hover, .rich-text-toolbar button:focus-visible { background: var(--sage); border-color: #c4cdb7; }
.rich-text-editor { min-height: 250px; padding: 18px; border: 1px solid #cdd3c7; border-radius: 0 0 9px 9px; outline-offset: 2px; overflow-wrap: anywhere; }
.rich-text-editor[aria-invalid=true] { border-color: var(--error); }
.rich-text-content { line-height: 1.85; font-size: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich-text-content p + p { margin-top: 14px; }
.rich-text-content h2, .rich-text-content h3 { margin: 22px 0 12px; letter-spacing: -.02em; }
.rich-text-content h2 { font-size: 1.7rem; }
.rich-text-content h3 { font: 600 1.1rem/1.5 ui-sans-serif, system-ui, sans-serif; }
.rich-text-content ul, .rich-text-content ol { margin: 14px 0; padding-left: 26px; white-space: normal; }
.rich-text-content li { padding-left: 5px; margin: 9px 0; }
.rich-text-content blockquote { margin: 16px 0; padding-left: 20px; border-left: 3px solid #bdcbaa; color: var(--muted); }
.photo-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 25px; }
.photo-remove-card { overflow: hidden; border-radius: 9px; border: 1px solid var(--line); cursor: pointer; }
.photo-remove-card img { display: block; height: 130px; width: 100%; object-fit: cover; }
.photo-remove-card > span { display: flex; align-items: center; gap: 7px; padding: 10px; font-size: .8125rem; }
.recipe-form-actions, .delete-recipe-form, .recipe-actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.delete-recipe-form { margin-top: 28px; }
.recipe-actions { flex-shrink: 0; }
.recipe-actions { flex-wrap: wrap; }
.button-danger { color: white; background: #934c3c; }
.button-danger:hover { color: white; background: #783d31; }
.recipe-stats { display: flex; gap: 50px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 28px 0; padding: 22px 0; }
.recipe-stats dt { font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.recipe-stats dd { font-size: 1rem; font-weight: 550; margin: 0; }
.recipe-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 30px 0 38px; }
.recipe-gallery a:first-child { grid-column: 1 / -1; }
.recipe-gallery img { display: block; width: 100%; object-fit: cover; height: 180px; border-radius: 14px; }
.recipe-gallery a:first-child img { height: min(440px, 45vw); }
.recipe-body { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 45px; align-items: start; margin-top: 32px; }
.recipe-body h2 { font-size: 2rem; margin: 10px 0 25px; }
.recipe-ingredients { padding: 26px; border-radius: 15px; background: var(--sage); }
.recipe-ingredients > ul { list-style: none; padding: 0; margin: 0; }
.recipe-ingredients li { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid #d1dac6; overflow-wrap: anywhere; font-size: 1rem; }
.ingredient-amount { font-weight: 600; flex-shrink: 0; max-width: 45%; }
.recipe-ingredients small { display: block; color: var(--muted); font-size: .8125rem; margin-top: 2px; }
.recipe-method { padding-top: 26px; }
.recipe-source { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: .875rem; }
@media (max-width: 1000px) {
  .recipe-grid { grid-template-columns: repeat(2, 1fr); }
  .recipe-cover { height: 220px; }
  .recipe-body { gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}
@media (max-width: 740px) {
  .main-nav { gap: 14px; }
  .recipe-page { width: calc(100% - 40px); margin-top: 20px; }
  .recipe-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .recipe-filters { flex-wrap: wrap; padding: 18px; }
  .recipe-filters > div { flex: 1 1 100%; }
  .recipe-grid { grid-template-columns: 1fr; gap: 22px; }
  .recipe-cover { height: 240px; }
  .editor-section { padding: 24px 20px; }
  .editor-section-heading h2 { font-size: 1.65rem; }
  .field-grid { gap: 12px; }
  .field-grid label { min-height: 44px; display: flex; align-items: flex-end; }
  .ingredient-row { grid-template-columns: 1fr 1fr; }
  .ingredient-name { grid-column: 1 / -1; }
  .ingredient-note { grid-column: 1 / -1; }
  .ingredient-remove { grid-column: 1 / -1; }
  .photo-picker { grid-template-columns: repeat(2, 1fr); }
  .recipe-stats { gap: 24px; flex-wrap: wrap; }
  .recipe-body { grid-template-columns: 1fr; gap: 15px; }
  .recipe-gallery { gap: 10px; }
  .recipe-gallery img { height: 100px; }
  .recipe-gallery a:first-child img { height: 260px; }
}
@media (min-width: 441px) and (max-width: 650px) {
  .site-header:has(.main-nav) { flex-wrap: wrap; }
  .main-nav { width: 100%; justify-content: space-between; }
}

.recipe-import-page { max-width: 760px; }
.recipe-import-page > h1 { font-size: clamp(2.5rem, 5vw, 3.8rem); margin: 16px 0; }
.recipe-import-page > h1 em { color: #58765a; }
.import-setup-note, .import-review-note { margin-bottom: 24px; }
.import-explanation { font-size: .875rem; color: var(--muted); padding: 18px 0 24px; }
.paste-recipe { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.paste-recipe summary { cursor: pointer; color: var(--green); font-size: .875rem; }
.paste-recipe > div { margin-top: 20px; }
.import-progress { margin-top: 15px; text-align: center; }
.button:disabled { opacity: .65; cursor: wait; }
.import-photo-choice { max-width: 360px; margin-bottom: 26px; }
.import-photo-choice > img { display: block; width: 100%; height: 220px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; background: var(--sage); }
.import-photo-choice > label { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: .875rem; }

/* Family album */
.album-upload-form { margin-top: 0; }
.album-upload-form input[type=file] { height: auto; min-height: 52px; }
.album-upload-form > .help-text { margin-top: 12px; }
.album-grid { display: flex; flex-wrap: wrap; margin: -10px; }
.album-card { display: block; flex: 0 0 calc(25% - 20px); width: calc(25% - 20px); margin: 10px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--white); color: var(--ink); text-decoration: none; }
.album-card:hover { border-color: #9cab91; color: var(--ink); }
.album-card > img { display: block; width: 100%; height: 180px; object-fit: cover; background: #e8eddf; }
.album-card > div { padding: 15px 16px; }
.album-card p { font-size: 1rem; overflow-wrap: anywhere; }
.album-card span { display: block; color: var(--muted); font-size: .75rem; margin-top: 6px; }
.album-detail > h1 { font-size: clamp(2.3rem, 4vw, 3.4rem); margin-top: 12px; overflow-wrap: anywhere; }
.album-full-photo { display: block; max-height: 70vh; width: 100%; object-fit: contain; border-radius: 16px; background: #e8eddf; margin: 25px 0; }
.album-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.album-delete-link { margin-left: auto; color: #934c3c; font-size: .875rem; }
.album-delete-preview { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 10px; background: #e8eddf; }

/* Fixed overlay preserves the current page, including any unfinished form. */
.screensaver-open { overflow: hidden; }
.screensaver { position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 2147483000; background: #0d100e; color: #fff; outline: none; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.screensaver-photo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-position: center center; background-size: contain; background-repeat: no-repeat; opacity: 0; transition: opacity .9s ease; }
.screensaver-close { position: absolute; top: 22px; right: 22px; z-index: 2; border: 1px solid rgba(255,255,255,.3); border-radius: 24px; padding: 11px 18px; background: rgba(0,0,0,.35); color: #fff; font-size: .875rem; }
.screensaver-footer { position: absolute; bottom: 0; left: 0; right: 0; padding: 55px 24px 24px; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none; }
.screensaver-caption { color: #fff; font-size: 1.1rem; line-height: 1.5; margin-bottom: 7px; }
.screensaver-hint { color: rgba(255,255,255,.85); font-size: .875rem; }
@media (max-width: 1000px) {
  .album-card { flex-basis: calc(33.333% - 20px); width: calc(33.333% - 20px); }
  .site-header { flex-wrap: wrap; }
  .main-nav { flex-wrap: wrap; }
}
@media (max-width: 740px) {
  .album-card { flex-basis: calc(50% - 20px); width: calc(50% - 20px); }
  .album-card > img { height: 160px; }
  .album-card > div { padding: 12px; }
  .album-delete-link { margin-left: 0; }
  .screensaver-close { top: 16px; right: 16px; }
}
@media (max-width: 440px) {
  .main-nav { justify-content: flex-start; }
  .main-nav > a { margin-right: 4px; }
  .album-card > img { height: 135px; }
}
