/* ============================================================
   KOCHBUCH — Minimalist Monochrome Design System
   ============================================================ */

:root {
    --color-primary: #111111;
    --color-primary-hover: #000000;
    --color-primary-light: #f5f5f5;

    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #111111;
    --color-text-secondary: #6b6b6b;
    --color-text-tertiary: #999999;
    --color-border: #e5e5e5;
    --color-border-light: #f0f0f0;

    --color-danger: #111111;
    --color-danger-light: #f5f5f5;
    --color-keep: #111111;
    --color-dismiss: #111111;

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 40px rgba(0, 0, 0, 0.1);

    --nav-height: 68px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    --icon-size: 20px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

#app-content {
    flex: 1;
    padding: 20px 20px calc(var(--nav-height) + 20px);
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    animation: fadeIn 0.2s ease;
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */

#app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--color-text-tertiary);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--color-text); }
.nav-item:active { transform: scale(0.92); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.section-title svg { width: 14px; height: 14px; }
.home-empty-hint {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    opacity: 0.7;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    line-height: 1.4;
}

.btn:active { transform: scale(0.97); }

.btn svg, .back-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover { background: var(--color-primary-hover); }

.btn-secondary {
    background: var(--color-primary-light);
    color: var(--color-text);
}

.btn-secondary:hover { background: #ebebeb; }

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
}

.btn-outline:hover { border-color: var(--color-text-tertiary); }

.btn-danger {
    background: var(--color-primary-light);
    color: var(--color-text);
}

.btn-danger:hover { background: #ebebeb; }

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-full); }
.btn-icon svg { width: 18px; height: 18px; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover { box-shadow: var(--shadow-md); }
.card-clickable { cursor: pointer; }
.card-clickable:hover { transform: translateY(-1px); }
.card-clickable:active { transform: translateY(0) scale(0.99); }

/* ============================================================
   RECIPE CARDS
   ============================================================ */

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.recipe-card { position: relative; }

.recipe-card-hero {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    position: relative;
}

.recipe-card-hero svg {
    width: 48px;
    height: 48px;
    color: var(--color-text-tertiary);
    stroke-width: 1.2;
}

.recipe-card-category {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

.recipe-card-body { padding: 12px 14px 14px; }

.recipe-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.recipe-card-meta {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.recipe-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.recipe-card-meta svg {
    width: 13px;
    height: 13px;
}

/* ============================================================
   GROUP BADGE / HINT
   ============================================================ */

/* Recipe card labels */
.recipe-card-labels {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.recipe-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-text-secondary);
}

.recipe-label svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* Detail labels */
.detail-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.detail-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--color-text);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.detail-label svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.swipe-card-tag-group {
    background: var(--color-text);
    color: white;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.15s;
    outline: none;
    -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-text);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============================================================
   SEARCH
   ============================================================ */

.search-bar { position: relative; margin-bottom: 16px; }

.search-bar svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--color-text-tertiary);
    pointer-events: none;
}

.search-bar input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--color-surface);
    outline: none;
    transition: border-color 0.15s;
}

.search-bar input:focus { border-color: var(--color-text); }

/* ============================================================
   FILTER TABS
   ============================================================ */

