:root {
    --ink: #173f35;
    --ink-deep: #0d2c26;
    --sage: #819a73;
    --sage-light: #dfe8d7;
    --cream: #f7f3e9;
    --paper: #fffdf8;
    --orange: #de7047;
    --orange-dark: #bf5531;
    --line: #ddd8ca;
    --muted: #6c746f;
    --shadow: 0 18px 55px rgba(20, 52, 44, .12);
    --serif: "DM Serif Display", Georgia, serif;
    --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink-deep); font-family: var(--sans); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at 78% 18%, rgba(222,112,71,.24), transparent 28%), linear-gradient(135deg, var(--ink-deep), var(--ink)); }
.auth-card { width: min(100%, 470px); padding: 34px; border-radius: 26px; background: var(--paper); box-shadow: 0 28px 90px rgba(0,0,0,.3); }
.auth-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.auth-brand .brand-mark { flex: 0 0 auto; width: 46px; height: 46px; }
.auth-brand .brand-mark span { font-size: 30px; }
.auth-brand p { margin: 0; color: var(--ink); font: 25px var(--serif); }
.auth-brand > div > span { color: var(--muted); font-size: 12px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 25px 0; padding: 4px; border-radius: 999px; background: var(--sage-light); }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.auth-tabs button.active { background: var(--paper); color: var(--ink); box-shadow: 0 3px 12px rgba(23,63,53,.1); }
.auth-form { display: grid; gap: 15px; }
.auth-form h1 { margin: 0; color: var(--ink); font: 38px/1.05 var(--serif); }
.auth-form > div:first-child > p:last-child { margin: 8px 0 4px; color: var(--muted); font-size: 14px; }
.auth-form .section-kicker { margin-bottom: 7px; }
.auth-submit { width: 100%; margin-top: 4px; }
.field small { margin-top: -2px; color: var(--muted); font-size: 11px; }

.topbar { height: 78px; padding: 0 clamp(24px, 5vw, 78px); display: flex; align-items: center; gap: 48px; background: rgba(255,253,248,.95); border-bottom: 1px solid rgba(23,63,53,.12); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font: 26px var(--serif); }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50% 50% 45% 55%; background: var(--ink); color: var(--cream); transform: rotate(-8deg); }
.brand-mark span { transform: rotate(8deg); font-size: 25px; margin-top: -5px; }
.nav-links { display: flex; gap: 35px; align-self: stretch; }
.nav-links a, .nav-links button { border: 0; background: none; display: flex; align-items: center; color: var(--muted); text-decoration: none; cursor: pointer; font-weight: 600; position: relative; padding: 0; }
.nav-links button svg { width: 16px; margin-right: 6px; }
.nav-links .active { color: var(--ink); }
.nav-links .active::after { content: ""; height: 3px; border-radius: 3px 3px 0 0; background: var(--orange); position: absolute; bottom: 0; left: 0; right: 0; }
.top-add { margin-left: auto; }

.button { border: 0; border-radius: 999px; min-height: 44px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--orange); color: white; box-shadow: 0 7px 18px rgba(222,112,71,.22); }
.button-primary:hover { background: var(--orange-dark); }
.button-secondary { background: var(--sage-light); color: var(--ink); }
.button-ghost { background: transparent; border: 1px solid var(--line); }
.button-danger { background: #a83c32; color: white; }
.button-small { min-height: 38px; padding: 0 16px; font-size: 13px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); cursor: pointer; }

