:root {
  --ink: #17201c;
  --muted: #667169;
  --forest: #173d2d;
  --forest-2: #245840;
  --cream: #f4f2ec;
  --paper: #fffefa;
  --line: #d9ddd6;
  --red: #a63d2f;
  --shadow: 0 18px 48px rgba(24, 36, 29, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Arial, Helvetica, sans-serif; letter-spacing: 0; }
body:has(.cook-page) > .site-header { display: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
img { object-fit: cover; }
.page-width { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.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; }
.eyebrow { margin: 0 0 12px; color: #dce8df; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.6px; }
.eyebrow.dark { color: var(--forest-2); }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: 6px; font-weight: 750; transition: background .18s ease, color .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--forest); }
.button-primary:hover { background: var(--forest-2); }
.button-secondary { color: var(--ink); background: transparent; border-color: #bfc7c0; }
.button-secondary:hover { background: #fff; border-color: #9da8a0; }
.site-header { position: sticky; top: 0; z-index: 40; height: 66px; background: rgba(255, 254, 250, .94); border-bottom: 1px solid rgba(23, 32, 28, .1); backdrop-filter: blur(14px); }
.header-inner { width: min(1280px, calc(100% - 42px)); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 850; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--forest); border-radius: 6px; }
.brand-mark { overflow: hidden; background: #111; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.top-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 750; }
.top-nav a { padding: 8px 0; }
.top-nav a:hover { color: var(--forest-2); }
.top-nav .icon-link { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; }
.account-link { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding-inline: 10px !important; border: 1px solid var(--line); border-radius: 6px; }

.library-hero { position: relative; height: min(500px, 62svh); min-height: 380px; overflow: hidden; background: #18281e; }
.library-hero > img, .detail-visual > img, .recipe-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.library-hero > img { animation: heroZoom 1.4s cubic-bezier(.2,.8,.2,1) both; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,20,15,.84) 0%, rgba(11,20,15,.64) 36%, rgba(11,20,15,.12) 72%); }
.hero-content { position: relative; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; color: #fff; padding-bottom: 24px; animation: riseIn .7s .12s ease both; }
.hero-content h1 { max-width: 680px; margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 64px; line-height: 1; font-weight: 500; }
.hero-content > p:not(.eyebrow) { max-width: 530px; margin: 25px 0 28px; color: #e8ede8; font-size: 18px; line-height: 1.55; }
.hero-content .button { background: #fff; color: var(--forest); }
.recipe-workspace { padding-block: 72px 90px; }
.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.workspace-heading h2, .portion-panel h2, .section-title-row h2, .steps-section h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 38px; font-weight: 500; }
.result-count { color: var(--muted); font-size: 14px; }
.filter-bar { display: grid; grid-template-columns: 1fr 260px; gap: 12px; margin: 34px 0 12px; }
.search-field, .select-field { height: 52px; display: flex; align-items: center; gap: 11px; padding: 0 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.search-field:focus-within, .select-field:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(36,88,64,.12); }
.search-field input, .select-field select { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.recipe-list { border-top: 1px solid var(--line); }
.recipe-row { position: relative; display: grid; grid-template-columns: 165px 1fr 38px; gap: 25px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); transition: padding .2s ease, background .2s ease; }
.recipe-row:hover { padding-left: 12px; padding-right: 12px; background: rgba(255,255,255,.52); }
.recipe-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 6px; background: #ddd; }
.recipe-thumb img { transition: transform .35s ease; }
.recipe-row:hover .recipe-thumb img { transform: scale(1.035); }
.category-label { display: inline-block; margin-bottom: 8px; color: var(--forest-2); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: 1.2px; }
.category-label.light { color: #e2eee5; }
.recipe-copy h3 { margin: 0 0 7px; font-family: Georgia, 'Times New Roman', serif; font-size: 27px; font-weight: 500; }
.recipe-copy > p { max-width: 720px; margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.meta-line { display: flex; gap: 22px; color: #48534c; font-size: 13px; }
.meta-line span { display: flex; align-items: center; gap: 6px; }
.row-arrow { color: var(--forest); }
.empty-state, .not-found { min-height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.state-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: var(--forest); background: #e3ece5; border-radius: 50%; font-size: 20px; font-weight: 900; }
.empty-state h3, .not-found h1 { margin: 17px 0 7px; color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: 30px; font-weight: 500; }
.empty-state p, .not-found p { margin: 0 0 18px; }
.text-button { padding: 4px; border: 0; border-bottom: 1px solid var(--forest); color: var(--forest); background: transparent; font-weight: 750; }

.detail-page { background: var(--paper); }
.detail-visual { position: relative; height: min(620px, 66svh); min-height: 480px; overflow: hidden; color: #fff; background: #19281f; }
.detail-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,16,12,.8) 0%, rgba(9,16,12,.12) 63%), linear-gradient(90deg, rgba(9,16,12,.55), transparent 60%); }
.back-link { position: absolute; top: 28px; left: max(24px, calc((100vw - 1180px)/2)); display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 5px; background: rgba(13,27,19,.48); backdrop-filter: blur(8px); font-weight: 750; }
.visual-copy { position: absolute; left: max(24px, calc((100vw - 1180px)/2)); right: 24px; bottom: 55px; max-width: 780px; animation: riseIn .6s ease both; }
.visual-copy h1 { margin: 0 0 15px; font-family: Georgia, 'Times New Roman', serif; font-size: 68px; line-height: 1; font-weight: 500; }
.visual-copy p { max-width: 680px; margin: 0; color: #e8ece8; font-size: 18px; line-height: 1.5; }
.detail-content { padding: 0 0 90px; }
.portion-panel { position: relative; z-index: 2; margin-top: -28px; min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 34px; background: var(--paper); border-radius: 7px; box-shadow: var(--shadow); }
.portion-panel h2 { font-size: 31px; }
.portion-panel > div > p:last-child { margin: 7px 0 0; color: var(--muted); }
.portion-control { display: grid; grid-template-columns: 50px 118px 50px; align-items: stretch; height: 66px; border: 1px solid #aeb9b1; border-radius: 7px; overflow: hidden; }
.portion-control button { border: 0; color: var(--forest); background: #edf2ee; }
.portion-control button:hover { background: #dfe9e2; }
.portion-control label { display: flex; flex-direction: column; justify-content: center; border-inline: 1px solid #aeb9b1; text-align: center; }
.portion-control input { width: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; text-align: center; font-size: 25px; font-weight: 850; appearance: textfield; }
.portion-control small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.recipe-meta-band { display: flex; gap: 38px; padding: 28px 6px; border-bottom: 1px solid var(--line); color: #47534b; font-size: 14px; }
.recipe-meta-band span { display: flex; align-items: center; gap: 8px; }
.recipe-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .78fr); gap: 78px; padding-top: 64px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 33px; }
.portion-badge { padding: 8px 11px; color: var(--forest); background: #e8f0ea; border-radius: 5px; font-size: 12px; font-weight: 850; }
.ingredient-group { margin-bottom: 38px; }
.ingredient-group h3 { margin: 0 0 10px; color: var(--forest); font-size: 13px; text-transform: uppercase; letter-spacing: 1.3px; }
.ingredient-rows { border-top: 1px solid var(--line); }
.ingredient-row { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 3px; border-bottom: 1px solid var(--line); }
.ingredient-row strong { display: block; font-size: 15px; }
.ingredient-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.ingredient-row > span { flex-shrink: 0; color: var(--forest); font-size: 17px; font-weight: 850; }
.steps-section h2 { margin-bottom: 28px; }
.steps-list { margin: 0; padding: 0; list-style: none; }
.steps-list li { display: grid; grid-template-columns: 38px 1fr; gap: 17px; padding: 0 0 27px; }
.step-number { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--forest); border-radius: 50%; font-size: 13px; font-weight: 850; }
.steps-list p { margin: 4px 0 9px; line-height: 1.58; }
.step-time { display: inline-flex; align-items: center; gap: 6px; color: var(--forest-2); font-size: 12px; font-weight: 800; }
.detail-actions { display: flex; gap: 10px; padding-top: 52px; border-top: 1px solid var(--line); }

.cook-page { min-height: 100svh; color: var(--ink); background: #f7f6f1; }
.cook-header { height: 74px; display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 0 25px; background: var(--paper); border-bottom: 1px solid var(--line); }
.cook-close { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; }
.cook-header > div { display: flex; flex-direction: column; gap: 2px; }
.cook-header > div span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.cook-header strong { font-size: 15px; }
.cook-progress { padding: 7px 10px; color: var(--forest); background: #e8f0ea; border-radius: 5px; font-size: 12px; font-weight: 850; }
.cook-stage { width: min(850px, calc(100% - 42px)); margin-inline: auto; padding: 52px 0 130px; }
.cook-stage-heading { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 35px; }
.cook-stage-heading > svg { margin-top: 4px; color: var(--forest); }
.cook-stage-heading h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 40px; font-weight: 500; }
.cook-stage-heading > div > p:last-child { margin: 8px 0 0; color: var(--muted); }
.cook-checklist { display: grid; gap: 8px; }
.cook-checklist > button { min-height: 74px; display: grid; grid-template-columns: 30px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper); text-align: left; }
.cook-checklist > button.checked { color: #748078; background: #edf0ec; }
.cook-checklist > button.checked strong { text-decoration: line-through; }
.check-box { width: 27px; height: 27px; display: grid; place-items: center; border: 2px solid #98a49b; border-radius: 5px; }
.checked .check-box { color: #fff; background: var(--forest); border-color: var(--forest); }
.cook-checklist small, .cook-checklist strong { display: block; }
.cook-checklist small { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.cook-checklist b { color: var(--forest); font-size: 16px; }
.cook-bottom { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; padding: 15px 24px; background: rgba(255,254,250,.95); border-top: 1px solid var(--line); backdrop-filter: blur(10px); text-align: center; }
.cook-bottom .button { min-width: 260px; }
.single-step { min-height: calc(100svh - 74px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: 40px; text-align: center; }
.step-kicker { margin: 0 0 10px; color: var(--forest); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: 1.2px; }
.step-meter { width: min(420px, 80%); height: 4px; margin-bottom: 42px; overflow: hidden; background: #dfe4df; border-radius: 2px; }
.step-meter span { display: block; height: 100%; background: var(--forest); transition: width .25s ease; }
.active-step-number { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 28px; color: #fff; background: var(--forest); border-radius: 50%; font-size: 23px; font-weight: 850; }
.single-step h1 { max-width: 760px; margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 46px; line-height: 1.25; font-weight: 500; }
.large-time { display: inline-flex; align-items: center; gap: 8px; margin-top: 27px; padding: 10px 13px; color: var(--forest); background: #e5eee7; border-radius: 5px; font-weight: 800; }
.step-navigation { display: flex; gap: 10px; margin-top: 45px; }
.step-navigation .button { min-width: 150px; }
.step-dots { display: flex; gap: 8px; margin-top: 28px; }
.step-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #c6ccc7; }
.step-dots button.done { background: #78a388; }
.step-dots button.active { background: var(--forest); transform: scale(1.35); }
.cook-done { min-height: calc(100svh - 74px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: 40px; text-align: center; }
.cook-done > svg { color: var(--forest); }
.done-mark { width: 70px; height: 70px; display: grid; place-items: center; color: #fff; background: var(--forest); border-radius: 50%; font-size: 34px; }
.cook-done .eyebrow { margin-top: 24px; }
.cook-done h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 50px; font-weight: 500; }
.cook-done p:not(.eyebrow) { max-width: 480px; margin: 13px 0 30px; color: var(--muted); line-height: 1.6; }

.auth-page { min-height: calc(100svh - 66px); display: grid; grid-template-columns: 1fr 420px; gap: 100px; align-items: center; padding-block: 70px; }
.auth-copy h1, .admin-heading h1, .editor-header h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 50px; font-weight: 500; }
.auth-copy > p:last-child { max-width: 500px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.login-form { padding: 34px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.login-form h2 { margin: 0 0 25px; font-family: Georgia, 'Times New Roman', serif; font-size: 28px; font-weight: 500; }
.login-form label, .form-grid label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; color: #414d45; font-size: 13px; font-weight: 750; }
.login-form label > small, .password-panel label > small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
.login-form input, .form-grid input, .form-grid select, .form-grid textarea, .group-editor input, .group-editor select, .step-editor-row input, .step-editor-row textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #bfc7c0; border-radius: 5px; outline: 0; }
.login-form input:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .group-editor input:focus, .group-editor select:focus, .step-editor-row input:focus, .step-editor-row textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(36,88,64,.1); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 50px; }
.password-field button { position: absolute; top: 0; right: 0; width: 46px; height: 44px; display: grid; place-items: center; border: 0; color: var(--muted); background: transparent; }
.form-error { padding: 11px 13px; color: #842f25; background: #f9e7e3; border: 1px solid #edc7c0; border-radius: 5px; font-size: 13px; line-height: 1.4; }
.login-form .button { width: 100%; }
.text-link { display: inline-flex; margin-top: 8px; color: var(--forest); border-bottom: 1px solid var(--forest); font-weight: 800; }
.form-switch { margin: 19px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.form-switch a { color: var(--forest); font-weight: 800; }
.admin-page, .editor-page { padding-block: 55px 90px; }
.admin-heading, .editor-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.admin-heading h1, .editor-header h1 { font-size: 44px; }
.admin-heading p, .editor-header p { margin: 8px 0 0; color: var(--muted); }
.admin-actions, .editor-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #bfc7c0; border-radius: 6px; background: transparent; }
.role-notice { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 9px 11px; color: var(--forest); background: #e5eee7; border-radius: 5px; font-size: 12px; }
.admin-table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th { padding: 13px 18px; color: var(--muted); background: #eff1ed; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.admin-table td { padding: 17px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.admin-table td:first-child strong, .admin-table td:first-child small { display: block; }
.admin-table td:first-child small { margin-top: 4px; color: var(--muted); }
.status { display: inline-block; padding: 5px 8px; border-radius: 4px; font-size: 11px; font-weight: 800; }
.status-published { color: #24563e; background: #deeee3; }
.status-draft { color: #695823; background: #f5eccf; }
.status-archived { color: #626a65; background: #e7e9e7; }
.status-reader { color: #4f5b54; background: #e8ebe9; }
.status-editor { color: #24563e; background: #deeee3; }
.status-author { color: #24563e; background: #deeee3; }
.status-admin { color: #7b341f; background: #f5e3d9; }
.date-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.row-actions a, .compact-actions button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.row-actions svg, .compact-actions svg { width: 16px; }
.subtle-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 15px; color: var(--muted); font-size: 13px; font-weight: 750; }
.editor-error { margin-bottom: 20px; }
.editor-section { margin-bottom: 22px; padding: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.editor-section-title { display: flex; gap: 15px; margin-bottom: 28px; }
.editor-section-title > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--forest); border-radius: 5px; font-size: 12px; font-weight: 850; }
.editor-section-title h2 { margin: 0; font-size: 21px; }
.editor-section-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid textarea { resize: vertical; }
.group-editor-list { display: grid; gap: 18px; margin-bottom: 15px; }
.group-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; }
.group-editor-head { display: grid; grid-template-columns: 24px 1fr auto; gap: 9px; align-items: center; padding: 12px; background: #eff1ed; }
.group-editor-head > svg { color: var(--muted); }
.group-editor-head > input { min-height: 40px; font-weight: 800; }
.compact-actions { display: flex; gap: 4px; }
.compact-actions button.danger { color: var(--red); }
.ingredient-editor-head, .ingredient-editor-row { display: grid; grid-template-columns: minmax(150px, 1.4fr) 110px 90px minmax(150px, 1fr) minmax(160px, 1.2fr) 114px; gap: 8px; align-items: center; padding: 8px 12px; }
.ingredient-editor-head { padding-top: 13px; padding-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ingredient-editor-row { border-bottom: 1px solid #edf0ed; }
.ingredient-editor-row input, .ingredient-editor-row select { min-height: 40px; font-size: 13px; }
.add-row-button { display: inline-flex; align-items: center; gap: 6px; margin: 10px 12px 12px; padding: 7px 4px; border: 0; color: var(--forest); background: transparent; font-size: 13px; font-weight: 800; }
.step-editor-list { display: grid; gap: 9px; margin-bottom: 15px; }
.step-editor-row { display: grid; grid-template-columns: 38px 1fr 120px 114px; gap: 10px; align-items: center; padding: 10px; background: #f4f5f2; border-radius: 6px; }
.step-editor-row textarea { resize: vertical; }
.step-editor-row label { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.step-editor-row label span { display: block; margin-bottom: 4px; }
.editor-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.image-upload-field { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: center; margin-top: 5px; padding: 18px; background: #f2f4f0; border: 1px solid var(--line); border-radius: 6px; }
.image-upload-preview { position: relative; aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: #dfe4df; border-radius: 5px; font-size: 13px; }
.image-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-upload-copy > strong { display: block; font-size: 16px; }
.image-upload-copy > p { max-width: 620px; margin: 7px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.image-upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.image-upload-actions label { margin: 0; }
.image-upload-actions input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.image-upload-status { display: block; min-height: 18px; margin-top: 10px; color: var(--forest); font-size: 12px; font-weight: 750; }

.account-page { min-height: calc(100svh - 66px); padding-block: 58px 90px; }
.account-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 34px; }
.account-heading h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 46px; font-weight: 500; }
.account-heading p:last-child { margin: 8px 0 0; color: var(--muted); }
.account-layout { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(380px, 1.25fr); gap: 22px; align-items: start; }
.profile-panel, .password-panel { padding: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.profile-avatar { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 25px; color: #fff; background: var(--forest); border-radius: 50%; font-family: Georgia, 'Times New Roman', serif; font-size: 27px; }
.profile-panel dl { margin: 0 0 26px; }
.profile-panel dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.profile-panel dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.profile-panel dd { margin: 0; overflow-wrap: anywhere; }
.profile-panel .button { width: 100%; }
.account-hint { margin: 0; padding: 12px; color: var(--muted); background: #f0f2ef; border-radius: 5px; font-size: 13px; line-height: 1.5; }
.password-panel h2 { margin: 0 0 7px; font-family: Georgia, 'Times New Roman', serif; font-size: 29px; font-weight: 500; }
.password-panel > p { margin: 0 0 25px; color: var(--muted); font-size: 14px; }
.password-panel label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 17px; color: #414d45; font-size: 13px; font-weight: 750; }
.password-panel input { min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #bfc7c0; border-radius: 5px; outline: 0; }
.password-panel input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(36,88,64,.1); }
.access-notice { margin-bottom: 20px; padding: 13px 15px; color: #49564e; background: #e9efea; border-left: 3px solid var(--forest); font-size: 13px; line-height: 1.5; }
.access-table select { min-width: 145px; height: 38px; padding: 0 8px; border: 1px solid #bfc7c0; border-radius: 5px; background: #fff; }
.access-toggle { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.access-toggle input { width: 18px; height: 18px; accent-color: var(--forest); }
.compact-save { min-height: 38px; padding-inline: 12px; }
.access-summary { color: var(--muted); font-size: 13px; }

@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroZoom { from { opacity: .7; transform: scale(1.035); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 980px) {
  .recipe-columns { grid-template-columns: 1fr; gap: 55px; }
  .recipe-columns .steps-section { max-width: 720px; }
  .auth-page { grid-template-columns: 1fr 390px; gap: 45px; }
  .ingredient-editor-head { display: none; }
  .ingredient-editor-row { grid-template-columns: 1.4fr 100px 90px; padding-block: 12px; }
  .ingredient-editor-row > :nth-child(4), .ingredient-editor-row > :nth-child(5) { grid-column: span 1; }
  .ingredient-editor-row > .compact-actions { justify-self: end; }
}

@media (max-width: 720px) {
  .page-width { width: min(100% - 30px, 1180px); }
  .site-header { height: 60px; }
  .header-inner { width: calc(100% - 28px); }
  .brand { font-size: 16px; }
  .top-nav { gap: 14px; }
  .library-hero { height: 430px; min-height: 400px; }
  .library-hero > img { object-position: 62% center; }
  .hero-shade { background: linear-gradient(0deg, rgba(9,18,13,.88) 0%, rgba(9,18,13,.56) 58%, rgba(9,18,13,.15) 100%); }
  .hero-content { justify-content: flex-end; padding-bottom: 48px; }
  .hero-content h1 { font-size: 45px; }
  .hero-content > p:not(.eyebrow) { margin: 18px 0 22px; font-size: 16px; }
  .recipe-workspace { padding-block: 50px 65px; }
  .workspace-heading { align-items: flex-start; }
  .workspace-heading h2, .portion-panel h2, .section-title-row h2, .steps-section h2 { font-size: 30px; }
  .result-count { padding-top: 24px; }
  .filter-bar { grid-template-columns: 1fr; margin-top: 25px; }
  .recipe-row { grid-template-columns: 105px 1fr; gap: 16px; align-items: start; }
  .recipe-copy h3 { font-size: 21px; }
  .recipe-copy > p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; }
  .meta-line { flex-direction: column; gap: 5px; }
  .row-arrow { display: none; }
  .detail-visual { height: 67svh; min-height: 460px; }
  .detail-visual img { object-position: 63% center; }
  .visual-copy { bottom: 44px; }
  .visual-copy h1 { font-size: 43px; }
  .visual-copy p { font-size: 15px; }
  .portion-panel { flex-direction: column; align-items: stretch; margin-top: -20px; padding: 24px; }
  .portion-control { align-self: stretch; grid-template-columns: 54px 1fr 54px; }
  .recipe-meta-band { flex-direction: column; gap: 11px; padding-inline: 3px; }
  .recipe-columns { padding-top: 48px; }
  .ingredient-row { align-items: flex-start; }
  .detail-actions { flex-wrap: wrap; }
  .detail-actions .button:first-child { width: 100%; }
  .cook-header { padding-inline: 14px; }
  .cook-header strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cook-stage { width: calc(100% - 28px); padding-top: 35px; }
  .cook-stage-heading h1 { font-size: 32px; }
  .cook-checklist > button { grid-template-columns: 29px 1fr; }
  .cook-checklist b { grid-column: 2; }
  .single-step h1 { font-size: 31px; }
  .step-navigation { width: 100%; }
  .step-navigation .button { min-width: 0; flex: 1; }
  .auth-page { grid-template-columns: 1fr; gap: 25px; padding-block: 45px; }
  .auth-copy h1, .admin-heading h1, .editor-header h1 { font-size: 38px; }
  .auth-copy > p:last-child { font-size: 15px; }
  .login-form { padding: 25px; }
  .account-heading { align-items: flex-start; flex-direction: column; }
  .account-layout { grid-template-columns: 1fr; }
  .account-heading h1 { font-size: 38px; }
  .admin-heading, .editor-header { align-items: flex-start; flex-direction: column; }
  .admin-actions, .editor-actions { width: 100%; }
  .admin-actions .button, .editor-actions .button { flex: 1; }
  .admin-table { min-width: 740px; }
  .editor-section { padding: 20px 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .group-editor-head { grid-template-columns: 1fr auto; }
  .group-editor-head > svg { display: none; }
  .ingredient-editor-row { grid-template-columns: 1fr 90px; }
  .ingredient-editor-row > :nth-child(3), .ingredient-editor-row > :nth-child(4), .ingredient-editor-row > :nth-child(5) { grid-column: span 2; }
  .ingredient-editor-row > .compact-actions { grid-column: span 2; justify-self: stretch; justify-content: flex-end; }
  .step-editor-row { grid-template-columns: 38px 1fr; align-items: start; }
  .step-editor-row label, .step-editor-row .compact-actions { grid-column: 2; }
  .editor-footer .button { flex: 1; }
  .image-upload-field { grid-template-columns: 1fr; }
  .image-upload-preview { max-width: 100%; }
  .image-upload-actions .button { width: 100%; }
  .top-nav .account-link span:last-child { display: none; }
  .top-nav .account-link { width: 38px; justify-content: center; padding: 0 !important; }
}

@media print {
  .site-header, .detail-visual, .portion-panel, .detail-actions { display: none !important; }
  body, .detail-page { background: #fff; }
  .detail-content { width: 100%; padding: 0; }
  .recipe-meta-band { padding-top: 0; }
  .recipe-columns { grid-template-columns: 1fr 1fr; gap: 35px; padding-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.loading-screen { min-height: calc(100svh - 66px); display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.loading-screen span { width: 20px; height: 20px; border: 2px solid #c8cfca; border-top-color: var(--forest); border-radius: 50%; animation: spin .7s linear infinite; }
.toast { position: fixed; z-index: 100; right: 20px; bottom: 20px; max-width: calc(100% - 40px); padding: 12px 16px; color: #fff; background: var(--forest); border-radius: 6px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@keyframes spin { to { transform: rotate(360deg); } }
