:root {
  --paper: #f8f4ed;
  --paper-deep: #f0e9de;
  --surface: rgba(255, 253, 249, .92);
  --ink: #26352a;
  --muted: #6f736d;
  --line: #dfd7cc;
  --green: #3f5a3d;
  --green-dark: #263e2a;
  --sage: #e8eadc;
  --red: #bd3929;
  --shadow: 0 12px 35px rgba(74, 58, 39, .08);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% -10%, #fff 0, transparent 32rem), var(--paper); color: var(--ink); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .18; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E"); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, .button { min-height: 44px; }
button { color: inherit; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; margin: 0; letter-spacing: -.025em; }
h1 { font-size: clamp(2.15rem, 5vw, 4.4rem); line-height: .98; }
h2 { font-size: clamp(1.35rem, 2vw, 1.8rem); }
p { line-height: 1.55; }

.app-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; height: 74px; padding: 0 max(20px, calc((100vw - 1220px)/2)); background: rgba(248,244,237,.84); border-bottom: 1px solid rgba(223,215,204,.7); backdrop-filter: blur(18px); }
.brand { font: 600 1.45rem Georgia, serif; }
.header-actions, .language-switch { display: flex; align-items: center; gap: 8px; }
.header-actions form { margin: 0; }
.account-menu { position: relative; }
.account-menu summary { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; list-style: none; font-size: 1.3rem; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu > div { position: absolute; z-index: 50; top: 50px; right: 0; display: grid; min-width: 210px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.account-menu a, .account-menu button { width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: var(--paper-deep); }
.language-switch button { min-height: auto; padding: 6px 3px; background: none; border: 0; font-size: .78rem; color: var(--muted); }
.language-switch button[aria-current="true"] { color: var(--green-dark); font-weight: 800; }
.icon-button, .favorite-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); box-shadow: 0 3px 12px rgba(50,40,30,.05); cursor: pointer; }
.favorite-button { color: var(--red); font-size: 1.7rem; }
.app-main { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 130px; position: relative; }
.flash, .error, .warning { margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; background: var(--sage); border: 1px solid #cdd4bf; }
.error { background: #fbe9e5; border-color: #e8c2b8; color: #7b2f24; }
.warning { background: #fff4d8; border-color: #ecd99f; }
.warning ul { margin-bottom: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid #b8b1a6; border-radius: 11px; background: transparent; cursor: pointer; font-weight: 650; }
.button.primary { background: var(--green); border-color: var(--green); color: #fff; }
.button:hover { transform: translateY(-1px); }
.text-button { border: 0; background: none; color: var(--green); font-weight: 700; cursor: pointer; }
.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--green); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.home-hero { display: flex; justify-content: space-between; align-items: end; margin-bottom: 34px; }
.search-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 9px 8px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.search-bar input { width: 100%; min-height: 48px; border: 0; outline: 0; background: transparent; font-size: 1.02rem; }
.search-bar button { padding: 0 20px; border: 0; border-radius: 10px; background: var(--paper-deep); cursor: pointer; }
.filter-row { display: flex; gap: 9px; padding: 22px 0; overflow: auto; scrollbar-width: none; }
.chip { flex: 0 0 auto; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.45); font-size: .87rem; }
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.section-heading > span { color: var(--muted); }
.recipe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.recipe-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.recipe-card:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(74,58,39,.14); }
.recipe-card img, .card-placeholder { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card-placeholder { display: grid; place-items: center; color: var(--green); background: linear-gradient(145deg, #ecebdc, #dfd8c8); font-size: 2rem; }
.recipe-card-body { display: flex; justify-content: space-between; gap: 10px; padding: 16px 16px 3px; }
.recipe-card h3 { margin-top: 4px; font-size: 1.35rem; }
.recipe-card > a > p { margin: 5px 16px 16px; color: var(--muted); font-size: .82rem; }
.recipe-type { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.favorite-mark { color: var(--red); font-size: 1.25rem; }
.empty-state { grid-column: 1 / -1; padding: 70px 25px; text-align: center; border: 1px dashed #c9c0b4; border-radius: var(--radius); background: rgba(255,255,255,.35); }
.empty-state > span { display: block; margin-bottom: 10px; color: var(--green); font-size: 2rem; }
.empty-state p { max-width: 500px; margin: 14px auto 22px; color: var(--muted); }
.ai-banner { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--sage); }
.ai-banner > span { font-size: 1.8rem; }.ai-banner div { flex: 1; }.ai-banner p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }

.page-heading { margin-bottom: 30px; }.page-heading > a { display: inline-block; margin-bottom: 25px; color: var(--muted); }.page-heading p { color: var(--muted); }
.recipe-editor { display: grid; gap: 18px; }
.form-card, .capture-card, .recipe-panel, .installer-card, .auth-card { padding: clamp(20px, 4vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stack { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .84rem; font-weight: 650; }
input, textarea, select { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fffefa; color: var(--ink); outline: none; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { border-color: var(--green); box-shadow: 0 0 0 3px rgba(63,90,61,.17); outline: none; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.capture-card { display: grid; gap: 14px; background: linear-gradient(135deg, var(--sage), #f6eee2); }
.capture-card p { margin: -5px 0 3px; color: var(--muted); }
.upload-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 150px; border: 1px dashed #9da690; border-radius: 15px; background: rgba(255,255,255,.42); color: var(--ink); cursor: pointer; }
.upload-zone > span { font-size: 2rem; }.upload-zone input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.upload-zone.compact { min-height: 90px; }
.ingredient-row { display: grid; grid-template-columns: 100px 90px minmax(150px,2fr) minmax(130px,1fr) 40px; gap: 8px; margin-bottom: 9px; }
.instruction-row { display: grid; grid-template-columns: 34px 1fr 40px; gap: 10px; align-items: start; margin-bottom: 10px; }
.instruction-row > span { display: grid; place-items: center; width: 30px; height: 30px; margin-top: 8px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: .78rem; }
.ingredient-row button, .instruction-row button { border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; }
.sticky-actions { position: sticky; bottom: 90px; display: flex; justify-content: flex-end; gap: 10px; padding: 12px; border: 1px solid rgba(223,215,204,.9); border-radius: 14px; background: rgba(248,244,237,.9); backdrop-filter: blur(15px); }

.recipe-detail-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }.recipe-detail-top > div { display: flex; gap: 8px; }.recipe-detail-top form { margin: 0; }
.recipe-detail { display: grid; gap: 20px; }
.recipe-summary { display: grid; grid-template-columns: minmax(320px, .9fr) 1.1fr; gap: clamp(28px,5vw,65px); align-items: center; }
.recipe-hero-image, .recipe-hero-placeholder { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 25px; box-shadow: var(--shadow); }
.recipe-hero-placeholder { display: grid; place-items: center; background: var(--sage); font-size: 4rem; }
.recipe-summary-copy > p { max-width: 680px; color: #4f554f; }
.meta-row { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0; color: var(--muted); }
.detail-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 20px 0; }.detail-controls label { max-width: 120px; }
.source-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }.danger-zone { padding: 20px; text-align: right; }.danger-zone .text-button { color: var(--red); }
.segmented { display: flex; padding: 4px; border-radius: 11px; background: var(--paper-deep); }.segmented button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; }.segmented button.active { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.recipe-columns { display: grid; grid-template-columns: .78fr 1.22fr; gap: 20px; align-items: start; }.recipe-columns > div { display: grid; gap: 20px; }
.recipe-panel h2 { margin-bottom: 20px; }
.ingredient-check { grid-template-columns: 24px 1fr; align-items: start; padding: 10px 0; border-bottom: 1px solid #eee7dd; color: var(--ink); font-size: .94rem; font-weight: 400; }.ingredient-check input { min-height: auto; margin-top: 3px; accent-color: var(--green); }.ingredient-check:has(input:checked) span { text-decoration: line-through; opacity: .55; }
.instruction-list { display: grid; gap: 20px; padding: 0; list-style: none; }.instruction-list li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; }.instruction-list span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: white; font-size: .76rem; font-weight: 800; }.instruction-list p { margin: 2px 0; }
.notes-panel { background: #f6efe4; }

.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; justify-content: space-around; width: min(520px, calc(100% - 24px)); padding: 8px; border: 1px solid rgba(215,206,195,.9); border-radius: 20px; background: rgba(255,253,249,.92); box-shadow: 0 15px 45px rgba(53,43,33,.17); backdrop-filter: blur(20px); }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 63px; min-height: 52px; color: var(--muted); border-radius: 13px; }.nav-item > span { font-size: 1.35rem; line-height: 1; }.nav-item small { margin-top: 4px; font-size: .64rem; }.nav-item.active { color: var(--green-dark); background: var(--sage); }.nav-add { margin-top: -27px; width: 62px; height: 62px; border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(38,62,42,.25); }.nav-add small { position: absolute; top: 67px; color: var(--green-dark); }

.auth-layout { display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: 70px; align-items: center; min-height: calc(100vh - 160px); }.auth-intro p { color: var(--muted); }.auth-card { max-width: 500px; margin: 50px auto; }.auth-layout .auth-card { width: 100%; margin: 0; }
.installer-card { max-width: 850px; margin: 20px auto; }.installer-progress { display: flex; justify-content: space-between; padding: 0; margin: 0 0 38px; list-style: none; counter-reset: step; }.installer-progress li { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper-deep); color: var(--muted); font-weight: 800; }.installer-progress li span { display: none; }.installer-progress li.active, .installer-progress li.done { background: var(--green); color: #fff; }.installer-card h1 { margin-bottom: 25px; font-size: 2.5rem; }.system-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }.system-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); }.status { padding: 5px 9px; border-radius: 99px; font-size: .75rem; font-weight: 800; }.status.pass { background: #e2ecdb; color: #31502e; }.status.warning { background: #fff0c7; color: #765a0d; }.status.fail { background: #f7dfdb; color: #8a3025; }.installation-complete { padding: 60px 10px; text-align: center; }.installation-complete > span { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--green); color: #fff; font-size: 2.2rem; }.installation-complete h1 { margin: 25px 0; }
.settings-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }.table-scroll { overflow: auto; }.table-scroll table { width: 100%; border-collapse: collapse; }.table-scroll th, .table-scroll td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }.provider-card { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px; border-bottom: 1px solid var(--line); border-radius: 12px; }.provider-card:hover { background: var(--paper); }.provider-card p { margin: 4px 0; color: var(--muted); }.check-row { display: flex; grid-template-columns: auto 1fr; align-items: center; }.check-row input { width: auto; min-height: auto; }.system-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }.system-item { padding: 15px; border-radius: 12px; background: var(--paper); }.system-item span, .system-item strong { display: block; }.system-item span { color: var(--muted); font-size: .76rem; }.system-item strong { margin-top: 4px; }
.user-edit-row { display: grid; grid-template-columns: 1fr 1.4fr 150px 130px auto; gap: 8px; align-items: center; }.user-edit-row > span { display: grid; font-size: .85rem; }.user-edit-row small { color: var(--muted); }.user-row-actions { display: flex; gap: 16px; }.user-row-actions form { margin: 0; }

@media (min-width: 900px) { .bottom-nav { display: none; }.app-main { padding-bottom: 70px; }.sticky-actions { bottom: 20px; } }
@media (max-width: 950px) { .recipe-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }.recipe-summary { grid-template-columns: 1fr 1fr; }.ingredient-row { grid-template-columns: 80px 70px 1fr 40px; }.ingredient-row input:nth-child(4) { grid-column: 3; }.settings-grid { grid-template-columns: 1fr; }.user-edit-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .app-header { padding: 0 18px; }.app-main { width: min(100% - 28px, 620px); padding-top: 28px; }.recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }.recipe-card { border-radius: 15px; }.recipe-card-body { padding: 12px 12px 2px; }.recipe-card h3 { font-size: 1.1rem; }.recipe-card > a > p { margin: 4px 12px 12px; }.desktop-add { display: none; }.ai-banner { align-items: flex-start; }.ai-banner .button { display: none; }.form-grid { grid-template-columns: 1fr 1fr; }.form-grid label:first-child { grid-column: 1/-1; }.ingredient-row { grid-template-columns: 72px 65px 1fr 34px; }.ingredient-row input:nth-child(4) { grid-column: 1/4; }.recipe-summary { grid-template-columns: 1fr; }.recipe-summary-copy h1 { font-size: 2.8rem; }.recipe-columns { grid-template-columns: 1fr; }.auth-layout { grid-template-columns: 1fr; gap: 30px; }.auth-intro { padding-top: 20px; }.system-grid { grid-template-columns: 1fr; } }
@media (max-width: 390px) { .brand { font-size: 1.18rem; }.language-switch { display: none; }.app-main { width: calc(100% - 22px); }.recipe-grid { grid-template-columns: 1fr 1fr; }.nav-item { min-width: 54px; }.recipe-card-body { gap: 5px; }.ingredient-row { grid-template-columns: 64px 58px 1fr 30px; }.button { padding-inline: 13px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
