/* ============================================================
   Wohlfühl-Webapp – Stylesheet
   Mobile-first, ruhige Naturtöne: Creme, Salbei, Sand
   Ohne externe Abhängigkeiten (System-Schriften, DSGVO-freundlich)
   ============================================================ */

:root {
    /* Farben */
    --cream:       #faf6ef;
    --cream-dark:  #f1eadf;
    --sage:        #7d9272;
    --sage-tint:   rgba(125, 146, 114, 0.14);
    --sage-strong: #6e8265;
    --sage-deep:   #55674e;
    --sand:        #d9c7ad;
    --sand-light:  #ece1d0;
    --text:        #3d3a34;
    --text-soft:   #6f6a60;
    --white:       #fffdf9;
    --danger:      #a85d4e;
    --border:      #e7ddcd;

    /* Schriften */
    --font-sans:  'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, 'Times New Roman', serif;

    /* Radien */
    --radius-sm:   10px;
    --radius:      14px;
    --radius-lg:   22px;
    --radius-pill: 999px;

    /* Schatten */
    --shadow-sm: 0 1px 2px rgba(80, 70, 50, 0.05), 0 2px 6px rgba(80, 70, 50, 0.05);
    --shadow:    0 4px 18px rgba(80, 70, 50, 0.08);
    --shadow-lg: 0 14px 34px rgba(80, 70, 50, 0.15);

    /* Übergänge & Fokus */
    --t-fast: 0.15s ease;
    --t:      0.25s ease;
    --ring:   0 0 0 3px rgba(110, 130, 101, 0.30);

    color-scheme: light;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--sage-deep);
    text-wrap: balance;
}

h1 { font-size: 1.95rem; margin: 0.4em 0 0.5em; }
h2 { font-size: 1.45rem; margin: 1.6em 0 0.6em; }
h3 { font-size: 1.12rem; margin: 0.3em 0 0.4em; }

p { text-wrap: pretty; }

a {
    color: var(--sage-deep);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
    transition: color var(--t-fast);
}
a:hover { color: var(--sage-strong); }

img { max-width: 100%; display: block; }

code {
    font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Code', Consolas, monospace;
    background: var(--cream-dark);
    padding: 0.1em 0.4em;
    border-radius: 6px;
    font-size: 0.85em;
}

::selection { background: var(--sand); color: var(--text); }

:focus-visible {
    outline: 2px solid var(--sage-strong);
    outline-offset: 2px;
    border-radius: 4px;
}

:target { scroll-margin-top: 5.5rem; }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

.container.narrow { max-width: 780px; }
.container.form-narrow { max-width: 480px; }

/* ---------------- Header & Navigation ---------------- */

.site-header {
    background: rgba(255, 253, 249, 0.85);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.brand {
    font-family: var(--font-sans);
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--sage-deep);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.brand-mark {
    color: var(--sand);
    font-size: 1.3em;
    line-height: 1;
    transition: transform 0.5s ease, color var(--t);
}

.brand:hover .brand-mark { transform: rotate(45deg); color: var(--sage); }

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--sage-deep);
    border-radius: 2px;
    transition: transform var(--t), opacity var(--t-fast);
}

/* Burger wird zum X, wenn das Menü offen ist (JS setzt aria-expanded) */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.8rem;
}

.main-nav.open { display: flex; animation: nav-drop var(--t); }

@keyframes nav-drop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.main-nav a {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: background var(--t-fast), color var(--t-fast);
}

.main-nav a:hover { background: var(--cream-dark); }

.nav-cta {
    background: var(--sage-strong);
    color: var(--white) !important;
    box-shadow: var(--shadow-sm);
}

.nav-cta:hover { background: var(--sage-deep) !important; }

.nav-admin { color: var(--danger) !important; }