.filter-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
    padding: 7px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-border);
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.filter-tab.active {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.filter-tab:not(.active):hover {
    border-color: var(--color-text-secondary);
}

.filter-tab svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.label-filters {
    margin-top: -10px;
}

/* ============================================================
   LABEL PICKER (FORM)
   ============================================================ */

.label-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.label-picker-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    background: transparent;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.label-picker-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.label-picker-item:hover { border-color: var(--color-text-secondary); }

.label-picker-item.selected {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

/* ============================================================
   CHIPS / TAGS
   ============================================================ */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--color-primary-light);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.chip:hover { border-color: var(--color-text-secondary); }

.chip-selected {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.chip-removable .chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.7rem;
    line-height: 1;
}

.chips-container { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   INGREDIENT INPUT
   ============================================================ */

.ingredient-input-wrapper { display: flex; gap: 8px; margin-bottom: 12px; }
.ingredient-input-wrapper .form-input { flex: 1; }

/* ============================================================
   RECIPE DETAIL
   ============================================================ */

.detail-hero {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
}

.detail-hero svg {
    width: 72px;
    height: 72px;
    color: var(--color-text-tertiary);
    stroke-width: 1;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    background: var(--color-primary-light);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.detail-meta-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.detail-section { margin-bottom: 28px; }

.detail-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section-title svg {
    width: 16px;
    height: 16px;
}

.ingredient-list { list-style: none; }

.ingredient-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.9rem;
}

.ingredient-list li:last-child { border-bottom: none; }

.ingredient-check {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1.5px solid var(--color-border);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    background: var(--color-surface);
}

.ingredient-check.checked {
    background: var(--color-text);
    border-color: var(--color-text);
}

.ingredient-check.checked::after {
    content: '';
    width: 10px;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center/contain;
}

.ingredient-amount {
    color: var(--color-text-tertiary);
    min-width: 80px;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.step-list { list-style: none; counter-reset: step; }

.step-list li {
    counter-increment: step;
    display: flex;
    gap: 14px;
    padding: 10px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.step-list li::before {
    content: counter(step);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-text);
    color: white;
    font-weight: 600;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

/* ============================================================
   DYNAMIC LIST ITEMS (FORM)
   ============================================================ */

.dynamic-list-item {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.dynamic-list-item .form-input { flex: 1; }

.dynamic-list-item .btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: transparent;
    color: var(--color-text-tertiary);
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.dynamic-list-item .btn-remove:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

/* ============================================================
   SUGGEST VIEW
   ============================================================ */

.suggest-hero {
    text-align: center;
    padding: 32px 0 28px;
}

.suggest-hero-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--color-text-tertiary);
}

.suggest-hero-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.2;
}

.suggest-description {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    max-width: 380px;
    margin: 0 auto;
}

.quick-ingredients { margin-top: 20px; margin-bottom: 24px; }

.quick-ingredients-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-tertiary);
    margin-bottom: 10px;
}

.match-preview {
    margin-top: 24px;
    padding: 20px;
    background: var(--color-primary-light);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--color-border-light);
}

.match-count {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.match-label {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

/* ============================================================
   SWIPE VIEW
   ============================================================ */

.swipe-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100dvh - var(--nav-height) - 40px);
    padding-top: 12px;
}

.swipe-header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.swipe-round {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.swipe-progress {
    font-size: 0.82rem;
    color: var(--color-text-tertiary);
}

.swipe-progress-bar {
    width: 100%;
    max-width: 240px;
    height: 2px;
    background: var(--color-border);
    border-radius: 1px;
    margin: 10px auto 0;
    overflow: hidden;
}

.swipe-progress-fill {
    height: 100%;
    background: var(--color-text);
    border-radius: 1px;
    transition: width 0.3s ease;
}

.swipe-container {
    position: relative;
    width: 100%;
    max-width: 340px;
    height: 420px;
    margin: 0 auto;
}

.swipe-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.swipe-card:active { cursor: grabbing; }
.swipe-card.no-transition { transition: none !important; }

.swipe-card-hero {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    position: relative;
}

.swipe-card-hero svg {
    width: 56px;
    height: 56px;
    color: var(--color-text-tertiary);
    stroke-width: 1;
}

.swipe-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.swipe-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.swipe-card-description {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swipe-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.swipe-card-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--color-primary-light);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.swipe-card-tag svg { width: 12px; height: 12px; }

.swipe-card-match {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text);
}

.swipe-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.swipe-overlay svg {
    width: 64px;
    height: 64px;
    stroke-width: 2;
}

.swipe-overlay-keep {
    background: rgba(0, 0, 0, 0.04);
    border: 2px solid var(--color-text);
    color: var(--color-text);
}

.swipe-overlay-dismiss {
    background: rgba(0, 0, 0, 0.04);
    border: 2px solid var(--color-text-tertiary);
    color: var(--color-text-tertiary);
}

