:root {
  --background: #fcf9f7;
  --paper: #fff;
  --ink: #382d35;
  --muted: #756c73;
  --cherry: #782f4a;
  --cherry-dark: #59223a;
  --rose: #e9bec9;
  --rose-pale: #f7e9ec;
  --border: #ecdee2;
  --shadow: 0 16px 50px rgba(82, 35, 54, .065);
}
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
body { margin: 0; background: var(--background); color: var(--ink); line-height: 1.55; }
a { color: var(--cherry); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.site-header { background: rgba(255,255,255,.86); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.wordmark { font-weight: 750; color: var(--ink); text-decoration: none; letter-spacing: -.025em; display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; width: 58px; height: 58px; background: var(--rose-pale); color: var(--cherry); font-size: 30px; }
.brand-mark {
	text-indent: -9999px;
	background: transparent;
	background-image: url('images/torte1.png');
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
	
	border-radius: 0;
	
}
.brand-mark.small { margin: 0; width: 33px; height: 33px; font-size: 21px; flex-shrink: 0; }
.text-button { border: none; background: none; color: var(--cherry); font-weight: 650; padding: 8px 2px; }
.main-content { padding-top: 65px; padding-bottom: 80px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-weight: 750; font-size: .7rem; color: var(--cherry); margin: 0 0 10px; }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: normal; line-height: 1.19; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0; letter-spacing: -.04em; }
h2 { font-size: 1.5rem; }
.intro { color: var(--muted); margin: 15px 0 0; }
.title-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.count-pill { white-space: nowrap; border-radius: 100px; background: var(--rose-pale); color: var(--cherry); padding: 7px 14px; font-size: .87rem; }
.empty-state { margin-top: 44px; padding: 55px 25px; background: var(--paper); border: 1px solid var(--border); border-radius: 22px; text-align: center; box-shadow: var(--shadow); }
.empty-state h2 { margin: 8px 0 15px; }
.empty-state p { color: var(--muted); max-width: 475px; margin: 0 auto; }
.empty-icon { color: var(--cherry); font-size: 32px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: radial-gradient(circle at 50% 5%, #f7e7eb, transparent 55%), var(--background); }
.login-card { width: min(100%, 440px); background: var(--paper); padding: 42px; border: 1px solid var(--border); border-radius: 24px; text-align: center; box-shadow: var(--shadow); }
.login-card h1 { font-size: 2.35rem; }
.login-card .intro { margin-bottom: 34px; }
.login-card form { text-align: left; }
label, .search-label { display: block; margin-bottom: 8px; font-size: .91rem; font-weight: 650; }
input { width: 100%; border: 1px solid #d9c9ce; border-radius: 10px; padding: 12px 14px; background: #fff; color: var(--ink); }
.button { border: none; padding: 13px 22px; border-radius: 10px; font-weight: 700; }
.button-primary { background: var(--cherry); color: #fff; }
.button-primary:hover { background: var(--cherry-dark); }
.button-full { width: 100%; margin-top: 16px; }
.login-footer { color: var(--muted); font-size: .78rem; margin: 28px 0 0; }
.alert { color: #8e2534; background: #fff0f1; border: 1px solid #f2bec8; border-radius: 10px; padding: 12px; margin: 20px 0; }
.toolbar { margin: 35px 0 23px; display: flex; flex-wrap: wrap; align-items: end; gap: 15px; }
.toolbar .search-label { width: 100%; margin-bottom: -10px; }
.toolbar input { flex: 1; min-width: 180px; }
.filters { display: flex; gap: 5px; border: 1px solid var(--border); border-radius: 11px; padding: 4px; background: white; }
.filter { border: 0; border-radius: 8px; padding: 8px 15px; color: var(--muted); background: transparent; }
.filter.active { color: white; background: var(--cherry); }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px,1fr)); gap: 18px; }
.recipe-card { background: white; border-radius: 16px; padding: 25px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.recipe-card[hidden] { display: none; }
.recipe-card h2 { margin: 7px 0 20px; }
.card-category { color: var(--cherry); text-transform: uppercase; font-size: .73rem; letter-spacing: .12em; font-weight: 750; margin: 0; }
.card-hint, .no-results { font-size: .87rem; color: var(--muted); }
@media (max-width: 540px) {
 .container { padding: 0 18px; }
 .main-content { padding-top: 39px; }
 .title-row { align-items: start; flex-direction: column; gap: 17px; }
 .login-card { padding: 32px 23px; }
 .filters { width: 100%; }
 .filter { flex: 1; }
}

/* Rezepteditor und Detailansicht */
select, textarea { font: inherit; width: 100%; border: 1px solid #d9c9ce; border-radius: 10px; padding: 12px 14px; background: white; color: var(--ink); }
textarea { resize: vertical; }
select:focus-visible, textarea:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.form-page { max-width: 850px; }
.form-panel { background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 18px; padding: 26px; margin-top: 24px; }
.form-panel h2 { margin: 0 0 20px; }
.field { margin: 0 0 20px; }
.field:last-child { margin-bottom: 0; }
.section-heading, .form-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.section-heading h2 { margin: 0; }
.field-hint { color: var(--muted); font-size: .88rem; }
.stack-list { display: grid; gap: 15px; margin-top: 18px; }
.repeat-row { background: #fcf9fa; border: 1px solid var(--border); padding: 14px; border-radius: 12px; }
.ingredient-fields { display: grid; grid-template-columns: minmax(85px,1fr) minmax(95px,1fr) minmax(130px,3fr); gap: 10px; }
.repeat-row label { font-size: .85rem; }
.repeat-row label input, .repeat-row label select, .repeat-row label textarea { display: block; margin-top: 6px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.egg-label { margin-right: auto; margin-bottom: 0; display: inline-flex; gap: 6px; align-items: center; }
.egg-label[hidden] { display: none; }
.egg-label input { width: auto; margin: 0 !important; }
.mini-button { border: 1px solid var(--border); border-radius: 8px; background: white; color: var(--cherry); padding: 5px 10px; }
.button-subtle { background: var(--rose-pale); color: var(--cherry); text-decoration: none;}
.form-panel .button-subtle { margin-top: 20px; }
.form-footer { margin-top: 25px; justify-content: flex-end; }
.delete-form { text-align: right; margin-top: 15px; }
.danger { color: #a32639; }
.recipe-card-link { display: block; text-decoration: none; color: var(--ink); }
.recipe-card-link:hover { border-color: var(--rose); transform: translateY(-2px); }
.recipe-card-link { transition: transform .15s, border-color .15s; }
.recipe-detail { max-width: 850px; }
.ingredients-display, .steps-display { padding-left: 22px; }
.ingredients-display li, .steps-display li { padding: 7px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 640px) { .ingredient-fields { grid-template-columns: 1fr 1fr; } .ingredient-fields > div:last-child { grid-column: 1 / -1; } .form-panel { padding: 18px; } .section-heading { align-items: start; } .section-heading .button { white-space: nowrap; } }

/* Mengenrechner */
.optional-tag { font: 600 .8rem system-ui, sans-serif; color: var(--muted); }
.calculator-panel { background: #fff9fa; }
.calculated-pill { background: var(--rose-pale); color: var(--cherry); font-weight: 750; border-radius: 999px; padding: 6px 14px; }
.calculator-panel .section-heading { margin-bottom: 20px; }
.calculator-panel .section-heading h2 { margin: 0; }
.mode-switch { display: flex; gap: 5px; background: var(--rose-pale); border-radius: 11px; padding: 5px; margin-bottom: 20px; }
.mode-button { background: none; color: var(--cherry); flex: 1; border: none; border-radius: 8px; padding: 10px; font-weight: 650; }
.mode-button.is-active { background: white; box-shadow: 0 2px 10px rgba(82,35,54,.10); }
.calculator-inputs { display: flex; align-items: center; gap: 24px; }
.calculator-inputs input[type=range] { flex: 1; min-width: 0; accent-color: var(--cherry); padding: 0; }
.number-with-unit { display: flex; align-items: center; gap: 8px; font-weight: 750; color: var(--cherry); }
.number-with-unit input { width: 90px; text-align: center; }
.egg-number-wrap input { width: 110px; }
.reset-button { font-size: .85rem; }
.calculator-controls[hidden], .alert[hidden] { display: none; }
.header-actions { display: flex; gap: 16px; }
.back-link { margin: 0 0 28px; }
@media print {
 body { background: white; color: black; }
 .site-header, .back-link, .calculator-panel, .header-actions, .reset-button { display: none !important; }
 .main-content { padding: 0; max-width: 100%; }
 .form-panel { box-shadow: none; border: none; padding: 10px 0; margin: 8px 0; break-inside: avoid; }
 .form-panel h2 { margin-bottom: 7px; }
 .ingredients-display li, .steps-display li { padding: 4px 0; }
}