/* Admin-Untermenü */
.admin-nav {
    background: var(--sage-deep);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.admin-nav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.admin-nav a {
    color: var(--cream);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    padding: 0.32rem 0.7rem;
    border-radius: 7px;
    transition: background var(--t-fast), color var(--t-fast);
}

.admin-nav a:hover { background: rgba(255, 255, 255, 0.15); color: var(--white); }

/* ---------------- Hero ---------------- */

.hero {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(60% 80% at 18% 18%, rgba(217, 199, 173, 0.30), transparent 60%),
        radial-gradient(70% 90% at 85% 85%, rgba(60, 76, 54, 0.45), transparent 60%),
        linear-gradient(135deg, var(--sage-strong) 0%, var(--sage-deep) 100%);
    color: var(--cream);
    padding: 4.8rem 0;
    overflow: hidden;
}

/* Sanfter Übergang in die Seite hinein */
.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 80px;
    background: linear-gradient(transparent, rgba(250, 246, 239, 0.18));
    pointer-events: none;
}

.hero-inner { max-width: 680px; margin-left: auto; margin-right: auto; text-align: center; }

.hero h1 {
    color: var(--white);
    font-size: 2.4rem;
    margin: 0 0 0.5em;
    text-shadow: 0 1px 2px rgba(40, 50, 35, 0.18);
    animation: rise 0.6s ease both;
}

.hero-text {
    max-width: 34em;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.08rem;
    opacity: 0.96;
    animation: rise 0.6s ease 0.08s both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 1.6rem;
    animation: rise 0.6s ease 0.16s both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- Abschnitte & Karten ---------------- */

.site-main { min-height: 60vh; }

.section { padding: 2.8rem 0; }

.section-alt { background: var(--cream-dark); }

.section-title { text-align: center; margin-top: 0; }

.page-intro { color: var(--text-soft); max-width: 38em; }

/* Startseite mittig: Intro-Absätze in ihren Abschnitten zentrieren */
.home .page-intro { margin-left: auto; margin-right: auto; text-align: center; }

.lead { font-size: 1.1rem; color: var(--text-soft); max-width: 40em; }

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    margin: 1.6rem 0;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--t), box-shadow var(--t);
}

.card:hover { box-shadow: var(--shadow-lg); }

.card-link {
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.card-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 1.6rem;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sage-tint);
    margin-bottom: 0.4rem;
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--sand-light);
    transition: transform 0.5s ease;
}

.card:hover .card-img { transform: scale(1.045); }

.card-body { padding: 1.2rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }

.card-body .btn { align-self: flex-start; margin-top: auto; }

.card-meta {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-soft);
}

.stat-card { padding: 1.5rem; align-items: center; text-align: center; gap: 0.2rem; }

.stat-number { font-size: 2.4rem; font-weight: 700; color: var(--sage-deep); font-family: var(--font-sans); line-height: 1.1; }

.stat-label { color: var(--text-soft); font-family: var(--font-sans); font-size: 0.9rem; }

/* ---------------- Buttons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.62rem 1.35rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--sage-strong);
    background: var(--sage-strong);
    color: var(--white);
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
}

.btn:hover { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-primary { background: var(--sage-strong); }

.btn-ghost {
    background: transparent;
    color: var(--sage-deep);
    border-color: var(--sand);
    box-shadow: none;
}

.btn-ghost:hover { background: var(--cream-dark); color: var(--sage-deep); border-color: var(--sand); }

.btn-small { padding: 0.38rem 0.95rem; font-size: 0.85rem; }

.btn-danger-outline {
    background: transparent;
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: none;
}

.btn-danger-outline:hover { background: var(--danger); border-color: var(--danger); color: var(--white); }

.btn-icon {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--sand);
    background: var(--white);
    border-radius: 9px;
    width: 2.1rem;
    height: 2.1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
    box-shadow: none;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.btn-icon:hover { background: var(--cream-dark); }

.btn-icon.btn-danger { color: var(--danger); border-color: var(--danger); }

.btn-icon.btn-danger:hover { background: var(--danger); color: var(--white); }

/* ---------------- Formulare ---------------- */

.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem;
    margin: 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

label, .label {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sage-deep);
    margin-top: 0.6rem;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], textarea, select {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--sand);
    border-radius: var(--radius-sm);
    background: var(--cream);
    color: var(--text);
    width: 100%;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