.swipe-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.swipe-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.swipe-btn svg { width: 22px; height: 22px; }
.swipe-btn:active { transform: scale(0.9); }

.swipe-btn-dismiss { color: var(--color-text-tertiary); }
.swipe-btn-dismiss:hover { border-color: var(--color-text); color: var(--color-text); }

.swipe-btn-keep { color: var(--color-text); }
.swipe-btn-keep:hover { background: var(--color-text); color: white; }

@keyframes swipeRight {
    to { transform: translateX(150%) rotate(15deg); opacity: 0; }
}

@keyframes swipeLeft {
    to { transform: translateX(-150%) rotate(-15deg); opacity: 0; }
}

.swipe-card.swiping-out-right { animation: swipeRight 0.3s ease forwards; }
.swipe-card.swiping-out-left { animation: swipeLeft 0.3s ease forwards; }

/* ============================================================
   WINNER
   ============================================================ */

.winner-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100dvh - var(--nav-height) - 64px);
    animation: winnerIn 0.5s ease;
}

@keyframes winnerIn {
    0% { opacity: 0; transform: scale(0.9); }
    60% { transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

.winner-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.winner-icon svg { width: 100%; height: 100%; stroke-width: 1; }

.winner-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.winner-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.winner-description {
    color: var(--color-text-secondary);
    max-width: 300px;
    margin-bottom: 28px;
    font-size: 0.9rem;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state { text-align: center; padding: 48px 24px; }

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--color-text-tertiary);
}

.empty-state-icon svg { width: 100%; height: 100%; stroke-width: 1.2; }

.empty-state-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.empty-state-text { color: var(--color-text-secondary); font-size: 0.85rem; margin-bottom: 20px; }

/* ============================================================
   HOME
   ============================================================ */

.home-hero { padding: 20px 0 16px; position: relative; }

.logout-btn {
    position: absolute;
    top: 20px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-tertiary);
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logout-btn:hover { color: var(--color-text-primary); background: var(--color-bg); }
.logout-btn svg { width: 20px; height: 20px; }

.home-greeting {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 2px;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    border: 1px solid var(--color-border-light);
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--color-text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.home-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 32px;
}

.action-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.action-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.action-card:active { transform: scale(0.98); }

.action-card-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    color: var(--color-text-secondary);
}

.action-card-icon svg { width: 100%; height: 100%; stroke-width: 1.5; }

.action-card-label { font-size: 0.82rem; font-weight: 500; }

/* ============================================================
   ICON PICKER (FORM)
   ============================================================ */

.icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 6px;
}

.icon-picker-item {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: var(--color-text-secondary);
    -webkit-tap-highlight-color: transparent;
}

.icon-picker-item svg { width: 22px; height: 22px; stroke-width: 1.5; }

.icon-picker-item:hover { border-color: var(--color-text-secondary); }

.icon-picker-item.selected {
    background: var(--color-text);
    border-color: var(--color-text);
    color: white;
}

/* ============================================================
   PHOTO UPLOAD
   ============================================================ */

.photo-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    overflow: hidden;
}

.photo-upload-area:hover { border-color: var(--color-text-secondary); }
.photo-upload-area.has-photo { padding: 0; border-style: solid; }