.hero { min-height: 370px; padding: 64px clamp(24px, 8vw, 125px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); align-items: center; gap: 60px; background: var(--ink); color: var(--cream); overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; right: 5%; top: -230px; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .section-kicker { margin: 0 0 13px; color: var(--orange); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { font: clamp(42px, 5vw, 70px)/.98 var(--serif); letter-spacing: -.025em; margin: 0; max-width: 800px; font-weight: 400; }
.hero h1 em { color: #eaa57e; font-weight: 400; }
.hero-intro { margin: 25px 0 0; max-width: 570px; color: rgba(247,243,233,.72); line-height: 1.65; font-size: 17px; }
.hero-art { height: 250px; position: relative; }
.sun { width: 190px; height: 190px; border-radius: 50%; background: #e49a5c; position: absolute; left: 27%; top: 12px; opacity: .95; }
.bowl { position: absolute; width: 255px; height: 105px; border-radius: 10px 10px 130px 130px; background: #f2d8b0; left: 18%; bottom: 9px; border-top: 12px solid #fff1d8; transform: rotate(-2deg); box-shadow: inset 0 -12px rgba(130,74,46,.08); }
.bowl-food { position: absolute; width: 205px; height: 42px; border-radius: 50%; background: #7d925b; top: -30px; left: 25px; color: #d85d3d; letter-spacing: 9px; text-align: center; padding-top: 7px; font-size: 24px; transform: rotate(2deg); }
.steam { position: absolute; width: 25px; height: 75px; border-left: 3px solid rgba(255,255,255,.6); border-radius: 50%; top: 6px; }
.steam-one { left: 43%; transform: rotate(8deg); }.steam-two { left: 54%; top: 22px; transform: rotate(-12deg); }
.leaf { position: absolute; width: 75px; height: 36px; border-radius: 100% 0 100% 0; background: #98ad7f; z-index: 2; }
.leaf-one { left: 8%; bottom: 72px; transform: rotate(26deg); }.leaf-two { right: 9%; top: 72px; transform: rotate(-33deg); }

.library-section { padding: 60px clamp(24px, 6vw, 96px) 90px; max-width: 1500px; margin: 0 auto; }
.library-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 34px; }
.library-heading h2 { margin: 0; font: 38px var(--serif); font-weight: 400; }
.recipe-count { display: inline-flex; vertical-align: middle; margin-left: 13px; border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; font: 12px var(--sans); color: var(--muted); }
.view-note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.view-note svg { width: 28px; height: 28px; color: var(--sage); }
.toolbar { display: flex; align-items: center; gap: 13px; margin-bottom: 32px; }
.search-box { height: 48px; min-width: 290px; flex: 1; max-width: 430px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); display: flex; align-items: center; padding: 0 18px; gap: 11px; }
.search-box svg { color: var(--sage); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.category-tabs { display: flex; gap: 7px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.category-tab { min-height: 42px; border: 1px solid var(--line); border-radius: 999px; padding: 0 17px; background: transparent; white-space: nowrap; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.category-tab.active { color: white; background: var(--ink); border-color: var(--ink); }
.sort-control { height: 44px; border-left: 1px solid var(--line); padding-left: 16px; display: flex; align-items: center; gap: 5px; }
.sort-control svg { width: 17px; color: var(--muted); }
.sort-control select { border: 0; background: transparent; outline: 0; color: var(--ink); font-size: 13px; font-weight: 600; }

.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.recipe-card { min-height: 365px; background: var(--paper); border: 1px solid rgba(23,63,53,.12); border-radius: 20px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .22s, box-shadow .22s; animation: rise .4s both; }
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-art { height: 130px; padding: 18px; display: flex; align-items: end; justify-content: space-between; position: relative; overflow: hidden; }
.card-art::after { content: ""; width: 145px; height: 145px; border-radius: 50%; border: 1px solid rgba(255,255,255,.42); position: absolute; right: -48px; top: -42px; }
.art-dinner { background: #cb7453; }.art-breakfast { background: #d7a43f; }.art-lunch { background: #718e6e; }.art-baking { background: #a98676; }.art-dessert { background: #c78891; }.art-snack { background: #769896; }.art-drinks { background: #7596ae; }.art-default { background: #8c9170; }
.dish-glyph { font-size: 62px; filter: saturate(.78); transform: rotate(-5deg); line-height: 1; text-shadow: 0 7px 10px rgba(45,34,24,.15); }
.favorite-button { width: 39px; height: 39px; z-index: 2; display: grid; place-items: center; align-self: start; border: 0; border-radius: 50%; background: rgba(255,255,255,.87); color: var(--ink); cursor: pointer; }
.favorite-button.active { color: var(--orange); }
.favorite-button.active svg { fill: currentColor; }
.card-body { padding: 22px 23px 21px; display: flex; flex: 1; flex-direction: column; }
.card-category { color: var(--orange); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; }
.card-body h3 { font: 25px/1.12 var(--serif); font-weight: 400; margin: 9px 0 9px; }
.card-description { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 17px; border-top: 1px solid var(--line); margin-top: auto; padding-top: 17px; color: var(--muted); font-size: 12px; }
.card-meta span { display: flex; align-items: center; gap: 6px; }.card-meta svg { width: 16px; height: 16px; }
.card-open { margin-left: auto; color: var(--ink); }.card-open svg { width: 18px; }
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed #bbb7aa; border-radius: 20px; }
.empty-icon { font: 60px var(--serif); color: var(--orange); transform: rotate(-20deg); }.empty-state h3 { font: 30px var(--serif); margin: 0; }.empty-state p { color: var(--muted); margin-bottom: 25px; }

dialog { border: 0; padding: 0; background: transparent; color: var(--ink-deep); }
dialog::backdrop { background: rgba(8, 30, 25, .66); backdrop-filter: blur(3px); }
.recipe-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border-radius: 24px; }
.dialog-shell { background: var(--paper); border-radius: 24px; position: relative; overflow: hidden; }
.dialog-close { position: absolute; right: 18px; top: 18px; z-index: 3; }
.detail-hero { min-height: 235px; color: white; padding: 45px 55px; display: flex; flex-direction: column; justify-content: end; position: relative; overflow: hidden; }
.detail-hero::after { content: attr(data-glyph); position: absolute; right: 65px; top: 40px; font-size: 120px; transform: rotate(8deg); opacity: .96; }
.detail-hero .card-category { color: white; opacity: .75; }.detail-hero h2 { max-width: 620px; font: 48px/1.02 var(--serif); font-weight: 400; margin: 10px 0; position: relative; z-index: 1; }
.detail-description { opacity: .82; max-width: 590px; margin: 0; position: relative; z-index: 1; }
.detail-content { padding: 34px 55px 48px; }
.detail-toolbar { display: flex; align-items: center; gap: 22px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.detail-stat { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }.detail-stat strong { color: var(--ink); display: block; }.detail-actions { margin-left: auto; display: flex; gap: 8px; }
.serving-picker { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; background: var(--sage-light); }.serving-picker button { border: 0; border-radius: 50%; width: 27px; height: 27px; display: grid; place-items: center; background: white; cursor: pointer; }.serving-picker svg { width: 14px; }
.detail-columns { display: grid; grid-template-columns: .85fr 1.15fr; gap: 55px; padding-top: 32px; }
.detail-columns h3 { font: 27px var(--serif); font-weight: 400; margin: 0 0 19px; }
.ingredient-list { list-style: none; padding: 0; margin: 0; }.ingredient-list li { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(221,216,202,.7); font-size: 14px; }.ingredient-amount { color: var(--orange-dark); font-weight: 700; }.ingredient-note { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.method-list { list-style: none; padding: 0; margin: 0; counter-reset: step; }.method-list li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 13px; padding-bottom: 21px; line-height: 1.6; font-size: 14px; }.method-list li::before { content: counter(step); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: white; font-size: 11px; font-weight: 700; }

.editor-dialog { width: min(850px, calc(100vw - 32px)); max-height: calc(100vh - 28px); border-radius: 24px; }
.editor-shell { background: var(--paper); border-radius: 24px; overflow: hidden; }
.editor-header { padding: 27px 34px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.editor-header .section-kicker { margin-bottom: 5px; }.editor-header h2 { font: 32px var(--serif); font-weight: 400; margin: 0; }
.editor-body { padding: 28px 34px 15px; max-height: calc(100vh - 210px); overflow-y: auto; }
.form-grid { display: grid; gap: 17px; }.two-columns { grid-template-columns: repeat(2, minmax(0,1fr)); }.field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; }.field > span { color: var(--muted); font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 12px 13px; outline: 0; resize: vertical; }.field input:focus, .field textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(129,154,115,.14); }
.favorite-field { align-self: end; min-height: 44px; display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; font-weight: 600; }.favorite-field input { position: absolute; opacity: 0; }.favorite-check { width: 37px; height: 37px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }.favorite-field input:checked + .favorite-check { background: #f8dfd4; color: var(--orange); border-color: #edb49f; }.favorite-field input:checked + .favorite-check svg { fill: currentColor; }
.repeat-section { margin-top: 34px; padding-top: 27px; border-top: 1px solid var(--line); }.repeat-heading { display: flex; align-items: center; justify-content: space-between; }.repeat-heading > div { display: flex; gap: 11px; align-items: center; }.repeat-heading h3 { margin: 0; font: 25px var(--serif); font-weight: 400; }.repeat-section > p { margin: 6px 0 16px 41px; color: var(--muted); font-size: 12px; }.step-label { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--ink); font-size: 10px; font-weight: 700; }
.ingredient-row { display: grid; grid-template-columns: 1.7fr .65fr .8fr 1.4fr 38px; gap: 8px; margin-bottom: 8px; }.ingredient-row input, .step-row textarea { border: 1px solid var(--line); border-radius: 9px; padding: 10px; min-width: 0; outline: 0; background: white; }.row-remove { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: #a83c32; cursor: pointer; }.row-remove svg { width: 17px; }
.step-row { display: grid; grid-template-columns: 32px 1fr 38px; gap: 8px; align-items: start; margin-bottom: 9px; }.step-row-number { margin-top: 7px; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-light); color: var(--ink); font-size: 11px; font-weight: 700; }.step-row textarea { resize: vertical; min-height: 58px; }
.editor-footer { padding: 19px 34px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); background: #f5f1e6; }
.form-message { padding: 12px 15px; margin-bottom: 18px; border-radius: 9px; background: #f6dcd6; color: #862e29; font-size: 13px; }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); border-radius: 22px; }.confirm-shell { padding: 38px; background: var(--paper); border-radius: 22px; text-align: center; }.danger-icon { margin: 0 auto 18px; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: #f5dad5; color: #a83c32; }.confirm-shell h2 { font: 31px var(--serif); margin: 0; }.confirm-shell p { color: var(--muted); line-height: 1.6; }.confirm-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: 999px; background: var(--ink-deep); color: white; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
    .recipe-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.hero { grid-template-columns: 1fr .6fr; }.hero-art { transform: scale(.8); transform-origin: center; }.toolbar { flex-wrap: wrap; }.category-tabs { order: 3; flex-basis: 100%; }.sort-control { margin-left: auto; }.detail-hero::after { opacity: .35; }
}
@media (max-width: 680px) {
    .topbar { padding: 0 18px; height: 68px; }.nav-links { display: none; }.top-add { min-width: 44px; padding: 0 13px; font-size: 0; }.top-add svg { width: 20px; }.hero { min-height: 350px; padding: 48px 24px; grid-template-columns: 1fr; }.hero-art { display: none; }.hero h1 { font-size: 46px; }.library-section { padding: 44px 18px 70px; }.library-heading { align-items: start; }.library-heading h2 { font-size: 32px; }.view-note { display: none; }.toolbar { align-items: stretch; }.search-box { max-width: none; min-width: 100%; }.sort-control { border-left: 0; padding-left: 5px; }.recipe-grid { grid-template-columns: 1fr; }.recipe-card { min-height: 330px; }.detail-hero { padding: 42px 25px 30px; }.detail-hero h2 { font-size: 37px; }.detail-hero::after { right: 15px; font-size: 90px; }.detail-content { padding: 25px; }.detail-toolbar { flex-wrap: wrap; gap: 13px; }.detail-actions { width: 100%; margin-left: 0; }.detail-columns { grid-template-columns: 1fr; gap: 35px; }.editor-header, .editor-footer { padding-left: 20px; padding-right: 20px; }.editor-body { padding-left: 20px; padding-right: 20px; }.two-columns { grid-template-columns: 1fr 1fr; }.ingredient-row { grid-template-columns: 1fr .55fr .75fr 38px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }.ingredient-row .ingredient-note-input { grid-column: 1 / 4; grid-row: 2; }.ingredient-row .row-remove { grid-column: 4; grid-row: 1; }.repeat-heading { align-items: start; gap: 10px; }.repeat-heading .button { font-size: 0; width: 38px; padding: 0; }.repeat-heading .button svg { margin: 0; }.repeat-section > p { margin-left: 0; }.editor-footer .button { flex: 1; }
}

/* Geerts Gerechten additions */
.brand-mark { width: 42px; border-radius: 14px; transform: none; }
.brand-mark span { transform: none; margin: 0; font: 700 12px var(--sans); letter-spacing: .04em; }
.top-actions { margin-left: auto; display: flex; gap: 9px; }
.top-actions .top-add { margin-left: 0; }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--sage-light); color: var(--ink); display: inline-grid; place-items: center; font-size: 10px; }
.selection-actions { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 13px; }
.card-select { position: absolute; left: 16px; top: 16px; z-index: 3; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.9); display: grid; place-items: center; cursor: pointer; }
.card-select input { position: absolute; opacity: 0; }
.card-select span { width: 17px; height: 17px; border: 1.5px solid var(--sage); border-radius: 5px; display: grid; place-items: center; }
.card-select input:checked + span { background: var(--ink); border-color: var(--ink); }
.card-select input:checked + span::after { content: "✓"; color: white; font-size: 11px; font-weight: 700; }
.card-tags, .detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tags { margin: 12px 0 5px; }
.tag-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; background: var(--sage-light); color: var(--ink); font-size: 10px; font-weight: 700; }
.detail-tags { margin: 11px 0 0; position: relative; z-index: 1; }
.detail-tags .tag-pill { background: rgba(255,255,255,.2); color: white; }
.detail-extra { margin-top: 28px; padding: 20px; border-radius: 14px; background: #f1eee4; }
.detail-extra h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.detail-extra p { white-space: pre-wrap; margin: 0; line-height: 1.6; font-size: 14px; }
.source-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--orange-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.source-link svg { width: 15px; height: 15px; }
.add-one-list { margin-top: 22px; width: 100%; }
.tag-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-check { position: relative; cursor: pointer; }
.tag-check input { position: absolute; opacity: 0; }
.tag-check span { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; }
.tag-check input:checked + span { background: var(--ink); border-color: var(--ink); color: white; }

.utility-dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 28px); border-radius: 24px; }
.utility-dialog.wide { width: min(780px, calc(100vw - 32px)); }
.utility-shell { background: var(--paper); border-radius: 24px; overflow: hidden; }
.utility-body { padding: 28px 34px; max-height: calc(100vh - 205px); overflow-y: auto; }
.utility-intro { color: var(--muted); line-height: 1.6; margin: 0 0 23px; }
.utility-body .field + .field { margin-top: 18px; }
.info-box { margin-top: 22px; padding: 14px; border-radius: 12px; background: var(--sage-light); display: flex; gap: 11px; align-items: flex-start; color: var(--ink); font-size: 12px; line-height: 1.5; }
.info-box svg { flex: 0 0 auto; color: var(--orange-dark); }
.shopping-list { display: grid; gap: 7px; }
.shopping-row { display: grid; grid-template-columns: 32px 90px 1fr 36px; gap: 10px; align-items: center; padding: 11px 8px; border-bottom: 1px solid var(--line); }
.shopping-row.checked { opacity: .48; }
.shopping-row.checked .shopping-name { text-decoration: line-through; }
.shopping-check { width: 25px; height: 25px; accent-color: var(--ink); }
.shopping-amount { color: var(--orange-dark); font-weight: 700; font-size: 13px; }
.shopping-name { font-weight: 600; }
.shopping-sub { display: block; color: var(--muted); font-weight: 400; font-size: 10px; margin-top: 2px; }
.shopping-empty { text-align: center; padding: 45px 20px; color: var(--muted); line-height: 1.6; }
.manual-item-form { display: grid; grid-template-columns: 1fr 100px 100px auto; gap: 8px; padding: 16px 34px; background: #f2eee4; }
.manual-item-form input, .tag-create-form input { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: white; outline: 0; }
.editor-footer.split { justify-content: space-between; }
.editor-footer.split > div { display: flex; gap: 8px; }
.button-danger-text { color: #973b32; }
.print-title { display: none; }
.manage-section + .manage-section { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 28px; }
.manage-section h3 { margin: 0; display: flex; gap: 9px; align-items: center; font: 25px var(--serif); font-weight: 400; }
.manage-section > p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.tag-create-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 17px 0; }
.managed-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.managed-tag { display: inline-flex; align-items: center; gap: 4px; padding-left: 13px; border-radius: 999px; background: var(--sage-light); font-size: 12px; font-weight: 700; }
.managed-tag button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; color: #743a32; }
.managed-tag svg { width: 13px; }
.backup-actions { display: flex; gap: 8px; margin-top: 17px; }
.password-form { display: grid; gap: 12px; margin: 17px 0; }
.password-form .button { justify-self: start; }
.logout-button { color: #8d3029; }
.nav-links button svg { width: 16px; height: 16px; margin-right: 5px; }
.password-form { display: grid; gap: 12px; margin: 18px 0; }
.logout-button { color: #8d3029; }
.shopping-print-page { display: none; }

@media (max-width: 900px) {
    .topbar { gap: 18px; }.brand > span:last-child { display: none; }.top-actions .button-secondary { font-size: 0; width: 44px; padding: 0; }.top-actions .button-secondary svg { margin: 0; }.nav-links { gap: 18px; }.nav-links #accountNav span { display: none; }.nav-links #accountNav svg { margin: 0; }
}
@media (max-width: 680px) {
    .auth-card { padding: 26px 20px; }.top-actions { gap: 6px; }.nav-links { gap: 12px; }.nav-links a, .nav-links button { font-size: 12px; }.selection-actions { align-items: flex-end; flex-direction: column; }.detail-actions { flex-wrap: wrap; }.manual-item-form { grid-template-columns: 1fr 72px 72px; padding: 14px 20px; }.manual-item-form .button { grid-column: 1 / -1; }.utility-body { padding: 23px 20px; }.shopping-row { grid-template-columns: 28px 68px 1fr 32px; gap: 7px; }.editor-footer.split { flex-direction: column-reverse; }.editor-footer.split > div { display: grid; grid-template-columns: 1fr 1fr; }.backup-actions { flex-direction: column; }
}

@media print {
    @page { margin: 16mm; }
    body { background: white !important; color: #111 !important; }
    body > * { display: none !important; }
    body.print-recipe #recipeDialog { display: block !important; position: static !important; width: 100% !important; max-height: none !important; }
    body.print-recipe #recipeDialog .dialog-shell { box-shadow: none; overflow: visible; }
    body.print-recipe .dialog-close, body.print-recipe .detail-actions, body.print-recipe .serving-picker, body.print-recipe .add-one-list { display: none !important; }
    body.print-recipe .detail-hero { min-height: auto; padding: 0 0 18px; background: white !important; color: #111 !important; border-bottom: 2px solid #173f35; }
    body.print-recipe .detail-hero::after { display: none; }
    body.print-recipe .detail-hero .card-category, body.print-recipe .detail-description { color: #444; }
    body.print-recipe .detail-tags .tag-pill { color: #173f35; border: 1px solid #173f35; background: white; }
    body.print-recipe .detail-content { padding: 20px 0; }
    body.print-shopping #shoppingPrintPage { display: block !important; width: 100% !important; }
    body.print-shopping .print-title { display: flex; gap: 16px; align-items: center; border-bottom: 2px solid #173f35; padding-bottom: 14px; margin-bottom: 22px; }
    .print-logo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #173f35; color: white; font-weight: 700; }
    .print-title h1 { margin: 0; font: 30px var(--serif); }.print-title p { margin: 3px 0 0; color: #555; font-size: 12px; }
    body.print-shopping .shopping-row { grid-template-columns: 28px 90px 1fr; break-inside: avoid; page-break-inside: avoid; }
    body.print-shopping .print-checkbox { width: 17px; height: 17px; display: grid; place-items: center; border: 1.5px solid #173f35; border-radius: 4px; font-size: 12px; font-weight: 800; }
    .shopping-row .row-remove { display: none; }
}