input::placeholder, textarea::placeholder { color: var(--text-soft); opacity: 0.7; }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--sage-strong);
    box-shadow: var(--ring);
    background: var(--white);
}

textarea { resize: vertical; min-height: 6rem; }

input[type="file"] { font-size: 0.9rem; padding: 0.4rem 0; }

.form-card .btn { align-self: flex-start; margin-top: 1.1rem; }

.form-hint { font-size: 0.92rem; color: var(--text-soft); }

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0.6rem 0;
}

.form-inline input[type="text"], .form-inline select { width: auto; flex: 1 1 160px; }

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.4rem;
    background: var(--cream);
    border: 1px solid var(--sand);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    margin: 0;
    font-size: 0.92rem;
    cursor: pointer;
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--sage-strong); }

/* ---------------- Filter & Tags ---------------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: 1.4rem 0;
    padding: 0.9rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.filter-bar select, .filter-bar input[type="search"] { width: auto; flex: 1 1 170px; }

.tag-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 1.2rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0; }

.tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    padding: 0.22rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--sand-light);
    color: var(--sage-deep);
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
}

a.tag:hover { background: var(--sand); }

.tag-active { background: var(--sage-strong); color: var(--white); }
a.tag-active:hover { background: var(--sage-deep); color: var(--white); }

/* ---------------- Detailseiten ---------------- */

.back-link {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-decoration: none;
    margin-bottom: 0.8rem;
}

.back-link:hover { text-decoration: underline; }

.detail-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 0.6rem 0 1rem;
    background: var(--sand-light);
    box-shadow: var(--shadow);
}

.fact-list {
    list-style: none;
    padding: 1.1rem 1.3rem;
    margin: 1rem 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.96rem;
}

.check-list { list-style: none; padding: 0; }

.check-list li { padding-left: 1.7em; position: relative; margin: 0.35em 0; }

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--sage-strong);
    font-weight: 700;
}

.steps { white-space: normal; }

.notice-box {
    background: var(--sage-tint);
    border-left: 4px solid var(--sage-strong);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.1rem;
    font-size: 0.95rem;
}

/* Responsiver YouTube-Einbettungsrahmen (16:9) auf der Übungsseite. */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0.6rem 0 0.8rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Fallback für Browser ohne aspect-ratio-Unterstützung. */
@supports not (aspect-ratio: 16 / 9) {
    .video-embed { height: 0; padding-bottom: 56.25%; }
}

.video-link {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.video-link:hover { text-decoration: underline; }

/* Hinweis-Tag „▶ Video“ in den Übungskarten. */
.tag-video {
    background: var(--sage-strong);
    color: var(--white);
}

.recipe-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
    margin: 1rem 0;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
    margin: 1.6rem 0;
}

.fav-form { margin: 0.8rem 0 1.2rem; }

/* ---------------- Yoga-Plan ---------------- */

.plan-list {
    list-style: none;
    counter-reset: plan;
    padding: 0;
    margin: 1.4rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.plan-item {
    counter-increment: plan;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.8rem 1rem;
    transition: box-shadow var(--t);
}

.plan-item:hover { box-shadow: var(--shadow-lg); }

.plan-item::before {
    content: counter(plan);
    display: grid;
    place-items: center;
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--sage-strong);
    background: var(--sage-tint);
    font-size: 0.95rem;
    width: 1.9em;
    height: 1.9em;
    border-radius: 50%;
    flex-shrink: 0;
}

.plan-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--sand-light);
    flex-shrink: 0;
}

.plan-item-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.plan-item-body a { text-decoration: none; }

.plan-item-actions { display: flex; gap: 0.3rem; }

/* ---------------- Ernährungsplan ---------------- */

.day-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem 1.4rem;
    margin: 1.2rem 0;
}

.day-block h2, .day-block h3 { margin-top: 0.2em; }

.day-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.meal-row {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--cream-dark);
}

.meal-type {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sage-deep);
    min-width: 7.5em;
}

.meal-body { flex: 1; display: flex; flex-direction: column; }