.photo-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.photo-upload-placeholder {
    color: var(--color-text-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.photo-upload-placeholder svg { width: 32px; height: 32px; stroke-width: 1.2; }

.photo-upload-placeholder span {
    font-size: 0.82rem;
    font-weight: 500;
}

.photo-upload-hint {
    font-size: 0.72rem;
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

.photo-upload-preview {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    border-radius: calc(var(--radius-lg) - 2px);
}

.photo-upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.photo-upload-remove:hover { background: rgba(0, 0, 0, 0.8); }
.photo-upload-remove svg { width: 14px; height: 14px; stroke-width: 2.5; }

/* Hero with photo */
.recipe-card-hero.has-photo,
.detail-hero.has-photo,
.swipe-card-hero.has-photo {
    padding: 0;
    background: var(--color-text);
}

.recipe-card-hero.has-photo img,
.detail-hero.has-photo img,
.swipe-card-hero.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================
   YOUTUBE PREVIEW
   ============================================================ */

.youtube-preview {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    margin-top: 4px;
    background: var(--color-text);
    aspect-ratio: 16/9;
}

.youtube-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.youtube-preview:hover img { opacity: 1; }

.youtube-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    backdrop-filter: blur(4px);
}

.youtube-preview:hover .youtube-play-btn {
    background: rgba(0, 0, 0, 0.85);
    transform: translate(-50%, -50%) scale(1.05);
}

.youtube-play-btn svg {
    width: 24px;
    height: 24px;
    color: white;
    margin-left: 2px;
}

.youtube-input-preview {
    margin-top: 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    background: var(--color-primary-light);
}

.youtube-input-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================================
   BACK BUTTON
   ============================================================ */

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    margin-bottom: 16px;
    -webkit-tap-highlight-color: transparent;
}

.back-btn:hover { color: var(--color-text); }

/* ============================================================
   GUEST PICKER
   ============================================================ */

.guest-picker-modal {
    max-width: 400px;
    padding: 28px 24px;
}

.guest-picker-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    color: var(--color-text-secondary);
}

.guest-picker-icon svg { width: 100%; height: 100%; stroke-width: 1.2; }

.guest-picker-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guest-picker-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    text-align: left;
}

.guest-picker-option:hover {
    border-color: var(--color-text);
    background: var(--color-primary-light);
}

.guest-picker-option:active {
    transform: scale(0.98);
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.guest-picker-option-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-picker-option-icon svg { width: 100%; height: 100%; }

.guest-picker-option-label { flex: 1; }

/* Guest selection bar in suggest view */
.guest-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    cursor: pointer;
}

.guest-selection-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text);
}

.guest-selection-label svg { width: 16px; height: 16px; }

/* ============================================================
   FAB
   ============================================================ */

.fab {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-text);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.fab svg { width: 20px; height: 20px; stroke-width: 2; }
.fab:hover { transform: scale(1.08); }
.fab:active { transform: scale(0.95); }

/* ============================================================
   TOAST
   ============================================================ */

.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: var(--color-text);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.25s ease, toastOut 0.25s ease 3s forwards;
    pointer-events: auto;
    white-space: nowrap;
}
.toast-icon svg { width: 16px; height: 16px; vertical-align: middle; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-12px); }
}

