:root {
    --bg: #f4efe6;
    --paper: #fffcf8;
    --ink: #1f1a17;
    --muted: #6f655c;
    --line: #e4dacb;
    --accent: #c4502a;
    --herb: #2c5c4e;
    --shadow: 0 14px 34px rgba(48, 32, 16, 0.07);
    --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.5;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 0% -10%, #fff 0%, transparent 55%),
        var(--bg);
}

img { max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--herb); }

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

p { margin: 0; }

.wrap {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.skip {
    position: absolute;
    left: 12px;
    top: -48px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    z-index: 40;
}

.skip:focus { top: 12px; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #1d1c21;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-mark { width: 34px; height: 34px; flex: none; object-fit: contain; display: block; }

.header-search {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 188px;
    height: 34px;
    margin-left: auto;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #fff;
    color: #1d1c21;
}

.header-search svg { flex: none; }

.header-search input {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.88rem;
    outline: none;
    color: #1d1c21;
    caret-color: #1d1c21;
}

.header-search input::placeholder { color: #8a8178; }

.header-search:hover,
.header-search:focus-within,
.header-search:focus-within input,
.header-search input:focus {
    background: #fff;
    color: #1d1c21;
}

.header-search input:-webkit-autofill,
.header-search input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1d1c21;
    caret-color: #1d1c21;
    box-shadow: 0 0 0 1000px #fff inset;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: none;
    margin-left: auto;
}

.header-link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.header-link:hover { color: #fff; }

.as-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.mini-search input {
    width: min(240px, 42vw);
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
}

main { padding: 22px 0 12px; }

.lede {
    max-width: 38rem;
    color: var(--muted);
    font-size: 1.02rem;
    margin-bottom: 8px;
}

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(680px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 6px 6px 16px;
    box-shadow: var(--shadow);
}

.search svg { flex: none; color: var(--muted); }

.search input {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 10px 0;
    outline: none;
}

.search:focus-within {
    border-color: #ddb5a2;
    box-shadow: 0 0 0 4px rgba(196, 80, 42, 0.12);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 16px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    background: rgba(255, 252, 248, 0.7);
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.chip:hover { border-color: #cfc3b2; }

.chip.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.count {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid rgba(48, 32, 16, 0.06);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    min-height: 100%;
}

.card { transition: transform 0.18s ease; }
.card:hover { transform: translateY(-2px); }

.card-media {
    aspect-ratio: 3.5 / 1;
    background:
        linear-gradient(120deg, #eadfce, #f7f1e8 45%, #e7d3c4);
}

.card-media img,
.hero-photo img,
.preview img,
.admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body { padding: 12px 14px 14px; }

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card h2 {
    margin: 3px 0 0;
    font-size: 1.35rem;
    color: var(--ink);
}

.meta { color: var(--muted); font-size: 0.95rem; }

.card.is-hidden { display: none; }

.empty {
    margin-top: 12px;
    padding: 28px 8px 12px;
}

.empty p { margin-bottom: 14px; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.crumbs a { color: var(--herb); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.recipe { width: min(980px, 100%); margin: 0 auto; }

.hero-photo {
    aspect-ratio: 3.5 / 1;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(120deg, #eadfce, #f7f1e8 45%, #e7d3c4);
    margin-bottom: 18px;
}

.recipe h1 {
    margin: 8px 0 12px;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
}

.layout-recipe {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 26px;
}

.ingredients,
.panel,
fieldset {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.ingredients { padding: 8px 16px 10px; }

.ingredients h2,
.steps h2,
.panel h2,
legend {
    font-size: 1.45rem;
}

.ingredient {
    display: grid;
    grid-template-columns: minmax(78px, 42%) 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.ingredient:last-child { border-bottom: 0; }

.qty {
    text-align: right;
    color: var(--herb);
    font-weight: 600;
}

.steps { list-style: none; margin: 8px 0 0; padding: 0; }

.steps li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 8px;
    margin: 0 0 16px;
}

.steps li::before {
    content: counter(step);
    counter-increment: step;
    font-family: var(--serif);
    font-size: 1.35rem;
    color: var(--accent);
    line-height: 1.3;
}

.steps { counter-reset: step; }

.steps p { margin: 0; white-space: pre-line; max-width: 65ch; }

.site-footer {
    margin-top: 48px;
    background: #1d1c21;
    color: rgba(255, 255, 255, 0.72);
}

body.page-home .site-footer { margin-top: 0; }

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    padding: 22px 0 32px;
    color: rgba(255, 255, 255, 0.72);
}

.footer-id { display: flex; flex-direction: column; gap: 2px; justify-self: start; min-width: 0; }

.footer-id strong { color: #fff; }

.footer-impressum,
.footer-admin {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-weight: 500;
}

.footer-impressum { justify-self: center; }
.footer-admin { justify-self: end; }
.footer-impressum:hover,
.footer-admin:hover { color: #fff; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 16px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
}

.btn:hover { background: #a84322; }

.btn.secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn.secondary:hover { background: #fff; }

.btn.danger {
    background: transparent;
    color: #9f1239;
    border-color: #f0c4cf;
}

.btn.danger:hover { background: #fff5f7; }

.btn.small { padding: 8px 12px; font-size: 0.92rem; }

.btn.mint { background: #67a34a; }
.btn.mint:hover { background: #58913e; }
.btn.amber { background: #e39a3c; }
.btn.amber:hover { background: #cf872d; }
.btn.block {
    border-radius: 4px;
    background: #d08a3c;
    padding: 12px 22px;
    font-weight: 500;
}
.btn.block:hover { background: #c07c30; }

body.page-home {
    background: #fff;
    color: #2c3338;
}

body.page-home .wrap { width: min(1180px, calc(100% - 36px)); }

body.page-home main { padding: 0; }

.hero-intro,
.chef { background: #fff; }

.landing-block {
    padding: 36px 0 42px;
    background: #e8e8e8;
}

#kategorien,
#ueber-mich { scroll-margin-top: 84px; }

.hero-intro {
    position: relative;
    padding: 18px 0 36px;
    overflow: hidden;
}

.hero-intro-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) 1.05fr;
    align-items: center;
    gap: 20px 36px;
}

.hero-plate {
    width: min(100%, 520px);
    margin: 0 auto;
    display: block;
}

.hero-copy { max-width: 34rem; padding-bottom: 28px; }

.hero-copy h1 {
    margin: 0 0 14px;
    color: #2b3338;
    font-size: clamp(2.4rem, 4vw, 3.45rem);
    font-weight: 560;
    max-width: 20ch;
}

.hero-copy p { margin: 0 0 22px; color: #3a4348; }

.hero-spices {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(34vw, 380px);
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.landing-intro { text-align: center; margin: 10px 0 22px; }

.landing-kicker {
    color: #d4842f;
    font-size: 0.98rem;
    font-weight: 500;
    margin: 0 0 2px;
}

.landing-intro h2,
.chef h2 {
    margin: 0;
    color: #2b3338;
    font-size: clamp(2.5rem, 4.2vw, 3.5rem);
    font-weight: 560;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cat-tile {
    position: relative;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    min-height: 228px;
    border-radius: 4px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
}

.cat-tile h3 {
    margin: 0;
    color: inherit;
    font-size: clamp(1.85rem, 2.2vw, 2.45rem);
    font-weight: 560;
    line-height: 1.05;
}

.cat-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px 14px 18px 20px;
}

.cat-kicker { font-size: 1rem; font-weight: 500; }

.cat-tile .blurb {
    max-width: 15rem;
    font-size: 0.92rem;
    line-height: 1.3;
}

.tile-btn {
    margin-top: auto;
    background: #fff;
    color: #3d3d3d;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 0.92rem;
    font-weight: 500;
}

.cat-media {
    min-height: 228px;
    display: grid;
    place-items: center;
    padding: 14px;
}

.cat-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tone-breakfast { background: #d08945; }
.tone-salad { background: #3f8f46; }
.tone-dessert { background: #c75b88; }
.tone-snacks { background: #3f5878; }
.tone-main { background: #8d4b32; }
.tone-bread { background: #e3b23c; color: #1d1d1d; }
.tone-bread .tile-btn { background: #f6f1e6; }

.cat-tile:hover .tile-btn { background: #fff7ef; }
.cat-tile:hover .cat-media img { transform: scale(1.04); }
.cat-media img { transition: transform 0.35s ease; }

.chef { margin: 0; padding-top: 48px; }

.chef-inner {
    display: grid;
    grid-template-columns: minmax(240px, 0.92fr) 1.08fr;
    gap: 18px 36px;
    align-items: end;
}

.chef-photo {
    position: relative;
    display: grid;
    place-items: center;
}

.chef-photo::before {
    content: "";
    position: absolute;
    width: min(78%, 380px);
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.22);
    background-image: radial-gradient(rgba(60, 60, 60, 0.4) 0.7px, transparent 0.85px);
    background-size: 7px 7px;
}

.chef-photo img {
    position: relative;
    width: min(100%, 420px);
    margin: 0 auto;
    display: block;
}

.chef-copy { max-width: 38rem; padding-bottom: 40px; }

.chef p { margin: 0 0 12px; color: #3a4348; }

.signature {
    display: block;
    width: min(210px, 70%);
    height: auto;
    margin: 2px 0 16px;
}

.chef-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin: 4px 0 22px;
}

.page-head h1,
.login-card h1,
form h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); }

.group { margin: 0 0 26px; }

.group h2 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 1.7rem;
}

.group h2 span {
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0;
}

.admin-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }

.admin-item {
    display: grid;
    grid-template-columns: 148px 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
}

.admin-thumb {
    width: 148px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(120deg, #eadfce, #f7f1e8);
}

.admin-item h3 { margin: 0; font-family: var(--sans); font-weight: 600; letter-spacing: 0; font-size: 1.02rem; }

.row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.stack { display: flex; flex-direction: column; gap: 8px; }

.split,
.step-row {
    display: grid;
    gap: 8px;
    align-items: start;
}

.split { grid-template-columns: 130px 1fr auto; }
.step-row { grid-template-columns: 1fr auto; }

.icon-buttons { display: flex; gap: 6px; }

.icon-buttons button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    min-width: 36px;
    height: 36px;
    cursor: pointer;
}

fieldset { margin: 0 0 16px; padding: 16px; }
legend { padding: 0 6px; }
.field { margin-bottom: 12px; }
label.block { display: block; font-weight: 600; margin-bottom: 6px; }

input[type="text"],
input[type="password"],
input[type="search"],
select,
textarea,
.mini-search input {
    background: #fff;
}

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    background: #fff;
}

textarea { min-height: 90px; resize: vertical; }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 8px 0 20px;
}

.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }

.preview { margin: 8px 0 12px; }
.preview img { width: min(100%, 420px); height: auto; border-radius: 12px; }

.login-card,
.panel {
    width: min(460px, 100%);
    margin: 8vh auto;
    padding: 22px;
}

.panel { width: min(560px, 100%); margin: 28px 0; }

.flash {
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 16px;
}

.flash.ok { background: #e7f3ee; color: #1d4a3c; }
.flash.bad { background: #fde8e8; color: #8f1d1d; }
.flash ul { margin: 0; padding-left: 18px; }

.help { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.search input:focus-visible { outline: none; }

@media (min-width: 860px) {
    .grid { grid-template-columns: 1fr 1fr; }
    .ingredients { position: sticky; top: 88px; }
}

@media (max-width: 980px) {
    .cat-grid { grid-template-columns: 1fr 1fr; }
    .chef-inner,
    .hero-intro-inner { grid-template-columns: 1fr; }
    .chef-photo { order: 2; }
    .chef-copy { order: 1; padding-bottom: 8px; }
    .hero-copy { padding-bottom: 120px; }
    .hero-copy h1 { max-width: none; }
    .hero-spices { width: min(46vw, 240px); }
}

@media (max-width: 800px) {
    .layout-recipe { grid-template-columns: 1fr; }
    .header-inner { min-height: 58px; }
    .header-search { width: 132px; }
    .admin-item,
    .split,
    .step-row { grid-template-columns: 1fr; }
    .qty { text-align: left; }
}

@media (max-width: 640px) {
    .cat-grid { grid-template-columns: 1fr; }
    .cat-tile { min-height: 200px; }
    .footer-inner {
        grid-template-areas:
            "id id id"
            ". impressum admin";
    }
    .footer-id { grid-area: id; }
    .footer-impressum { grid-area: impressum; }
    .footer-admin { grid-area: admin; align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
    .site-header, .site-footer, .crumbs, .mini-search { display: none !important; }
    body { background: #fff; }
    .hero-photo { border-radius: 0; }
}