.meal-add { border-top: 1px dashed var(--sand); padding-top: 0.8rem; }

/* ---------------- Tabellen ---------------- */

.table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    overflow: hidden;
    font-size: 0.92rem;
}

.data-table th, .data-table td {
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--cream-dark);
    vertical-align: middle;
}

.data-table th {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
    background: var(--cream-dark);
}

.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover { background: var(--cream); }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--sand-light); }

.table-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }

.admin-thumb {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin: 0.3rem 0;
    background: var(--sand-light);
}

.remove-image-label { margin: 0.1rem 0 0.6rem; color: var(--text-soft); }

/* ---------------- Status & Flash ---------------- */

.status {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.18rem 0.7rem;
    border-radius: var(--radius-pill);
}

.status-pending   { background: #f0e6c8; color: #7a6420; }
.status-confirmed { background: #dde8d4; color: var(--sage-deep); }
.status-cancelled { background: #efdcd6; color: var(--danger); }

.flash-wrap { max-width: 1100px; margin: 1rem auto 0; padding: 0 1.2rem; }

.flash {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.1rem;
    margin: 0.5rem 0;
    border-left: 4px solid transparent;
    box-shadow: var(--shadow-sm);
}

.flash-success { background: #dde8d4; color: var(--sage-deep); border-left-color: var(--sage-strong); }
.flash-error   { background: #efdcd6; color: var(--danger); border-left-color: var(--danger); }
.flash-info    { background: var(--sand-light); color: var(--text); border-left-color: var(--sand); }

.flash a { color: inherit; font-weight: 600; }

/* ---------------- Footer ---------------- */

.site-footer {
    background: var(--sage-deep);
    color: var(--cream);
    margin-top: 3.5rem;
    padding: 2.6rem 0 1.2rem;
    font-size: 0.95rem;
}

.site-footer strong { font-family: var(--font-sans); font-size: 1.05rem; }

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.footer-inner p { margin: 0.5rem 0 0; opacity: 0.85; max-width: 32em; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 1rem; }

.footer-nav a { color: var(--cream); text-decoration: none; opacity: 0.9; transition: opacity var(--t-fast); }

.footer-nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; color: var(--white); opacity: 1; }

.footer-copy {
    margin-top: 1.6rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.82rem;
    opacity: 0.8;
}

/* ---------------- Größere Bildschirme ---------------- */

@media (min-width: 700px) {
    h1 { font-size: 2.4rem; }

    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    .form-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

    .recipe-columns { grid-template-columns: 1fr 1.4fr; }

    .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

@media (min-width: 980px) {
    .nav-toggle { display: none; }

    .main-nav {
        display: flex;
        flex-direction: row;
        width: auto;
        padding-top: 0;
        align-items: center;
        gap: 0.15rem;
    }

    .grid-3 { grid-template-columns: repeat(3, 1fr); }

    .hero { padding: 7rem 0; }

    .hero h1 { font-size: 3.1rem; }
}

/* ---------------- Bewegung reduzieren ---------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   Feinschliff II – Detailseiten, Karten & Akzente
   ============================================================ */

/* Hero: Ghost-Button auf dunklem Grund klar lesbar */
.hero .btn-ghost {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.06);
}

.hero .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.85);
    color: var(--white);
}

/* Abschnittstitel mit dezentem Akzentstrich */
.section-title { position: relative; padding-bottom: 0.7rem; }

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--sand), var(--sage));
}

/* Karten-Überschriften enger an den Inhalt führen */
.card-body h3, .card-link h3 { margin-top: 0; }
.card-body .tag-row { margin: 0.1rem 0 0; }

/* Faktenliste als saubere Schlüssel-Wert-Liste mit Trennlinien */
.fact-list { gap: 0; }

.fact-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.3rem 1.2rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--cream-dark);
}

.fact-list li:first-child { border-top: none; padding-top: 0; }
.fact-list li:last-child { padding-bottom: 0; }

.fact-list strong {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--text-soft);
}