.toast-success { background: #1a7a3a; }
.toast-error { background: #b91c1c; }

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: modalOverlayIn 0.15s ease;
}

@keyframes modalOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 24px;
    max-width: 360px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.modal-text { font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 24px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================================
   CONFETTI (monochrome)
   ============================================================ */

.confetti-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 200;
    overflow: hidden;
}

.confetti {
    position: absolute;
    border-radius: 1px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 640px) {
    #app-content { padding: 24px 24px calc(var(--nav-height) + 24px); }
    .page-title { font-size: 1.8rem; }
    .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .swipe-container { max-width: 380px; height: 460px; }
}

@media (min-width: 768px) {
    #app-nav {
        top: 0; bottom: auto;
        height: 56px;
        border-top: none;
        border-bottom: 1px solid var(--color-border-light);
        justify-content: center;
        gap: 4px;
    }
    .nav-item {
        flex-direction: row;
        gap: 6px;
        padding: 8px 18px;
        border-radius: var(--radius-full);
        font-size: 0.78rem;
    }
    .nav-item.active { background: var(--color-primary-light); }
    .nav-item svg { width: 18px; height: 18px; }
    #app-content { padding: 80px 24px 32px; }
    .fab { bottom: 28px; right: 28px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */

/* ============================================================
   ADMIN: CONTACT CARDS
   ============================================================ */

.admin-contact-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.contact-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.contact-card:active { transform: scale(0.99); }

.contact-card-info { flex: 1; min-width: 0; }
.contact-card-name { font-size: 0.9rem; font-weight: 600; }
.contact-card-meta { font-size: 0.75rem; color: var(--color-text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.contact-pate-line {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--color-text-tertiary);
    margin-top: 3px;
}
.contact-pate-line svg { width: 11px; height: 11px; flex-shrink: 0; }

.contact-card-roles {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1.5px solid;
}

.role-badge-mitglied  { color: var(--color-text-tertiary); border-color: var(--color-border); background: transparent; }
.role-badge-redakteur { color: var(--color-text-secondary); border-color: var(--color-border); background: var(--color-primary-light); }
.role-badge-admin     { color: #fff; border-color: var(--color-text); background: var(--color-text); }

/* Role Picker im Formular */
.role-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.role-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.role-picker-item:hover { border-color: var(--color-text-secondary); background: var(--color-primary-light); }

.role-picker-item.selected {
    border-color: var(--color-text);
    background: var(--color-text);
    color: white;
}

.role-picker-icon { display: flex; flex-shrink: 0; opacity: 0.7; }
.role-picker-icon svg { width: 18px; height: 18px; }

.role-picker-text { flex: 1; min-width: 0; }
.role-picker-name { display: block; font-size: 0.88rem; font-weight: 600; }
.role-picker-desc { display: block; font-size: 0.75rem; opacity: 0.65; margin-top: 1px; }

.role-picker-check { display: flex; flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.role-picker-check svg { width: 16px; height: 16px; }
.role-picker-item.selected .role-picker-check { opacity: 1; }

.contact-card-arrow {
    color: var(--color-text-tertiary);
    transform: rotate(180deg);
    flex-shrink: 0;
}

.contact-card-arrow svg { width: 16px; height: 16px; }

/* Drag & Drop Sort */
.contact-drag-handle {
    display: flex;
    align-items: center;
    padding: 4px 2px;
    color: var(--color-text-tertiary);
    cursor: grab;
    flex-shrink: 0;
    touch-action: none;
}

.contact-drag-handle:active { cursor: grabbing; }
.contact-drag-handle svg { width: 18px; height: 18px; }

.contact-drag-original {
    opacity: 0;
}

.contact-drag-ghost {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    background: var(--color-surface);
    border: 1.5px solid var(--color-text);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.95;
}

.contact-drag-ghost .contact-drag-handle { display: none; }

.contact-drag-placeholder {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    margin-bottom: 4px;
}

/* Avatar */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-text);
    color: white;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Avatar upload */
.avatar-upload {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px dashed var(--color-border);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}

.avatar-upload:hover { border-color: var(--color-text-secondary); }

.avatar-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.avatar-upload-placeholder {
    color: var(--color-text-tertiary);
}

.avatar-upload-placeholder svg { width: 28px; height: 28px; stroke-width: 1.2; }

.avatar-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload-remove {
    position: absolute;
    bottom: 2px;
    right: 2px;
    z-index: 3;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-upload-remove svg { width: 12px; height: 12px; stroke-width: 2.5; }

/* ============================================================
   ADMIN: CONTACT CHECK CARD (Newsletter recipient picker)
   ============================================================ */

.contact-check-card {
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.contact-check-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.contact-check-visual {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all 0.15s;
}

.contact-check-card:hover .contact-check-visual { border-color: var(--color-text-secondary); }

.contact-check-card input:checked + .contact-check-visual {
    border-color: var(--color-text);
    background: var(--color-primary-light);
}

.contact-check-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1.5px solid var(--color-border);
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.15s;
}

.contact-check-box svg { width: 14px; height: 14px; stroke-width: 2.5; }

.contact-check-card input:checked + .contact-check-visual .contact-check-box {
    background: var(--color-text);
    border-color: var(--color-text);
    color: white;
}

/* ============================================================
   ADMIN: NEWSLETTER CARDS
   ============================================================ */

.admin-newsletter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-card {
    display: block;
    padding: 14px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.newsletter-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.newsletter-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.newsletter-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.newsletter-status {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.newsletter-status-entwurf { background: var(--color-primary-light); color: var(--color-text-secondary); }
.newsletter-status-geplant { background: var(--color-text); color: white; }
.newsletter-status-gesendet { background: var(--color-primary-light); color: var(--color-text-tertiary); }

.newsletter-card-meta {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    margin-bottom: 6px;
}

.newsletter-card-preview {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.newsletter-group-select {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Backend Status Badge */
.backend-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    margin-top: 12px;
}

.backend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.backend-dot-checking { background: #ccc; animation: pulse 1.2s ease-in-out infinite; }
.backend-dot-online   { background: #4caf50; }
.backend-dot-offline  { background: #e53935; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ============================================================
   PIN LOCK SCREEN
   ============================================================ */

#pin-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}

.pin-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 24px;
    width: 100%;
    max-width: 340px;
}

.pin-lock-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
}

.pin-lock-icon svg { width: 26px; height: 26px; }

.pin-header { text-align: center; }
.pin-title   { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; }
.pin-subtitle { font-size: 0.88rem; color: var(--color-text-secondary); margin-top: 6px; min-height: 1.4em; }

.pin-dots {
    display: flex;
    gap: 18px;
    align-items: center;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.pin-dot.filled {
    background: var(--color-text);
    border-color: var(--color-text);
    transform: scale(1.15);
}

.pin-numpad {
    display: grid;
    grid-template-columns: repeat(3, 76px);
    gap: 14px;
    justify-content: center;
}

.pin-key {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary-light);
    font-family: inherit;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.pin-key:not([disabled]):hover   { background: var(--color-border-light); }
.pin-key:not([disabled]):active  { transform: scale(0.91); background: var(--color-border); }
.pin-key-empty   { background: transparent !important; cursor: default; pointer-events: none; }
.pin-key-del svg { width: 22px; height: 22px; }

/* Kontakt-Picker beim Login */
.pin-screen-picker { gap: 20px; max-width: 400px; }

.contact-login-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-height: 55vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.contact-login-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--color-border-light);
    background: var(--color-surface);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
}

.contact-login-item:hover  { border-color: var(--color-text-secondary); background: var(--color-primary-light); }
.contact-login-item:active { transform: scale(0.98); }

.contact-login-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.contact-login-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border-light);
    border-radius: var(--radius-full);
    margin-bottom: 4px;
}
.contact-login-search svg { width: 16px; height: 16px; color: var(--color-text-tertiary); flex-shrink: 0; }
.contact-login-search input {
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--color-text);
    width: 100%;
}

/* Avatar im PIN-Screen */
.pin-avatar-wrap { display: flex; align-items: center; justify-content: center; }
.pin-avatar-wrap .avatar,
.pin-avatar-wrap .avatar-initials {
    box-shadow: 0 0 0 3px var(--color-bg), 0 0 0 5px var(--color-border-light);
}

/* mustChangePin-Badge auf Kontaktkarten */
.pin-change-badge {
    color: #92400e;
    border-color: #fcd34d;
    background: #fffbeb;
}
.pin-change-badge svg { width: 9px; height: 9px; display: inline; vertical-align: middle; margin-right: 1px; }

/* Provisorisch-Badge */
.status-badge-provisorisch {
    color: #9a3412;
    border-color: #fed7aa;
    background: #fff7ed;
}

/* Hint-Box im Vorschlagsformular */
.provisional-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    font-size: 0.83rem;
    color: #9a3412;
    line-height: 1.5;
}
.provisional-hint svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* Banner im Kontaktformular (provisorisch) */
.provisional-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    margin-top: 8px;
}
.provisional-banner-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Alert-Bar im Admin-Dashboard */
.provisional-alert-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #9a3412;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.provisional-alert-bar:hover { background: #ffedd5; }
.provisional-alert-bar svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Stat-Card mit Alert-Hervorhebung */
.stat-card-alert .stat-number { color: #ea580c; }

.pin-cancel-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: 8px 16px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pin-cancel-btn:hover { color: var(--color-text-secondary); }

.pin-footer {
    margin-top: auto;
    padding-top: 24px;
    font-size: 0.72rem;
    color: var(--color-text-tertiary);
    letter-spacing: 0.02em;
}
.pin-footer a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 600;
}
.pin-footer a:hover { text-decoration: underline; }

@keyframes pinShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-12px); }
    40%       { transform: translateX(12px); }
    60%       { transform: translateX(-8px); }
    80%       { transform: translateX(8px); }
}

.pin-shake { animation: pinShake 0.55s ease; }

/* ============================================================
   NEWSLETTER TOOLBAR
   ============================================================ */

.newsletter-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-light);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    flex-wrap: wrap;
}

.newsletter-toolbar + .link-input-row,
.newsletter-toolbar + .link-input-row + textarea,
.newsletter-toolbar + textarea {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}

.toolbar-btn:hover { background: var(--color-border-light); border-color: var(--color-text-secondary); }
.toolbar-btn svg { width: 13px; height: 13px; }

.toolbar-hint {
    font-size: 0.72rem;
    color: var(--color-text-tertiary);
    margin-left: 4px;
    font-family: 'SF Mono', 'Fira Mono', monospace;
}

.link-input-row {
    padding: 10px 12px;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-light);
    border-top: none;
    border-bottom: none;
}

/* ============================================================
   TEMPLATE EDITOR
   ============================================================ */

.template-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.template-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border-light);
}

.template-preview-wrap {
    background: #ebebeb;
    border-radius: var(--radius-lg);
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--color-border-light);
}

.template-preview-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.template-preview-scaler {
    position: relative;
    overflow: hidden;
    height: 260px;
    border-radius: var(--radius-md);
    background: #f5f5f5;
}

.template-preview-frame {
    width: 580px;
    height: 490px;
    border: none;
    display: block;
    transform-origin: top left;
    transform: scale(0.52);
    pointer-events: none;
}