/* Rezept-Detail: Nährwert-Tortendiagramm */
.nutrition-overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.macro-chart-card {
    --macro-protein: #7d9272;
    --macro-fat: #d9a66f;
    --macro-carbs: #9bb7c8;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.3rem;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.15rem;
}

.macro-pie {
    width: min(44vw, 160px);
    min-width: 132px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--macro-chart));
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(61, 58, 52, 0.08);
}

.macro-pie::after {
    content: '';
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 0 1px rgba(61, 58, 52, 0.06);
}

.macro-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.45rem;
    font-size: 0.95rem;
}

.macro-legend li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.macro-dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(61, 58, 52, 0.08);
}

.macro-dot-protein { background: var(--macro-protein); }
.macro-dot-fat { background: var(--macro-fat); }
.macro-dot-carbs { background: var(--macro-carbs); }

@media (min-width: 700px) {
    .nutrition-overview { grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr); }
}

/* Rezept-Detail: Zutaten als ruhiges Panel neben der Zubereitung */
.recipe-columns h2 { margin-top: 0; }

.recipe-columns > div:first-child {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.3rem;
    align-self: start;
}

/* Zubereitungstext angenehmer lesbar */
.steps { line-height: 1.8; max-width: 38em; }

/* Yoga-Plan: Titel-Link beim Hovern unterstreichen */
.plan-item-body a:hover strong { text-decoration: underline; text-underline-offset: 0.15em; }

/* ============================================================
   Ernährungsplaner / Wizard
   ============================================================ */

/* Profil-Chips (kcal, Tage, Stil …) */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 1.2rem; }

.chip {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    padding: 0.28rem 0.8rem;
    border-radius: var(--radius-pill);
    background: var(--sand-light);
    color: var(--sage-deep);
}

.chip-strong { background: var(--sage-strong); color: var(--white); font-weight: 600; }

/* Wizard-Schritte */
.wizard legend {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--sage-deep);
    font-size: 1.1rem;
    padding: 0;
    margin-bottom: 0.3rem;
}

.wizard-step {
    border: none;
    padding: 0;
    margin: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* Schritte werden per JS ein-/ausgeblendet; ohne JS alle sichtbar */
.wizard.is-enhanced .wizard-step + .wizard-step { margin-top: 0; }
.wizard-step[hidden] { display: none; }

.wizard-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.wizard-dot {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-pill);
    background: var(--cream-dark);
    color: var(--text-soft);
    border: 1px solid var(--border);
}

.wizard-dot.is-active { background: var(--sage-strong); color: var(--white); border-color: var(--sage-strong); }
.wizard-dot.is-done { background: var(--sage-tint); color: var(--sage-deep); }

.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.3rem;
}

/* Auswahl-Karten (Radio als Kachel) */
.choice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin: 0.2rem 0 0.4rem;
}

.choice { position: relative; margin: 0; cursor: pointer; }

.choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.choice-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--sand);
    border-radius: var(--radius-sm);
    background: var(--cream);
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

.choice-title { font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; color: var(--text); }

.choice:hover .choice-body { border-color: var(--sage); background: var(--white); }

.choice input:checked + .choice-body {
    border-color: var(--sage-strong);
    background: var(--white);
    box-shadow: var(--sage-tint) 0 0 0 3px;
}

.choice input:focus-visible + .choice-body { box-shadow: var(--ring); }

/* Live-Kalorienschätzung im Wizard */
.kcal-estimate {
    margin-top: 1.1rem;
    padding: 0.8rem 1.1rem;
    background: var(--sage-tint);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--sage-deep);
}

.kcal-estimate strong { font-size: 1.1rem; }

/* Teilen-Karte */
.share-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.3rem;
    margin: 1.2rem 0 1.6rem;
}

.share-title { font-family: var(--font-sans); display: block; margin-bottom: 0.7rem; color: var(--sage-deep); }

.share-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--sand);
    background: var(--cream);
    color: var(--sage-deep);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.share-btn:hover { transform: translateY(-1px); }
.share-btn:focus-visible { outline: 2px solid var(--sage-strong); outline-offset: 2px; }