@media (min-width: 480px) {
    .template-preview-frame { transform: scale(0.62); }
    .template-preview-scaler { height: 310px; }
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-text-input { flex: 1; font-family: 'SF Mono', 'Fira Mono', monospace; font-size: 0.85rem; }

.color-picker-native {
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    padding: 2px;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}

.color-swatches {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.color-swatch:hover { transform: scale(1.2); border-color: var(--color-text-secondary); }

.form-label-hint { font-weight: 400; color: var(--color-text-tertiary); text-transform: none; letter-spacing: 0; font-size: 0.75rem; }

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    margin-top: 5px;
    line-height: 1.4;
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
/* Recipe Status Badges */
.recipe-status-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}
.recipe-status-entwurf {
    background: #f5f5f5;
    color: #888;
}
.recipe-status-bereit {
    background: #fff8e1;
    color: #b8860b;
}

/* Like Button */
.btn-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-like:hover { border-color: #ccc; }
.btn-like.liked {
  background: #fff0f0;
  border-color: #e8a0a0;
  color: #d44;
}
.btn-like.liked svg { fill: #d44; stroke: #d44; }
.btn-like svg { width: 18px; height: 18px; transition: all 0.2s; }

/* Recipe Author */
.recipe-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}
.recipe-author strong { color: var(--color-text-primary); }

/* Dashboard Rankings */
.dashboard-rankings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.ranking-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px;
}
.ranking-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
}
.ranking-card-title svg { width: 16px; height: 16px; }
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}
.ranking-pos {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.ranking-item:first-child .ranking-pos {
  background: var(--color-text-primary);
  color: #fff;
}
.ranking-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.ranking-icon svg { width: 20px; height: 20px; }
.ranking-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.ranking-value {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.ranking-value svg { width: 14px; height: 14px; }
.ranking-empty {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  opacity: 0.6;
  padding: 8px 0;
}

/* ─── Kochtagebuch ─── */
.cooklog-form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.cooklog-guest-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.cooklog-guest-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 0.88rem;
}
.cooklog-guest-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-text);
  flex-shrink: 0;
}
.cooklog-entry {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.cooklog-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cooklog-entry-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.cooklog-entry-date svg { width: 14px; height: 14px; }
.cooklog-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  opacity: 0.5;
  transition: opacity 0.15s;
  padding: 2px;
}
.cooklog-delete-btn:hover { opacity: 1; color: #c00; }
.cooklog-delete-btn svg { width: 14px; height: 14px; }
.cooklog-entry-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  margin-bottom: 4px;
}
.cooklog-entry-guests {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-bottom: 2px;
}
.cooklog-entry-guests svg { width: 14px; height: 14px; }
.cooklog-entry-note {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: 4px;
}
.recipe-picker {
  position: relative;
}
.rp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.rp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 500;
}
.rp-chip-remove {
  all: unset;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
  margin-left: 2px;
}
.rp-chip-remove:hover { opacity: 1; }
.rp-search {
  width: 100%;
}
.rp-dropdown {
  display: none;
  position: absolute;
  z-index: 50;
  left: 0; right: 0;
  top: 100%;
  max-height: 220px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  margin-top: 2px;
}
.rp-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.rp-option:hover {
  background: var(--color-bg);
}
.rp-no-result {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}
.cooklog-card-motto {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.cooklog-card-recipes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}
.home-cooklog-motto {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.home-cooklog-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.home-cooklog-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}
.home-cooklog-date svg { width: 13px; height: 13px; }
.home-cooklog-recipes {
  font-size: 0.88rem;
  margin-bottom: 3px;
}
.home-cooklog-recipe {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 2px;
}
.home-cooklog-recipe:hover { text-decoration-color: var(--color-text); }
.home-cooklog-guests {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}
.home-cooklog-guests svg { width: 13px; height: 13px; }
.cooklog-add-guest {
  margin-top: 8px;
}
.cooklog-new-guest-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.cooklog-new-guest-row .form-input-sm {
  padding: 6px 10px;
  font-size: 0.82rem;
  flex: 1;
}
.cooklog-already-badge {
  font-size: 0.68rem;
  background: var(--color-border);
  color: var(--color-text-secondary);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: auto;
  white-space: nowrap;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
}
.form-input-sm {
  padding: 6px 10px;
  font-size: 0.84rem;
}

/* ─── Gäste-Verwaltung ─── */
.guest-tabs {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.guest-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.guest-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.guest-avatar-group {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.guest-avatar-group svg { width: 18px; height: 18px; color: var(--color-text-secondary); }
.guest-edit-btn,
.guest-delete-btn,
.ggroup-edit-btn,
.ggroup-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  opacity: 0.5;
  transition: opacity 0.15s;
  padding: 4px;
}
.guest-edit-btn:hover, .ggroup-edit-btn:hover { opacity: 1; }
.guest-delete-btn:hover, .ggroup-delete-btn:hover { opacity: 1; color: #c00; }
.guest-edit-btn svg, .guest-delete-btn svg,
.ggroup-edit-btn svg, .ggroup-delete-btn svg { width: 16px; height: 16px; }
/* ─── Kochtagebuch-Übersicht ─── */
.cooklog-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.cooklog-card.cooklog-archived { opacity: 0.55; }
.cooklog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cooklog-card-actions {
  display: flex;
  gap: 2px;
}
.cooklog-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  opacity: 0.5;
  padding: 4px;
  border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
}
.cooklog-action-btn:hover { opacity: 1; background: var(--color-border); }
.cooklog-action-delete:hover { color: #c00; }
.cooklog-action-btn svg { width: 15px; height: 15px; }
.cooklog-card-recipe {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
}
.cooklog-card-recipe:hover { text-decoration: underline; }
.cooklog-card-recipe .recipe-card-hero,
.cooklog-card-recipe .recipe-hero-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}
.cooklog-edit-recipe {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}
.section-title-link {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.section-title-link:hover { opacity: 1; }

.cooklog-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  padding: 6px 0 2px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2px;
}
.cooklog-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2px;
  cursor: pointer;
  font-size: 0.84rem;
}
.cooklog-group-header input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-text);
  flex-shrink: 0;
}
.cooklog-group-count {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-border);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: auto;
}

.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