.share-icon { display: block; width: 1.15rem; height: 1.15rem; }
.share-check { font-size: 1.15rem; line-height: 1; font-weight: 700; }

.share-whatsapp:hover  { background: #25d366; border-color: #25d366; color: #fff; }
.share-telegram:hover  { background: #229ed9; border-color: #229ed9; color: #fff; }
.share-facebook:hover  { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-x:hover         { background: #14171a; border-color: #14171a; color: #fff; }
.share-e-mail:hover    { background: var(--sage-strong); border-color: var(--sage-strong); color: #fff; }
.share-instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    border-color: transparent;
    color: #fff;
}

/* Kurze Rückmeldung nach „Link kopieren“ / Teilen */
.share-btn.is-done { background: var(--sage-strong); border-color: var(--sage-strong); color: #fff; transform: none; }

.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 0.9rem; }

/* Tagesblöcke im persönlichen Plan */
.plan-day {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem 1.3rem;
    margin: 1.1rem 0;
}

.plan-day h2 { margin: 0; }

.day-kcal { font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-soft); }
.day-kcal strong { color: var(--sage-deep); font-size: 1.05rem; }

.plan-day .meal-row { align-items: center; }
.plan-day .meal-body { gap: 0.1rem; }

.meal-action { margin: 0; }

.rename-box {
    margin: 1.4rem 0 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.rename-box summary { cursor: pointer; color: var(--sage-deep); }
.rename-box .form-inline { margin-top: 0.6rem; }

.print-footnote { font-size: 0.85rem; color: var(--text-soft); margin-top: 1.6rem; }

@media (min-width: 640px) {
    .choice-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .choice-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------- Druck / Als PDF speichern ---------------- */

/* Branding nur im Druck / PDF sichtbar */
.print-brand, .print-footer { display: none; }

@media print {
    .site-header, .admin-nav, .site-footer, .nav-toggle,
    .no-print, .back-link, .flash-wrap, .share-card { display: none !important; }

    .print-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0 0 0.7rem;
        padding-bottom: 0.5rem;
        border-bottom: 2pt solid #6e8265;
        font-family: var(--font-sans);
        font-weight: 700;
        font-size: 15pt;
        color: #4b5a44;
    }
    .print-brand-mark { font-size: 19pt; line-height: 1; }

    .print-footer {
        display: block;
        margin-top: 1.2rem;
        padding-top: 0.5rem;
        border-top: 1pt solid #999;
        font-family: var(--font-sans);
        font-size: 9pt;
        color: #555;
        text-align: center;
    }

    body { background: #fff; color: #000; font-size: 12pt; }
    .site-main { min-height: 0; }
    .section { padding: 0; }
    .container, .container.narrow { max-width: none; padding: 0; }

    h1, h2, .day-head h2 { color: #000; }

    .plan-day {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #bbb;
        margin: 0.5rem 0;
    }

    .chip, .chip-strong { background: #fff; color: #000; border: 1px solid #999; }

    a { color: #000; text-decoration: none; }

    .print-footnote { color: #555; }
}

/* Schrittfolge mit Icons – geteilt von Rezept-Zubereitung und Übungs-Anleitung */
.preparation-panel {
    background: linear-gradient(145deg, var(--white), rgba(236, 225, 208, 0.34));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.15rem;
}

.preparation-panel h2 { margin-top: 0; }

.preparation-steps {
    list-style: none;
    counter-reset: preparation;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
}

.preparation-steps li {
    counter-increment: preparation;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    position: relative;
    padding: 0.95rem 1rem;
    background: rgba(255, 253, 249, 0.82);
    border: 1px solid rgba(231, 221, 205, 0.78);
    border-radius: var(--radius);
}

.preparation-steps li::before {
    content: counter(preparation);
    position: absolute;
    top: -0.55rem;
    left: 2.45rem;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: var(--sage-strong);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.step-icon {
    width: 2.3rem;
    height: 2.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--sage-tint);
    font-size: 1.15rem;
    line-height: 1;
}

.step-content {
    padding-top: 0.1rem;
    line-height: 1.75;
}
