/* ============================================================
   🍌 BANÁN - MODERNÍ VZHLED 2025
   GLASSMORFISMUS + MONTSERRAT
   ============================================================ */

/* ===== PROMĚNNÉ ===== */
:root {
    --primary: #f5b700;
    --primary-dark: #c99400;
    --primary-light: #ffd966;
    --primary-glow: rgba(245, 183, 0, 0.25);
    --gold: #f5b700;
    --bg-dark: #0d0d0d;
    --bg-light: #f2ede8;
    --card-dark: rgba(0, 0, 0, 0.8);
    --card-light: rgba(255, 255, 255, 0.9);
    --text-dark: #1a1a1a;
    --text-light: #eaeaea;
    --radius: 24px;
    --radius-sm: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --banan-onboarding-surface: rgba(13,13,13,.94);
    --banan-onboarding-line: rgba(245,183,0,.16);
    --banan-onboarding-line-width: 1px;
    --banan-onboarding-radius: 30px;
    --banan-onboarding-padding: 28px 24px 22px;
    --banan-onboarding-shadow: 0 24px 80px rgba(0,0,0,.48), 0 1px 0 rgba(255,255,255,.035) inset;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== TĚLO ===== */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-image: url('img/gold-glass-wallpaper.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #000;
    color: var(--text-light);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: calc(20px + env(safe-area-inset-top)) 12px calc(30px + env(safe-area-inset-bottom));
    position: relative;
    z-index: 1;
}

/* ===== SVĚTLÝ REŽIM ===== */
body.light {
    background-color: #f2ede8;
    color: var(--text-dark);
}

/* ===== HLAVIČKA A OBAL ===== */
.header-wrap {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 22px 18px 12px;
    border-radius: 32px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    position: sticky;
    top: 10px;
    z-index: 1001;
}
body.light .header-wrap {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0,0,0,0.05);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header .logo .banana-icon {
    font-size: 2.6rem;
    transition: transform 0.4s ease;
}
.header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1.2px;
    text-transform: none;
}
.header h1 span {
    color: var(--primary);
    filter: drop-shadow(0 2px 10px rgba(245, 183, 0, 0.3));
}
.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.theme-toggle,
.btn-kalkulacka {
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 40px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary);
}

/* ===== TABS (Pills style) ===== */
.tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px;
}
.tab {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: inherit;
    opacity: 0.6;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
}
.tab-active {
    opacity: 1;
    background: var(--primary);
    color: #000;
}
body.light .tab { background: rgba(0,0,0,0.05); }

/* ===== KARTY ===== */
.card {
    position: relative;
    background: var(--card-dark);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 18px 16px;
    margin-bottom: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s, box-shadow 0.25s;
    z-index: 10;
}
.card.elevated {
    z-index: 1000 !important;
}
body.light .card {
    background: var(--card-light);
    border-color: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}
.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 12px;
}

/* ===== SUMMARY CARD (INTEGROVANÁ) ===== */
.summary-card {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 2px solid var(--primary) !important;
    padding: 18px 15px !important;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-radius: 30px !important;
}
body.light .summary-card { background: #fff !important; }

.summary-row { display: flex; justify-content: space-between; gap: 8px; }
.summary-item { text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; }

.summary-row.targets .summary-item label {
    font-size: 0.55rem; font-weight: 900; text-transform: uppercase; color: var(--primary); margin-bottom: 4px;
}
.summary-row.targets .summary-item input {
    width: 100%; height: 32px; padding: 0 !important; text-align: center; font-size: 1rem !important; font-weight: 900;
    background: rgba(255, 255, 255, 0.08) !important; border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important; color: #fff !important;
}
body.light .summary-row.targets .summary-item input { background: #f0f0f0 !important; color: #000 !important; border-color: #ddd !important; }

.remaining-bar { width: 100%; height: 10px; background: rgba(255, 255, 255, 0.1); border-radius: 20px; overflow: hidden; }
body.light .remaining-bar { background: #eee; }
.remaining-bar .fill { height: 100%; background: var(--primary); box-shadow: 0 0 15px var(--primary-glow); transition: width 0.5s; }

.progress-info { display: flex; justify-content: space-between; font-size: 0.7rem; font-weight: 800; margin-top: 4px; text-transform: uppercase; }
.summary-row.fulfilled .value { font-size: 1.2rem; font-weight: 900; color: #fff; }
body.light .summary-row.fulfilled .value { color: #000; }
.summary-row.fulfilled .summary-item:first-child .value { color: var(--primary); font-size: 1.6rem; }
.summary-row.fulfilled .unit { font-size: 0.55rem; opacity: 0.5; font-weight: 800; }

/* ===== INPUTY A SELECTY ===== */
input, select, .custom-select-trigger {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: inherit;
}
body.light input, body.light .custom-select-trigger { background: #fff; border-color: #ccc; color: #000; }
input:focus, .custom-select-trigger.open { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(245, 183, 0, 0.1); }

/* ===== TLAČÍTKA ===== */
.btn {
    padding: 14px 20px; border: none; border-radius: 60px; font-weight: 700; font-size: 1rem;
    cursor: pointer; transition: var(--transition); font-family: inherit; width: 100%; text-align: center;
}
.btn-primary { background: var(--primary); color: #000; box-shadow: 0 4px 20px var(--primary-glow); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }

/* ===== LAYOUT ===== */
.row { display: flex; gap: 10px; margin-bottom: 12px; width: 100%; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-group label { font-size: 0.75rem; font-weight: 700; opacity: 0.8; margin-left: 4px; text-transform: uppercase; }
@media (max-width: 440px) { .row { flex-wrap: wrap; } }

/* ===== CUSTOM SELECTS ===== */
.select-wrapper { position: relative; width: 100%; }
.custom-select-trigger { font-family: 'Montserrat', sans-serif; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.custom-select-trigger:after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); margin-top: -4px; }
.custom-options {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: rgba(15, 15, 15, 0.98); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border: 2px solid var(--primary); border-radius: 18px; z-index: 2005; max-height: 250px; overflow-y: auto; display: none;
    box-shadow: 0 15px 50px rgba(0,0,0,0.8);
}
body.light .custom-options { background: #fff; color: #000; }
.custom-options.show { display: block; animation: selectSlide 0.2s ease-out; }
@keyframes selectSlide { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.custom-option { padding: 14px 16px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); font-weight: 600; }
body.light .custom-option { border-bottom-color: #eee; }
.custom-option:hover { background: var(--primary); color: #000; }
.custom-option.selected { background: rgba(245, 183, 0, 0.2); color: var(--primary); }
select.hidden-select { display: none !important; }

/* ===== SUGGESTIONS ===== */
.suggestions {
    border-radius: var(--radius-sm); border: 2px solid var(--primary); max-height: 220px; overflow-y: auto; display: none;
    margin-top: 4px; margin-bottom: 12px; z-index: 1002; position: relative;
    background: rgba(10, 10, 10, 0.98); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
body.light .suggestions { background: #fff; color: #000; }
.suggestion-item { padding: 14px 16px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); }
.suggestion-item:hover { background: var(--primary); color: #000; }
.suggestion-item .kcal-info { color: var(--primary); margin-left: 8px; font-weight: 800; }
.suggestion-item:hover .kcal-info { color: #000; }

/* ===== WEEKLY CHART (KRÁSNÝ) ===== */
.chart-bar-container { display: flex; justify-content: space-between; align-items: flex-end; height: 180px; padding: 10px; gap: 8px; }
.chart-column { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.chart-bar-wrap { height: 130px; width: 100%; display: flex; align-items: flex-end; background: rgba(255,255,255,0.03); border-radius: 12px; padding: 0 4px; position: relative; }
.chart-bar { width: 100%; border-radius: 8px 8px 4px 4px; transition: all 0.4s ease; cursor: pointer; min-height: 5px; }
.chart-bar.under { background: #2ecc71; }
.chart-bar.over { background: #e74c3c; }
.chart-bar.today { border: 2px solid #fff; box-shadow: 0 0 15px var(--primary-glow); }
.chart-tooltip {
    position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%);
    background: #000; color: #fff; font-size: 0.6rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: 0.2s; z-index: 20;
}
.chart-column:hover .chart-tooltip { opacity: 1; transform: translateX(-50%) translateY(-5px); }
.chart-label { margin-top: 8px; font-size: 0.7rem; font-weight: 800; opacity: 0.6; }

/* ===== SPOJENÉ POZADÍ SPLASH → APP ===== */
#appBackground {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity .55s ease;
    background: #000;
}
#appBackground img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120vmax;
    height: 120vmax;
    object-fit: cover;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}
#appBackground.is-visible {
    opacity: 1;
}

/* ===== SPLASH SCREEN ===== */
#splash { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; background: #000; display: flex; justify-content: center; align-items: center; flex-direction: column; overflow: hidden; }
#splashBg { position: absolute; top: 50%; left: 50%; width: 120vmax; height: 120vmax; object-fit: cover; transform: translate(-50%, -50%); opacity: 0.85; animation: splashSpin 30s linear infinite; border-radius: 50%; }
@keyframes splashSpin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
#splash .content { position: relative; z-index: 10; text-align: center; }
#splash .title {
    font-family: 'Montserrat', sans-serif;
    font-size: 5.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -3.8px;
    line-height: 1;
    text-shadow: 0 2px 18px rgba(255,255,255,0.16), 0 5px 36px rgba(0,0,0,0.82);
    animation: splashTitleIn 0.75s cubic-bezier(.22,.8,.24,1) both;
}
#splash .title .first {
    color: #fff;
    font-size: 6.05rem;
}
@keyframes splashTitleIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.loader { display: flex; justify-content: center; gap: 15px; margin-top: 40px; }
.loader span { width: 12px; height: 12px; background: var(--primary); border-radius: 50%; animation: loaderBounce 1.4s infinite both; }
@keyframes loaderBounce { 0%, 80%, 100% { transform: scale(0.3); opacity: 0.3; } 40% { transform: scale(1); opacity: 1; } }

/* ===== STATS CARD (VYLEPŠENO) ===== */
.stats-card {
    padding: 20px 15px !important;
}
.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0.05);
}
.stats-main {
    flex: 1.2;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.stats-main .label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0.5;
}
.stats-main .value {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
}
.stats-macros {
    flex: 1;
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-macro-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
}
.stat-macro-item .label {
    opacity: 0.6;
}
.stat-macro-item .value {
    color: #fff;
}
body.light .stat-macro-item .value { color: #000; }
.stats-grid .unit {
    font-size: 0.6rem;
    opacity: 0.5;
    margin-left: 2px;
}

/* ===== OSTATNÍ ===== */
/* Ve tvém souboru style.css najdi .day-header a změň barvu: */
.day-header {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.94rem;
    line-height: 1.22;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    color: #000; /* nebo #ffffff, podle tvého pozadí */
}
.food-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.food-item .name { font-weight: 700; }
.food-item .details { font-size: 0.8rem; opacity: 0.6; }
.food-item .kcal { color: var(--primary); font-weight: 900; }
.empty-state { text-align: center; padding: 20px; opacity: 0.5; font-style: italic; }

/* ============================================================
   ⭐ PRAISE BOX – PŘEKRYTÍ TLAČÍTKA
   ============================================================ */
.praise-box {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    padding: 6px 14px;
    min-height: 100%;
    border-radius: 60px; /* Match button radius */
    font-weight: 800;
    text-align: center;
    font-size: 0.94rem;
    line-height: 1.22;
    white-space: normal;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.praise-box.excellent,
.praise-box.good,
.praise-box.neutral {
    background: #f5b700 !important;
    color: #000 !important;
    border: 2px solid #f5b700 !important;
}

.praise-box.bad {
    background: #e74c3c !important;
    color: #fff !important;
    border: 2px solid #e74c3c !important;
}
/* ===== MOBILNÍ ZVĚTŠENÍ ===== */
/* Pro všechny displeje menší než 600px (mobil) */
@media (max-width: 600px) {
    /* Hlavička */
    .header h1 {
        font-size: 1.6rem !important;
    }
    .header .banana-icon {
        font-size: 2rem !important;
    }
    .header-actions button {
        font-size: 1.4rem !important;
        padding: 8px 14px !important;
    }

    /* Taby */
    .tab {
        font-size: 0.9rem !important;
        padding: 10px 8px !important;
    }

    /* Karty */
    .card-title {
        font-size: 1.1rem !important;
    }

    /* Sumář */
    .summary-item .value {
        font-size: 1.2rem !important;
    }
    .summary-item label {
        font-size: 0.75rem !important;
    }

    /* Inputy */
    input, select, button {
        font-size: 1rem !important;
        min-height: 44px !important; /* větší klikací plocha */
    }

    /* Generátor - jídla */
    .generator-meal-name {
        font-size: 0.9rem !important;
    }
    .generator-meal-macro {
        font-size: 0.8rem !important;
    }

    /* Recepty */
    .recipe-item .recipe-header {
        padding: 14px !important;
    }
    .recipe-item .recipe-header span {
        font-size: 0.95rem !important;
    }
    .recipe-detail ul, .recipe-detail ol {
        font-size: 0.9rem !important;
        padding-left: 18px !important;
    }
    .recipe-detail .recipe-tip {
        font-size: 0.85rem !important;
    }

    /* Seznam jídel - denní přehled */
    .food-item {
        font-size: 0.95rem !important;
        padding: 12px !important;
    }
    .food-item .details {
        font-size: 0.8rem !important;
    }

    /* Toast a notifikace */
    .toast {
        font-size: 1rem !important;
        padding: 14px 20px !important;
    }

    /* Doporučení */
    .rec-subtitle {
        font-size: 1rem !important;
    }
    .rec-item {
        font-size: 0.9rem !important;
        padding: 10px !important;
    }

    /* Tlačítka */
    .btn {
        font-size: 1rem !important;
        padding: 14px 20px !important;
    }
    .btn-primary {
        font-size: 1rem !important;
        padding: 16px 24px !important;
    }
}

/* ============================================================
   WIZARD - KOMPLETNÍ
   ============================================================ */

/* ===== HLAVNÍ KONTEJNER ===== */
.wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0d0d0d !important;
    z-index: 99999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== BANÁN NA POZADÍ (TOČÍCÍ SE) ===== */
.wizard-overlay::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 120vmax;
    height: 120vmax;
    background-image: url('img/gold-glass-wallpaper.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: translate(-50%, -50%);
    opacity: 1 !important;
    z-index: 0;
    animation: wizardSpin 60s linear infinite;
}

@keyframes wizardSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.wizard-container {
    max-width: 400px;
    width: 100%;
    background: #0d0d0d !important;
    background-color: #0d0d0d !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: var(--banan-onboarding-radius);
    padding: 40px 28px 30px;
    border: 2px solid rgba(255, 215, 0, 0.12);
    position: relative;
    z-index: 10;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

/* ===== KROKY ===== */
.wizard-step {
    animation: fadeIn 0.5s ease;
}

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

.wizard-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 16px;
}

.wizard-container h1,
.wizard-container h2,
.banan-language-card h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 12px;
    font-family: 'Montserrat', sans-serif;
}

.wizard-container p,
.banan-language-card p {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== VÍTEJ OBRAZOVKA ===== */
.welcome-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
}

.welcome-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
}

/* ===== INPUTY ===== */
.wizard-input-wrap {
    position: relative;
    margin: 20px 0 30px;
}

.wizard-big-input {
    width: 100%;
    font-size: 4rem !important;
    font-weight: 900;
    text-align: center;
    padding: 20px 10px;
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid rgba(255, 215, 0, 0.3) !important;
    color: #fff !important;
    border-radius: 0 !important;
    outline: none;
}

.wizard-big-input:focus {
    border-bottom-color: #f5b700 !important;
}

.wizard-unit {
    position: absolute;
    right: 10px;
    bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
}

.wizard-input-medium {
    width: 100%;
    font-size: 2rem !important;
    font-weight: 700;
    text-align: center;
    padding: 16px 10px;
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid rgba(255, 215, 0, 0.3) !important;
    color: #fff !important;
    border-radius: 0 !important;
    outline: none;
}

.wizard-input-medium:focus {
    border-bottom-color: #f5b700 !important;
}

.wizard-select {
    width: 100%;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 2px solid rgba(255, 215, 0, 0.2) !important;
    border-radius: 16px !important;
    color: #fff !important;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.wizard-select:focus {
    border-color: #f5b700 !important;
}

.wizard-select option {
    background: #1a1a1a;
    color: #fff;
}

/* ===== FORMULAR ===== */
.wizard-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.wizard-row .form-group {
    flex: 1;
}

.wizard-row .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

/* ===== CÍLE (VOLBA) ===== */
.wizard-goals {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0 30px;
}

.wizard-goal {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.wizard-goal:hover {
    background: rgba(255, 215, 0, 0.05);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateX(4px);
}

.wizard-goal.selected {
    border-color: #f5b700;
    background: rgba(245, 183, 0, 0.08);
    box-shadow: 0 0 30px rgba(245, 183, 0, 0.05);
}

.wizard-goal .goal-icon {
    font-size: 1.8rem;
}

.wizard-goal .goal-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

/* ===== TLAČÍTKA ===== */
.wizard-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.wizard-buttons .btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
}

.btn-wizard {
    padding: 16px 40px;
    font-size: 1.1rem;
    width: auto;
    min-width: 200px;
    margin: 0 auto;
}

/* ===== ANIMACE ===== */
.animate-icon {
    animation: bounceIcon 2s ease-in-out infinite;
}

@keyframes bounceIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.pulse-btn {
    animation: pulseBtn 2s ease-in-out infinite;
}

@keyframes pulseBtn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 183, 0, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(245, 183, 0, 0); }
}

/* ===== PROGRESS BAR ===== */
.wizard-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    margin: 25px 0 12px;
    overflow: hidden;
}

.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f5b700, #ffd966);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ===== INDIKÁTORY (TEČKY) ===== */
.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.wizard-step-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wizard-step-indicator:hover {
    background: rgba(255, 215, 0, 0.15);
    transform: scale(1.1);
}

.wizard-step-indicator.active {
    background: #f5b700;
    color: #000;
    box-shadow: 0 0 20px rgba(245, 183, 0, 0.3);
}

.wizard-step-indicator.completed {
    background: rgba(245, 183, 0, 0.2);
    color: #f5b700;
    border: 1px solid rgba(245, 183, 0, 0.2);
}

/* ===== MOTIVAČNÍ VĚTA - VELKÁ, ŽLUTÁ, ZÁŘÍCÍ ===== */
.wizard-final-text {
    margin: 10px 0 20px;
    position: relative;
    z-index: 1;
}

.final-line1,
.final-line2,
.final-line3 {
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    line-height: 1.6;
    color: #f5b700 !important;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    text-shadow: 0 0 40px rgba(245, 183, 0, 0.3), 0 0 80px rgba(245, 183, 0, 0.1);
    letter-spacing: 0.5px;
}

.final-line1 { transition-delay: 0.3s; }
.final-line2 { transition-delay: 1.1s; }
.final-line3 { transition-delay: 1.9s; }

body.light .final-line1,
body.light .final-line2,
body.light .final-line3 {
    color: #b87a00 !important;
    text-shadow: 0 0 40px rgba(184, 122, 0, 0.2), 0 0 80px rgba(184, 122, 0, 0.05);
}

/* ===== SUMMARY ===== */
.wizard-summary {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin: 10px 0 20px;
    line-height: 1.8;
}

.wizard-summary strong {
    color: #f5b700;
}

/* ============================================================
   SVĚTLÝ REŽIM
   ============================================================ */
body.light .wizard-overlay {
    background: #f2ede8 !important;
}

body.light .wizard-overlay::before {
    opacity: 0.5 !important;
}

body.light .wizard-container {
    background: #f2ede8 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: rgba(184, 122, 0, 0.15);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

body.light .wizard-container h1,
body.light .wizard-container h2,
body.light .welcome-title,
/* ===== INPUTY BEZ RÁMEČKŮ A ŠIPEK ===== */
.wizard-big-input,
.wizard-input-medium {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid rgba(255, 215, 0, 0.15) !important;
    color: #fff !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    padding: 20px 10px !important;
    font-weight: 900 !important;
    text-align: center !important;
}

/* Skryjeme šipky (pro Chrome, Safari, Edge) */
.wizard-big-input::-webkit-outer-spin-button,
.wizard-big-input::-webkit-inner-spin-button,
.wizard-input-medium::-webkit-outer-spin-button,
.wizard-input-medium::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Skryjeme šipky (pro Firefox) */
.wizard-big-input[type="number"],
.wizard-input-medium[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Když je input zaměřený (focus) */
.wizard-big-input:focus,
.wizard-input-medium:focus {
    border-bottom: 2px solid #f5b700 !important;
    outline: none !important;
    box-shadow: none !important;
}
body.light .wizard-goal .goal-name,
body.light .final-line1,
body.light .final-line2,
body.light .final-line3 {
    color: #1a1a1a;
}

body.light .wizard-container p,
body.light .welcome-sub,
body.light .wizard-unit,
body.light .wizard-summary {
    color: rgba(0, 0, 0, 0.6);
}

body.light .wizard-goal {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light .wizard-goal:hover {
    background: rgba(184, 122, 0, 0.05);
    border-color: rgba(184, 122, 0, 0.2);
}

body.light .wizard-goal.selected {
    border-color: #b87a00;
    background: rgba(184, 122, 0, 0.08);
}

body.light .wizard-goal .goal-name {
    color: #1a1a1a;
}

body.light .wizard-select {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1a1a1a !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light .wizard-select option {
    background: #fff;
    color: #1a1a1a;
}

body.light .wizard-step-indicator {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.3);
}

body.light .wizard-step-indicator:hover {
    background: rgba(184, 122, 0, 0.1);
}

body.light .wizard-step-indicator.active {
    background: #b87a00;
    color: #fff;
}

body.light .wizard-step-indicator.completed {
    background: rgba(184, 122, 0, 0.15);
    color: #b87a00;
}

body.light .wizard-progress {
    background: rgba(0, 0, 0, 0.06);
}

body.light .wizard-summary {
    background: rgba(0, 0, 0, 0.03);
}

body.light .final-line1,
body.light .final-line2,
body.light .final-line3 {
    color: #b87a00;
    text-shadow: 0 0 30px rgba(184, 122, 0, 0.15);
}
/* ===== EFEKT PŘIBLÍŽENÍ - PÍSMENO "O" ===== */
.zoom-o {
    display: inline-block;
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.6rem;
    color: #f5b700;
}

.zoom-o.zoomed {
    font-size: 8rem !important;
    color: #f5b700 !important;
    text-shadow: 0 0 80px rgba(245, 183, 0, 0.6) !important;
}

body.light .zoom-o.zoomed {
    color: #b87a00 !important;
    text-shadow: 0 0 80px rgba(184, 122, 0, 0.4) !important;
}
/* ============================================================
   NOVÉ STYLY PRO PRÉMIOVÉ FUNKCE
   ============================================================ */

/* ===== NÁKUPNÍ SEZNAM ===== */
#shoppingListOutput {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px;
    min-height: 60px;
    font-size: 0.9rem;
    max-height: 400px;
    overflow-y: auto;
}

/* ===== DLOUHODOBÉ STATISTIKY ===== */
.long-term-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.stat-box {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.stat-box .stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.5;
    font-weight: 700;
}
.stat-box .stat-number {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold);
    margin-top: 4px;
}
body.light .stat-box {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.05);
}

/* ===== TĚLESNÉ MÍRY ===== */
#bodyHistoryContent table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}
#bodyHistoryContent th {
    color: var(--gold);
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
#bodyHistoryContent td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.light #bodyHistoryContent td {
    border-color: rgba(0,0,0,0.05);
}

/* ===== GENERÁTOR – VÝMĚNA JÍDLA ===== */
.meal-swap-btn {
    font-size: 0.7rem;
    background: rgba(245,183,0,0.15);
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 2px 10px;
    cursor: pointer;
    color: var(--gold);
    transition: all 0.2s;
}
.meal-swap-btn:hover {
    background: var(--gold);
    color: #000;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 8px;
    overflow-x: auto;
}
body.light .chart-container {
    background: rgba(0,0,0,0.02);
}
/* ============================================================
   NOVÉ STYLY
   ============================================================ */

/* ===== HLAVIČKA - ŽÁDNÝ POSUVNÍK ===== */
.header-wrap {
    position: sticky;
    top: 10px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 16px 18px 10px;
    border-radius: 32px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

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

/* ===== ZÁLOŽKY - DRUHÁ ŘADA, ŽÁDNÝ POSUVNÍK ===== */
.tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto !important;
}

.tab {
    padding: 6px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: inherit;
    opacity: 0.5;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
}

.tab-active {
    opacity: 1;
    background: var(--primary);
    color: #000;
}

body.light .tab {
    background: rgba(0,0,0,0.05);
}

/* ===== DLOUHODOBÉ STATISTIKY ===== */
.long-term-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.stat-box {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.stat-box .stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    opacity: 0.5;
    font-weight: 700;
}
.stat-box .stat-number {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--primary);
    margin-top: 4px;
}
body.light .stat-box {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.05);
}

/* ===== NÁKUPNÍ SEZNAM ===== */
#shoppingListOutput {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px;
    min-height: 60px;
    font-size: 0.85rem;
    max-height: 400px;
    overflow-y: auto;
}
#shoppingListOutput ul {
    margin: 2px 0 6px 0;
    padding-left: 18px;
}
#shoppingListOutput li {
    margin-bottom: 2px;
}

/* ===== TĚLESNÉ MÍRY ===== */
#bodyHistoryContent table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}
#bodyHistoryContent th {
    color: var(--primary);
    text-align: left;
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
#bodyHistoryContent td {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.light #bodyHistoryContent td {
    border-color: rgba(0,0,0,0.05);
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 8px;
    overflow-x: auto;
}
body.light .chart-container {
    background: rgba(0,0,0,0.02);
}

/* ===== NASTAVENÍ ===== */
#tab-nastaveni .btn-outline {
    width: auto !important;
    padding: 6px 16px !important;
    font-size: 0.75rem !important;
}/* ============================================================
    OPRAVY TEXTU V GENERÁTORU
    ============================================================ */

 /* ===== JÍDLA - NEOMEZOVAT TEXT ===== */
 #mealPlanContainer div {
     word-wrap: break-word;
     overflow-wrap: break-word;
     white-space: normal;
 }

 #mealPlanContainer .meal-ingredients {
     font-size: 0.85rem;
     color: var(--text-muted);
     margin-top: 4px;
     border-top: 1px solid var(--border-color);
     padding-top: 4px;
     word-wrap: break-word;
     overflow-wrap: break-word;
     white-space: normal;
 }

 /* ===== JÍDLO - CELÁ ŠÍŘKA ===== */
 .meal-item {
     width: 100% !important;
     flex: none !important;
     min-width: 0 !important;
     box-sizing: border-box;
 }

 /* ===== VÝMĚNA JÍDLA - ROZBAVENÍ POD JÍDLEM ===== */
 #swapOptionsContent-* div {
     word-wrap: break-word;
     overflow-wrap: break-word;
 }
 /* ============================================================
    HLAVIČKA S BANÁNEM (KOMPLETNÍ)
    ============================================================ */

 .header-wrap {
     background: rgba(0, 0, 0, 0.85);
     backdrop-filter: blur(25px);
     -webkit-backdrop-filter: blur(25px);
     padding: 16px 18px 10px;
     border-radius: 32px;
     margin-bottom: 18px;
     border: 1px solid rgba(255, 255, 255, 0.1);
     box-shadow: 0 12px 40px rgba(0,0,0,0.4);
     position: sticky;
     top: 10px;
     z-index: 1001;
 }

 body.light .header-wrap {
     background: rgba(255, 255, 255, 0.9);
     border-color: rgba(0,0,0,0.05);
 }

 /* ===== HLAVIČKA – LAYOUT ===== */
 .header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 10px;
     flex-wrap: wrap;
     gap: 8px;
 }

 /* ===== LOGO ===== */
 .logo {
     display: flex;
     align-items: center;
     gap: 10px;
 }

 /* ===== BANÁN – DÝCHÁ ===== */
 .header-banana {
     display: block !important;
     width: 40px !important;
     height: 40px !important;
     min-width: 40px;
     min-height: 40px;
     object-fit: contain;
     width: 40px;
     height: 40px;
     object-fit: contain;
     flex: 0 0 40px;
     overflow: visible;
     transform-origin: center center;
     opacity: 1;
     visibility: visible;
     display: block;
     filter: drop-shadow(0 2px 8px rgba(245, 183, 0, 0.3));
     transition: transform 0.3s ease;
     animation: bananaBreathe 3s ease-in-out infinite;
 }

 .header-banana:hover {
     transform: scale(1.15) rotate(-8deg);
     animation-play-state: paused; /* Zastaví dýchání při najetí myší */
 }

 /* ===== ANIMACE DÝCHÁNÍ ===== */
 @keyframes bananaBreathe {
     0%, 100% {
         transform: scale(1);
         filter: drop-shadow(0 2px 8px rgba(245, 183, 0, 0.25));
     }
     50% {
         transform: scale(1.08);
         filter: drop-shadow(0 4px 20px rgba(245, 183, 0, 0.5));
     }
 }

 /* ===== NÁPIS BANÁN ===== */
 .header h1 {
     font-family: 'Montserrat', sans-serif;
     font-size: 2.35rem;
     font-weight: 900;
     letter-spacing: -1.5px;
     text-transform: none;
     margin: 0;
     line-height: 1;
 }

 .header h1 span {
     color: var(--primary);
     filter: drop-shadow(0 2px 10px rgba(245, 183, 0, 0.3));
     text-shadow: 0 2px 12px rgba(245, 183, 0, 0.16);
 }

 /* ===== TLAČÍTKA V HLAVIČCE ===== */
 .header-actions {
     display: flex;
     gap: 8px;
     align-items: center;
 }

 .theme-toggle,
 .btn-kalkulacka {
     background: transparent;
     border: 2px solid var(--primary);
     border-radius: 40px;
     padding: 6px 14px;
     font-size: 0.85rem;
     font-weight: 700;
     cursor: pointer;
     transition: all 0.3s ease;
     color: var(--primary);
 }

 .theme-toggle:hover,
 .btn-kalkulacka:hover {
     background: var(--primary);
     color: #000;
     transform: scale(1.05);
 }

 /* ===== RESPONZIVITA – MOBIL ===== */
 @media (max-width: 600px) {
     .header-wrap {
         padding: 12px 14px 8px;
         border-radius: 24px;
     }

     .header-banana {
         width: 32px !important;
         height: 32px !important;
         min-width: 32px;
         min-height: 32px;
     }

     .header h1 {
         font-size: 1.72rem;
         letter-spacing: -1.1px;
     }

     .theme-toggle,
     .btn-kalkulacka {
         font-size: 1.2rem;
         padding: 4px 10px;
     }
 }
 /* ============================================================
    WIZARD – NOVÉ ILUSTRACE A ANIMACE
    ============================================================ */

 /* ===== POZADÍ S BANÁNEM VE WIZARDU ===== */
 .wizard-banana-bg {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     overflow: hidden;
     border-radius: 30px;
     z-index: 0;
     pointer-events: none;
     display: none;  /* ← PŘIDEJ TENTO ŘÁDEK */
 }

.wizard-banana-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50vmax;
    height: 50vmax;
    object-fit: cover;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    animation: wizardBananaPulse 6s ease-in-out infinite;
    border-radius: 50%;
}

@keyframes wizardBananaPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.06;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.04);
        opacity: 0.12;
    }
}

 /* ===== ILUSTRACE VE WIZARDU ===== */
 .wizard-illustration {
     width: 120px;
     height: 120px;
     object-fit: contain;
     border-radius: 20px;
     filter: drop-shadow(0 4px 20px rgba(245, 183, 0, 0.15));
     transition: all 0.3s ease;
 }

 /* ===== ANIMACE PULZOVÁNÍ PRO ILUSTRACE ===== */
 .animate-icon .wizard-illustration {
     animation: illustrationPulse 2s ease-in-out infinite;
 }

 @keyframes illustrationPulse {
     0%, 100% {
         transform: scale(1);
         filter: drop-shadow(0 4px 20px rgba(245, 183, 0, 0.15));
     }
     50% {
         transform: scale(1.05);
         filter: drop-shadow(0 4px 40px rgba(245, 183, 0, 0.3));
     }
 }

 /* ===== PŘEKRYTÍ PRO KONTEJNER ===== */
 .wizard-container {
     position: relative;
     overflow: hidden;
 }

 /* ===== RESPONZIVITA PRO ILUSTRACE ===== */
 @media (max-width: 600px) {
     .wizard-illustration {
         width: 80px;
         height: 80px;
     }
 }

 /* ===== SVĚTLÝ REŽIM PRO WIZARD ILUSTRACE ===== */
 body.light .wizard-banana-pulse {
     opacity: 0.08;
 }

 body.light .wizard-illustration {
     filter: drop-shadow(0 4px 20px rgba(184, 122, 0, 0.15));
 }

 body.light .animate-icon .wizard-illustration {
     animation: illustrationPulseLight 2s ease-in-out infinite;
 }

 @keyframes illustrationPulseLight {
     0%, 100% {
         transform: scale(1);
         filter: drop-shadow(0 4px 20px rgba(184, 122, 0, 0.15));
     }
     50% {
         transform: scale(1.05);
         filter: drop-shadow(0 4px 40px rgba(184, 122, 0, 0.25));
     }
 }
 /* ===== TLAČÍTKO SMAZÁNÍ S OBRÁZKEM ===== */
 .del-btn {
     background: none !important;
     border: none !important;
     padding: 4px 6px !important;
     cursor: pointer;
     transition: transform 0.2s ease;
     display: inline-flex;
     align-items: center;
     justify-content: center;
 }

 .del-btn img {
     width: 20px;
     height: 20px;
     display: block;
     opacity: 0.5;
     transition: opacity 0.2s ease, transform 0.2s ease;
 }

 .del-btn:hover img {
     opacity: 1;
     transform: scale(1.15);
 }

 .del-btn:active img {
     transform: scale(0.9);
 }
 /* ===== ELIMINACE MODRÉHO OBDÉLNÍKU PŘI KLIKNUTÍ ===== */
 * {
     -webkit-tap-highlight-color: transparent !important;
     outline: none !important;
 }

 /* Ale necháme aspoň nějakou vizuální odezvu - třeba ztmavení */
 .btn:active,
 .tab:active,
 button:active {
     transform: scale(0.96);
     opacity: 0.8;
     transition: all 0.1s ease;
 }

/* ===== MOBILNÍ AUDIT 320–412 PX ===== */
/* ===== V19: vyvážený tmavý podklad fullscreen náhledu receptu ===== */
body:not(.light) .generator-recipe-panel {
    background: rgba(25, 25, 18, 0.60) !important;
    border-color: rgba(245, 183, 0, 0.28) !important;
}
body:not(.light) .generator-recipe-overlay .generator-recipe-backdrop {
    background: rgba(0, 0, 0, 0.72);
}

@media (max-width: 420px) {
    .container { padding-left: 10px !important; padding-right: 10px !important; }
    .card { padding: 12px !important; border-radius: 13px !important; }
    .row { gap: 8px !important; }
    .btn { min-height: 44px; padding-left: 12px !important; padding-right: 12px !important; }
    .tab { min-width: 82px; padding-left: 8px !important; padding-right: 8px !important; }
    .food-item { gap: 8px !important; }
    .food-item .details { word-break: break-word; }
    #mealPlanContainer .btn { min-height: 40px; }
    #mealPlanContainer [style*="font-size:1rem"] { overflow-wrap: anywhere; }
    #shoppingListOutput { max-height: 42vh !important; }
    .shopping-controls { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
    .shopping-select-all { grid-column: 1 / -1; min-height: 40px; display:flex; align-items:center; gap:7px; }
    .shopping-controls .btn { width:100% !important; font-size:0.86rem !important; }
    #activityCard .row { flex-wrap: wrap; }
    #activityCard .form-group { min-width: 0 !important; flex: 1 1 100% !important; }
    #activityCard .form-group:last-child { flex-basis: 100% !important; }
    #historyList .history-row { flex-wrap: wrap; gap: 6px; }
    #historyList .history-values { width:100%; font-size:0.8rem; }
    .strike-title { font-size: 0.92rem !important; }
}

@media (max-width: 340px) {
    .tab { min-width: 70px; font-size: 0.72rem; }
    .summary-grid { gap: 6px !important; }
    .summary-item .value { font-size: 1rem !important; }
    .card-title { font-size: 1rem !important; }
}

.shopping-controls { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.shopping-select-all { font-size:0.82rem; opacity:0.85; padding:6px 8px; }
.shopping-controls .btn { flex:1 1 140px; }

.strike-title { font-weight:800; font-size:1rem; }
.strike-track { height:8px; border-radius:999px; background:rgba(128,128,128,0.22); overflow:hidden; margin-top:8px; }
.strike-fill { height:100%; border-radius:999px; background:var(--primary, #f5b700); transition:width .25s ease; }
.strike-sub { font-size:0.75rem; opacity:0.68; margin-top:7px; line-height:1.45; }
.history-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid rgba(128,128,128,0.14); }
.history-row:last-child { border-bottom:0; }
.history-day-name { font-size:0.72rem; opacity:0.58; margin-top:1px; }
.history-values { text-align:right; font-size:0.82rem; opacity:0.84; }
.history-complete { border-left:3px solid var(--primary, #f5b700); padding-left:9px; }

/* ===== V2.2 SMALL-SCREEN FINISHING ===== */
@media (max-width: 360px) {
    .shopping-controls { grid-template-columns: 1fr !important; }
    .shopping-controls .btn { min-height: 44px !important; font-size: 0.9rem !important; }
    .shopping-select-all { font-size: 0.78rem; }
    .history-row { align-items: flex-start; }
    .history-values { text-align: left; line-height: 1.35; }
    #dailyPraise { font-size: 0.9rem !important; line-height: 1.35 !important; }
}
.day-checkbox { min-width: 18px; min-height: 18px; }

/* ===== V4.1 – RECEPT Z GENERÁTORU: FOKUSOVANÝ PANEL ===== */
body.recipe-overlay-open { overflow: hidden; }
.generator-recipe-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}
.generator-recipe-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}
.generator-recipe-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.66);
    backdrop-filter: blur(2px);
}
.generator-recipe-panel {
    position: relative;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    overflow: auto;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,.4);
    padding: 18px;
    transform: translateY(8px);
    transition: transform .18s ease;
    -webkit-overflow-scrolling: touch;
}
.generator-recipe-overlay.is-visible .generator-recipe-panel {
    transform: translateY(0) scale(1);
}
.generator-recipe-panel-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.generator-recipe-kicker {
    font-size:.74rem;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
    color:var(--gold);
}
.generator-recipe-title {
    margin:8px 42px 6px 0;
    font-size:clamp(1.12rem, 4.8vw, 1.55rem);
    line-height:1.25;
}
.generator-recipe-meta,
.generator-recipe-macro {
    font-size:.84rem;
    color:var(--text-muted);
    line-height:1.45;
}
.generator-recipe-macro {
    margin-top:4px;
    color:var(--gold);
    font-weight:700;
}
.generator-recipe-section {
    margin-top:16px;
}
.generator-recipe-section h3 {
    margin:0 0 7px;
    font-size:.9rem;
    color:var(--text-secondary);
}
.generator-recipe-section ul,
.generator-recipe-section ol {
    margin:4px 0 0;
    padding-left:22px;
    font-size:.95rem;
    line-height:1.55;
    color:var(--text-secondary);
}
.generator-recipe-section li { margin-bottom:5px; }
.generator-recipe-tip {
    margin-top:14px;
    font-size:.82rem;
    line-height:1.45;
    color:var(--gold);
}
.generator-recipe-back {
    width:100%;
    min-height:46px;
    margin-top:18px;
    border:1px solid var(--gold);
    border-radius:12px;
    background:transparent;
    color:var(--gold);
    font-weight:800;
    font-size:.95rem;
    cursor:pointer;
}
.generator-recipe-back:active { transform:scale(.98); }

@media (max-width: 360px) {
    .generator-recipe-overlay { padding:8px; }
    .generator-recipe-panel { padding:14px; border-radius:14px; max-height:92vh; }
    .generator-recipe-title { font-size:1.06rem; }
    .generator-recipe-section ul,
    .generator-recipe-section ol { font-size:.9rem; }
}


/* ===== V5.1 UI POLISH: RECEPTY + GENERATOR + NAKUP ===== */
.recipe-name { color: var(--gold) !important; }
.recipe-arrow { display:inline-block; transform-origin:center; }
.recipe-detail { position:relative; }
.recipe-detail-actions { position:relative; min-height:28px; }
.recipe-fullscreen-btn { position:static !important; right:auto; top:auto; width:32px; height:32px; padding:0; display:flex; align-items:center; justify-content:center; border:1px solid var(--gold); border-radius:8px; background:transparent; color:var(--gold); font-size:1rem; line-height:1; cursor:pointer; z-index:2; }
.recipe-fullscreen-btn:active { transform:scale(.97); }
.generator-recipe-open-btn { display:block !important; margin-left:auto !important; margin-right:auto !important; min-height:38px !important; padding-left:18px !important; padding-right:18px !important; }
.shopping-controls { display:grid !important; grid-template-columns:1fr 1fr; gap:8px !important; align-items:stretch; }
.shopping-selected-control { grid-column:1 / -1; width:100%; display:grid; grid-template-columns:1fr 1fr; min-height:44px; border:1px solid var(--gold); border-radius:999px; overflow:hidden; }
.shopping-selected-summary { display:flex; align-items:center; min-width:0; padding:0 14px; background:rgba(255,255,255,.03); color:var(--text-primary); font-size:.84rem; line-height:1.2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shopping-selected-btn { width:100% !important; min-height:44px !important; border-radius:0 !important; border:0 !important; margin:0 !important; }
.generator-recipe-back { min-height:54px; padding:12px 18px; }
.generator-recipe-back:focus-visible { outline:3px solid rgba(245,183,0,.45); outline-offset:2px; }
@media (max-width:420px) { .recipe-fullscreen-btn { width:32px; height:32px; } .generator-recipe-back { min-height:54px !important; } .shopping-selected-summary { font-size:.78rem; padding:0 10px; } }
@media (max-width:340px) { .shopping-controls { grid-template-columns:1fr !important; } .shopping-selected-control { grid-column:1; } }

.generator-day-actions .day-shopping-toggle { white-space:nowrap; }
.generator-day-actions .generator-day-swap-btn { white-space:nowrap; }
@media (max-width:420px) {
    #mealPlanContainer .generator-day-header { margin-bottom:7px !important; padding-bottom:6px !important; gap:5px !important; }
    #mealPlanContainer .generator-day-actions { gap:5px !important; }
    #mealPlanContainer .day-shopping-toggle { font-size:.68rem !important; padding:2px 6px !important; }
    #mealPlanContainer .generator-day-swap-btn { padding:4px 8px !important; font-size:.66rem !important; }
    #mealPlanContainer .generator-day-header + div { margin-bottom:6px !important; }
}


/* ===== V6 – UI FINISHING: DENNÍ HLAVIČKY, NÁKUP, KONTRAST ===== */
#mealPlanContainer .generator-day-header {
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) auto auto auto !important;
    align-items:center !important;
    column-gap:10px !important;
    margin-bottom:8px !important;
    padding:0 0 7px 0 !important;
    flex-wrap:nowrap !important;
    border-bottom:2px solid var(--gold) !important;
}
#mealPlanContainer .generator-day-title {
    min-width:0;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    font-weight:800;
    color:var(--gold);
    font-size:1.02rem;
    line-height:1.2;
}
#mealPlanContainer .generator-day-date {
    font-size:.74rem;
    opacity:.65;
    font-weight:500;
}
#mealPlanContainer .day-shopping-toggle {
    min-height:36px !important;
    padding:5px 9px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
    border:1px solid var(--gold) !important;
    border-radius:10px !important;
    background:rgba(255,255,255,.04) !important;
    color:var(--text-primary) !important;
    font-size:.8rem !important;
    font-weight:700 !important;
    white-space:nowrap !important;
    cursor:pointer;
    box-sizing:border-box;
}
#mealPlanContainer .day-shopping-toggle input {
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    min-height:18px !important;
    margin:0 !important;
    accent-color:var(--gold);
}
#mealPlanContainer .generator-day-kcal {
    white-space:nowrap;
    font-size:.8rem;
    color:var(--text-primary);
    font-weight:700;
    text-align:right;
}
#mealPlanContainer .generator-day-swap-btn {
    min-height:36px !important;
    height:36px !important;
    padding:5px 10px !important;
    width:auto !important;
    font-size:.78rem !important;
    white-space:nowrap !important;
}
#mealPlanContainer .generator-recipe-open-btn {
    min-height:36px !important;
    height:36px !important;
    padding:5px 22px !important;
    font-size:.78rem !important;
}

/* Kompaktní výpis vybraných dnů – bez elipsy, max. 6 zkratek pohodlně vedle sebe. */
.shopping-selected-summary {
    justify-content:center !important;
    text-align:center !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    letter-spacing:.01em;
    font-variant-numeric:tabular-nums;
}

/* Čitelnější světlý režim. */
body.light .day-shopping-toggle,
body.light .shopping-selected-summary,
body.light .generator-day-kcal {
    color:#24201c !important;
}
body.light .day-shopping-toggle {
    background:#fff9ec !important;
    border-color:#c89200 !important;
}
body.light .shopping-selected-summary {
    background:#fff !important;
    border-right:1px solid #c89200;
}
body.light .generator-recipe-panel {
    background:#ffffff !important;
    color:#171717 !important;
    border-color:#d7c7a0 !important;
    box-shadow:0 18px 60px rgba(0,0,0,.32) !important;
}
body.light .generator-recipe-kicker,
body.light .generator-recipe-macro,
body.light .generator-recipe-tip { color:#9a6a00 !important; }
body.light .generator-recipe-title { color:#f5b700 !important; }
body.light .generator-recipe-meta { color:#4a4540 !important; }
body.light .generator-recipe-section h3 { color:#2f2b27 !important; }
body.light .generator-recipe-section ul,
body.light .generator-recipe-section ol { color:#2a2724 !important; }
body.light .generator-recipe-back {
    background:#fffdf8 !important;
    border-color:#b98500 !important;
    color:#8a5f00 !important;
}

@media (max-width: 420px) {
    #mealPlanContainer .generator-day-header {
        grid-template-columns:minmax(0,1fr) auto auto auto !important;
        column-gap:6px !important;
    }
    #mealPlanContainer .generator-day-title { font-size:.94rem; }
    #mealPlanContainer .day-shopping-toggle { font-size:.76rem !important; padding:4px 7px !important; }
    #mealPlanContainer .generator-day-kcal { font-size:.73rem; }
    #mealPlanContainer .generator-day-swap-btn { font-size:.72rem !important; padding:4px 7px !important; }
}
@media (max-width: 360px) {
    #mealPlanContainer .generator-day-header {
        grid-template-columns:minmax(0,1fr) auto auto !important;
        row-gap:5px !important;
    }
    #mealPlanContainer .generator-day-kcal { grid-column:2; grid-row:2; }
    #mealPlanContainer .generator-day-swap-btn { grid-column:3; grid-row:2; }
    #mealPlanContainer .day-shopping-toggle { grid-column:1; grid-row:2; justify-self:start; }
    #mealPlanContainer .generator-day-title { grid-column:1 / -1; grid-row:1; }
    #mealPlanContainer .generator-recipe-open-btn { min-width:150px !important; }
}
@media (max-width: 320px) {
    #mealPlanContainer .day-shopping-toggle { font-size:.73rem !important; }
    #mealPlanContainer .generator-day-swap-btn { font-size:.69rem !important; }
}

/* V6.1 – zachovat půlený nákupní panel i na velmi úzkých displejích. */
@media (max-width: 360px) {
    .shopping-controls { grid-template-columns:1fr 1fr !important; }
    .shopping-selected-control { grid-column:1 / -1 !important; }
    .shopping-selected-summary { font-size:.76rem !important; padding:0 8px !important; }
    .shopping-selected-btn { font-size:.8rem !important; }
}
@media (max-width: 320px) {
    .shopping-selected-summary { font-size:.72rem !important; }
    .shopping-selected-btn { font-size:.76rem !important; }
}

/* V7 – denní hlavička: název dne nahoře, spodní ovládání rovnoměrně rozdělené. */
#mealPlanContainer .generator-day-header {
    display:block !important;
    margin-bottom:8px !important;
    padding:0 0 8px 0 !important;
    border-bottom:2px solid var(--gold) !important;
}
#mealPlanContainer .generator-day-title {
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    overflow:visible !important;
    white-space:nowrap !important;
    text-overflow:clip !important;
    text-align:left !important;
    font-size:1.02rem !important;
    line-height:1.25 !important;
    margin-bottom:7px !important;
}
#mealPlanContainer .generator-day-controls {
    display:grid !important;
    grid-template-columns:1fr 1fr 1fr !important;
    align-items:center !important;
    width:100% !important;
    min-width:0 !important;
    gap:8px !important;
}
#mealPlanContainer .generator-day-controls .day-shopping-toggle,
#mealPlanContainer .generator-day-controls .generator-day-kcal,
#mealPlanContainer .generator-day-controls .generator-day-swap-btn {
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    justify-content:center !important;
    text-align:center !important;
}
#mealPlanContainer .generator-day-controls .day-shopping-toggle {
    min-height:36px !important;
    padding:5px 8px !important;
    font-size:.8rem !important;
}
#mealPlanContainer .generator-day-controls .generator-day-kcal {
    font-size:.8rem !important;
    white-space:nowrap !important;
}
#mealPlanContainer .generator-day-controls .generator-day-swap-btn {
    min-height:36px !important;
    height:36px !important;
    padding:5px 8px !important;
    font-size:.78rem !important;
    white-space:nowrap !important;
}
@media (max-width:420px) {
    #mealPlanContainer .generator-day-title { font-size:.96rem !important; margin-bottom:6px !important; }
    #mealPlanContainer .generator-day-controls { grid-template-columns:1fr 1fr 1fr !important; gap:6px !important; }
    #mealPlanContainer .generator-day-controls .day-shopping-toggle { font-size:.75rem !important; padding:4px 5px !important; }
    #mealPlanContainer .generator-day-controls .generator-day-kcal { font-size:.72rem !important; }
    #mealPlanContainer .generator-day-controls .generator-day-swap-btn { font-size:.72rem !important; padding:4px 5px !important; }
}
@media (max-width:340px) {
    #mealPlanContainer .generator-day-controls { gap:4px !important; }
    #mealPlanContainer .generator-day-controls .day-shopping-toggle { font-size:.72rem !important; }
    #mealPlanContainer .generator-day-controls .generator-day-kcal { font-size:.68rem !important; }
    #mealPlanContainer .generator-day-controls .generator-day-swap-btn { font-size:.69rem !important; }
}

/* V7.1 – název dne centrovaný nad rovnoměrně rozvrženým spodním řádkem. */
#mealPlanContainer .generator-day-title {
    text-align:center !important;
}


/* V8 – malé, bezpečné úpravy: pořadí karet a explicitní styl názvů receptů. */
.recipe-item .recipe-name { color: var(--gold) !important; }
body.light .recipe-item .recipe-name { color: #b77b00 !important; }
#activityCard, #activityCard + .card { }

/* ===== V13: RECEPTY + FOCUS POZICE VYHLEDÁVÁNÍ ===== */
.recipe-name,
.recipe-item .recipe-name,
.generator-recipe-title { color: var(--gold) !important; }
body.light .generator-recipe-title,
body.light .recipe-item .recipe-name { color: #f5b700 !important; }

/* V15: názvy receptů jsou žluté v obou režimech. */
.recipe-name,
.recipe-item .recipe-name,
.generator-recipe-title { color: #f5b700 !important; font-weight: 800 !important; }

.remaining-bar.calorie-progress-flash {
    animation: calorieProgressFlash .7s ease-out;
}
.remaining-bar.calorie-progress-flash .fill {
    animation: calorieProgressFillFlash .7s ease-out;
}
@keyframes calorieProgressFlash {
    0% { box-shadow:0 0 0 rgba(245,183,0,0); }
    18% { box-shadow:0 0 18px 5px rgba(255,217,102,.95), 0 0 34px 8px rgba(245,183,0,.45); }
    55% { box-shadow:0 0 10px 2px rgba(255,217,102,.45); }
    100% { box-shadow:0 0 0 rgba(245,183,0,0); }
}
@keyframes calorieProgressFillFlash {
    0% { filter:brightness(1); }
    20% { filter:brightness(1.75); }
    55% { filter:brightness(1.25); }
    100% { filter:brightness(1); }
}

/* ===== V22: jemný záblesk hlavních akčních tlačítek ===== */
/* ===== Jemný záblesk hlavních akčních tlačítek ===== */

.action-feedback-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.action-feedback-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0;

    background: linear-gradient(
        105deg,
        transparent 28%,
        rgba(255,255,255,.08) 40%,
        rgba(255,255,255,.70) 50%,
        rgba(255,217,102,.30) 56%,
        transparent 70%
    );

    transform: translateX(-100%);
}

.action-feedback-btn.action-flash::after {
    animation: actionButtonShine .62s ease-out both;
}

@keyframes actionButtonShine {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }

    14% {
        opacity: 1;
    }

    45% {
        opacity: .9;
        transform: translateX(10%);
    }

    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .action-feedback-btn.action-flash::after {
        animation-duration: .25s;
    }
}
@media (prefers-reduced-motion: reduce) { .action-flash-layer.is-active { animation-duration:.25s; } }

@media (max-width: 360px) {
    #dailyPraise { font-size: 0.98rem !important; line-height: 1.35 !important; }
}
/* ===== Jemná animace načtení hlavní obrazovky ===== */

@keyframes bananPageReveal {
    from {
        opacity: 0;
        transform: none;
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.banan-load-animation {
    animation: bananPageReveal 420ms ease-out both;
}

.banan-load-delay-1 {
    animation-delay: 60ms;
}

.banan-load-delay-2 {
    animation-delay: 120ms;
}

.banan-load-delay-3 {
    animation-delay: 180ms;
}

.banan-load-delay-4 {
    animation-delay: 240ms;
}
/* ===== V2.3: PLYNULÉ NAČTENÍ HLAVNÍ OBRAZOVKY ===== */
.banan-main-reveal {
    animation: bananMainLightUp 520ms ease-out both;
    will-change: opacity, filter;
}

@keyframes bananMainLightUp {
    from {
        opacity: 0;
        filter: brightness(.78);
    }
    to {
        opacity: 1;
        filter: brightness(1);
    }
}

.banan-main-reveal-1 { animation-delay: 80ms; }
.banan-main-reveal-2 { animation-delay: 160ms; }
.banan-main-reveal-3 { animation-delay: 240ms; }
.banan-main-reveal-4 { animation-delay: 320ms; }
.banan-main-reveal-5 { animation-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
    .banan-main-reveal {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}


/* ============================================================
   BANÁN V3 · PREMIUM MOTION SYSTEM
   Splash → aplikace → wizard: jeden vizuální jazyk, žádné trhané
   přehazování vrstev. Protože lidské oko si těchto věcí všímá.
   ============================================================ */
#appBackground {
    opacity: 0;
    transition: opacity 760ms cubic-bezier(.22,.75,.25,1);
}
#appBackground img {
    transform: translate(-50%, -50%) rotate(0deg);
    transition: transform 980ms cubic-bezier(.22,.78,.2,1);
    will-change: transform;
}
#appBackground.is-settling img {
    transform: translate(-50%, -50%) rotate(0deg) !important;
}

#splash {
    background:
        radial-gradient(circle at 50% 46%, rgba(245,183,0,.09), transparent 34%),
        #070707;
    transition: opacity 760ms cubic-bezier(.22,.75,.25,1), filter 760ms ease;
}
#splash::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 28%, rgba(0,0,0,.18) 58%, rgba(0,0,0,.58) 100%),
        linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.18));
}
#splashBg {
    opacity: .78;
    filter: saturate(1.06) contrast(1.02);
    animation: splashSpin 26s linear infinite;
    transition: opacity 650ms ease, filter 650ms ease;
}
#splash .content {
    z-index: 10;
    transform: translateY(0);
    animation: splashContentFloat 5s ease-in-out infinite;
}
#splash .title {
    font-size: clamp(4.3rem, 14vw, 5.8rem);
    letter-spacing: -4px;
    text-shadow: 0 3px 22px rgba(0,0,0,.72), 0 0 34px rgba(245,183,0,.08);
    animation: splashTitlePremium 900ms cubic-bezier(.16,1,.3,1) both;
}
#splash .title .first {
    color: #f5b700;
    font-size: 1.045em;
    text-shadow: 0 0 28px rgba(245,183,0,.25), 0 3px 22px rgba(0,0,0,.65);
}
#splash .subtitle {
    margin-top: 13px;
    color: rgba(255,255,255,.78);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: 0;
    animation: splashSubtitleIn 700ms 260ms cubic-bezier(.16,1,.3,1) forwards;
}
#splash .loader {
    margin-top: 34px;
    gap: 10px;
    opacity: 0;
    animation: splashLoaderIn 650ms 520ms ease forwards;
}
#splash .loader span {
    width: 8px;
    height: 8px;
    box-shadow: 0 0 14px rgba(245,183,0,.35);
}
@keyframes splashTitlePremium {
    from { opacity: 0; transform: translateY(18px) scale(.94); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes splashSubtitleIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: .78; transform: translateY(0); }
}
@keyframes splashLoaderIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes splashContentFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Hlavní obrazovka navazuje na splash měkkým světelným odhalením. */
.banan-main-reveal {
    animation-duration: 680ms;
    animation-timing-function: cubic-bezier(.22,.78,.2,1);
}

/* ============================================================
   WIZARD · STEJNÝ MOTION JAZYK
   ============================================================ */
.wizard-overlay {
    background:
        radial-gradient(circle at 50% 35%, rgba(245,183,0,.075), transparent 34%),
        rgba(8,8,8,.965) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    opacity: 0;
    animation: wizardOverlayIn 600ms cubic-bezier(.22,.78,.2,1) forwards;
}
.wizard-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 40%, rgba(245,183,0,.055), transparent 45%);
    opacity: .9;
    animation: wizardAmbient 7s ease-in-out infinite;
}
.wizard-overlay::before {
    animation: none !important;
    opacity: .07 !important;
    filter: saturate(.9) contrast(.95);
}
.wizard-container {
    background: rgba(16,16,16,.88) !important;
    border: 1px solid rgba(245,183,0,.18);
    box-shadow: 0 22px 70px rgba(0,0,0,.52), 0 0 0 1px rgba(255,255,255,.025) inset;
    transform: translateY(14px) scale(.985);
    animation: wizardCardIn 700ms 80ms cubic-bezier(.16,1,.3,1) forwards;
}
.wizard-step {
    animation: none !important;
    will-change: opacity, transform, filter;
}
.wizard-step.wizard-enter {
    animation: wizardStepEnter 520ms cubic-bezier(.16,1,.3,1) both !important;
}
.wizard-step.wizard-exit {
    animation: wizardStepExit 260ms ease both !important;
    pointer-events: none;
}
.wizard-icon {
    margin-bottom: 14px;
}
.wizard-illustration {
    transition: transform 450ms cubic-bezier(.16,1,.3,1), filter 450ms ease;
}
.animate-icon .wizard-illustration {
    animation: wizardIllustrationFloat 3.8s ease-in-out infinite !important;
}
.wizard-goal {
    transition: transform 320ms cubic-bezier(.16,1,.3,1), background 320ms ease, border-color 320ms ease, box-shadow 320ms ease;
}
.wizard-progress-bar {
    transition: width 650ms cubic-bezier(.22,.78,.2,1);
    box-shadow: 0 0 14px rgba(245,183,0,.18);
}
.wizard-step-indicator {
    transition: transform 280ms cubic-bezier(.16,1,.3,1), background 300ms ease, color 300ms ease, box-shadow 300ms ease;
}
@keyframes wizardOverlayIn { to { opacity: 1; } }
@keyframes wizardCardIn { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes wizardStepEnter {
    from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(2px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes wizardStepExit {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}
@keyframes wizardIllustrationFloat {
    0%,100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.025); }
}
@keyframes wizardAmbient {
    0%,100% { opacity: .55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
    #splash *, .wizard-overlay, .wizard-overlay::after, .wizard-container, .wizard-step,
    .wizard-illustration, .wizard-progress-bar, #appBackground img {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

.wizard-overlay.wizard-closing {
    animation: wizardOverlayOut 440ms cubic-bezier(.4,0,.6,1) both !important;
}
.wizard-overlay.wizard-closing .wizard-container {
    animation: wizardCardOut 420ms cubic-bezier(.4,0,.6,1) both !important;
}
@keyframes wizardOverlayOut { to { opacity: 0; } }
@keyframes wizardCardOut { to { opacity: 0; transform: translateY(8px) scale(.985); } }

/* ============================================================
   BANÁN FINAL MOTION PASS
   Splash odhaluje hotovou aplikaci. Wizard překlápí pouze opacity.
   Geometrie zůstává stabilní, protože lidé používají telefony, ne
   laboratorní zařízení na testování pružnosti divů.
   ============================================================ */

/* --- Splash: žluté B + bílý zbytek --- */
#splash {
    z-index: 9999 !important;
    background: #050505 !important;
    isolation: isolate;
}
#splashBg {
    animation: splashSpin 34s linear infinite !important;
    opacity: .78 !important;
    will-change: transform;
}
#splash .content {
    transform: none !important;
    animation: none !important;
}
#splash .title {
    color: #fff !important;
    opacity: 1;
    animation: splashTitleFinal 900ms cubic-bezier(.22,.61,.36,1) both !important;
}
#splash .title .first {
    color: var(--primary) !important;
    font-size: 6.05rem;
    text-shadow: 0 2px 18px rgba(245,183,0,.18), 0 5px 36px rgba(0,0,0,.82);
}
#splash .title + p {
    animation: splashSubFinal 800ms 180ms cubic-bezier(.22,.61,.36,1) both;
}
#splash .loader {
    animation: splashSubFinal 800ms 300ms cubic-bezier(.22,.61,.36,1) both;
}
@keyframes splashTitleFinal {
    from { opacity: 0; transform: translateY(8px); filter: blur(3px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes splashSubFinal {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* App je hotová ještě pod splash. Žádné prudké druhé vykreslení. */
#app {
    opacity: 1 !important;
    transform: none !important;
}
#appBackground {
    display: none !important;
}

/* --- Wizard: průhledná clona nad hotovou aplikací --- */
.wizard-overlay {
    background: rgba(0,0,0,.34) !important;
    backdrop-filter: blur(5px) saturate(.96) !important;
    -webkit-backdrop-filter: blur(5px) saturate(.96) !important;
    animation: wizardOverlayFinalIn 520ms cubic-bezier(.22,.61,.36,1) both !important;
    overflow: hidden !important;
}
.wizard-overlay::before {
    display: none !important;
}
.wizard-overlay::after {
    background: radial-gradient(circle at 50% 38%, rgba(245,183,0,.055), transparent 42%) !important;
    animation: none !important;
}

/* Stabilní geometrie karty. Obsah jednotlivých kroků je pouze vrstvený. */
.wizard-container {
    width: min(400px, calc(100vw - 28px)) !important;
    height: min(650px, calc(100vh - 28px)) !important;
    min-height: 520px !important;
    max-height: 650px !important;
    padding: 40px 28px 30px !important;
    overflow: hidden !important;
    background: var(--banan-onboarding-surface) !important;
    border: var(--banan-onboarding-line-width) solid var(--banan-onboarding-line) !important;
    box-shadow: var(--banan-onboarding-shadow) !important;
    transform: none !important;
    animation: wizardCardFinalIn 620ms 60ms cubic-bezier(.22,.61,.36,1) both !important;
}

/* Každý krok sedí na stejné ploše. Výška karty se proto nikdy nepřizpůsobuje obsahu. */
.wizard-step {
    position: absolute !important;
    left: 28px !important;
    right: 28px !important;
    top: 40px !important;
    bottom: 112px !important;
    width: auto !important;
    margin: 0 !important;
    display: none;
    overflow: hidden;
    opacity: 1;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: opacity 420ms cubic-bezier(.22,.61,.36,1) !important;
    will-change: opacity;
}
.wizard-step[style*="display: block"],
.wizard-step.wizard-current {
    display: block !important;
}
.wizard-step.wizard-fading-out {
    opacity: 0 !important;
    z-index: 2 !important;
}
.wizard-step.wizard-fading-in {
    opacity: 0 !important;
    z-index: 1 !important;
}

/* Progress je ukotvený dole, nikoli v toku jednotlivých kroků. */
.wizard-progress {
    position: absolute !important;
    left: 28px !important;
    right: 28px !important;
    bottom: 58px !important;
    margin: 0 !important;
    z-index: 20 !important;
}
.wizard-steps {
    position: absolute !important;
    left: 28px !important;
    right: 28px !important;
    bottom: 22px !important;
    z-index: 20 !important;
}

/* Žádné samovolné posouvání karty při focusu/klávesnici. */
.wizard-buttons,
.wizard-goals,
.wizard-input-wrap {
    transform: none !important;
}
.wizard-goal:hover {
    transform: none !important;
}
.animate-icon .wizard-illustration {
    animation: wizardIllustrationFinal 4.8s ease-in-out infinite !important;
}
@keyframes wizardIllustrationFinal {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
@keyframes wizardOverlayFinalIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes wizardCardFinalIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wizard-overlay.wizard-closing {
    animation: wizardOverlayFinalOut 520ms cubic-bezier(.22,.61,.36,1) both !important;
}
.wizard-overlay.wizard-closing .wizard-container {
    animation: none !important;
}
@keyframes wizardOverlayFinalOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@media (max-width: 600px) {
    .wizard-container {
        width: calc(100vw - 20px) !important;
        height: min(650px, calc(100vh - 20px)) !important;
        min-height: 500px !important;
        padding: var(--banan-onboarding-padding) !important;
        border-radius: var(--banan-onboarding-radius) !important;
    }
    .wizard-step {
        left: 22px !important;
        right: 22px !important;
        top: 34px !important;
        bottom: 102px !important;
    }
    .wizard-progress {
        left: 22px !important;
        right: 22px !important;
        bottom: 52px !important;
    }
    .wizard-steps {
        left: 22px !important;
        right: 22px !important;
        bottom: 18px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #splashBg,
    #splash .title,
    #splash .title + p,
    #splash .loader,
    .wizard-overlay,
    .wizard-container,
    .wizard-step,
    .animate-icon .wizard-illustration {
        animation: none !important;
        transition: none !important;
    }
}


/* ============================================================
   BANÁN FINAL MOTION v4 · SPLASH / WIZARD LAYERS
   Princip: app je dole, rotující splash uprostřed, wizard nahoře.
   Při ukončení se rozpustí wizard i splash a hotová appka zůstane pod nimi.
   ============================================================ */
#splash {
    z-index: 50 !important;
    opacity: 1;
    pointer-events: none;
    background: #050505 !important;
}
#splashBg {
    z-index: 1 !important;
    animation: splashSpin 34s linear infinite !important;
}
#splash .content { z-index: 3 !important; }

/* Splash není při prvním spuštění časovaná překážka. Rozpustí se až po wizardu. */
#splash.splash-revealing-app {
    opacity: 0 !important;
    transition: opacity 760ms cubic-bezier(.4,0,.2,1) !important;
}
#splash.splash-revealing-app #splashBg,
#splash.splash-revealing-app .content {
    opacity: 0 !important;
    transition: opacity 700ms ease !important;
}

/* Wizard sedí nad splashí, ale jeho plocha je průsvitná, takže banán zůstává vidět. */
#wizard.wizard-overlay {
    z-index: 100 !important;
    background: rgba(0,0,0,.16) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden !important;
}
#wizard.wizard-overlay::after { opacity: .35 !important; }

/* Karta je jediná neprůsvitná plocha. Žádná změna rozměrů při přechodu kroků. */
#wizard .wizard-container {
    width: min(400px, calc(100vw - 24px)) !important;
    height: min(700px, calc(100dvh - 24px)) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 24px) !important;
    box-sizing: border-box !important;
    padding: var(--banan-onboarding-padding) !important;
    position: relative !important;
    overflow: hidden !important;
    transform: none !important;
    animation: wizardCardStableIn 520ms ease both !important;
}

/* Všechny kroky mají identickou geometrii a překlápějí pouze opacity. */
#wizard .wizard-step {
    position: absolute !important;
    inset: 28px 24px 96px 24px !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: none;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 2px 8px !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    opacity: 1;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: opacity 480ms cubic-bezier(.4,0,.2,1) !important;
}
#wizard .wizard-step::-webkit-scrollbar { display:none; }
#wizard .wizard-step[style*="display: block"],
#wizard .wizard-step.wizard-current { display:flex !important; }
#wizard .wizard-step.wizard-fading-out { opacity:0 !important; z-index:2 !important; }
#wizard .wizard-step.wizard-fading-in { opacity:0 !important; z-index:1 !important; }
#wizard .wizard-buttons {
    margin-top: auto !important;
    padding-top: 14px !important;
    flex-shrink: 0 !important;
}
#wizard .wizard-icon { flex-shrink:0 !important; margin-bottom:10px !important; }
#wizard .wizard-illustration { width:92px !important; height:92px !important; }
#wizard h1, #wizard h2 { flex-shrink:0 !important; }
#wizard p { flex-shrink:0 !important; }

/* 6 a 7 mají více obsahu. Zmenšení ilustrace je jemné, ne deformativní. */
#wizard #wizardStep6 .wizard-illustration,
#wizard #wizardStep7 .wizard-illustration { width:82px !important; height:82px !important; }
#wizard #wizardStep7 .wizard-final-text { margin-top:4px !important; }
#wizard #wizardStep7 .wizard-final-text p { margin-bottom:8px !important; line-height:1.3 !important; }
#wizard #wizardStep7 .wizard-summary { margin:8px 0 10px !important; padding:10px !important; line-height:1.55 !important; }

/* Progress a indikátory jsou pevně uvnitř karty. */
#wizard .wizard-progress {
    position:absolute !important;
    left:24px !important; right:24px !important; bottom:50px !important;
    margin:0 !important; z-index:20 !important;
}
#wizard .wizard-steps {
    position:absolute !important;
    left:24px !important; right:24px !important; bottom:14px !important;
    z-index:20 !important;
}

/* Číslo 1: původní jemné pulzování. Ostatní: záblesk při stisku. */
#wizard .pulse-btn { animation: pulseBtn 2s ease-in-out infinite !important; }
#wizard .wizard-flash-btn {
    position:relative !important;
    overflow:hidden !important;
    isolation:isolate !important;
    animation:none !important;
}
#wizard .wizard-flash-btn::after {
    content:""; position:absolute; inset:0; pointer-events:none; z-index:2;
    opacity:0; transform:translateX(-100%);
    background:linear-gradient(105deg, transparent 28%, rgba(255,255,255,.08) 40%, rgba(255,255,255,.70) 50%, rgba(255,217,102,.30) 56%, transparent 70%);
}
#wizard .wizard-flash-btn.action-flash::after { animation:actionButtonShine .62s ease-out both; }

/* Zavření: karta a clona mizí, splash se rozpustí zároveň. */
#wizard.wizard-closing { animation:wizardFinalFadeOut 760ms cubic-bezier(.4,0,.2,1) both !important; }
#wizard.wizard-closing .wizard-container { animation:none !important; }
@keyframes wizardCardStableIn { from{opacity:0} to{opacity:1} }
@keyframes wizardFinalFadeOut { from{opacity:1} to{opacity:0} }

@media (max-width:600px) {
    #wizard .wizard-container {
        width:calc(100vw - 16px) !important;
        height:calc(100dvh - 16px) !important;
        max-height:calc(100dvh - 16px) !important;
        padding:22px 18px 18px !important;
        border-radius:24px !important;
    }
    #wizard .wizard-step { inset:22px 18px 88px 18px !important; }
    #wizard .wizard-progress { left:18px !important; right:18px !important; bottom:44px !important; }
    #wizard .wizard-steps { left:18px !important; right:18px !important; bottom:10px !important; }
    #wizard .wizard-illustration { width:78px !important; height:78px !important; }
    #wizard #wizardStep6 .wizard-illustration,
    #wizard #wizardStep7 .wizard-illustration { width:70px !important; height:70px !important; }
    #wizard #wizardStep7 .wizard-final-text p { font-size:.88rem !important; }
}

/* ============================================================
   WIZARD FINAL LAYOUT PASS
   Ilustrace jsou větší a jednotlivé kroky mají konzistentní osu.
   Karta 1 je skutečně vycentrovaná, formulářové kroky mají ilustraci
   nahoře a text/hodnoty až pod ní. Bez ořezaných světelných okrajů.
   ============================================================ */
#wizard .wizard-step {
    justify-content: flex-start !important;
}

/* Karta 1: celý obsah doprostřed karty. */
#wizard #wizardStep1 {
    justify-content: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
#wizard #wizardStep1 .wizard-icon {
    margin-bottom: 18px !important;
}
#wizard #wizardStep1 .wizard-illustration {
    width: 122px !important;
    height: 122px !important;
}
#wizard #wizardStep1 .welcome-title {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}
#wizard #wizardStep1 .welcome-sub {
    margin-bottom: 26px !important;
}

/* Karty 2–5: ilustrace nahoře, větší a ve stejné horní pozici. */
#wizard #wizardStep2 .wizard-icon,
#wizard #wizardStep3 .wizard-icon,
#wizard #wizardStep4 .wizard-icon,
#wizard #wizardStep5 .wizard-icon {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
}
#wizard #wizardStep2 .wizard-illustration,
#wizard #wizardStep3 .wizard-illustration,
#wizard #wizardStep4 .wizard-illustration,
#wizard #wizardStep5 .wizard-illustration {
    width: 116px !important;
    height: 116px !important;
}
#wizard #wizardStep2 h2,
#wizard #wizardStep3 h2,
#wizard #wizardStep4 h2,
#wizard #wizardStep5 h2 {
    margin-top: 0 !important;
    margin-bottom: 24px !important;
}

/* Hodnoty jsou záměrně níže, aby nevznikla slepená horní třetina karty. */
#wizard #wizardStep2 .wizard-input-wrap,
#wizard #wizardStep3 .wizard-input-wrap {
    margin: 0 0 18px !important;
}
#wizard #wizardStep2 .wizard-big-input,
#wizard #wizardStep3 .wizard-big-input {
    padding-top: 10px !important;
    padding-bottom: 12px !important;
}

#wizard #wizardStep4 .wizard-row {
    margin-top: 2px !important;
    margin-bottom: 12px !important;
}
#wizard #wizardStep5 .wizard-select-wrap {
    margin-top: 2px !important;
}

/* Karty 6 a 7: trochu větší ilustrace, ale stále s rezervou pro obsah. */
#wizard #wizardStep6 .wizard-illustration,
#wizard #wizardStep7 .wizard-illustration {
    width: 100px !important;
    height: 100px !important;
}
#wizard #wizardStep6 .wizard-icon,
#wizard #wizardStep7 .wizard-icon {
    margin-bottom: 12px !important;
}

/* Tlačítka: odstranění oříznutého záření kolem hran. Záblesk zůstává uvnitř. */
#wizard .wizard-flash-btn,
#wizard .btn-wizard.wizard-flash-btn {
    box-shadow: none !important;
}
#wizard .wizard-flash-btn:hover,
#wizard .wizard-flash-btn:focus,
#wizard .wizard-flash-btn:active {
    box-shadow: none !important;
}

/* Karta 1 si ponechává pulz, ale jen jako čistý vnitřní efekt bez přetékajícího halo. */
#wizard .pulse-btn {
    animation: wizardPulseClean 2s ease-in-out infinite !important;
}
@keyframes wizardPulseClean {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
}

@media (max-width: 600px) {
    #wizard #wizardStep1 .wizard-illustration {
        width: 108px !important;
        height: 108px !important;
    }
    #wizard #wizardStep2 .wizard-illustration,
    #wizard #wizardStep3 .wizard-illustration,
    #wizard #wizardStep4 .wizard-illustration,
    #wizard #wizardStep5 .wizard-illustration {
        width: 106px !important;
        height: 106px !important;
    }
    #wizard #wizardStep2 h2,
    #wizard #wizardStep3 h2,
    #wizard #wizardStep4 h2,
    #wizard #wizardStep5 h2 {
        margin-bottom: 20px !important;
    }
    #wizard #wizardStep6 .wizard-illustration,
    #wizard #wizardStep7 .wizard-illustration {
        width: 90px !important;
        height: 90px !important;
    }
}

/* ============================================================
   WIZARD MOBILE FINAL POSITION FIX – OPRAVDU PŮVODNÍ VELIKOST
   Karta zůstává velká jako původně. Pouze je na telefonu posazená
   vkusně výš. Při otevřené klávesnici se zmenší jen natolik, aby
   zůstala celá ve viditelné části displeje.
   ============================================================ */
#wizard.wizard-overlay {
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 18px 12px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

#wizard .wizard-container {
    width: min(400px, calc(100vw - 24px)) !important;
    height: min(650px, calc(100dvh - 36px)) !important;
    min-height: 500px !important;
    max-height: 650px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Na kratších displejích necháme kartu stále dostatečně vysokou,
   ale nikdy ji nenecháme přesahovat mimo viewport. */
@media (max-width: 600px) {
    #wizard.wizard-overlay {
        padding: 18px 8px !important;
    }

    #wizard .wizard-container {
        width: calc(100vw - 16px) !important;
        height: min(650px, calc(100dvh - 36px)) !important;
        min-height: 500px !important;
        max-height: 650px !important;
        padding: var(--banan-onboarding-padding) !important;
        border-radius: var(--banan-onboarding-radius) !important;
    }

    #wizard .wizard-step {
        left: 22px !important;
        right: 22px !important;
        top: 34px !important;
        bottom: 102px !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Tlačítko zůstává při scrollování kroku dostupné. */
    #wizard .wizard-buttons {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 10 !important;
        margin-top: 18px !important;
        padding-top: 10px !important;
        padding-bottom: 5px !important;
        background: linear-gradient(to bottom, rgba(13,13,13,0), rgba(13,13,13,.96) 22%, rgba(13,13,13,.98)) !important;
    }

    #wizard .wizard-progress {
        left: 22px !important;
        right: 22px !important;
        bottom: 52px !important;
    }

    #wizard .wizard-steps {
        left: 22px !important;
        right: 22px !important;
        bottom: 18px !important;
    }
}

/* Při otevřené klávesnici je jedinou změnou výška karty.
   Její horní poloha zůstává stejná, takže nic neposkakuje. */
#wizard.wizard-keyboard-open .wizard-container {
    height: min(650px, calc(var(--wizard-visible-height, 100dvh) - 24px)) !important;
    max-height: calc(var(--wizard-visible-height, 100dvh) - 24px) !important;
    min-height: 0 !important;
}

#wizard.wizard-keyboard-open .wizard-step {
    overflow-y: auto !important;
}


/* ============================================================
   WIZARD · POSLEDNÍ POLOHOVÝ KOMPROMIS
   Běžně: karta zůstává velká jako původně, ale sedí cca o 15 %
   výšky displeje níže. Při klávesnici se posune nahoru jen proto,
   aby spodní tlačítko zůstalo skutečně dostupné.
   ============================================================ */
@media (max-width: 600px) {
    #wizard.wizard-overlay {
        align-items: flex-start !important;
        justify-content: center !important;
        padding: 15vh 8px 24px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    #wizard .wizard-container {
        width: calc(100vw - 16px) !important;
        height: min(650px, calc(85vh - 24px)) !important;
        max-height: min(650px, calc(85vh - 24px)) !important;
        min-height: 0 !important;
        padding: var(--banan-onboarding-padding) !important;
    }

    /* Když je klávesnice otevřená, kartu zvedneme k hornímu okraji
       viditelné plochy. Jinak by se spodní část dostala pod klávesnici. */
    #wizard.wizard-keyboard-open {
        /* Při otevřené klávesnici necháme kartu cca o 5 % výšky
           viditelné plochy níže. Pouze při klávesnici, běžná poloha
           wizardu zůstává beze změny. */
        padding-top: 5vh !important;
        padding-bottom: 10px !important;
    }

    #wizard.wizard-keyboard-open .wizard-container {
        height: min(650px, calc(var(--wizard-visible-height, 100dvh) - 5vh - 10px)) !important;
        max-height: calc(var(--wizard-visible-height, 100dvh) - 5vh - 10px) !important;
    }

    /* Karta 1: zachovat původní upoutávací pulzování tlačítka.
       Ostatní tlačítka zůstávají bez vnějšího halo a používají jen
       vnitřní diagonální záblesk. */
    #wizard .pulse-btn {
        animation: pulseBtn 2s ease-in-out infinite !important;
    }
}


/* ============================================================
   EXPERIMENT · VLASTNÍ JÍDLA A INGREDIENCE
   ============================================================ */
.generator-custom-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,.68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.generator-custom-modal {
    width: min(720px, 100%);
    max-height: min(88vh, 820px);
    overflow-y: auto;
    border-radius: 22px;
    padding: 18px;
    box-sizing: border-box;
    box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.generator-custom-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}
.generator-custom-close {
    width:38px;
    height:38px;
    border:0;
    border-radius:50%;
    background:rgba(255,255,255,.08);
    color:inherit;
    font-size:1rem;
    cursor:pointer;
    flex:0 0 auto;
}
.generator-custom-section {
    padding:14px;
    margin-top:10px;
    border:1px solid rgba(245,183,0,.18);
    border-radius:16px;
    background:rgba(255,255,255,.025);
}
.generator-custom-section-title {
    font-weight:800;
    margin-bottom:10px;
    color:#f5b700;
}
.generator-custom-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}
.generator-custom-modal input,
.generator-custom-modal textarea,
.generator-custom-modal select {
    width:100%;
    box-sizing:border-box;
    border:1px solid rgba(255,255,255,.12);
    border-radius:10px;
    padding:10px 11px;
    background:rgba(255,255,255,.055);
    color:inherit;
    font:inherit;
}
.generator-custom-modal textarea {
    display:block;
    margin-top:8px;
    resize:vertical;
    min-height:72px;
}
.generator-custom-modal input::placeholder,
.generator-custom-modal textarea::placeholder { opacity:.52; }
.generator-custom-modal select option { color:#111; }
.generator-custom-action { margin-top:9px; width:auto; }
.generator-custom-list { margin-top:9px; }
.generator-custom-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:8px 0;
    border-top:1px solid rgba(255,255,255,.07);
}
.generator-custom-row span { min-width:0; }
.generator-custom-row b { display:block; overflow-wrap:anywhere; }
.generator-custom-row small { display:block; opacity:.58; margin-top:2px; }
.generator-custom-row button {
    border:0;
    background:transparent;
    color:inherit;
    cursor:pointer;
    padding:7px;
    flex:0 0 auto;
}
.generator-custom-empty { opacity:.5; font-size:.82rem; padding:6px 0; }
.generator-custom-checks {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px 10px;
    max-height:260px;
    overflow-y:auto;
    padding-top:5px;
}
.generator-custom-check {
    display:flex;
    align-items:center;
    gap:7px;
    min-width:0;
    padding:5px 3px;
    font-size:.82rem;
}
.generator-custom-check input {
    width:18px !important;
    height:18px;
    margin:0;
    flex:0 0 auto;
}
.generator-custom-check span { overflow-wrap:anywhere; }
.generator-custom-footer {
    display:flex;
    justify-content:flex-end;
    margin-top:14px;
}
@media (max-width:600px) {
    .generator-custom-overlay { padding:10px; align-items:flex-start; }
    .generator-custom-modal { max-height:94vh; border-radius:18px; padding:14px; }
    .generator-custom-grid,
    .generator-custom-checks { grid-template-columns:1fr; }
    .generator-custom-section { padding:11px; }
    .generator-custom-action { width:100%; }
}

/* ============================================================
   EXPERIMENT · JEDNODUCHÝ EDITOR VLASTNÍCH INGREDIENCÍ
   ============================================================ */
.generator-builder-modal{width:min(980px,100%);max-height:min(90vh,900px);overflow:hidden;border-radius:22px;padding:18px;box-sizing:border-box;box-shadow:0 18px 60px rgba(0,0,0,.38)}
.generator-builder-title{font-size:1.2rem;font-weight:850;color:#f5b700}
.generator-builder-sub{font-size:.82rem;opacity:.62;margin-top:4px;max-width:720px}
.generator-builder-create{padding:12px;border:1px solid rgba(245,183,0,.18);border-radius:15px;background:rgba(255,255,255,.025);margin-bottom:12px}
.generator-builder-create-title{font-weight:800;color:#f5b700;margin-bottom:8px}
.generator-builder-create-grid{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:7px}
.generator-builder-create-grid input{min-width:0}
.generator-builder-create-note{font-size:.72rem;opacity:.5;margin-top:6px}
.generator-builder-work{display:grid;grid-template-columns:minmax(220px,30%) minmax(0,1fr);gap:10px;min-height:360px;height:min(50vh,500px)}
.generator-builder-library,.generator-builder-editor{border:1px solid rgba(255,255,255,.10);border-radius:16px;overflow:hidden;background:rgba(255,255,255,.025);min-width:0}
.generator-builder-library-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.08);color:#f5b700}
.generator-builder-library-head span{font-size:.72rem;opacity:.55}
.generator-builder-library>input{margin:8px 9px;width:calc(100% - 18px);box-sizing:border-box}
.generator-builder-list{height:calc(100% - 84px);overflow-y:auto;padding:5px}
.generator-builder-item{display:grid;grid-template-columns:18px minmax(0,1fr) auto auto auto;align-items:center;gap:5px;padding:7px 6px;border-radius:9px;cursor:grab;font-size:.78rem;user-select:none}
.generator-builder-item:hover{background:rgba(245,183,0,.09)}
.generator-builder-item.is-custom{background:rgba(245,183,0,.055)}
.generator-builder-grip{opacity:.32;letter-spacing:-3px}
.generator-builder-item-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.generator-builder-type{font-size:.62rem;opacity:.42;white-space:nowrap}
.generator-builder-own{font-size:.55rem;font-weight:800;color:#f5b700;border:1px solid rgba(245,183,0,.35);border-radius:5px;padding:2px 4px}
.generator-builder-tool{border:0;background:transparent;color:inherit;opacity:.58;cursor:pointer;padding:2px 4px;font-size:.8rem}
.generator-builder-tool:hover{opacity:1;color:#f5b700}.generator-builder-tool.danger:hover{color:#ff7777}
.generator-builder-editor-head{padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.08);font-weight:800;color:#f5b700}
.generator-builder-recipe-head{display:flex;gap:8px;align-items:center;padding:10px 10px 8px}.generator-builder-recipe-head input{flex:1;min-width:0}.generator-builder-target{font-size:.68rem;opacity:.55;white-space:nowrap}
.generator-builder-row{display:grid;grid-template-columns:minmax(130px,1fr) minmax(100px,28%) 68px 18px 30px;gap:7px;align-items:center;padding:7px 10px;border-bottom:1px solid rgba(255,255,255,.06)}
.generator-builder-row-main{min-width:0}.generator-builder-row-main b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8rem}.generator-builder-row-main small{display:block;opacity:.42;font-size:.62rem;margin-top:2px}
.generator-builder-knob{width:100%;accent-color:#f5b700}.generator-builder-amount{width:68px;box-sizing:border-box}.generator-builder-unit{opacity:.45;font-size:.75rem}.generator-builder-remove{border:0;background:transparent;color:inherit;opacity:.45;cursor:pointer;font-size:1rem}.generator-builder-remove:hover{opacity:1;color:#ff7777}
.generator-builder-drop{margin:10px;padding:38px 15px;border:1px dashed rgba(245,183,0,.28);border-radius:12px;text-align:center;opacity:.55;line-height:1.5}.generator-builder-editor.drag-over .generator-builder-drop,.generator-builder-editor.drag-over{background:rgba(245,183,0,.05)}
.generator-builder-totals{display:flex;gap:14px;flex-wrap:wrap;padding:9px 10px 4px;font-size:.75rem}.generator-builder-totals b{color:#f5b700}.generator-builder-totals span{opacity:.65}.generator-builder-meter{height:4px;margin:0 10px 8px;border-radius:10px;background:rgba(255,255,255,.08);overflow:hidden}.generator-builder-meter span{display:block;height:100%;background:#f5b700;border-radius:inherit;transition:width .2s ease}
.generator-builder-actions{display:flex;gap:8px;padding:8px 10px}.generator-builder-actions .btn{margin:0}.generator-builder-day-note{font-size:.72rem;opacity:.52;padding:9px 2px 0}.generator-builder-empty{padding:20px;text-align:center;opacity:.45;font-size:.8rem}
@media(max-width:700px){.generator-builder-modal{max-height:96vh;padding:12px;border-radius:18px}.generator-builder-create-grid{grid-template-columns:1fr 1fr}.generator-builder-create-grid input:first-child{grid-column:1/-1}.generator-builder-work{grid-template-columns:1fr;height:62vh;min-height:0}.generator-builder-library{height:28vh}.generator-builder-editor{height:33vh}.generator-builder-list{height:calc(100% - 84px)}.generator-builder-row{grid-template-columns:minmax(105px,1fr) minmax(80px,30%) 58px 14px 25px;gap:4px;padding:6px 7px}.generator-builder-amount{width:58px}.generator-builder-target{display:none}.generator-builder-sub{display:none}.generator-builder-type{display:none}}

/* ============================================================
   EXPERIMENT 3 · JEDNODUCHÉ OVLÁDÁNÍ NA TELEFONU
   ============================================================ */
.generator-builder-knob{display:none!important}
.generator-builder-row{grid-template-columns:minmax(0,1fr) 72px 18px 30px!important}
.generator-builder-row-main b{font-size:.82rem}
.generator-builder-amount{font-size:1rem!important;text-align:center}
.generator-builder-suggestions{padding:5px 7px 7px;border-bottom:1px solid rgba(255,255,255,.08)}
.generator-builder-suggestions small{display:block;opacity:.45;font-size:.65rem;margin:0 4px 4px}
.generator-builder-suggestions button{display:block;width:100%;border:0;background:rgba(245,183,0,.08);color:inherit;text-align:left;padding:7px 8px;border-radius:8px;margin:2px 0;font-size:.78rem}
.generator-builder-suggestions button:active{background:rgba(245,183,0,.18)}
.generator-day-swap-overlay{position:fixed;inset:0;z-index:10050;background:rgba(0,0,0,.62);display:flex;align-items:center;justify-content:center;padding:14px;box-sizing:border-box}
.generator-day-swap-modal{width:min(620px,100%);max-height:88vh;overflow:auto;background:#1f1f1a;color:#fff;border:1px solid rgba(245,183,0,.25);border-radius:20px;padding:16px;box-sizing:border-box;box-shadow:0 20px 70px rgba(0,0,0,.5)}
.generator-day-swap-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.generator-day-swap-head b{font-size:1.15rem;color:#f5b700}
.generator-day-swap-head small{display:block;opacity:.55;margin-top:2px}
.generator-day-swap-head button{border:0;background:transparent;color:inherit;font-size:1.2rem;padding:6px}
.generator-day-swap-note{font-size:.82rem;opacity:.68;line-height:1.45;margin-bottom:12px}
.generator-day-swap-standard{width:100%;margin-bottom:14px}
.generator-day-swap-section{border-top:1px solid rgba(255,255,255,.08);padding-top:13px}
.generator-day-swap-section>b{display:block;color:#f5b700;margin-bottom:8px}
.generator-day-swap-grid{display:grid;gap:6px;margin-bottom:12px}
.generator-day-swap-card{display:block;cursor:pointer}
.generator-day-swap-card input{display:none}
.generator-day-swap-card span{display:block;border:1px solid rgba(255,255,255,.09);border-radius:11px;padding:9px 10px;background:rgba(255,255,255,.025)}
.generator-day-swap-card input:checked+span{border-color:rgba(245,183,0,.75);background:rgba(245,183,0,.10);box-shadow:inset 3px 0 #f5b700}
.generator-day-swap-card b{display:block;font-size:.84rem}
.generator-day-swap-card small{display:block;opacity:.52;margin-top:3px;font-size:.7rem}
.generator-day-swap-section>.btn{width:100%}
.generator-day-swap-hint,.generator-day-swap-empty{display:block;font-size:.7rem;opacity:.48;line-height:1.4;margin-top:8px}
@media(max-width:700px){
  .generator-builder-modal{max-height:94vh;padding:10px;border-radius:16px}
  .generator-builder-create{padding:9px;margin-bottom:8px}
  .generator-builder-create-title{font-size:.86rem}
  .generator-builder-create-note{display:none}
  .generator-builder-work{grid-template-columns:1fr;height:64vh;gap:7px}
  .generator-builder-library{height:29vh}
  .generator-builder-editor{height:34vh}
  .generator-builder-list{height:calc(100% - 78px)}
  .generator-builder-item{grid-template-columns:14px minmax(0,1fr) auto auto auto;padding:6px 5px;font-size:.75rem}
  .generator-builder-row{grid-template-columns:minmax(0,1fr) 68px 16px 27px!important;padding:7px 7px}
  .generator-builder-row-main small{display:none}
  .generator-builder-actions{padding:6px 7px}
  .generator-builder-actions .btn{flex:1;font-size:.78rem;padding:9px 7px}
  .generator-day-swap-overlay{align-items:flex-end;padding:8px}
  .generator-day-swap-modal{max-height:88vh;border-radius:18px;padding:13px}
}


/* ============================================================
   EXPERIMENT 4 · TELEFON + ŽIVÉ NAŠEPTÁVÁNÍ + UŽIVATELSKÉ MNOŽSTVÍ
   ============================================================ */

/* Vyhledávání nesmí při každém písmenu překreslovat celý editor.
   Seznam výsledků se mění samostatně a vstup proto neztrácí fokus. */
.generator-builder-suggestions{
    position:relative;
    z-index:5;
    background:inherit;
}
.generator-builder-suggestions button{
    cursor:pointer;
}

/* Množství je normální textově/číselně editovatelné pole. */
.generator-builder-amount{
    appearance:textfield;
    -moz-appearance:textfield;
    min-width:0!important;
    border:1px solid rgba(245,183,0,.28)!important;
    background:rgba(255,255,255,.06)!important;
    color:inherit!important;
    border-radius:9px!important;
    padding:7px 5px!important;
}
.generator-builder-amount::-webkit-outer-spin-button,
.generator-builder-amount::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
}

/* Na telefonu musí editor skutečně sedět uvnitř viewportu. */
@media(max-width:700px){
    .generator-custom-overlay{
        padding:6px!important;
        align-items:center!important;
        overflow:hidden!important;
    }
    .generator-builder-modal{
        width:calc(100vw - 12px)!important;
        max-width:calc(100vw - 12px)!important;
        height:calc(100vh - 12px)!important;
        max-height:calc(100vh - 12px)!important;
        padding:9px!important;
        border-radius:16px!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
    }
    .generator-builder-create{
        padding:8px!important;
        margin-bottom:8px!important;
    }
    .generator-builder-create-grid{
        gap:5px!important;
    }
    .generator-builder-work{
        grid-template-columns:1fr!important;
        height:auto!important;
        min-height:0!important;
        gap:7px!important;
    }
    .generator-builder-library{
        height:31vh!important;
        min-height:150px!important;
    }
    .generator-builder-editor{
        height:34vh!important;
        min-height:210px!important;
    }
    .generator-builder-library-head,
    .generator-builder-editor-head{
        padding:7px 9px!important;
    }
    .generator-builder-library>input{
        margin:6px 7px!important;
        width:calc(100% - 14px)!important;
    }
    .generator-builder-list{
        height:calc(100% - 72px)!important;
        padding:3px!important;
    }
    .generator-builder-item{
        grid-template-columns:14px minmax(0,1fr) auto auto auto!important;
        padding:6px 4px!important;
        gap:3px!important;
        font-size:.73rem!important;
    }
    .generator-builder-type{
        display:none!important;
    }
    .generator-builder-recipe-head{
        padding:7px 7px 5px!important;
    }
    .generator-builder-row{
        grid-template-columns:minmax(0,1fr) 68px 14px 26px!important;
        padding:6px 7px!important;
        gap:4px!important;
    }
    .generator-builder-amount{
        width:68px!important;
        font-size:.95rem!important;
        padding:6px 3px!important;
    }
    .generator-builder-totals{
        gap:8px!important;
        padding:7px!important;
    }
    .generator-builder-actions{
        padding:6px 7px!important;
        gap:5px!important;
    }
    .generator-builder-actions .btn{
        padding:8px 9px!important;
        font-size:.78rem!important;
    }
    .generator-builder-day-note{
        display:none!important;
    }
}


/* ===== JEDNODUCHÉ UI PRO MOJE INGREDIENCE ===== */
.generator-builder-modal{
    width:min(920px,100%)!important;
    padding:14px!important;
    border-radius:20px!important;
}
.generator-custom-head{margin-bottom:10px!important;}
.generator-builder-title{font-size:1.08rem!important;}
.generator-builder-sub{font-size:.78rem!important;max-width:640px!important;}
.generator-builder-create{
    padding:10px!important;
    margin-bottom:10px!important;
    border-radius:14px!important;
}
.generator-builder-create-title{font-size:.9rem!important;margin-bottom:7px!important;}
.generator-builder-create-grid{gap:6px!important;}
.generator-builder-create-grid input{font-size:.86rem!important;}
.generator-custom-action{padding:8px 12px!important;margin-top:7px!important;}
.generator-builder-work{gap:8px!important;}
.generator-builder-library,.generator-builder-editor{
    border-radius:14px!important;
}
.generator-builder-library-head,.generator-builder-editor-head{
    padding:9px 11px!important;
}
.generator-builder-library>input{
    margin:7px 8px!important;
    width:calc(100% - 16px)!important;
    min-height:42px!important;
    font-size:.95rem!important;
    border-radius:11px!important;
}
.generator-builder-item{
    grid-template-columns:minmax(0,1fr) auto auto auto!important;
    padding:8px 8px!important;
    gap:5px!important;
    font-size:.82rem!important;
    cursor:pointer!important;
}
.generator-builder-grip,.generator-builder-type{display:none!important;}
.generator-builder-own{font-size:.52rem!important;}
.generator-builder-tool{font-size:.85rem!important;padding:2px 5px!important;}
.generator-builder-suggestions{padding:4px 8px 7px!important;}
.generator-builder-suggestions button{padding:8px 9px!important;font-size:.82rem!important;}
.generator-builder-recipe-head{padding:9px 9px 7px!important;}
.generator-builder-recipe-head input{font-size:.92rem!important;}
.generator-builder-target{display:none!important;}
.generator-builder-row{
    grid-template-columns:minmax(0,1fr) 68px 26px!important;
    padding:8px 9px!important;
    gap:5px!important;
}
.generator-builder-row-main b{font-size:.84rem!important;}
.generator-builder-row-main small{display:none!important;}
.generator-builder-amount{width:68px!important;min-height:38px!important;font-size:.95rem!important;}
.generator-builder-unit{display:none!important;}
.generator-builder-remove{font-size:.92rem!important;}
.generator-builder-drop{margin:8px!important;padding:28px 12px!important;border-radius:11px!important;}
.generator-builder-meter{display:none!important;}
.generator-builder-totals{padding:8px 9px 4px!important;gap:10px!important;font-size:.76rem!important;}
.generator-builder-actions{padding:7px 9px!important;}
.generator-builder-day-note{display:none!important;}
.generator-custom-footer{padding-top:7px!important;}
@media(max-width:700px){
    .generator-builder-modal{padding:9px!important;border-radius:16px!important;}
    .generator-builder-create-grid{grid-template-columns:1fr 1fr!important;}
    .generator-builder-create-grid input:first-child{grid-column:1/-1!important;}
    .generator-builder-work{height:63vh!important;gap:7px!important;}
    .generator-builder-library{height:28vh!important;}
    .generator-builder-editor{height:34vh!important;}
    .generator-builder-item{padding:7px 6px!important;font-size:.78rem!important;}
    .generator-builder-row{grid-template-columns:minmax(0,1fr) 68px 26px!important;padding:7px 7px!important;}
    .generator-builder-actions .btn{font-size:.8rem!important;padding:9px 7px!important;}
}

/* V5 – výměna jednotlivého jídla a sjednocená tlačítka pod jídlem. */
#mealPlanContainer .generator-meal-action-row {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    flex-wrap:wrap !important;
    margin-top:7px !important;
}
#mealPlanContainer .generator-meal-action-row .generator-recipe-open-btn,
#mealPlanContainer .generator-meal-action-row .generator-meal-swap-btn {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:auto !important;
    min-width:0 !important;
    min-height:36px !important;
    height:36px !important;
    margin:0 !important;
    padding:5px 12px !important;
    font-size:.76rem !important;
    white-space:nowrap !important;
}
#mealPlanContainer .generator-meal-swap-btn {
    border-color:var(--gold) !important;
    color:var(--gold) !important;
}
.generator-meal-swap-overlay {
    position:fixed;
    inset:0;
    z-index:10060;
    background:rgba(0,0,0,.62);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:14px;
    box-sizing:border-box;
}
.generator-meal-swap-modal {
    width:min(620px,100%);
    max-height:88vh;
    overflow:auto;
    background:#1f1f1a;
    color:#fff;
    border:1px solid rgba(245,183,0,.25);
    border-radius:20px;
    padding:16px;
    box-sizing:border-box;
    box-shadow:0 20px 70px rgba(0,0,0,.5);
}
body.light .generator-meal-swap-modal {
    background:#fff;
    color:#111;
    border-color:rgba(184,122,0,.25);
}
.generator-meal-swap-confirm {
    width:100% !important;
    margin-top:10px !important;
}
@media(max-width:700px){
    .generator-meal-swap-overlay{align-items:flex-end;padding:8px}
    .generator-meal-swap-modal{max-height:88vh;border-radius:18px;padding:13px}
    #mealPlanContainer .generator-meal-action-row{gap:6px !important}
    #mealPlanContainer .generator-meal-action-row .generator-recipe-open-btn,
    #mealPlanContainer .generator-meal-action-row .generator-meal-swap-btn{
        min-height:35px !important;
        height:35px !important;
        padding:5px 10px !important;
        font-size:.72rem !important;
    }
}

/* V6 – vlastní jídla a pohodlné zpětné úpravy. */
.generator-my-meals{margin:0 0 12px;padding:12px;border:1px solid rgba(245,183,0,.18);border-radius:15px;background:rgba(245,183,0,.035)}
.generator-my-meals-head{display:flex;align-items:center;justify-content:space-between;color:#f5b700;font-weight:800;margin-bottom:8px}
.generator-my-meals-head span{font-size:.72rem;opacity:.55}
.generator-my-meals-list{display:grid;gap:6px;max-height:180px;overflow:auto}
.generator-my-meal-card{display:flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.09);border-radius:11px;padding:8px 9px;background:rgba(255,255,255,.025)}
body.light .generator-my-meal-card{border-color:rgba(0,0,0,.09);background:rgba(0,0,0,.018)}
.generator-my-meal-info{min-width:0;flex:1}.generator-my-meal-info b{display:block;font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.generator-my-meal-info small{display:block;font-size:.68rem;opacity:.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
.generator-my-meal-tools{display:flex;gap:3px;flex:0 0 auto}.generator-my-meal-tools .generator-builder-tool{padding:5px 7px;border-radius:8px}.generator-my-meal-tools .danger{color:#e77}
.generator-my-meals-empty{font-size:.75rem;opacity:.48;padding:5px 0}
.generator-data-editor-overlay{position:fixed;inset:0;z-index:10080;background:rgba(0,0,0,.64);display:flex;align-items:center;justify-content:center;padding:14px;box-sizing:border-box}
.generator-data-editor-modal{width:min(560px,100%);border:1px solid rgba(245,183,0,.28);border-radius:20px;padding:17px;box-sizing:border-box;box-shadow:0 20px 70px rgba(0,0,0,.52)}
.generator-data-editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.generator-data-editor-head b{display:block;color:#f5b700;font-size:1.08rem}.generator-data-editor-head small{display:block;opacity:.5;margin-top:3px}.generator-data-editor-head button{border:0;background:transparent;color:inherit;font-size:1.2rem;padding:5px;cursor:pointer}
.generator-data-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.generator-data-editor-grid label{font-size:.7rem;opacity:.7}.generator-data-editor-grid label:first-child{grid-column:1/-1}.generator-data-editor-grid input{display:block;width:100%;box-sizing:border-box;margin-top:4px}
.generator-data-editor-preview{margin-top:11px;padding:10px;border-radius:10px;background:rgba(245,183,0,.07);font-size:.76rem;line-height:1.4}.generator-data-editor-preview b{color:#f5b700}
.generator-data-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.generator-data-editor-actions .btn{margin:0}
@media(max-width:700px){.generator-my-meals-list{max-height:140px}.generator-my-meal-card{align-items:flex-start}.generator-my-meal-tools .generator-builder-tool{font-size:.68rem}.generator-data-editor-overlay{align-items:flex-end;padding:8px}.generator-data-editor-modal{border-radius:18px;padding:13px}.generator-data-editor-actions .btn{flex:1}.generator-data-editor-grid{gap:7px}}

/* ============================================================
   V23 · EDITOR FOOD_DB – ČISTÉ TLAČÍTKO + BANÁNOVÉ OKOLÍ
   ============================================================ */
.generator-custom-overlay{
    background:
        linear-gradient(rgba(0,0,0,.70),rgba(0,0,0,.70)),
        url('img/gold-glass-wallpaper.png') center/cover no-repeat !important;
}
.generator-builder-modal{
    position:relative;
    isolation:isolate;
}
.generator-builder-modal::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    z-index:-1;
    border-radius:inherit;
    background:linear-gradient(rgba(245,183,0,.025),rgba(0,0,0,.025));
}

/* Žádný permanentní odlesk. Shine vzniká pouze během skutečného stisku. */
.generator-builder-tool,
.generator-editor-food-export,
.generator-editor-food-restore,
.generator-custom-action,
.generator-builder-actions .btn,
.generator-custom-footer .btn{
    position:relative;
    overflow:hidden;
    isolation:isolate;
    touch-action:manipulation;
}
.generator-builder-tool::after,
.generator-editor-food-export::after,
.generator-editor-food-restore::after,
.generator-custom-action::after,
.generator-builder-actions .btn::after,
.generator-custom-footer .btn::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    opacity:0;
    transform:translateX(-115%);
    background:linear-gradient(105deg,transparent 28%,rgba(255,255,255,.08) 40%,rgba(255,255,255,.72) 50%,rgba(255,217,102,.28) 56%,transparent 70%);
}
.generator-builder-tool:active::after,
.generator-editor-food-export:active::after,
.generator-editor-food-restore:active::after,
.generator-custom-action:active::after,
.generator-builder-actions .btn:active::after,
.generator-custom-footer .btn:active::after{
    animation:generatorEditorPressShine .42s ease-out both;
}
@keyframes generatorEditorPressShine{
    0%{opacity:0;transform:translateX(-115%)}
    20%{opacity:1}
    100%{opacity:0;transform:translateX(115%)}
}

/* Zavírací křížek: jasný, ale stále elegantní Banánový akcent. */
.generator-custom-close{
    border:1px solid rgba(245,183,0,.72) !important;
    color:#f5b700 !important;
    background:rgba(245,183,0,.07) !important;
    box-shadow:0 0 0 1px rgba(245,183,0,.06), inset 0 0 0 1px rgba(245,183,0,.04);
    touch-action:manipulation;
}
.generator-custom-close:active{
    background:rgba(245,183,0,.18) !important;
    transform:scale(.96);
}

/* Dočasný nástroj pro ruční výběr FOOD_DB. */
.generator-editor-food-controls{
    display:flex;
    gap:6px;
    padding:6px 8px 0;
}
.generator-editor-food-export,
.generator-editor-food-restore{
    border:1px solid rgba(245,183,0,.28);
    border-radius:9px;
    padding:6px 8px;
    background:rgba(245,183,0,.055);
    color:inherit;
    font-size:.68rem;
    cursor:pointer;
}
.generator-editor-food-export{color:#f5b700;font-weight:800;}
.generator-editor-food-restore{opacity:.7;}
.generator-builder-source{
    font-size:.52rem;
    font-weight:800;
    letter-spacing:.03em;
    color:#f5b700;
    border:1px solid rgba(245,183,0,.30);
    border-radius:5px;
    padding:2px 4px;
    white-space:nowrap;
}
.generator-builder-food-remove{
    border:1px solid rgba(245,183,0,.32);
    border-radius:7px;
    padding:5px 7px;
    background:rgba(245,183,0,.06);
    color:#f5b700;
    font-size:.64rem;
    font-weight:800;
    cursor:pointer;
    touch-action:manipulation;
}
.generator-builder-food-remove:active{
    background:rgba(245,183,0,.20);
    transform:scale(.97);
}
.generator-builder-pick{
    min-width:0;
    width:100%;
    padding:0;
    border:0;
    background:transparent;
    color:inherit;
    text-align:left;
    font:inherit;
    cursor:pointer;
    touch-action:manipulation;
}
.generator-builder-pick:active{color:#f5b700;}
.generator-builder-item.is-food-db{grid-template-columns:14px minmax(0,1fr) auto auto auto;}
.generator-builder-item.is-food-db .generator-builder-item-name{cursor:pointer;}
.generator-my-meal-tools .generator-builder-tool{
    min-height:34px;
    touch-action:manipulation;
}

@media(max-width:700px){
    .generator-custom-overlay{
        align-items:flex-start !important;
        padding:calc(env(safe-area-inset-top, 0px) + 12px) 6px 8px !important;
        overflow:hidden !important;
    }
    .generator-builder-modal{
        height:calc(100vh - env(safe-area-inset-top, 0px) - 20px) !important;
        max-height:calc(100vh - env(safe-area-inset-top, 0px) - 20px) !important;
        overflow-y:auto !important;
    }
    .generator-editor-food-controls{padding-top:5px;}
    .generator-editor-food-export,
    .generator-editor-food-restore{min-height:34px;}
    .generator-builder-food-remove{min-height:32px;padding:5px 6px;}
}

/* ============================================================
   WIZARD · V23 KLIDNĚJŠÍ POLOHA + LEPŠÍ POSLEDNÍ KARTA
   ============================================================ */
@media(max-width:600px){
    #wizard.wizard-overlay{
        align-items:flex-start !important;
        padding-top:8vh !important;
        padding-bottom:12px !important;
    }
    #wizard.wizard-keyboard-open{
        padding-top:4vh !important;
    }
    #wizard #wizardStep7{
        justify-content:center !important;
        padding-top:4px !important;
        padding-bottom:0 !important;
    }
    #wizard #wizardStep7 .wizard-icon{margin-bottom:8px !important;}
    #wizard #wizardStep7 .wizard-illustration{width:82px !important;height:82px !important;}
    #wizard #wizardStep7 .wizard-final-text{
        margin:2px 0 8px !important;
    }
    #wizard #wizardStep7 .wizard-final-text p{
        font-size:1.05rem !important;
        line-height:1.32 !important;
        margin:0 0 6px !important;
    }
    #wizard #wizardStep7 .wizard-summary{
        font-size:.88rem !important;
        line-height:1.45 !important;
        margin:6px 0 10px !important;
        padding:9px !important;
    }
}


/* V25: pouze sbalení formuláře pro vlastní ingredienci. Ostatní editor zůstává ve stejném vzhledu. */
.generator-builder-add-own{
    width:100%;
    min-height:40px;
    margin:0 0 9px;
    padding:8px 12px;
    border:1px solid rgba(245,183,0,.32);
    border-radius:11px;
    background:rgba(245,183,0,.055);
    color:#f5b700;
    font-weight:800;
    font-size:.82rem;
    cursor:pointer;
    touch-action:manipulation;
}
.generator-builder-add-own:active{background:rgba(245,183,0,.15);transform:scale(.99);}
.generator-builder-create[hidden]{display:none!important;}

/* ===== V26: mobilní editor jídel + správa databáze ===== */
.generator-custom-overlay{
    position:fixed!important;
    inset:0!important;
    z-index:10070!important;
    padding:calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom))!important;
    box-sizing:border-box!important;
    overflow:auto!important;
}
.generator-builder-modal{
    background:var(--card-dark)!important;
    color:var(--text-light)!important;
}
body.light .generator-builder-modal{
    background:var(--card-light)!important;
    color:var(--text-dark)!important;
}
.generator-builder-editor{
    display:flex!important;
    flex-direction:column!important;
    min-height:0!important;
}
.generator-builder-editor #generatorBuilderRecipe{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    padding-bottom:env(safe-area-inset-bottom)!important;
}
.generator-builder-actions{
    position:sticky!important;
    bottom:0!important;
    z-index:4!important;
    background:inherit!important;
    padding-bottom:calc(8px + env(safe-area-inset-bottom))!important;
}
.generator-builder-actions .btn{min-height:42px!important;}

.food-db-editor-overlay{
    position:fixed;inset:0;z-index:10100;display:flex;align-items:center;justify-content:center;
    padding:calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
    box-sizing:border-box;background:rgba(0,0,0,.62);overflow:auto;
}
.food-db-editor-modal{
    width:min(980px,100%);max-height:calc(100dvh - 24px);display:flex;flex-direction:column;
    background:var(--card-dark);color:var(--text-light);border:1px solid rgba(255,255,255,.10);
    border-radius:20px;box-shadow:0 18px 60px rgba(0,0,0,.45);overflow:hidden;
}
body.light .food-db-editor-modal{background:var(--card-light);color:var(--text-dark);border-color:rgba(0,0,0,.08);}
.food-db-editor-head{display:flex;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.08);}
body.light .food-db-editor-head{border-bottom-color:rgba(0,0,0,.08);}
.food-db-editor-head b{display:block;color:var(--gold);font-size:1.05rem;}
.food-db-editor-head small{display:block;opacity:.6;margin-top:4px;line-height:1.35;}
.food-db-editor-close{border:0;background:transparent;color:inherit;font-size:1.2rem;cursor:pointer;}
.food-db-editor-toolbar{display:flex;gap:8px;align-items:center;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.08);}
body.light .food-db-editor-toolbar{border-bottom-color:rgba(0,0,0,.08);}
.food-db-editor-toolbar input{flex:1;min-width:0;}
.food-db-editor-toolbar span{font-size:.75rem;opacity:.55;white-space:nowrap;}
.food-db-editor-list{overflow:auto;min-height:0;flex:1;padding:6px;}
.food-db-row{display:grid;grid-template-columns:minmax(170px,1fr) auto auto auto;gap:8px;align-items:center;padding:9px 10px;border-bottom:1px solid rgba(255,255,255,.06);}
body.light .food-db-row{border-bottom-color:rgba(0,0,0,.06);}
.food-db-main b{display:block;font-size:.82rem;}
.food-db-main small{display:block;opacity:.5;font-size:.67rem;margin-top:2px;}
.food-db-values{font-size:.72rem;opacity:.7;white-space:nowrap;}
.food-db-edit,.food-db-delete{border:0;background:transparent;color:inherit;cursor:pointer;padding:7px 8px;border-radius:8px;}
.food-db-edit:hover{color:var(--gold);background:rgba(245,183,0,.08);}
.food-db-delete{color:#ff7777;}
.food-db-delete:hover{background:rgba(255,80,80,.08);}
.food-db-protected{font-size:.7rem;opacity:.5;white-space:nowrap;}
.food-db-empty{text-align:center;padding:25px;opacity:.5;}
.food-db-editor-footer{padding:9px 12px calc(9px + env(safe-area-inset-bottom));border-top:1px solid rgba(255,255,255,.08);display:flex;justify-content:flex-end;}
body.light .food-db-editor-footer{border-top-color:rgba(0,0,0,.08);}
.generator-builder-db-manage{display:block;width:100%;margin:0 0 8px;padding:9px 12px;border:1px solid rgba(245,183,0,.28);border-radius:10px;background:rgba(245,183,0,.06);color:inherit;font-weight:700;cursor:pointer;}
.generator-builder-db-manage:hover{background:rgba(245,183,0,.12);}
@media(max-width:700px){
 .generator-builder-modal{height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px)!important;max-height:none!important;}
 .generator-builder-editor{height:34vh!important;min-height:240px!important;}
 .food-db-editor-overlay{align-items:flex-start;}
 .food-db-editor-modal{width:100%;max-height:calc(100dvh - 20px);border-radius:16px;}
 .food-db-row{grid-template-columns:minmax(0,1fr) auto auto;gap:5px;}
 .food-db-values{grid-column:1/-1;white-space:normal;}
 .food-db-protected{font-size:.65rem;}
}

/* ============================================================
   V36 · JEDNOTNÝ VZHLED RECEPTŮ + ZPĚTNÁ VAZBA + ML/G
   ============================================================ */

/* Editor vlastního receptu používá stejné karty jako zbytek Banánu.
   Žádná bílá textarea z jiného vesmíru. */
.custom-meal-recipe-modal{
    background:var(--card-dark) !important;
    color:var(--text-light) !important;
    border-color:var(--border-color) !important;
    overflow:hidden;
}
body.light .custom-meal-recipe-modal{
    background:var(--card-light) !important;
    color:var(--text-dark) !important;
    border-color:var(--border-color) !important;
}
.custom-meal-recipe-form{
    display:grid;
    gap:10px;
    padding:14px 16px;
    max-height:min(62vh,520px);
    overflow-y:auto;
}
.custom-meal-recipe-step{
    display:grid;
    gap:5px;
    font-weight:700;
    color:var(--text-light);
}
body.light .custom-meal-recipe-step{color:var(--text-dark);}
.custom-meal-recipe-step span{
    color:var(--gold);
    font-size:.82rem;
}
.custom-meal-recipe-step textarea{
    width:100%;
    min-height:72px;
    box-sizing:border-box;
    resize:vertical;
    border:1px solid var(--border-color) !important;
    border-radius:10px !important;
    background:var(--bg-card) !important;
    color:var(--text-light) !important;
    padding:10px 11px !important;
    font:inherit;
    line-height:1.4;
    outline:none;
}
body.light .custom-meal-recipe-step textarea{
    color:var(--text-dark) !important;
    background:var(--bg-card) !important;
}
.custom-meal-recipe-step textarea:focus{
    border-color:rgba(245,183,0,.65) !important;
    box-shadow:0 0 0 2px rgba(245,183,0,.10);
}
.custom-meal-recipe-footer{background:var(--card-dark);}
body.light .custom-meal-recipe-footer{background:var(--card-light);}

/* Editace vlastního receptu patří vedle fullscreen, ne do hlavičky seznamu. */
.recipe-detail-actions{
    position:relative !important;
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:7px;
    margin-top:8px;
}
.recipe-edit-btn,
.recipe-fullscreen-btn{
    width:34px !important;
    height:34px !important;
    padding:0 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:1px solid var(--gold) !important;
    border-radius:8px !important;
    background:transparent !important;
    color:var(--gold) !important;
    cursor:pointer;
}
.recipe-edit-btn{font-size:1rem; position:static !important;}
.recipe-detail-actions .recipe-edit-btn,
.recipe-detail-actions .recipe-fullscreen-btn{flex:0 0 34px !important; margin:0 !important;}
.recipe-edit-btn:active,
.recipe-fullscreen-btn:active{transform:scale(.96);}

/* Přidání ingredience musí být na telefonu okamžitě vidět. */
.generator-builder-row.generator-builder-added-flash{
    animation:generatorIngredientAdded .7s ease-out;
}
@keyframes generatorIngredientAdded{
    0%{background:rgba(245,183,0,.42);box-shadow:inset 3px 0 var(--gold);transform:translateX(0);}
    45%{background:rgba(245,183,0,.20);box-shadow:inset 3px 0 var(--gold);transform:translateX(2px);}
    100%{background:transparent;box-shadow:none;transform:translateX(0);}
}

/* V39: karta Přidat jídlo - množství a jednotka zůstávají na jednom řádku.
   Číselná hodnota dostává většinu prostoru, jednotka jen nezbytné minimum. */
.food-entry-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 1.25fr) !important;
    gap: 10px !important;
    align-items: end !important;
    flex-wrap: nowrap !important;
}
.food-name-group,
.food-amount-group {
    min-width: 0 !important;
    width: auto !important;
}
.food-amount-controls {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 6px !important;
}
.food-amount-controls #foodGrams {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
    box-sizing: border-box !important;
    font-size: 1rem !important;
    text-align: left !important;
}
.food-amount-controls #foodUnit {
    flex: 0 0 62px !important;
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    height: 42px !important;
    box-sizing: border-box !important;
    padding: 0 5px !important;
    text-align: center !important;
    font-weight: 700 !important;
}
@media (max-width: 440px) {
    .food-entry-row {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) !important;
        gap: 8px !important;
    }
    .food-amount-controls #foodUnit {
        flex-basis: 62px !important;
        width: 62px !important;
        min-width: 62px !important;
        max-width: 62px !important;
    }
}
@media (max-width: 340px) {
    .food-entry-row {
        grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.42fr) !important;
    }
}

/* ============================================================
   V40 – Přidat jídlo: maximum prostoru pro číslo, minimum pro g/ml
   ============================================================ */
.food-entry-row {
    display: grid !important;
    grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr) !important;
    gap: 8px !important;
    align-items: end !important;
}
.food-name-group,
.food-amount-group {
    min-width: 0 !important;
    width: 100% !important;
}
.food-amount-controls {
    display: flex !important;
    align-items: stretch !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
}
.food-amount-controls #foodGrams {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    text-align: left !important;
    font-size: 1rem !important;
}
.food-amount-controls #foodUnit {
    flex: 0 0 52px !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 42px !important;
    padding: 0 3px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    font-weight: 700 !important;
}
@media (max-width: 380px) {
    .food-entry-row { grid-template-columns: minmax(0, 0.30fr) minmax(0, 0.70fr) !important; }
    .food-amount-controls { gap: 4px !important; }
    .food-amount-controls #foodUnit {
        flex-basis: 50px !important;
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
    }
}

/* ============================================================
   V40 – velmi lehký indikátor práce
   ============================================================ */
.banan-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
    background: rgba(0,0,0,.28);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .16s ease;
}
.banan-busy-overlay.is-visible { opacity: 1; }
.banan-busy-card {
    min-width: 290px;
    max-width: min(400px, 88vw);
    padding: 34px 30px 30px;
    border-radius: 30px;
    background: var(--card-dark);
    border: 1px solid rgba(245,183,0,.28);
    box-shadow: 0 12px 34px rgba(0,0,0,.28);
    text-align: center;
}
body.light .banan-busy-card {
    background: var(--card-light);
    border-color: rgba(0,0,0,.08);
}
.banan-busy-icon {
    display: block;
    width: 104px;
    height: 104px;
    object-fit: contain;
    margin: 0 auto 18px;
    animation: bananBusyFloat .85s ease-in-out infinite alternate;
    transform-origin: 50% 70%;
    will-change: transform;
}
.banan-busy-message { font-size: 1rem; font-weight: 700; opacity: .82; }
@keyframes bananBusyFloat {
    from { transform: translateY(2px) rotate(-7deg); }
    to   { transform: translateY(-4px) rotate(7deg); }
}
@media (prefers-reduced-motion: reduce) {
    .banan-busy-icon { animation: none; }
}

@media (max-width: 380px) {
    .banan-busy-card { min-width: 0; width: 82vw; padding: 30px 22px 26px; }
    .banan-busy-icon { width: 92px; height: 92px; }
}

/* V44 – sjednocení nabídek, bezpečná navigace a skutečně editovatelná FOOD_DB */
.generator-builder-tool{
    min-width:32px!important;min-height:32px!important;padding:5px 7px!important;
    border:1px solid rgba(255,255,255,.08)!important;border-radius:8px!important;
    background:rgba(255,255,255,.025)!important;color:inherit!important;
    touch-action:manipulation!important;cursor:pointer!important;
}
.generator-builder-tool:hover,.generator-builder-tool:active{background:rgba(245,183,0,.10)!important;color:var(--gold)!important;}
.generator-builder-tool.danger{color:#ff7777!important;}
.generator-builder-db-lock{font-size:.75rem;opacity:.5;min-width:28px;text-align:center;}
.generator-builder-item.is-food-db{grid-template-columns:18px minmax(0,1fr) auto auto auto!important;}

/* Výměna jídla: stejná karta jako ostatní modály aplikace, s bezpečným spodním prostorem. */
.generator-meal-swap-overlay{background:rgba(0,0,0,.58)!important;padding:calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom))!important;}
.generator-meal-swap-modal{
    background:var(--card-dark)!important;color:var(--text-light)!important;
    border:1px solid rgba(245,183,0,.18)!important;border-radius:20px!important;
    box-shadow:0 18px 60px rgba(0,0,0,.42)!important;
    display:flex!important;flex-direction:column!important;
}
body.light .generator-meal-swap-modal{background:var(--card-light)!important;color:var(--text-dark)!important;border-color:rgba(0,0,0,.08)!important;}
.generator-meal-swap-modal .generator-day-swap-head{padding-bottom:10px;border-bottom:1px solid rgba(255,255,255,.07);}
body.light .generator-meal-swap-modal .generator-day-swap-head{border-bottom-color:rgba(0,0,0,.07);}
.generator-meal-swap-modal .generator-day-swap-note{padding:10px 11px;border-radius:12px;background:rgba(245,183,0,.045);border:1px solid rgba(245,183,0,.10);}
.generator-meal-swap-grid{overflow:auto;min-height:0;padding:2px 2px 4px;}
.generator-meal-swap-card span{background:var(--card-dark)!important;border-color:rgba(255,255,255,.08)!important;transition:background .18s,border-color .18s,transform .12s;}
body.light .generator-meal-swap-card span{background:var(--card-light)!important;border-color:rgba(0,0,0,.08)!important;}
.generator-meal-swap-card input:checked+span{background:rgba(245,183,0,.09)!important;border-color:rgba(245,183,0,.65)!important;}
.generator-meal-swap-card span:active{transform:scale(.99);}
.generator-meal-swap-confirm{flex:0 0 auto!important;margin-top:10px!important;margin-bottom:calc(2px + env(safe-area-inset-bottom))!important;position:relative!important;z-index:2!important;}
@media(max-width:700px){
  .generator-meal-swap-overlay{align-items:flex-end!important;padding:calc(6px + env(safe-area-inset-top)) 6px calc(6px + env(safe-area-inset-bottom))!important;}
  .generator-meal-swap-modal{width:100%!important;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px)!important;padding:13px!important;border-radius:18px!important;}
  .generator-meal-swap-confirm{min-height:44px!important;margin-bottom:env(safe-area-inset-bottom)!important;}
  .generator-builder-item.is-food-db{grid-template-columns:15px minmax(0,1fr) 32px 32px auto!important;gap:4px!important;}
  .generator-builder-tool{min-width:32px!important;width:32px!important;height:32px!important;padding:4px!important;}
}

/* Wizard: vlastní nabídka místo systémového bílého/šedého select popupu. */
.wizard-choice-overlay{position:fixed;inset:0;z-index:110000;background:rgba(0,0,0,.58);display:flex;align-items:center;justify-content:center;padding:18px;box-sizing:border-box;}
.wizard-choice-modal{width:min(470px,100%);max-height:min(78vh,620px);overflow:auto;background:var(--card-dark);color:var(--text-light);border:1px solid rgba(245,183,0,.18);border-radius:20px;box-shadow:0 20px 70px rgba(0,0,0,.48);padding:12px;box-sizing:border-box;}
body.light .wizard-choice-modal{background:var(--card-light);color:var(--text-dark);border-color:rgba(0,0,0,.08);}
.wizard-choice-head{display:flex;align-items:center;justify-content:space-between;padding:5px 5px 11px;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:8px;}
body.light .wizard-choice-head{border-bottom-color:rgba(0,0,0,.08);}
.wizard-choice-head b{font-size:1.05rem;color:var(--gold);}
.wizard-choice-close{border:0;background:transparent;color:inherit;font-size:1.2rem;padding:7px;cursor:pointer;}
.wizard-choice-list{display:grid;gap:6px;}
.wizard-choice-option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px 13px;background:rgba(255,255,255,.025);color:inherit;font:inherit;cursor:pointer;touch-action:manipulation;}
body.light .wizard-choice-option{border-color:rgba(0,0,0,.08);background:rgba(0,0,0,.018);}
.wizard-choice-option:hover,.wizard-choice-option.selected{border-color:rgba(245,183,0,.58);background:rgba(245,183,0,.09);}
.wizard-choice-option:active{transform:scale(.99);}
#wizard #wizardStep4 .wizard-select,#wizard #wizardStep5 .wizard-select{cursor:pointer;}

/* Poslední wizardová karta: ilustrace výš, text má vzduch, tlačítko níž. */
#wizard #wizardStep7{justify-content:flex-start!important;}
#wizard #wizardStep7 .wizard-icon{margin-top:2px!important;margin-bottom:20px!important;}
#wizard #wizardStep7 .wizard-illustration{width:104px!important;height:104px!important;}
#wizard #wizardStep7 .wizard-final-text{margin:0 0 18px!important;max-width:440px;}
#wizard #wizardStep7 .wizard-final-text p{line-height:1.45!important;margin:0 0 9px!important;}
#wizard #wizardStep7 .wizard-summary{margin:0 0 24px!important;}
#wizard #wizardStep7 .wizard-buttons{margin-top:auto!important;padding-top:12px!important;width:100%;}
@media(max-width:600px){
  .wizard-choice-overlay{padding:10px;}
  .wizard-choice-modal{max-height:82vh;border-radius:18px;padding:10px;}
  #wizard #wizardStep7{justify-content:flex-start!important;padding-top:0!important;}
  #wizard #wizardStep7 .wizard-icon{margin-bottom:22px!important;}
  #wizard #wizardStep7 .wizard-illustration{width:96px!important;height:96px!important;}
  #wizard #wizardStep7 .wizard-final-text{margin-bottom:18px!important;}
  #wizard #wizardStep7 .wizard-final-text p{font-size:1.02rem!important;line-height:1.48!important;margin-bottom:10px!important;}
  #wizard #wizardStep7 .wizard-summary{margin-bottom:18px!important;}
}

/* Databázový editor z otevřeného editoru jídel má stejný dotykový rozměr na PC i telefonu. */
.food-db-inline-editor{max-width:560px!important;}
.food-db-inline-editor .generator-data-editor-grid input{width:100%;box-sizing:border-box;}

/* V45: Wizard selecty jsou plně vlastní modály, ne nativní Android/WebView popupy. */
#wizard .wizard-custom-select-wrap{
    position:relative;
    cursor:pointer;
    touch-action:manipulation;
}
#wizard .wizard-custom-select-wrap .wizard-select{
    pointer-events:none !important;
    cursor:pointer !important;
}

/* V45: poslední dvě karty musí mít celé tlačítko uvnitř karty i na nízkém telefonu. */
@media(max-width:600px){
    #wizard #wizardStep6,
    #wizard #wizardStep7{
        justify-content:flex-start !important;
        padding-bottom:4px !important;
    }
    #wizard #wizardStep6 .wizard-buttons,
    #wizard #wizardStep7 .wizard-buttons{
        position:relative !important;
        bottom:auto !important;
        margin-top:14px !important;
        padding-top:8px !important;
        padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        background:transparent !important;
        flex-shrink:0 !important;
    }
    #wizard #wizardStep7 .wizard-icon{margin-top:0 !important;margin-bottom:12px !important;}
    #wizard #wizardStep7 .wizard-final-text{margin-bottom:12px !important;}
    #wizard #wizardStep7 .wizard-summary{margin-bottom:8px !important;}
}

/* V45: výměna jídla používá přesně stejnou kartu jako zbytek Banánu a respektuje Android safe-area. */
.generator-meal-swap-overlay{
    align-items:center !important;
    padding:calc(14px + env(safe-area-inset-top,0px)) 14px calc(18px + env(safe-area-inset-bottom,0px)) !important;
    background:rgba(0,0,0,.58) !important;
}
.generator-meal-swap-modal{
    background:var(--card-dark) !important;
    color:var(--text-light) !important;
    border:1px solid rgba(245,183,0,.18) !important;
    border-radius:20px !important;
    box-shadow:0 20px 70px rgba(0,0,0,.48) !important;
    max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 28px) !important;
}
body.light .generator-meal-swap-modal{
    background:var(--card-light) !important;
    color:var(--text-dark) !important;
    border-color:rgba(0,0,0,.08) !important;
}
.generator-meal-swap-confirm{
    margin-bottom:calc(8px + env(safe-area-inset-bottom,0px)) !important;
}
@media(max-width:700px){
    .generator-meal-swap-overlay{align-items:center !important;padding:calc(10px + env(safe-area-inset-top,0px)) 8px calc(16px + env(safe-area-inset-bottom,0px)) !important;}
    .generator-meal-swap-modal{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 20px) !important;width:100% !important;}
}

/* V45: plnohodnotný editor ingredience ve Správě databáze. Žádné systémové prompt() dialogy. */
.food-db-item-editor-overlay{
    position:fixed;inset:0;z-index:2147482410;display:flex;align-items:center;justify-content:center;
    padding:18px;box-sizing:border-box;background:rgba(0,0,0,.58);
}
.food-db-item-editor-modal{
    width:min(560px,100%);max-height:min(90dvh,760px);overflow:auto;box-sizing:border-box;
    background:var(--card-dark);color:var(--text-light);border:1px solid rgba(245,183,0,.18);
    border-radius:20px;box-shadow:0 20px 70px rgba(0,0,0,.48);padding:16px;
}
body.light .food-db-item-editor-modal{background:var(--card-light);color:var(--text-dark);border-color:rgba(0,0,0,.08);}
.food-db-item-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.08);}
body.light .food-db-item-editor-head{border-bottom-color:rgba(0,0,0,.08);}
.food-db-item-editor-head b{display:block;color:var(--gold);font-size:1.05rem;}
.food-db-item-editor-head small{display:block;opacity:.6;margin-top:4px;}
.food-db-item-editor-head button{border:0;background:transparent;color:inherit;font-size:1.2rem;padding:7px;cursor:pointer;}
.food-db-item-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px;}
.food-db-item-editor-grid label{display:flex;flex-direction:column;gap:6px;font-size:.8rem;opacity:.9;}
.food-db-item-editor-grid label:first-child{grid-column:1/-1;}
.food-db-item-editor-grid input{width:100%;box-sizing:border-box;min-height:42px;padding:9px 11px;border-radius:11px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.035);color:inherit;font:inherit;outline:none;}
body.light .food-db-item-editor-grid input{border-color:rgba(0,0,0,.1);background:rgba(0,0,0,.025);}
.food-db-item-editor-grid input:focus{border-color:rgba(245,183,0,.65);box-shadow:0 0 0 2px rgba(245,183,0,.08);}
.food-db-item-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-bottom:env(safe-area-inset-bottom,0px);}
@media(max-width:600px){
    .food-db-item-editor-overlay{align-items:flex-start;padding:calc(12px + env(safe-area-inset-top,0px)) 8px calc(12px + env(safe-area-inset-bottom,0px));}
    .food-db-item-editor-modal{width:100%;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);border-radius:18px;padding:13px;}
    .food-db-item-editor-grid{grid-template-columns:1fr;gap:9px;}
    .food-db-item-editor-grid label:first-child{grid-column:auto;}
    .food-db-item-editor-actions{position:sticky;bottom:0;background:linear-gradient(to bottom,transparent 0%,var(--card-dark) 18%);padding-top:10px;}
    body.light .food-db-item-editor-actions{background:linear-gradient(to bottom,transparent 0%,var(--card-light) 18%);}
    .food-db-item-editor-actions .btn{flex:1;min-height:44px;}
}

/* ============================================================
   V46 · WIZARD SELECTY + POSLEDNÍ KARTA
   ============================================================ */
#wizard .wizard-custom-select-wrap{
    position:relative !important;
    width:100% !important;
    cursor:pointer !important;
    touch-action:manipulation !important;
}
#wizard .wizard-custom-select-wrap .wizard-custom-trigger{
    display:flex !important;
    width:100% !important;
    min-height:56px !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    box-sizing:border-box !important;
    padding:14px 16px !important;
    border-radius:16px !important;
    border:2px solid rgba(255,215,0,.20) !important;
    background:rgba(255,255,255,.04) !important;
    color:#fff !important;
    font:700 1.05rem 'Montserrat',sans-serif !important;
    text-align:left !important;
    cursor:pointer !important;
    appearance:none !important;
    -webkit-appearance:none !important;
    outline:none !important;
    box-shadow:none !important;
}
#wizard .wizard-custom-select-wrap .wizard-custom-trigger::after{
    content:"" !important;
    flex:0 0 9px !important;
    width:9px !important;
    height:9px !important;
    border-right:2px solid var(--primary) !important;
    border-bottom:2px solid var(--primary) !important;
    transform:rotate(45deg) translateY(-2px) !important;
}
#wizard .wizard-custom-select-wrap .wizard-custom-trigger.placeholder{opacity:.62 !important;}
#wizard .wizard-custom-select-wrap .wizard-custom-trigger:active,
#wizard .wizard-custom-select-wrap .wizard-custom-trigger:focus{
    border-color:var(--primary) !important;
    box-shadow:0 0 0 4px rgba(245,183,0,.10) !important;
}
body.light #wizard .wizard-custom-select-wrap .wizard-custom-trigger{
    background:rgba(0,0,0,.018) !important;
    border-color:rgba(0,0,0,.10) !important;
    color:var(--text-dark) !important;
}
body.light #wizard .wizard-custom-select-wrap .wizard-custom-trigger:focus{border-color:var(--primary) !important;}

#wizard .wizard-choice-overlay{
    z-index:120000 !important;
    padding:18px !important;
    background:rgba(0,0,0,.62) !important;
    backdrop-filter:blur(4px) !important;
    -webkit-backdrop-filter:blur(4px) !important;
}
#wizard .wizard-choice-modal{
    width:min(430px,100%) !important;
    max-height:min(72dvh,560px) !important;
    overflow:hidden !important;
    padding:16px !important;
    background:var(--card-dark) !important;
    color:var(--text-light) !important;
    border:1px solid rgba(245,183,0,.22) !important;
    border-radius:22px !important;
    box-shadow:0 24px 80px rgba(0,0,0,.55) !important;
}
body.light #wizard .wizard-choice-modal{
    background:var(--card-light) !important;
    color:var(--text-dark) !important;
    border-color:rgba(0,0,0,.09) !important;
}
#wizard .wizard-choice-head{padding:4px 4px 13px !important;margin-bottom:10px !important;}
#wizard .wizard-choice-head b{font-size:1.12rem !important;}
#wizard .wizard-choice-list{overflow:auto !important;max-height:calc(min(72dvh,560px) - 78px) !important;padding:2px !important;}
#wizard .wizard-choice-option{
    min-height:52px !important;
    padding:13px 14px !important;
    border-radius:14px !important;
    background:rgba(255,255,255,.035) !important;
    border:1px solid rgba(255,255,255,.08) !important;
}
body.light #wizard .wizard-choice-option{background:rgba(0,0,0,.018) !important;border-color:rgba(0,0,0,.08) !important;}
#wizard .wizard-choice-option.selected{background:rgba(245,183,0,.10) !important;border-color:rgba(245,183,0,.62) !important;color:var(--primary) !important;}
#wizard .wizard-choice-check{font-weight:900 !important;color:var(--primary) !important;}

/* The final cards stay fully inside the wizard viewport. */
#wizard #wizardStep6 .wizard-buttons{
    width:100% !important;
    margin-top:auto !important;
    padding:10px 0 calc(4px + env(safe-area-inset-bottom,0px)) !important;
    flex-shrink:0 !important;
}
#wizard #wizardStep7{
    justify-content:flex-start !important;
    padding-bottom:0 !important;
}
#wizard #wizardStep7 .wizard-icon{margin-top:0 !important;margin-bottom:14px !important;flex-shrink:0 !important;}
#wizard #wizardStep7 .wizard-final-text{margin:0 0 12px !important;max-width:440px !important;}
#wizard #wizardStep7 .wizard-summary{margin:0 0 12px !important;flex-shrink:0 !important;}
#wizard #wizardStep7 > .btn{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    min-height:56px !important;
    height:56px !important;
    margin-top:auto !important;
    margin-bottom:calc(2px + env(safe-area-inset-bottom,0px)) !important;
    padding:0 18px !important;
    line-height:1 !important;
    text-align:center !important;
    flex-shrink:0 !important;
    box-sizing:border-box !important;
}
@media(max-width:600px){
    #wizard .wizard-choice-overlay{padding:10px !important;}
    #wizard .wizard-choice-modal{width:100% !important;max-height:76dvh !important;padding:12px !important;border-radius:20px !important;}
    #wizard .wizard-choice-list{max-height:calc(76dvh - 72px) !important;}
    #wizard #wizardStep6 .wizard-buttons{padding-bottom:4px !important;}
    #wizard #wizardStep7 .wizard-icon{margin-bottom:10px !important;}
    #wizard #wizardStep7 .wizard-illustration{width:76px !important;height:76px !important;}
    #wizard #wizardStep7 .wizard-final-text{margin-bottom:10px !important;}
    #wizard #wizardStep7 .wizard-final-text p{font-size:.98rem !important;line-height:1.38 !important;margin-bottom:7px !important;}
    #wizard #wizardStep7 .wizard-summary{margin-bottom:8px !important;padding:9px !important;}
    #wizard #wizardStep7 > .btn{min-height:54px !important;height:54px !important;margin-bottom:2px !important;}
}


/* ============================================================
   V47 · WIZARD CHOICE = SAME CUSTOM SELECT AS THE APP
   ============================================================ */
#wizard .wizard-custom-select-wrap{
    position:relative !important;
    width:100% !important;
    z-index:30 !important;
}
#wizard .wizard-custom-select-wrap .wizard-select.hidden-select{
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    opacity:0 !important;
}
#wizard .wizard-custom-select-wrap .wizard-custom-trigger{
    width:100% !important;
    min-height:52px !important;
    box-sizing:border-box !important;
    cursor:pointer !important;
    user-select:none !important;
    -webkit-tap-highlight-color:transparent !important;
}
#wizard .wizard-custom-select-wrap .wizard-custom-trigger.placeholder{opacity:.62 !important;}
#wizard .wizard-custom-select-wrap .wizard-custom-trigger.open{
    border-color:var(--primary) !important;
    box-shadow:0 0 0 4px rgba(245,183,0,.10) !important;
}
#wizard .wizard-custom-select-wrap .wizard-custom-options{
    top:calc(100% + 7px) !important;
    max-height:260px !important;
    overflow-y:auto !important;
    z-index:5000 !important;
}
#wizard .wizard-custom-select-wrap .wizard-custom-options.show{
    display:block !important;
}

/* The wizard steps themselves are flex columns, so the final button can
   genuinely sit at the bottom without being pushed outside the card. */
#wizard #wizardStep6,
#wizard #wizardStep7{
    display:none;
    flex-direction:column !important;
    align-items:stretch !important;
    box-sizing:border-box !important;
}
#wizard #wizardStep6.wizard-current,
#wizard #wizardStep7.wizard-current{
    display:flex !important;
}
#wizard #wizardStep6 .wizard-buttons,
#wizard #wizardStep7 .wizard-buttons{
    margin-top:auto !important;
    width:100% !important;
    flex:0 0 auto !important;
    padding:10px 0 calc(4px + env(safe-area-inset-bottom,0px)) !important;
    box-sizing:border-box !important;
}
#wizard #wizardStep7 > .btn{
    width:100% !important;
    min-height:60px !important;
    height:60px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    line-height:1.1 !important;
    margin:0 !important;
    padding:0 20px !important;
    box-sizing:border-box !important;
}
@media(max-width:600px){
    #wizard #wizardStep7 > .btn{min-height:58px !important;height:58px !important;}
}

/* ============================================================
   V48 - WIZARD USES THE EXACT SAME CUSTOM SELECT AS THE APP
   The native <select> is hidden by JS; only .custom-select-trigger
   and .custom-options are interactive, exactly like activity card.
   ============================================================ */
#wizard .wizard-select.hidden-select {
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    opacity:0 !important;
}
#wizard .wizard-select-wrap,
#wizard .form-group:has(.wizard-select) {
    position:relative !important;
    width:100% !important;
}
#wizard .wizard-select-wrap .custom-select-trigger,
#wizard .form-group .custom-select-trigger {
    width:100% !important;
    box-sizing:border-box !important;
    min-height:52px !important;
    padding:12px 16px !important;
    border-radius:var(--radius-sm) !important;
    font-size:1rem !important;
    font-family:inherit !important;
    font-weight:700 !important;
    background:rgba(255,255,255,.05) !important;
    border:1.5px solid rgba(255,255,255,.1) !important;
    color:inherit !important;
}
body.light #wizard .wizard-select-wrap .custom-select-trigger,
body.light #wizard .form-group .custom-select-trigger {
    background:#fff !important;
    border-color:#ccc !important;
    color:#000 !important;
}
#wizard .wizard-select-wrap .custom-options,
#wizard .form-group .custom-options {
    left:0 !important;
    right:0 !important;
    top:calc(100% + 6px) !important;
    z-index:2005 !important;
    max-height:250px !important;
    overflow-y:auto !important;
    border-radius:18px !important;
}
#wizard .wizard-select-wrap .custom-option,
#wizard .form-group .custom-option {
    padding:14px 16px !important;
    font-weight:600 !important;
}


/* ============================================================
   V49 · WIZARD VOLBY JSOU VIDITELNÉ ROVNOU V KARTĚ
   Žádné rozbalování. Pohlaví i aktivita používají stejný vzhled
   voleb jako ostatní Banánové karty, ale jsou vždy otevřené.
   ============================================================ */
#wizard #wizardStep4 .wizard-profile-stack{
    display:flex !important;
    flex-direction:column !important;
    gap:14px !important;
    width:100% !important;
    margin:0 !important;
}
#wizard #wizardStep4 .wizard-age-group{
    width:100% !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
}
#wizard #wizardStep4 .wizard-gender-group{
    width:100% !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
}
#wizard #wizardStep4 .wizard-gender-group > label{
    margin-bottom:7px !important;
}

/* initCustomSelects vytvoří stejný .select-wrapper jako jinde v aplikaci.
   U wizardu jen vypneme trigger a necháme jeho vlastní možnosti pořád viditelné. */
#wizard #wizardStep4 .wizard-gender-group .select-wrapper,
#wizard #wizardStep5 .wizard-activity-options.select-wrapper{
    width:100% !important;
    position:relative !important;
}
#wizard #wizardStep4 .wizard-gender-group .custom-select-trigger,
#wizard #wizardStep5 .wizard-activity-options .custom-select-trigger{
    display:none !important;
}
#wizard #wizardStep4 .wizard-gender-group .custom-options,
#wizard #wizardStep5 .wizard-activity-options .custom-options{
    display:grid !important;
    position:static !important;
    visibility:visible !important;
    opacity:1 !important;
    transform:none !important;
    width:100% !important;
    max-height:none !important;
    overflow:visible !important;
    box-sizing:border-box !important;
    gap:7px !important;
    padding:0 !important;
    margin:0 !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}
#wizard #wizardStep4 .wizard-gender-group .custom-options .custom-option:first-child{
    display:none !important;
}
#wizard #wizardStep4 .wizard-gender-group .custom-option,
#wizard #wizardStep5 .wizard-activity-options .custom-option{
    min-height:42px !important;
    width:100% !important;
    box-sizing:border-box !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    border:1px solid rgba(255,255,255,.08) !important;
    border-radius:12px !important;
    padding:8px 11px !important;
    background:rgba(255,255,255,.025) !important;
    color:inherit !important;
    font:inherit !important;
    cursor:pointer !important;
    transition:background .16s,border-color .16s,transform .12s !important;
}
body.light #wizard #wizardStep4 .wizard-gender-group .custom-option,
body.light #wizard #wizardStep5 .wizard-activity-options .custom-option{
    border-color:rgba(0,0,0,.08) !important;
    background:rgba(0,0,0,.018) !important;
}
#wizard #wizardStep4 .wizard-gender-group .custom-option:hover,
#wizard #wizardStep4 .wizard-gender-group .custom-option.selected,
#wizard #wizardStep5 .wizard-activity-options .custom-option:hover,
#wizard #wizardStep5 .wizard-activity-options .custom-option.selected{
    border-color:rgba(245,183,0,.58) !important;
    background:rgba(245,183,0,.09) !important;
}
#wizard #wizardStep4 .wizard-gender-group .custom-option:active,
#wizard #wizardStep5 .wizard-activity-options .custom-option:active{
    transform:scale(.99) !important;
}

/* Aktivita: kompaktní volby, aby se všech pět pohodlně vešlo. */
#wizard #wizardStep5 .wizard-activity-options{
    margin-top:0 !important;
    width:100% !important;
}
#wizard #wizardStep5 .wizard-activity-options .custom-options{
    gap:6px !important;
}
#wizard #wizardStep5 .wizard-activity-options .custom-option{
    min-height:37px !important;
    padding:6px 10px !important;
    font-size:.92rem !important;
}

/* Krok 4/5 má o něco méně prostoru nahoře, protože volby jsou součástí obsahu. */
#wizard #wizardStep4 .wizard-icon,
#wizard #wizardStep5 .wizard-icon{
    margin-bottom:12px !important;
}
#wizard #wizardStep4 h2,
#wizard #wizardStep5 h2{
    margin-bottom:14px !important;
}

/* Poslední karta: celé tlačítko musí být vidět, včetně spodní hrany. */
#wizard #wizardStep7{
    padding-bottom:14px !important;
}
#wizard #wizardStep7 .wizard-buttons{
    width:100% !important;
    margin-top:auto !important;
    padding:10px 0 calc(12px + env(safe-area-inset-bottom,0px)) !important;
    flex-shrink:0 !important;
    box-sizing:border-box !important;
}
#wizard #wizardStep7 .wizard-buttons .btn-wizard{
    width:100% !important;
    min-height:56px !important;
    height:56px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    line-height:1 !important;
    box-sizing:border-box !important;
    margin:0 !important;
}
@media(max-width:600px){
    #wizard #wizardStep7{
        bottom:96px !important;
        padding-bottom:8px !important;
    }
    #wizard #wizardStep7 .wizard-buttons{
        padding-bottom:calc(8px + env(safe-area-inset-bottom,0px)) !important;
    }
    #wizard #wizardStep7 .wizard-buttons .btn-wizard{
        min-height:54px !important;
        height:54px !important;
        font-size:1rem !important;
    }
}

/* V50: wizard volby jsou přímé karty, bez rozbalovacích nabídek */
#wizard .wizard-choice-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    width:100%;
    margin:12px 0 0;
}
#wizard .wizard-choice{
    width:100%;
    min-height:48px;
    padding:10px 14px;
    border:1px solid var(--border-color, rgba(128,128,128,.22));
    border-radius:14px;
    background:var(--card-bg, rgba(255,255,255,.05));
    color:var(--text-color, inherit);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    text-align:left;
    font:inherit;
    cursor:pointer;
    box-sizing:border-box;
    transition:transform .12s ease, border-color .12s ease, background .12s ease;
}
#wizard .wizard-choice span{font-weight:600; line-height:1.2;}
#wizard .wizard-choice small{opacity:.68; font-size:.86em; margin-left:auto; white-space:nowrap;}
#wizard .wizard-choice.selected{
    border-color:var(--accent-color, #f2c400);
    background:rgba(242,196,0,.12);
    box-shadow:0 0 0 1px rgba(242,196,0,.16) inset;
}
#wizard .wizard-choice:active{transform:scale(.985);}
#wizard .wizard-activity-choice-list{gap:8px; margin-top:8px;}
#wizard .wizard-activity-choice-list .wizard-choice{min-height:42px; padding:8px 12px;}
#wizard .wizard-activity-choice-list .wizard-choice small{font-size:.78em;}
body.light #wizard .wizard-choice{background:var(--card-light, #fff); color:var(--text-color, #222);}
#wizard .hidden-select{display:none !important;}

/* Poslední wizardové tlačítko musí být celé viditelné nad systémovou navigací. */
#wizard #wizardStep6 .wizard-buttons,
#wizard #wizardStep7 .wizard-buttons{
    position:relative;
    margin-top:18px;
    padding:0 0 calc(10px + env(safe-area-inset-bottom, 0px));
    flex-shrink:0;
}
#wizard #wizardStep6 .wizard-buttons .btn,
#wizard #wizardStep7 .wizard-buttons .btn{
    width:100%;
    min-height:56px;
    height:auto;
    padding:14px 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    line-height:1.15;
    box-sizing:border-box;
}
@media (max-height:700px){
  #wizard .wizard-choice-list{gap:7px; margin-top:8px;}
  #wizard .wizard-choice{min-height:43px; padding:8px 11px;}
  #wizard .wizard-activity-choice-list .wizard-choice{min-height:38px; padding:7px 10px;}
  #wizard #wizardStep6 .wizard-buttons .btn,
  #wizard #wizardStep7 .wizard-buttons .btn{min-height:52px; padding:12px 16px;}
}

/* The editor buttons must remain touchable in Android WebView. */
.food-db-editor-overlay,
.food-db-item-editor-overlay{
    touch-action:auto !important;
}
.food-db-row button,
#fdbeSave{
    position:relative !important;
    z-index:3 !important;
    pointer-events:auto !important;
    touch-action:manipulation !important;
    -webkit-tap-highlight-color:transparent !important;
}
@media(max-width:600px){
    .food-db-row{
        grid-template-columns:minmax(0,1fr) auto auto !important;
        min-height:48px !important;
        padding:9px 7px !important;
    }
    .food-db-edit,.food-db-delete{
        min-width:62px !important;
        min-height:40px !important;
        padding:9px 7px !important;
    }
    .food-db-item-editor-modal{width:calc(100vw - 16px) !important;}
}


/* ============================================================
   WIZARD FINAL CLEAN LAYOUT - V56
   Jediný zdroj rozměrů pro karty 5, 6 a 7.
   Obsah se vejde do dostupné plochy bez scrollování.
   ============================================================ */

/* Karty 5-7 mají jednu pevnou vnitřní plochu. */
#wizard #wizardStep5,
#wizard #wizardStep6,
#wizard #wizardStep7{
    position:absolute !important;
    inset:22px 18px 88px 18px !important;
    width:auto !important;
    height:auto !important;
    margin:0 !important;
    padding:0 2px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
}

#wizard #wizardStep5[style*="display: block"],
#wizard #wizardStep6[style*="display: block"],
#wizard #wizardStep7[style*="display: block"],
#wizard #wizardStep5.wizard-current,
#wizard #wizardStep6.wizard-current,
#wizard #wizardStep7.wizard-current{
    display:flex !important;
}

/* ---------- KARTA 5 ---------- */
#wizard #wizardStep5 .wizard-icon{
    flex:0 0 64px !important;
    height:64px !important;
    margin:0 0 8px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}
#wizard #wizardStep5 .wizard-illustration{
    width:64px !important;
    height:64px !important;
    object-fit:contain !important;
}
#wizard #wizardStep5 h2{
    flex:0 0 auto !important;
    margin:0 0 10px !important;
    font-size:1.14rem !important;
    line-height:1.15 !important;
}
#wizard #wizardStep5 .wizard-activity-choice-list{
    flex:0 0 auto !important;
    display:flex !important;
    flex-direction:column !important;
    gap:5px !important;
    width:100% !important;
    margin:0 !important;
}
#wizard #wizardStep5 .wizard-activity-choice-list .wizard-choice{
    flex:0 0 39px !important;
    width:100% !important;
    height:39px !important;
    min-height:39px !important;
    padding:4px 10px !important;
    border-radius:10px !important;
    box-sizing:border-box !important;
    font-size:.87rem !important;
    line-height:1.05 !important;
}
#wizard #wizardStep5 .wizard-activity-choice-list .wizard-choice small{
    font-size:.72rem !important;
    line-height:1 !important;
}
#wizard #wizardStep5 .wizard-buttons{
    flex:0 0 46px !important;
    width:100% !important;
    margin:10px 0 0 !important;
    padding:0 !important;
    position:static !important;
}
#wizard #wizardStep5 .wizard-buttons .btn{
    width:100% !important;
    height:46px !important;
    min-height:46px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
}

/* ---------- KARTA 6 ---------- */
#wizard #wizardStep6 .wizard-icon{
    flex:0 0 70px !important;
    height:70px !important;
    margin:0 0 8px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}
#wizard #wizardStep6 .wizard-illustration{
    width:70px !important;
    height:70px !important;
    object-fit:contain !important;
}
#wizard #wizardStep6 h2{
    flex:0 0 auto !important;
    margin:0 0 12px !important;
    font-size:1.18rem !important;
    line-height:1.15 !important;
}
#wizard #wizardStep6 .wizard-goals{
    flex:1 1 auto !important;
    min-height:0 !important;
    width:100% !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
    gap:8px !important;
    margin:0 0 12px !important;
}
#wizard #wizardStep6 .wizard-goal{
    flex:0 0 62px !important;
    width:100% !important;
    height:62px !important;
    min-height:62px !important;
    padding:8px 14px !important;
    border-radius:12px !important;
    box-sizing:border-box !important;
    display:flex !important;
    align-items:center !important;
}
#wizard #wizardStep6 .wizard-goal .goal-icon{font-size:1.3rem !important;}
#wizard #wizardStep6 .wizard-goal .goal-name{font-size:.98rem !important;}
#wizard #wizardStep6 .wizard-buttons{
    flex:0 0 48px !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    position:static !important;
}
#wizard #wizardStep6 .wizard-buttons .btn{
    width:100% !important;
    height:48px !important;
    min-height:48px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
}

/* ---------- KARTA 7 ---------- */
#wizard #wizardStep7 .wizard-icon{
    flex:0 0 70px !important;
    height:70px !important;
    margin:0 0 12px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}
#wizard #wizardStep7 .wizard-illustration{
    width:70px !important;
    height:70px !important;
    object-fit:contain !important;
}
#wizard #wizardStep7 .wizard-final-text{
    flex:0 0 auto !important;
    width:100% !important;
    margin:0 0 18px !important;
    text-align:center !important;
}
#wizard #wizardStep7 .wizard-final-text p{
    margin:0 0 7px !important;
    font-size:.98rem !important;
    line-height:1.38 !important;
}
#wizard #wizardStep7 .wizard-summary{
    flex:0 0 auto !important;
    width:100% !important;
    margin:0 0 18px !important;
    padding:11px 12px !important;
    box-sizing:border-box !important;
    font-size:.86rem !important;
    line-height:1.45 !important;
}
#wizard #wizardStep7 > .btn{
    flex:0 0 50px !important;
    width:100% !important;
    height:50px !important;
    min-height:50px !important;
    margin:0 !important;
    padding:8px 14px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    line-height:1.1 !important;
    box-sizing:border-box !important;
}

/* Krátké displeje: zmenšujeme pouze to, co je nutné, bez dalších vrstev pravidel. */
@media (max-height:700px){
    #wizard #wizardStep5 .wizard-icon{flex-basis:56px !important;height:56px !important;margin-bottom:6px !important;}
    #wizard #wizardStep5 .wizard-illustration{width:56px !important;height:56px !important;}
    #wizard #wizardStep5 h2{margin-bottom:7px !important;font-size:1.08rem !important;}
    #wizard #wizardStep5 .wizard-activity-choice-list{gap:4px !important;}
    #wizard #wizardStep5 .wizard-activity-choice-list .wizard-choice{flex-basis:36px !important;height:36px !important;min-height:36px !important;padding:3px 9px !important;}
    #wizard #wizardStep5 .wizard-buttons{flex-basis:44px !important;margin-top:7px !important;}
    #wizard #wizardStep5 .wizard-buttons .btn{height:44px !important;min-height:44px !important;}

    #wizard #wizardStep6 .wizard-icon{flex-basis:60px !important;height:60px !important;margin-bottom:6px !important;}
    #wizard #wizardStep6 .wizard-illustration{width:60px !important;height:60px !important;}
    #wizard #wizardStep6 h2{margin-bottom:8px !important;font-size:1.1rem !important;}
    #wizard #wizardStep6 .wizard-goals{gap:7px !important;margin-bottom:9px !important;justify-content:center !important;}
    #wizard #wizardStep6 .wizard-goal{flex-basis:55px !important;height:55px !important;min-height:55px !important;}
    #wizard #wizardStep6 .wizard-buttons{flex-basis:46px !important;}
    #wizard #wizardStep6 .wizard-buttons .btn{height:46px !important;min-height:46px !important;}

    #wizard #wizardStep7 .wizard-icon{flex-basis:58px !important;height:58px !important;margin-bottom:8px !important;}
    #wizard #wizardStep7 .wizard-illustration{width:58px !important;height:58px !important;}
    #wizard #wizardStep7 .wizard-final-text{margin-bottom:12px !important;}
    #wizard #wizardStep7 .wizard-final-text p{font-size:.9rem !important;line-height:1.34 !important;margin-bottom:5px !important;}
    #wizard #wizardStep7 .wizard-summary{margin-bottom:12px !important;padding:8px 10px !important;font-size:.8rem !important;line-height:1.35 !important;}
    #wizard #wizardStep7 > .btn{flex-basis:46px !important;height:46px !important;min-height:46px !important;}
}


/* ============================================================
   BANÁN SPLASH PERFORMANCE v1
   Plynulý GPU transform bez JS frame-loopu.
   ============================================================ */
#splashBg {
    -webkit-transform: translate3d(-50%, -50%, 0) rotate(0deg);
    transform: translate3d(-50%, -50%, 0) rotate(0deg);
    -webkit-transform-origin: 50% 50%;
    transform-origin: 50% 50%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
    -webkit-will-change: transform, opacity;
    will-change: transform, opacity;
    contain: paint;
    animation: splashSpinSmooth 34s linear infinite !important;
    -webkit-animation: splashSpinSmooth 34s linear infinite !important;
}

@-webkit-keyframes splashSpinSmooth {
    from { -webkit-transform: translate3d(-50%, -50%, 0) rotate(0deg); }
    to   { -webkit-transform: translate3d(-50%, -50%, 0) rotate(360deg); }
}

@keyframes splashSpinSmooth {
    from { transform: translate3d(-50%, -50%, 0) rotate(0deg); }
    to   { transform: translate3d(-50%, -50%, 0) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #splashBg {
        animation: none !important;
        -webkit-animation: none !important;
    }
}

/* ============================================================
   V58 · SPLASH TITLE PERFORMANCE FIX
   Title animation must not trigger a costly blur/filter repaint.
   The background keeps rotating, while the title enters only via
   compositor-friendly opacity + transform.
   ============================================================ */
#splash .title {
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    filter: none !important;
    animation: splashTitleSmooth 620ms cubic-bezier(.22,.75,.2,1) both !important;
}

#splash .title .first {
    filter: none !important;
}

@keyframes splashTitleSmooth {
    from {
        opacity: 0;
        transform: translate3d(0, 7px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Keep the splash text on its own compositing layer. */
#splash .content {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Do not animate blur/filter on the rotating splash image. */
#splashBg {
    filter: none !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}


/* ===== LANGUAGE GATE ===== */
.language-gate{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;background:rgba(13,13,13,.94);backdrop-filter:blur(8px);}
.language-gate-card{width:min(420px,100%);padding:30px 24px;border-radius:24px;background:var(--card-dark);color:var(--text-light);border:1px solid rgba(245,183,0,.18);box-shadow:0 24px 80px rgba(0,0,0,.5);text-align:center;box-sizing:border-box;}
body.light .language-gate{background:rgba(242,237,232,.94);}
body.light .language-gate-card{background:var(--card-light);color:var(--text-dark);border-color:rgba(0,0,0,.08);}
.language-gate-logo{width:96px;height:96px;margin:0 auto 10px;display:flex;align-items:center;justify-content:center;}
.language-gate-logo img{width:100%;height:100%;object-fit:contain;display:block;}
.language-gate-card h1{margin:0;font-size:2rem;font-weight:800;}
.language-gate-subtitle{margin:8px 0 24px;opacity:.72;font-size:.95rem;}
.language-gate-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.language-option{min-height:78px;border:1px solid rgba(245,183,0,.22);border-radius:16px;background:rgba(245,183,0,.08);color:inherit;font:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:9px;flex-direction:column;transition:transform .15s,background .15s,border-color .15s;}
.language-option:hover,.language-option:active{transform:translateY(-1px);background:rgba(245,183,0,.16);border-color:rgba(245,183,0,.48);}
.language-option span{font-size:1.55rem;}
.language-option b{font-size:1rem;}
@media(max-width:420px){.language-gate{padding:16px}.language-gate-card{padding:24px 18px}.language-gate-options{grid-template-columns:1fr;}.language-option{min-height:64px;flex-direction:row;}}


/* ===== V68 SETTINGS / LANGUAGE ===== */
.header-actions{position:relative;display:flex;align-items:center;gap:7px;}
.settings-toggle{min-width:44px;width:auto;height:40px;padding:0 10px;border:0;border-radius:12px;background:rgba(245,183,0,.10);color:var(--gold);font-size:.78rem;font-weight:900;letter-spacing:.03em;display:flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation;box-sizing:border-box;}
.settings-toggle:active{transform:scale(.97);background:rgba(245,183,0,.17);}
.banan-settings-menu{position:fixed;top:72px;right:max(12px,env(safe-area-inset-right));width:min(330px,calc(100vw - 24px));padding:14px;border-radius:18px;background:var(--card-dark);color:var(--text-light);border:1px solid rgba(245,183,0,.20);box-shadow:0 18px 48px rgba(0,0,0,.38);opacity:0;transform:translateY(-6px) scale(.98);pointer-events:none;transition:opacity .16s ease,transform .16s ease;z-index:150000;box-sizing:border-box;}
.banan-settings-menu.show{opacity:1;transform:none;pointer-events:auto;}
body.light .banan-settings-menu{background:var(--card-light);color:var(--text-dark);border-color:rgba(0,0,0,.08);}
.banan-settings-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 11px;border-bottom:1px solid rgba(127,127,127,.14);}
.banan-settings-head strong{display:block;font-size:.95rem}.banan-settings-head small{display:block;margin-top:2px;opacity:.58;font-size:.72rem;}
.banan-settings-close{width:34px;height:34px;border:0;border-radius:10px;background:rgba(127,127,127,.10);color:inherit;font-size:1rem;cursor:pointer;}
.banan-settings-section{padding-top:11px}.banan-settings-label{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;opacity:.58;margin-bottom:6px;}
.banan-settings-buttons{display:grid;grid-template-columns:1fr 1fr;gap:7px;}
.banan-settings-choice{min-height:42px;border:1px solid rgba(245,183,0,.16);border-radius:11px;background:rgba(245,183,0,.055);color:inherit;font:inherit;font-size:.8rem;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:7px;touch-action:manipulation;}
.banan-settings-choice.active{border-color:rgba(245,183,0,.58);background:rgba(245,183,0,.14);box-shadow:inset 0 0 0 1px rgba(245,183,0,.10);}
@media(max-width:420px){.banan-settings-menu{top:66px;right:10px;width:calc(100vw - 20px);}.settings-toggle{min-width:44px;width:auto;height:38px;padding:0 9px;}}

html.banan-language-pending #languageGate{display:flex !important;visibility:visible !important;opacity:1 !important;pointer-events:auto !important;}

/* ===== V74 LANGUAGE PENDING GUARD ===== */
html.banan-language-pending #languageGate{display:flex !important;visibility:visible !important;opacity:1 !important;pointer-events:auto !important;z-index:300000 !important;}
html.banan-language-pending #app,html.banan-language-pending #wizard{display:none !important;}

/* v78: canonical language gate. One ID, one pending-state contract. */
#languageGate{display:none;position:fixed;inset:0;z-index:400000;align-items:center;justify-content:center;background:rgba(0,0,0,.16);padding:18px 12px;box-sizing:border-box;overflow:auto;}
.banan-language-card{
    width:min(400px,100%);
    padding:var(--banan-onboarding-padding);
    border-radius:var(--banan-onboarding-radius);
    border:var(--banan-onboarding-line-width) solid var(--banan-onboarding-line);
    background:var(--classic-surface,var(--banan-onboarding-surface));
    box-shadow:var(--cl-shadow,var(--banan-onboarding-shadow));
    text-align:center;
}
.banan-language-actions .btn{min-width:0;min-height:46px;width:auto;white-space:normal;}
body.light .banan-language-card{background:#f2ede8;border-color:var(--banan-onboarding-line);}
body.light .banan-language-card h2{color:var(--text-dark);}
body.light .banan-language-card p{color:rgba(0,0,0,.6);}
body.banan-classic-ui .banan-language-card h2{color:var(--cl-title,var(--text-primary));}
body.bp-ready.banan-classic-ui #languageGate .banan-language-card{background:var(--cl-glass)!important;}
@media(max-width:600px){
    :root{--banan-onboarding-radius:26px;--banan-onboarding-padding:34px 22px 24px;}
    #languageGate{padding-inline:8px;}
    .banan-language-card{width:100%;}
}
html.banan-language-pending #languageGate{display:flex !important;visibility:visible !important;opacity:1 !important;pointer-events:auto !important;}
html.banan-language-pending #wizard,html.banan-language-pending #app,html.banan-language-pending #splash{display:none !important;visibility:hidden !important;pointer-events:none !important;}

/* ============================================================
   iOS v4 · conservative keyboard behavior
   No visualViewport-driven repositioning and no scripted scrolling.
   Native WKWebView owns keyboard/focus; Banán only keeps form controls
   comfortable to tap and type into.
   ============================================================ */
@supports (-webkit-touch-callout: none) {
    #wizard input,
    #wizard select,
    #wizard textarea {
        font-size: 16px !important; /* avoids Safari/WKWebView focus zoom */
        -webkit-user-select: text;
        user-select: text;
        touch-action: manipulation;
    }
}

/* ============================================================
   iOS v6 · STABLE WIZARD INPUT FOCUS
   Do not switch the wizard layout when the keyboard changes viewport height.
   Large reflow while a WKWebView input is first responder can drop focus.
   Keep the card geometry stable and let iOS pan/scroll the web view natively.
   ============================================================ */
@supports (-webkit-touch-callout: none) {
    #wizard input[type="text"] {
        font-size: 16px !important;
        -webkit-user-select: text !important;
        user-select: text !important;
        touch-action: auto !important;
        caret-color: currentColor;
    }

    #wizard.wizard-overlay {
        overflow: hidden !important;
    }

    #wizard .wizard-step {
        -webkit-overflow-scrolling: touch;
    }
}


/* ===== iOS v8: „Přidat jídlo“ jako krátký mini progress bar =====
   Tlačítko si zachovává normální barvu i černý text. Po úspěšném přidání
   se přes něj na 1.65 s zobrazí skutečný podíl denního kcal cíle a záblesk. */
#foodAddPrimaryBtn {
    --food-progress-width: 0%;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

#foodAddPrimaryBtn.food-progress-feedback::before {
    content: "";
    position: absolute;
    z-index: 1;
    pointer-events: none;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--food-progress-width);
    transform-origin: left center;
    background:
        linear-gradient(90deg,
            rgba(255,255,255,.10) 0%,
            rgba(255,255,255,.24) 68%,
            rgba(255,229,145,.34) 100%);
    box-shadow:
        inset -1px 0 0 rgba(255,255,255,.45),
        0 0 16px rgba(255,217,102,.22);
    animation: foodButtonProgressFill 1.65s cubic-bezier(.18,.76,.22,1) both;
}

/* Existing ::after is the diagonal shine. During successful add we give it
   a slightly longer sweep so it visually echoes the main calorie progress. */
#foodAddPrimaryBtn.food-progress-feedback::after {
    animation: foodButtonProgressShine 1.15s .16s ease-out both !important;
}

@keyframes foodButtonProgressFill {
    0%   { transform: scaleX(0); opacity: 0; }
    10%  { opacity: 1; }
    58%  { transform: scaleX(1); opacity: 1; }
    82%  { transform: scaleX(1); opacity: .95; }
    100% { transform: scaleX(1); opacity: 0; }
}

@keyframes foodButtonProgressShine {
    0%   { opacity: 0; transform: translateX(-115%); }
    14%  { opacity: 1; }
    55%  { opacity: .92; transform: translateX(12%); }
    100% { opacity: 0; transform: translateX(115%); }
}

@media (prefers-reduced-motion: reduce) {
    #foodAddPrimaryBtn.food-progress-feedback::before { animation-duration: .45s; }
    #foodAddPrimaryBtn.food-progress-feedback::after { animation-duration: .35s !important; animation-delay: 0s !important; }
}

/* v9: the previous button mini-progress is intentionally disabled. */
#foodAddPrimaryBtn.food-progress-feedback::before,
#foodAddPrimaryBtn.food-progress-feedback::after {
    animation: none !important;
    opacity: 0 !important;
}

/* Subtle full-screen reward flash after food is successfully added. */
.banan-edge-reward {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    border-radius: 1px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 216, 92, 0),
        inset 0 0 24px 4px rgba(255, 204, 56, 0),
        inset 0 0 54px 10px rgba(245, 183, 0, 0);
}
.banan-edge-reward.is-active {
    animation: bananEdgeRewardFlash .72s ease-out both;
}
@keyframes bananEdgeRewardFlash {
    0% {
        opacity: 0;
        box-shadow:
            inset 0 0 0 1px rgba(255,216,92,0),
            inset 0 0 16px 2px rgba(255,204,56,0),
            inset 0 0 38px 6px rgba(245,183,0,0);
    }
    18% {
        opacity: .9;
        box-shadow:
            inset 0 0 0 1px rgba(255,226,128,.42),
            inset 0 0 22px 4px rgba(255,210,72,.32),
            inset 0 0 48px 8px rgba(245,183,0,.16);
    }
    52% {
        opacity: .52;
        box-shadow:
            inset 0 0 0 1px rgba(255,226,128,.26),
            inset 0 0 16px 3px rgba(255,210,72,.20),
            inset 0 0 34px 6px rgba(245,183,0,.10);
    }
    100% {
        opacity: 0;
        box-shadow:
            inset 0 0 0 1px rgba(255,216,92,0),
            inset 0 0 10px 1px rgba(255,204,56,0),
            inset 0 0 20px 3px rgba(245,183,0,0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .banan-edge-reward.is-active { animation-duration: .28s; }
}


/* ===== iOS v10: one food-name field, wider amount row ===== */
#foodEntryCard .food-amount-row {
    display: block;
}
#foodEntryCard .food-amount-controls-wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}
#foodEntryCard .food-amount-controls-wide #foodGrams,
#foodEntryCard .food-amount-controls-wide .select-wrapper,
#foodEntryCard .food-amount-controls-wide #foodUnit {
    width: 100% !important;
    min-width: 0;
}
@media (max-width: 430px) {
    #foodEntryCard .food-amount-controls-wide {
        grid-template-columns: minmax(0, 1fr) 96px;
        gap: 8px;
    }
}

/* ===== iOS v11: amount + unit share the full row equally =====
   Both controls deliberately mirror the two-column rows below. */
#foodEntryCard .food-amount-row,
#foodEntryCard .food-amount-group,
#foodEntryCard .food-amount-controls-wide {
    width: 100% !important;
    max-width: none !important;
}
#foodEntryCard .food-amount-controls-wide {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: stretch !important;
}
#foodEntryCard .food-amount-controls-wide #foodGrams,
#foodEntryCard .food-amount-controls-wide #foodUnit {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    box-sizing: border-box !important;
}
@media (max-width: 430px) {
    #foodEntryCard .food-amount-controls-wide {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 8px !important;
    }
}

/* ===== iOS v12: ACTUAL full-width amount row =====
   Older Android rules force .food-entry-row into a 34/66 grid with !important.
   After removing the visible food-name field, that leaves the only remaining
   amount wrapper trapped in the first narrow column. Force this specific row
   to a single full-width column, then split amount/unit 50/50 inside it. */
#foodEntryCard .food-entry-row.food-amount-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    gap: 0 !important;
}
#foodEntryCard .food-entry-row.food-amount-row > .food-amount-group {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}
#foodEntryCard .food-amount-controls-wide {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 10px !important;
}
#foodEntryCard .food-amount-controls-wide > #foodGrams,
#foodEntryCard .food-amount-controls-wide > #foodUnit {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    box-sizing: border-box !important;
}
@media (max-width: 430px) {
    #foodEntryCard .food-amount-controls-wide { gap: 8px !important; }
}


/* ============================================================
   iOS v13 – custom-food save confirmation + post-keyboard alignment
   ============================================================ */
#foodSaveCustomBtn.food-save-feedback-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
#foodSaveCustomBtn.food-save-success {
    background: rgba(246, 195, 38, .12) !important;
    color: var(--primary) !important;
    box-shadow: 0 0 0 1px rgba(255,211,76,.18), 0 0 18px rgba(246,195,38,.18) !important;
}
#foodSaveCustomBtn.food-save-success::after {
    content: "";
    position: absolute;
    pointer-events: none;
    top: -45%;
    bottom: -45%;
    width: 28%;
    left: -38%;
    transform: skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.58), transparent);
    filter: blur(.4px);
    animation: bananSaveButtonShine .72s ease-out both;
}
@keyframes bananSaveButtonShine {
    0%   { left: -38%; opacity: 0; }
    15%  { opacity: .85; }
    100% { left: 112%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    #foodSaveCustomBtn.food-save-success::after { animation: none !important; }
}


/* ===== v17: Info legal documents ===== */
.info-legal-details{border:1px solid rgba(255,215,0,.18);border-radius:12px;background:rgba(255,255,255,.025);overflow:hidden;}
.info-legal-details summary{cursor:pointer;padding:12px 14px;list-style:none;user-select:none;}
.info-legal-details summary::-webkit-details-marker{display:none;}
.info-legal-details summary::after{content:'＋';float:right;color:var(--gold);font-weight:900;}
.info-legal-details[open] summary::after{content:'−';}
.info-legal-body{padding:0 14px 14px;font-size:.86rem;line-height:1.65;opacity:.92;}
.info-legal-body p{margin:10px 0 0;}
body.light .info-legal-details{background:rgba(0,0,0,.025);border-color:rgba(183,123,0,.22);}


/* ===== v21 GENERATOR DAY CONTROLS =====
   Nákup je bezpečně uvnitř rámečku a má o něco více prostoru než zbylé dva prvky. */
#mealPlanContainer .generator-day-controls {
    grid-template-columns: 1.12fr .94fr .94fr !important;
    gap: 6px !important;
}
#mealPlanContainer .generator-day-controls .day-shopping-toggle {
    padding-left: 8px !important;
    padding-right: 10px !important;
    overflow: hidden !important;
}
#mealPlanContainer .generator-day-controls .day-shopping-toggle span {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    transform: translateX(1px);
}
@media (max-width: 420px) {
    #mealPlanContainer .generator-day-controls {
        grid-template-columns: 1.16fr .92fr .92fr !important;
        gap: 5px !important;
    }
    #mealPlanContainer .generator-day-controls .day-shopping-toggle {
        padding-left: 6px !important;
        padding-right: 7px !important;
        font-size: .73rem !important;
    }
    #mealPlanContainer .generator-day-controls .day-shopping-toggle input {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        min-height: 16px !important;
    }
}

/* ============================================================
   iOS v27 – stable background without black-screen regression
   Keep the real body background. Only disable fixed attachment on WKWebView,
   which can trigger temporary low-resolution re-rasterization on tab changes.
   ============================================================ */
html.ios-wkwebview,
html.ios-wkwebview body {
    background-image: url('img/gold-glass-wallpaper.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    background-color: #000 !important;
}

/* Calculator: two editable fields per row in both unit systems.
   Unit labels stay inside their field; the existing unit module owns values. */
#tab-kalkulacka .calc-two-col-grid {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    width:100% !important;
    align-items:end !important;
    margin-bottom:12px;
}
#tab-kalkulacka .calc-two-col-grid > .form-group {
    min-width:0 !important;
    width:100% !important;
    margin:0 !important;
}
#tab-kalkulacka .calc-two-col-grid label {
    display:block;
    margin-bottom:6px !important;
    line-height:1.25;
}
#tab-kalkulacka .calc-two-col-grid input,
#tab-kalkulacka .calc-two-col-grid select,
#tab-kalkulacka .calc-two-col-grid .custom-select-trigger {
    width:100% !important;
    min-width:0 !important;
    min-height:44px !important;
    box-sizing:border-box !important;
    font-size:16px !important;
}
#tab-kalkulacka .calc-two-col-grid .custom-select-trigger {
    display:block;
    position:relative;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    padding-right:32px !important;
}
#tab-kalkulacka .calc-two-col-grid .custom-select-trigger:after {
    position:absolute;
    top:50%;
    right:14px;
    margin-top:-6px;
}
/* A wide options panel anchors inward from its own calculator column. */
#tab-kalkulacka .calc-two-col-grid .custom-options {
    left:0 !important;
    right:auto !important;
    transform:none !important;
    max-width:calc(100vw - 54px) !important;
    box-sizing:border-box;
}
#tab-kalkulacka .calc-gender-group .custom-options,
#tab-kalkulacka .calc-goal-group .custom-options,
html.banan-units-imperial #tab-kalkulacka .calc-activity-group .custom-options {
    left:auto !important;
    right:0 !important;
}
html.banan-units-imperial #tab-kalkulacka .calc-gender-group .custom-options,
html.banan-units-imperial #tab-kalkulacka .calc-goal-group .custom-options {
    left:0 !important;
    right:auto !important;
}
#tab-kalkulacka .calc-with-unit,
#tab-kalkulacka .calc-imperial-field {
    position:relative;
    min-width:0;
}
#tab-kalkulacka .calc-with-unit input,
#tab-kalkulacka .calc-imperial-field input {
    padding-right:42px !important;
}
#tab-kalkulacka .calc-with-unit .banan-inline-unit,
#tab-kalkulacka .calc-imperial-field .banan-inline-unit {
    position:absolute;
    top:50%;
    right:12px;
    transform:translateY(-50%);
    font-size:.8rem;
    line-height:1;
    font-weight:700;
    pointer-events:none;
    opacity:.75;
}
#tab-kalkulacka #calcHeightImperialWrap {
    width:100%;
    min-width:0;
    gap:10px;
}
html.banan-units-imperial #tab-kalkulacka .calc-height-group,
html.banan-units-imperial #tab-kalkulacka .calc-goal-group {
    grid-column:1/-1 !important;
}
html.banan-units-imperial #tab-kalkulacka #calcHeightImperialWrap {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}

/* ============================================================
   iOS v32 – dedicated stable app background layer
   Keep the tab content on its own layer so WKWebView does not
   re-rasterize the banana background on every tab change.
   ============================================================ */
html.ios-wkwebview,
html.ios-wkwebview body {
    background-image: none !important;
    background-color: #000 !important;
}
html.ios-wkwebview #appBackground {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transition: none !important;
    background: #000 !important;
    contain: strict !important;
}
html.ios-wkwebview #appBackground img {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
    border-radius: 0 !important;
}
html.ios-wkwebview #app {
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
}


/* ===== v35: PŘEHLEDNÝ SKLÁDACÍ EDITOR JÍDEL ===== */
.generator-editor-section{
    border:1px solid rgba(245,183,0,.20);
    border-radius:14px;
    background:rgba(255,255,255,.025);
    margin:0 0 8px;
    overflow:hidden;
}
body.light .generator-editor-section{background:rgba(0,0,0,.018);border-color:rgba(190,140,0,.22);}
.generator-editor-section-head{
    width:100%;
    min-height:44px;
    border:0;
    background:rgba(245,183,0,.055);
    color:inherit;
    padding:9px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    font:inherit;
    font-size:.88rem;
    font-weight:850;
    text-align:left;
    cursor:pointer;
    touch-action:manipulation;
}
.generator-editor-section.is-open>.generator-editor-section-head{
    color:#f5b700;
    border-bottom:1px solid rgba(245,183,0,.16);
}
.generator-editor-chevron{font-size:1.15rem;line-height:1;opacity:.72;}
.generator-editor-section-body{padding:9px;}
.generator-editor-section.is-collapsed>.generator-editor-section-body{display:none!important;}
.generator-editor-section.is-collapsed{
    background:rgba(245,183,0,.025);
}
.generator-editor-section.is-collapsed>.generator-editor-section-head{
    min-height:40px;
    padding-top:7px;
    padding-bottom:7px;
}

/* Ingredience a databáze patří do stejné části. */
#generatorIngredientsSection .generator-builder-db-manage,
#generatorIngredientsSection .generator-builder-add-own{margin-bottom:7px;}
#generatorIngredientsSection .generator-builder-create{margin-bottom:0;}

/* V aktivní editaci jídla dáme maximum prostoru samotné práci. */
#generatorMealSection .generator-builder-work{margin-top:8px;}
.generator-builder-actions{
    position:static!important;
    margin-top:13px!important;
    padding:7px 8px 2px!important;
    gap:7px!important;
}
.generator-builder-actions .btn{
    min-height:36px!important;
    padding:7px 10px!important;
    font-size:.78rem!important;
}
.generator-custom-footer{
    margin-top:11px!important;
    padding:0 2px calc(2px + env(safe-area-inset-bottom))!important;
    display:flex!important;
    justify-content:flex-end!important;
}
.generator-done-compact{
    min-height:34px!important;
    padding:6px 18px!important;
    font-size:.78rem!important;
    width:auto!important;
    margin:0!important;
}

@media(max-width:700px){
    .generator-builder-modal{
        display:flex!important;
        flex-direction:column!important;
        height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px)!important;
        overflow:hidden!important;
    }
    .generator-custom-head{margin-bottom:8px!important;flex:0 0 auto;}
    .generator-editor-section{flex:0 0 auto;margin-bottom:7px;}
    .generator-editor-section.is-open{
        flex:1 1 auto;
        min-height:0;
        display:flex;
        flex-direction:column;
    }
    .generator-editor-section.is-open>.generator-editor-section-body{
        flex:1 1 auto;
        min-height:0;
        overflow-y:auto;
        -webkit-overflow-scrolling:touch;
    }
    #generatorMealSection.is-open>.generator-editor-section-body{
        display:flex;
        flex-direction:column;
    }
    #generatorMealSection .generator-my-meals{flex:0 0 auto;}
    #generatorMealSection .generator-builder-work{
        flex:1 1 auto!important;
        min-height:330px!important;
        height:auto!important;
    }
    #generatorMealSection .generator-builder-library{height:29vh!important;min-height:150px!important;}
    #generatorMealSection .generator-builder-editor{height:37vh!important;min-height:250px!important;}
    .generator-custom-footer{flex:0 0 auto;margin-top:5px!important;}
    .generator-done-compact{min-height:32px!important;padding:5px 16px!important;}
}


/* ===== v36: iOS keyboard-safe accordion ===== */
@media(max-width:700px){
  .generator-builder-modal{
    display:block!important;
    height:auto!important;
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px)!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .generator-editor-section.is-open{
    display:block!important;
    min-height:0!important;
  }
  .generator-editor-section.is-open>.generator-editor-section-body{
    display:block!important;
    overflow:visible!important;
    max-height:none!important;
  }
  #generatorMealSection.is-open>.generator-editor-section-body{display:block!important;}
  #generatorMealSection .generator-builder-work{height:auto!important;min-height:0!important;}
  #generatorMealSection .generator-builder-library{height:auto!important;min-height:180px!important;max-height:34vh!important;overflow-y:auto!important;}
  #generatorMealSection .generator-builder-editor{height:auto!important;min-height:260px!important;}
  .generator-custom-footer{position:static!important;}
}


/* ===== v37 editor: friendlier labels + centered Done button ===== */
#foodEditorModal .editor-done-wrap,
#mealEditorModal .editor-done-wrap,
.editor-modal .editor-done-wrap {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}
#foodEditorModal .editor-done-btn,
#mealEditorModal .editor-done-btn,
.editor-modal .editor-done-btn,
#foodEditorModal button[data-editor-done],
#mealEditorModal button[data-editor-done] {
  min-width: 150px !important;
  min-height: 44px !important;
  padding: 10px 24px !important;
  font-size: 0.98rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}


/* ============================================================
   V39 · BANÁN CUSTOM DIALOGS + TOAST THEME
   ============================================================ */
.custom-dialog {
    position: fixed;
    inset: 0;
    z-index: 160000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: calc(18px + env(safe-area-inset-top,0px)) 18px calc(18px + env(safe-area-inset-bottom,0px));
    background: rgba(0,0,0,.52);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.custom-dialog.is-visible { display: flex !important; }
.custom-dialog-card {
    width: min(420px, 100%);
    border-radius: 24px;
    padding: 20px 18px 16px;
    background: linear-gradient(180deg, rgba(22,22,22,.96), rgba(10,10,10,.94));
    color: var(--text-light);
    border: 1px solid rgba(245,183,0,.22);
    box-shadow: 0 24px 70px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.06);
    text-align: center;
}
body.light .custom-dialog-card {
    background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(246,241,234,.96));
    color: var(--text-dark);
    border-color: rgba(245,183,0,.28);
    box-shadow: 0 24px 70px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.7);
}
.dialog-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    background: linear-gradient(180deg, rgba(245,183,0,.22), rgba(245,183,0,.09));
    border: 1px solid rgba(245,183,0,.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
body.light .dialog-icon {
    background: linear-gradient(180deg, rgba(245,183,0,.18), rgba(245,183,0,.08));
}
.dialog-title {
    font-size: 1.08rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 8px;
}
.dialog-message {
    font-size: .97rem;
    line-height: 1.45;
    opacity: .96;
    margin-bottom: 16px;
    white-space: pre-wrap;
}
.dialog-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.dialog-buttons.single { grid-template-columns: 1fr; }
.dialog-buttons button {
    min-height: 46px;
    border-radius: 14px;
    font: inherit;
    font-weight: 800;
    border: 1px solid rgba(245,183,0,.2);
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease, background .2s ease;
}
.dialog-buttons button:active { transform: scale(.985); }
.dialog-cancel {
    background: rgba(255,255,255,.05);
    color: inherit;
}
body.light .dialog-cancel { background: rgba(0,0,0,.035); }
.dialog-confirm {
    background: linear-gradient(180deg, #ffd45a, #f5b700);
    color: #191300;
    box-shadow: 0 8px 22px rgba(245,183,0,.18);
}
.dialog-confirm.dialog-danger {
    background: linear-gradient(180deg, #ffdf70, #f1a900);
}
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom,0px));
    transform: translateX(-50%) translateY(16px);
    width: min(92vw, 430px);
    border-radius: 18px;
    padding: 14px 16px;
    z-index: 150000;
    background: linear-gradient(180deg, rgba(18,18,18,.95), rgba(8,8,8,.93));
    color: var(--text-light);
    border: 1px solid rgba(245,183,0,.18);
    box-shadow: 0 20px 60px rgba(0,0,0,.38);
    opacity: 0;
    pointer-events: none;
    text-align: center;
    font-size: .96rem;
    line-height: 1.4;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity .22s ease, transform .22s ease;
}
body.light .toast {
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,241,234,.95));
    color: var(--text-dark);
    border-color: rgba(245,183,0,.22);
    box-shadow: 0 20px 60px rgba(0,0,0,.16);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
@media (max-width: 480px) {
    .custom-dialog-card { border-radius: 20px; padding: 18px 15px 14px; }
    .dialog-buttons { grid-template-columns: 1fr; }
}


/* V41: native form/keyboard appearance follows Banán light/dark theme where iOS permits it. */
html { color-scheme: dark; }
body.light { color-scheme: light; }


/* V42 body measurement edit/delete */
.body-history-actions{white-space:nowrap;text-align:center;padding:4px 5px!important}.body-measure-action{width:34px;height:34px;margin:0 2px;border-radius:10px;border:1px solid rgba(245,183,0,.2);background:rgba(255,255,255,.04);color:inherit;font-size:.9rem;cursor:pointer}body.light .body-measure-action{background:rgba(0,0,0,.035)}.body-measure-delete{border-color:rgba(255,100,80,.16)}
.body-measure-editor-overlay{position:fixed;inset:0;z-index:165000;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(0,0,0,.56);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.body-measure-editor-modal{width:min(480px,100%);max-height:calc(100dvh - 36px);overflow:auto;border-radius:22px;padding:17px;background:linear-gradient(180deg,rgba(22,22,22,.98),rgba(10,10,10,.97));color:var(--text-light);border:1px solid rgba(245,183,0,.22);box-shadow:0 24px 70px rgba(0,0,0,.48)}body.light .body-measure-editor-modal{background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(246,241,234,.97));color:var(--text-dark);box-shadow:0 24px 70px rgba(0,0,0,.18)}.body-measure-editor-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.08)}body.light .body-measure-editor-head{border-bottom-color:rgba(0,0,0,.08)}.body-measure-editor-head b{display:block;color:var(--gold);font-size:1.08rem}.body-measure-editor-head small{display:block;opacity:.58;margin-top:3px}.body-measure-editor-head button{border:0;background:transparent;color:inherit;font-size:1.15rem;padding:5px}.body-measure-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.body-measure-editor-grid label{display:flex;flex-direction:column;gap:5px;font-size:.82rem}.body-measure-editor-grid label:first-child{grid-column:1/-1}.body-measure-editor-grid input{width:100%;min-height:44px;border-radius:11px;border:1px solid rgba(255,255,255,.11);background:rgba(255,255,255,.045);color:inherit;padding:9px 11px;font:inherit;outline:none}.body-measure-editor-grid input:focus{border-color:rgba(245,183,0,.7);box-shadow:0 0 0 2px rgba(245,183,0,.08)}body.light .body-measure-editor-grid input{border-color:rgba(0,0,0,.1);background:rgba(0,0,0,.025)}.body-measure-editor-units{font-size:.76rem;opacity:.55;margin-top:10px}.body-measure-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-bottom:env(safe-area-inset-bottom,0px)}@media(max-width:520px){.body-measure-editor-overlay{align-items:flex-start;padding:calc(12px + env(safe-area-inset-top,0px)) 8px calc(12px + env(safe-area-inset-bottom,0px))}.body-measure-editor-actions .btn{padding:11px 15px!important}}


/* V44 · generátor: dvojklik + informace o kalkulačce */
#generateMealPlanBtn.banan-generator-disabled,
#generateMealPlanBtn:disabled {
    opacity:.68;
    cursor:default;
    pointer-events:none;
    filter:saturate(.8);
}
.generator-calc-notice {
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:16px;
    border-radius:16px;
    border:1px solid rgba(245,183,0,.24);
    background:rgba(245,183,0,.07);
    color:inherit;
}
.generator-calc-notice-icon {
    flex:0 0 auto;
    width:42px;
    height:42px;
    border-radius:13px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(245,183,0,.15);
    font-size:1.25rem;
}
.generator-calc-notice strong {
    display:block;
    color:var(--gold);
    font-size:.98rem;
    margin-bottom:4px;
}
.generator-calc-notice p {
    margin:0;
    font-size:.86rem;
    line-height:1.42;
    opacity:.8;
}
body.light .generator-calc-notice {
    background:rgba(245,183,0,.08);
    border-color:rgba(184,122,0,.22);
}


/* ============================================================
   V46 · DEFINITIVNÍ BARVY NÁZVŮ RECEPTŮ PODLE TÉMATU
   Starší vrstvy CSS obsahují několik protichůdných pravidel.
   Toto je jediná finální autorita a nesmí záviset na rerenderu.
   ============================================================ */
.recipe-name,
.recipe-item .recipe-name {
    color: #f2f2f2 !important;
    font-weight: 800 !important;
}

body.light .recipe-name,
body.light .recipe-item .recipe-name {
    color: #171717 !important;
}

/* Nadpis fullscreen receptu z generátoru zůstává banánově zlatý,
   protože je samostatným akcentem, ne názvem položky v seznamu. */
.generator-recipe-title {
    color: #f5b700 !important;
}


/* V48: viditelné bezpečnostní upozornění v horní části Info */
.info-food-safety-note{
  margin:14px 0 16px;
  padding:14px 15px;
  border:1px solid rgba(245,183,0,.42);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(245,183,0,.12),rgba(245,183,0,.055));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.info-food-safety-title{font-weight:900;color:var(--gold);margin-bottom:6px;line-height:1.35;}
.info-food-safety-text{font-size:.9rem;line-height:1.55;color:var(--text-light);}
body.light .info-food-safety-note{
  background:linear-gradient(180deg,rgba(245,183,0,.16),rgba(245,183,0,.07));
  border-color:rgba(185,128,0,.38);
}
body.light .info-food-safety-text{color:var(--text-dark);}

/* V94 · PITNÝ REŽIM */
.hydration-card{position:relative;overflow:hidden}.hydration-card::before{content:'';position:absolute;right:-45px;top:-55px;width:150px;height:150px;border-radius:50%;background:radial-gradient(circle,rgba(245,183,0,.12),transparent 68%);pointer-events:none}.hydration-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.hydration-title{margin-bottom:2px!important}.hydration-sub{font-size:.78rem;opacity:.62;line-height:1.35}.hydration-goal-badge{flex:0 0 auto;padding:7px 11px;border-radius:999px;background:rgba(245,183,0,.12);border:1px solid rgba(245,183,0,.24);color:var(--gold);font-weight:900;font-size:.9rem}.hydration-progress-wrap{margin-top:14px}.hydration-progress{height:14px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.06)}body.light .hydration-progress{background:rgba(0,0,0,.06);border-color:rgba(0,0,0,.06)}.hydration-fill{height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#f5b700,#ffd966);transition:width .28s ease}.hydration-progress-text{display:flex;align-items:center;gap:6px;margin-top:7px;font-size:.8rem;opacity:.75}.hydration-progress-text strong{color:var(--gold);font-size:.94rem;opacity:1}#waterPercentText{margin-left:auto;font-weight:800}.hydration-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:13px}.hydration-quick{min-height:42px;border-radius:12px;border:1px solid rgba(245,183,0,.25);background:rgba(245,183,0,.08);color:var(--gold);font-weight:850;font-size:.86rem;cursor:pointer}.hydration-quick:active{transform:scale(.98)}.hydration-minus{color:inherit;border-color:rgba(128,128,128,.22);background:rgba(128,128,128,.07)}.hydration-custom{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;margin-top:9px}.hydration-custom input{width:100%;min-width:0;min-height:42px;border-radius:11px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.045);color:inherit;padding:8px 10px;font:inherit}body.light .hydration-custom input{border-color:rgba(0,0,0,.1);background:rgba(0,0,0,.025)}.hydration-add-custom{padding:9px 14px!important;min-height:42px}.hydration-history{margin-top:15px;padding-top:12px;border-top:1px solid rgba(128,128,128,.13)}.hydration-history-title{font-size:.8rem;font-weight:800;opacity:.7;margin-bottom:8px}.hydration-history-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;align-items:end;min-height:62px}.hydration-day{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;min-width:0}.hydration-day-bar-wrap{height:38px;width:100%;max-width:22px;border-radius:7px;background:rgba(128,128,128,.12);overflow:hidden;display:flex;align-items:flex-end}.hydration-day-bar{width:100%;min-height:2px;border-radius:7px;background:linear-gradient(180deg,#ffd966,#f5b700)}.hydration-day-label{font-size:.62rem;opacity:.56;white-space:nowrap}.hydration-day-value{font-size:.57rem;opacity:.72;white-space:nowrap}.hydration-reminder-box{margin-top:14px;padding:11px;border-radius:14px;background:rgba(245,183,0,.045);border:1px solid rgba(245,183,0,.13)}.hydration-reminder-toggle{display:flex;align-items:center;gap:8px;font-weight:850;font-size:.88rem;cursor:pointer}.hydration-reminder-toggle input{accent-color:#f5b700;width:18px;height:18px}.hydration-reminder-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:10px;margin-top:9px;font-size:.78rem}.hydration-reminder-row select{min-height:38px;border-radius:10px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.045);color:inherit;padding:6px 9px}body.light .hydration-reminder-row select{border-color:rgba(0,0,0,.1);background:rgba(0,0,0,.025)}.hydration-reminder-row select option{color:#111}.hydration-reminder-note{font-size:.7rem;opacity:.55;line-height:1.4;margin-top:7px}.hydration-info{font-size:.72rem;line-height:1.45;opacity:.58;margin-top:12px}@media(max-width:370px){.hydration-actions{gap:5px}.hydration-quick{font-size:.78rem}.hydration-custom{grid-template-columns:1fr auto}.hydration-custom span{display:none}.hydration-add-custom{padding:8px 10px!important}}


/* ============================================================
   V95 · PITNÝ REŽIM – MODRÝ PROGRESS + ZÁBLESK + SELECT Z-INDEX
   ============================================================ */
.hydration-card {
    overflow: visible !important;
}
.hydration-card::before {
    background: radial-gradient(circle, rgba(103,205,255,.15), transparent 68%) !important;
}
.hydration-progress {
    position: relative;
    overflow: hidden;
}
.hydration-fill {
    background: linear-gradient(90deg, #70d6ff, #a7e8ff) !important;
    box-shadow: 0 0 14px rgba(112,214,255,.42);
}
.hydration-progress-text strong {
    color: #70d6ff !important;
}
.hydration-day-bar {
    background: linear-gradient(180deg, #b9efff, #70d6ff) !important;
}
.hydration-progress.water-progress-flash {
    animation: waterProgressFlash .72s ease-out;
}
.hydration-progress.water-progress-flash .hydration-fill {
    animation: waterProgressFillFlash .72s ease-out;
}
@keyframes waterProgressFlash {
    0% { box-shadow:0 0 0 rgba(112,214,255,0); }
    18% { box-shadow:0 0 18px 5px rgba(167,232,255,.95), 0 0 34px 8px rgba(112,214,255,.50); }
    55% { box-shadow:0 0 10px 2px rgba(167,232,255,.52); }
    100% { box-shadow:0 0 0 rgba(112,214,255,0); }
}
@keyframes waterProgressFillFlash {
    0% { filter:brightness(1); }
    20% { filter:brightness(1.8); }
    55% { filter:brightness(1.28); }
    100% { filter:brightness(1); }
}
.hydration-reminder-box,
.hydration-reminder-row,
.hydration-reminder-row .select-wrapper {
    position: relative;
    overflow: visible !important;
}
.hydration-reminder-box { z-index: 40; }
.hydration-reminder-row { z-index: 50; }
.hydration-reminder-row .select-wrapper { z-index: 60; }
.hydration-reminder-row .custom-options {
    z-index: 5000 !important;
}
.hydration-card.elevated {
    z-index: 5000 !important;
}

/* v107 production-prep billing */
.banan-paywall{position:fixed;inset:0;z-index:99999;background:rgba(0,0,0,.72);display:flex;align-items:center;justify-content:center;padding:20px;}
.banan-paywall-card{width:min(440px,100%);max-height:90vh;overflow:auto;background:var(--card,#171717);color:inherit;border:1px solid rgba(255,193,7,.45);border-radius:22px;padding:24px;text-align:center;box-shadow:0 20px 70px rgba(0,0,0,.45)}
body.light .banan-paywall-card{background:#fff;color:#171717}.banan-paywall-logo{font-size:44px}.banan-paywall-card h2{margin:6px 0 10px}.banan-paywall-offer{font-weight:800;margin:14px 0;color:#f5b700}.banan-paywall-card .btn{width:100%;margin-top:10px}.banan-paywall-small{font-size:.82rem;opacity:.68;margin-top:14px}


/* v51 shopping mass-unit toggle */
.shopping-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:2px}
.shopping-title-row .card-title{margin-bottom:0}
.shopping-mass-unit-toggle{display:inline-flex;flex:0 0 auto;padding:2px;border:1px solid rgba(255,193,7,.42);border-radius:999px;background:rgba(0,0,0,.14)}
.shopping-mass-unit-toggle button{appearance:none;border:0;background:transparent;color:inherit;min-width:34px;height:26px;padding:0 9px;border-radius:999px;font:inherit;font-size:.76rem;font-weight:800;opacity:.62;cursor:pointer}
.shopping-mass-unit-toggle button.active{background:rgba(255,193,7,.92);color:#111;opacity:1}
body.light .shopping-mass-unit-toggle{background:rgba(0,0,0,.04)}

/* v51 monthly + yearly subscription choice */
.banan-billing-plans{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 4px}
.banan-plan{position:relative;border:1px solid rgba(255,193,7,.34);border-radius:16px;padding:14px 10px 12px;background:rgba(255,255,255,.035);text-align:center}
body.light .banan-plan{background:rgba(0,0,0,.025)}
.banan-plan-yearly{border-color:rgba(255,193,7,.78);box-shadow:0 0 0 1px rgba(255,193,7,.10) inset}
.banan-plan-badge{display:inline-block;margin:-4px 0 7px;padding:3px 8px;border-radius:999px;background:#f5b700;color:#111;font-size:.67rem;font-weight:900}
.banan-plan-name{font-size:.95rem;font-weight:900;margin:0 0 5px}
.banan-plan-price{font-size:1.05rem;font-weight:900;color:#f5b700;line-height:1.25}
.banan-plan-trial{font-size:.75rem;opacity:.72;min-height:2.5em;margin:6px 0 8px;line-height:1.25}
.banan-plan-save{font-size:.74rem;font-weight:900;color:#f5b700;min-height:1.1em;margin-bottom:4px}
.banan-plan .btn{margin-top:7px!important;padding:10px 8px;font-size:.82rem}
@media(max-width:390px){.banan-billing-plans{grid-template-columns:1fr}.banan-plan-trial{min-height:0}}


/* ============================================================
   V52 · ON-DEVICE NUTRITION LABEL SCAN
   ============================================================ */
.food-entry-title-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:12px;
}
.food-entry-title-row .card-title{margin-bottom:0;min-width:0;}
.nutrition-scan-btn{
    appearance:none;
    border:1px solid rgba(245,183,0,.82);
    background:linear-gradient(145deg,rgba(245,183,0,.18),rgba(245,183,0,.06));
    color:var(--gold);
    min-height:36px;
    padding:7px 11px 7px 9px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    flex:0 0 auto;
    font:inherit;
    font-size:.82rem;
    font-weight:800;
    letter-spacing:.01em;
    box-shadow:inset 0 1px rgba(255,255,255,.08),0 5px 16px rgba(0,0,0,.12);
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
}
.nutrition-scan-btn:active{transform:scale(.97);background:rgba(245,183,0,.24);}
.nutrition-scan-icon{width:19px;height:19px;display:block;fill:currentColor;}
body.light .nutrition-scan-btn{
    color:#9a6900;
    border-color:rgba(183,123,0,.5);
    background:linear-gradient(145deg,rgba(245,183,0,.18),rgba(255,255,255,.82));
    box-shadow:0 4px 13px rgba(90,65,0,.09);
}

.nutrition-scan-overlay{
    position:fixed;inset:0;z-index:10060;
    display:flex;align-items:flex-end;justify-content:center;
    padding:max(14px,env(safe-area-inset-top)) 12px max(14px,env(safe-area-inset-bottom));
    background:rgba(0,0,0,.68);
    backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
}
.nutrition-scan-modal{
    width:min(100%,560px);max-height:92vh;overflow:auto;
    border-radius:24px 24px 18px 18px;
    border:1px solid rgba(245,183,0,.42);
    background:linear-gradient(180deg,#22221d,#171713);
    color:#f5f3ed;
    box-shadow:0 28px 80px rgba(0,0,0,.5),inset 0 1px rgba(255,255,255,.05);
    padding:18px;
}
body.light .nutrition-scan-modal{
    background:linear-gradient(180deg,#fffdf8,#fff);
    color:#181713;
    border-color:rgba(183,123,0,.28);
    box-shadow:0 24px 70px rgba(42,31,0,.22);
}
.nutrition-scan-head{display:flex;align-items:center;gap:11px;margin-bottom:8px;}
.nutrition-scan-head-icon{
    width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;
    background:rgba(245,183,0,.13);border:1px solid rgba(245,183,0,.35);color:var(--gold);flex:0 0 auto;
}
.nutrition-scan-head-icon svg{width:24px;height:24px;fill:currentColor;}
.nutrition-scan-head-text{min-width:0;flex:1;}
.nutrition-scan-head-text b{display:block;color:var(--gold);font-size:1.12rem;line-height:1.18;}
body.light .nutrition-scan-head-text b{color:#a46e00;}
.nutrition-scan-head-text small{display:block;opacity:.72;margin-top:3px;line-height:1.3;}
.nutrition-scan-warning{
    margin:12px 0 14px;padding:11px 12px;border-radius:14px;
    border:1px solid rgba(245,183,0,.34);background:rgba(245,183,0,.075);font-size:.82rem;line-height:1.38;
}
.nutrition-scan-warning strong{color:var(--gold);}
body.light .nutrition-scan-warning strong{color:#9a6900;}
.nutrition-scan-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.nutrition-scan-grid .nutrition-scan-wide{grid-column:1/-1;}
.nutrition-scan-grid label{display:flex;flex-direction:column;gap:5px;font-size:.78rem;font-weight:750;opacity:.92;}
.nutrition-scan-grid input{
    width:100%;box-sizing:border-box;border-radius:12px!important;min-height:45px!important;
    padding:10px 11px!important;font-size:1rem!important;
}
.nutrition-scan-check{
    margin:13px 0 7px;padding:11px 12px;border-radius:14px;
    display:flex;align-items:flex-start;gap:9px;
    border:1px solid rgba(245,183,0,.22);background:rgba(255,255,255,.025);
}
body.light .nutrition-scan-check{background:rgba(245,183,0,.055);}
.nutrition-scan-check input{width:20px;height:20px;flex:0 0 auto;margin:1px 0 0;accent-color:var(--gold);}
.nutrition-scan-check span{font-size:.82rem;line-height:1.35;}
.nutrition-scan-privacy{font-size:.74rem;line-height:1.35;opacity:.62;margin:9px 2px 14px;}
.nutrition-scan-actions{display:grid;grid-template-columns:.78fr 1.22fr;gap:10px;}
.nutrition-scan-actions .btn{min-height:46px;margin:0;}
.nutrition-scan-busy{
    position:fixed;inset:0;z-index:10070;display:flex;align-items:center;justify-content:center;padding:20px;
    background:rgba(0,0,0,.58);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);
}
.nutrition-scan-busy-card{
    min-width:210px;max-width:330px;padding:20px 18px;border-radius:20px;text-align:center;
    background:#1d1d18;border:1px solid rgba(245,183,0,.42);color:#fff;box-shadow:0 20px 60px rgba(0,0,0,.4);
}
body.light .nutrition-scan-busy-card{background:#fff;color:#111;}
.nutrition-scan-busy-banana{font-size:2rem;animation:nutritionBananaPulse 1.1s ease-in-out infinite;}
.nutrition-scan-busy-card b{display:block;margin-top:7px;color:var(--gold);}
.nutrition-scan-busy-card small{display:block;margin-top:5px;opacity:.7;line-height:1.35;}
@keyframes nutritionBananaPulse{0%,100%{transform:scale(.9) rotate(-7deg);opacity:.7}50%{transform:scale(1.1) rotate(7deg);opacity:1}}
@media(max-width:390px){
    .nutrition-scan-btn{padding:7px 9px;font-size:.78rem;}
    .nutrition-scan-icon{width:18px;height:18px;}
    .nutrition-scan-grid{gap:8px;}
}

/* ============================================================
   V54 · SAFE CORE UPGRADE — DATE NAV, RINGS, DAILY EDIT, MEAL SPLIT
   ============================================================ */
/* OCR surfaces now use the exact same card palette as the rest of Banán. */
.nutrition-scan-modal{
    background:var(--card-dark)!important;
    color:var(--text-light)!important;
}
body.light .nutrition-scan-modal{
    background:var(--card-light)!important;
    color:var(--text-dark)!important;
}
.nutrition-scan-busy-card{
    background:var(--card-dark)!important;
    color:var(--text-light)!important;
}
body.light .nutrition-scan-busy-card{
    background:var(--card-light)!important;
    color:var(--text-dark)!important;
}

/* Date navigation deliberately stays compact so the day card does not get taller. */
.day-nav{display:grid;grid-template-columns:42px minmax(0,1fr) 42px auto;align-items:center;gap:7px;margin:2px 0 12px;position:relative;}
.day-nav-center{min-width:0;display:flex;flex-direction:column;gap:5px;}
.day-nav .day-header{margin:0!important;text-align:center;min-width:0;}
.day-nav-arrow,.day-today-btn{appearance:none;border:1px solid rgba(245,183,0,.32);background:rgba(245,183,0,.075);color:var(--gold);border-radius:13px;min-height:40px;font:inherit;font-weight:900;cursor:pointer;}
.day-nav-arrow{font-size:1.65rem;line-height:1;padding:0 8px;}
.day-today-btn{padding:0 11px;font-size:.76rem;}
.day-date-picker{width:100%;min-height:30px;border:1px solid rgba(255,255,255,.08)!important;border-radius:10px!important;background:rgba(255,255,255,.035)!important;color:inherit!important;font:inherit!important;font-size:.72rem!important;padding:4px 8px!important;text-align:center;color-scheme:dark;}
body.light .day-date-picker{border-color:rgba(0,0,0,.08)!important;background:rgba(0,0,0,.025)!important;color-scheme:light;}

.summary-card{background:var(--card-dark)!important;border-color:rgba(245,183,0,.12)!important;box-shadow:0 12px 34px rgba(0,0,0,.24)!important;}
body.light .summary-card{background:var(--card-light)!important;}
.summary-rings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:14px 0 13px;}
.summary-ring{text-align:center;min-width:0;position:relative;}
.ring-visual{width:min(76px,19vw);height:min(76px,19vw);max-width:76px;max-height:76px;margin:0 auto 5px;position:relative;}
.ring-visual svg{display:block;width:100%;height:100%;transform:rotate(-90deg);overflow:visible;}
.ring-track,.ring-progress{fill:none;stroke-width:4.1;}
.ring-track{stroke:rgba(255,255,255,.075);}
body.light .ring-track{stroke:rgba(0,0,0,.08);}
.ring-progress{stroke:var(--gold);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100;transition:stroke-dashoffset .72s cubic-bezier(.2,.75,.25,1),filter .25s ease;filter:drop-shadow(0 0 4px rgba(245,183,0,.18));}
.ring-center{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:none;line-height:1;}
.ring-center strong{font-size:.88rem;font-weight:950;letter-spacing:-.03em;}
.ring-center small{font-size:.55rem;opacity:.55;margin-top:3px;font-weight:750;}
.ring-label{font-size:.63rem;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--gold);}
.ring-goal{font-size:.57rem;opacity:.52;margin-top:1px;}
.summary-ring.ring-flash .ring-progress{animation:bananRingFlash .78s ease-out;}
@keyframes bananRingFlash{0%{filter:drop-shadow(0 0 0 rgba(255,222,91,0));stroke:#fff0a2}35%{filter:drop-shadow(0 0 9px rgba(255,216,64,.95));stroke:#ffe47a}100%{filter:drop-shadow(0 0 4px rgba(245,183,0,.18));stroke:var(--gold)}}
@media(max-width:370px){.summary-rings{gap:3px}.ring-center strong{font-size:.78rem}.ring-label{font-size:.57rem}.ring-goal{font-size:.52rem}.day-nav{grid-template-columns:38px minmax(0,1fr) 38px auto;gap:5px}.day-today-btn{padding:0 8px;font-size:.7rem}}

.meal-split-toggle-row{margin:12px 0 6px;padding:10px 11px;border:1px solid rgba(245,183,0,.13);border-radius:14px;background:rgba(245,183,0,.035);}
.meal-split-toggle{display:flex;align-items:flex-start;gap:9px;cursor:pointer;}
.meal-split-toggle input{width:19px;height:19px;margin-top:1px;accent-color:var(--gold);flex:0 0 auto;}
.meal-split-toggle span{display:flex;flex-direction:column;gap:2px;min-width:0;}
.meal-split-toggle b{font-size:.79rem;color:var(--gold);}
.meal-split-toggle small{font-size:.64rem;opacity:.58;line-height:1.3;}
.meal-slot-group{margin-bottom:10px;}
.meal-day-section{padding:0 0 11px;margin:0 0 11px;border-bottom:1px solid rgba(128,128,128,.12);}
.meal-day-section:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0;}
.meal-day-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:0 0 6px;padding:0 3px;color:var(--gold);font-size:.76rem;}
.meal-day-head span{font-size:.69rem;color:inherit;opacity:.72;white-space:nowrap;}
.meal-day-empty{padding:8px 4px;font-size:.72rem;opacity:.42;}

.food-item-main{min-width:0;flex:1;}
.food-item-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto;}
.edit-food-btn{width:34px;height:34px;border-radius:11px;border:1px solid rgba(245,183,0,.3);background:rgba(245,183,0,.075);color:var(--gold);font-size:1rem;font-weight:900;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;}
.edit-food-btn:active{transform:scale(.96);background:rgba(245,183,0,.16);}

.daily-food-edit-overlay{position:fixed;inset:0;z-index:10065;display:flex;align-items:flex-end;justify-content:center;padding:max(14px,env(safe-area-inset-top)) 12px max(14px,env(safe-area-inset-bottom));background:rgba(0,0,0,.68);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);}
.daily-food-edit-modal{width:min(100%,560px);max-height:92vh;overflow:auto;border-radius:24px 24px 18px 18px;border:1px solid rgba(245,183,0,.34);background:var(--card-dark);color:var(--text-light);box-shadow:0 28px 80px rgba(0,0,0,.5);padding:18px;}
body.light .daily-food-edit-modal{background:var(--card-light);color:var(--text-dark);border-color:rgba(183,123,0,.23);}
.daily-food-edit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;}
.daily-food-edit-head b{display:block;color:var(--gold);font-size:1.05rem;}.daily-food-edit-head small{display:block;opacity:.58;font-size:.72rem;line-height:1.35;margin-top:3px;}
.daily-food-edit-head button{appearance:none;border:1px solid rgba(245,183,0,.24);background:rgba(245,183,0,.06);color:var(--gold);border-radius:11px;width:36px;height:36px;font-size:1rem;}
.daily-food-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}.daily-food-edit-grid .wide{grid-column:1/-1;}.daily-food-edit-grid label{display:flex;flex-direction:column;gap:5px;font-size:.74rem;font-weight:800;}.daily-food-edit-grid input,.daily-food-edit-grid select{width:100%;min-height:44px;border-radius:11px!important;padding:9px 10px!important;font:inherit!important;}
.daily-food-edit-actions{display:grid;grid-template-columns:.8fr 1.2fr;gap:10px;margin-top:15px;}.daily-food-edit-actions .btn{margin:0;min-height:46px;}

/* ============================================================
   V55 · DAY DASHBOARD POLISH + COMPACT MEAL ASSIGNMENT
   ============================================================ */
.day-nav{
    display:grid;
    grid-template-columns:42px minmax(0,1fr) auto 42px;
    align-items:stretch;
    gap:7px;
    margin:4px 0 11px;
}
.day-nav-arrow,.day-today-btn,.day-nav-center{
    border:1px solid rgba(245,183,0,.16);
    background:var(--card-dark);
    box-shadow:0 8px 24px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.035);
}
body.light .day-nav-arrow,body.light .day-today-btn,body.light .day-nav-center{
    background:var(--card-light);
    border-color:rgba(118,85,0,.12);
    box-shadow:0 7px 20px rgba(55,37,0,.07),inset 0 1px rgba(255,255,255,.72);
}
.day-nav-arrow,.day-today-btn{
    color:var(--gold);
    border-radius:14px;
    min-height:44px;
}
.day-nav-arrow{font-size:1.55rem;padding:0 8px;}
.day-today-btn{padding:0 12px;font-size:.74rem;letter-spacing:.02em;}
.day-nav-center{
    min-width:0;
    border-radius:15px;
    padding:6px 9px 5px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:2px;
}
.day-nav .day-header{font-size:.78rem;line-height:1.15;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.day-date-picker{
    min-height:24px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    font-size:.64rem!important;
    opacity:.66;
}

/* Kruhy nesou aktuální hodnotu i editovatelný cíl. Staré obdélníkové
   souhrny tedy nejsou potřeba a karta zůstává výrazně lehčí. */
.summary-card{gap:10px!important;padding:16px 13px 13px!important;}
.summary-rings{margin:1px 0 8px;gap:6px;}
.ring-visual{width:min(78px,19.4vw);height:min(78px,19.4vw);max-width:78px;max-height:78px;}
.ring-goal-editor{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:2px;
    min-height:24px;
    margin-top:2px;
    font-size:.57rem;
    opacity:.72;
}
.ring-goal-editor>span,.ring-goal-editor>small{opacity:.7;font-weight:800;}
.ring-goal-editor input{
    width:42px!important;
    min-width:0!important;
    height:24px!important;
    min-height:24px!important;
    padding:0 2px!important;
    margin:0!important;
    border-radius:8px!important;
    border:1px solid rgba(245,183,0,.16)!important;
    background:rgba(255,255,255,.035)!important;
    color:inherit!important;
    font-size:.62rem!important;
    font-weight:900!important;
    text-align:center!important;
    box-shadow:none!important;
}
body.light .ring-goal-editor input{
    background:rgba(0,0,0,.025)!important;
    border-color:rgba(123,88,0,.14)!important;
}
.ring-goal-editor input:focus{border-color:rgba(245,183,0,.55)!important;background:rgba(245,183,0,.055)!important;}
.summary-progress{margin-top:0;}

/* Samostatná minikarta: zapnutí dělení už nezvyšuje kartu s progressy. */
.meal-split-toggle-row{
    margin:0 0 11px!important;
    padding:9px 11px!important;
    background:var(--card-dark)!important;
    border:1px solid rgba(245,183,0,.12)!important;
    border-radius:15px!important;
    box-shadow:0 8px 23px rgba(0,0,0,.15);
}
body.light .meal-split-toggle-row{
    background:var(--card-light)!important;
    border-color:rgba(110,78,0,.10)!important;
    box-shadow:0 7px 18px rgba(55,37,0,.06);
}
.meal-split-toggle{align-items:center;}
.meal-split-toggle b{font-size:.76rem;}
.meal-split-toggle small{font-size:.60rem;line-height:1.22;}

/* Přepínač jídla se ukazuje pouze při aktivním dělení a sedí hned vedle OCR. */
.food-entry-title-row{gap:8px;margin-bottom:11px;}
.food-entry-title-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;flex:0 1 auto;}
.meal-slot-inline{margin:0!important;padding:0!important;min-width:0;flex:0 1 118px;}
.meal-slot-inline select{
    width:118px!important;
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
    padding:4px 24px 4px 8px!important;
    border-radius:999px!important;
    font-size:.67rem!important;
    font-weight:800!important;
    border:1px solid rgba(245,183,0,.28)!important;
    background:rgba(255,255,255,.035)!important;
}
body.light .meal-slot-inline select{background:rgba(0,0,0,.025)!important;border-color:rgba(145,100,0,.22)!important;}

@media(max-width:390px){
    .day-nav{grid-template-columns:38px minmax(0,1fr) auto 38px;gap:5px;}
    .day-nav-arrow,.day-today-btn{min-height:40px;}
    .day-today-btn{padding:0 9px;font-size:.68rem;}
    .food-entry-title-row{gap:5px;}
    .food-entry-title{font-size:.82rem!important;}
    .food-entry-title-actions{gap:4px;}
    .meal-slot-inline{flex-basis:104px;}
    .meal-slot-inline select{width:104px!important;font-size:.61rem!important;padding-left:6px!important;}
    .nutrition-scan-btn{padding-left:8px;padding-right:8px;font-size:.72rem;}
    .ring-goal-editor input{width:38px!important;font-size:.58rem!important;}
}


/* ============================================================
   V56 · CALENDAR + AIRY DROPDOWNS
   ============================================================ */
/* Only one visible date. The bold gold date is also the calendar trigger. */
.day-nav-date-button{
    appearance:none;
    -webkit-appearance:none;
    width:100%;
    color:inherit;
    font:inherit;
    cursor:pointer;
    text-align:center;
}
.day-nav-date-button:active{transform:scale(.985);}
.day-nav .day-header{
    color:var(--gold)!important;
    font-size:.82rem!important;
    font-weight:950!important;
    letter-spacing:.005em;
}
.day-date-picker-hidden{display:none!important;}

/* Fully controlled Banán calendar instead of the platform date popup. */
.banan-calendar-overlay{
    position:fixed;
    inset:0;
    z-index:10150;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:max(18px,env(safe-area-inset-top)) 16px max(18px,env(safe-area-inset-bottom));
    background:rgba(0,0,0,.34);
    -webkit-backdrop-filter:blur(10px);
    backdrop-filter:blur(10px);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .22s ease,visibility .22s ease;
}
body.light .banan-calendar-overlay{background:rgba(65,48,0,.12);}
.banan-calendar-overlay.show{opacity:1;visibility:visible;pointer-events:auto;}
.banan-calendar-panel{
    width:min(92vw,390px);
    padding:15px 15px 13px;
    border:0;
    border-radius:24px;
    background:var(--card-dark);
    color:var(--text-light);
    box-shadow:0 28px 80px rgba(0,0,0,.42),0 0 42px rgba(245,183,0,.065);
    transform:translateY(8px) scale(.985);
    transition:transform .24s cubic-bezier(.2,.8,.2,1);
}
body.light .banan-calendar-panel{
    background:var(--card-light);
    color:var(--text-dark);
    box-shadow:0 24px 65px rgba(84,58,0,.16),0 0 34px rgba(245,183,0,.08);
}
.banan-calendar-overlay.show .banan-calendar-panel{transform:translateY(0) scale(1);}
.banan-calendar-head{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;gap:8px;margin-bottom:11px;}
.banan-calendar-month{text-align:center;color:var(--gold);font-size:.92rem;font-weight:950;text-transform:capitalize;}
.banan-calendar-shift,.banan-calendar-close,.banan-calendar-today{
    appearance:none;border:0;background:rgba(245,183,0,.075);color:var(--gold);font:inherit;font-weight:950;cursor:pointer;
}
body.light .banan-calendar-shift,body.light .banan-calendar-close,body.light .banan-calendar-today{background:rgba(145,100,0,.06);}
.banan-calendar-shift{width:40px;height:40px;border-radius:13px;font-size:1.45rem;line-height:1;}
.banan-calendar-weekdays,.banan-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;}
.banan-calendar-weekdays{margin-bottom:4px;}
.banan-calendar-weekdays span{text-align:center;font-size:.61rem;font-weight:850;opacity:.45;padding:4px 0;}
.banan-calendar-day,.banan-calendar-empty{aspect-ratio:1;min-width:0;}
.banan-calendar-day{
    appearance:none;border:0;border-radius:12px;background:transparent;color:var(--gold);font:inherit;font-size:.78rem;font-weight:900;cursor:pointer;
    transition:background .16s ease,transform .16s ease,box-shadow .16s ease;
}
.banan-calendar-day:active{transform:scale(.91);}
.banan-calendar-day.is-today{background:rgba(245,183,0,.095);box-shadow:inset 0 0 0 1px rgba(245,183,0,.16);}
.banan-calendar-day.is-selected{background:var(--gold);color:#16120a;box-shadow:0 6px 18px rgba(245,183,0,.24);}
.banan-calendar-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:11px;padding-top:8px;}
.banan-calendar-today{min-height:38px;border-radius:999px;padding:0 16px;font-size:.72rem;}
.banan-calendar-close{width:38px;height:38px;border-radius:13px;font-size:1rem;}

/* All transformed selects open as a wider, borderless floating sheet.
   The trigger can remain compact while the choices get enough room to breathe. */
.custom-options{
    left:50%!important;
    right:auto!important;
    width:clamp(250px,78vw,420px)!important;
    max-width:calc(100vw - 24px)!important;
    min-width:100%!important;
    top:calc(100% + 8px)!important;
    padding:10px 7px!important;
    border:0!important;
    border-radius:22px!important;
    background:rgba(16,16,15,.96)!important;
    color:var(--text-light)!important;
    box-shadow:0 22px 70px rgba(0,0,0,.42),0 0 34px rgba(245,183,0,.055)!important;
    -webkit-backdrop-filter:blur(28px)!important;
    backdrop-filter:blur(28px)!important;
    transform:translateX(-50%);
    -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 10px),transparent 100%);
    mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 10px),transparent 100%);
}
body.light .custom-options{
    background:rgba(255,255,252,.97)!important;
    color:var(--text-dark)!important;
    box-shadow:0 20px 58px rgba(72,51,0,.15),0 0 28px rgba(245,183,0,.06)!important;
}
.custom-options.show{animation:bananSelectFloat .22s cubic-bezier(.2,.8,.2,1)!important;}
@keyframes bananSelectFloat{
    from{opacity:0;transform:translate(-50%,-8px) scale(.985);}
    to{opacity:1;transform:translate(-50%,0) scale(1);}
}
.custom-option{
    margin:2px 3px!important;
    padding:12px 14px!important;
    border:0!important;
    border-radius:13px!important;
    font-weight:720!important;
    line-height:1.25;
}
body.light .custom-option{border:0!important;}
.custom-option:hover,.custom-option:active{background:rgba(245,183,0,.13)!important;color:inherit!important;}
.custom-option.selected{background:rgba(245,183,0,.11)!important;color:var(--gold)!important;}
/* Meal assignment was the most cramped trigger. Its menu now uses the same wide floating sheet. */
.meal-slot-inline .select-wrapper{position:relative;}
.meal-slot-inline .custom-options{width:min(86vw,360px)!important;min-width:250px!important;}

@media(max-width:360px){
    .banan-calendar-panel{padding:13px 11px 11px;}
    .banan-calendar-weekdays,.banan-calendar-grid{gap:3px;}
    .custom-options{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;}
}


/* ============================================================
   V57 · FOOD SEARCH FLOAT + PILL MEAL SELECTOR
   ============================================================ */
/* Food search suggestions now use the same light, borderless floating language
   as the custom selects. They intentionally float over the form instead of
   increasing the Add Food card height. */
.search-container .form-group{position:relative;overflow:visible!important;}
#suggestions.suggestions{
    position:absolute!important;
    top:calc(100% + 8px)!important;
    left:50%!important;
    right:auto!important;
    width:clamp(280px,86vw,440px)!important;
    max-width:calc(100vw - 22px)!important;
    margin:0!important;
    padding:10px 7px!important;
    transform:translateX(-50%);
    border:0!important;
    border-radius:22px!important;
    background:rgba(16,16,15,.965)!important;
    color:var(--text-light)!important;
    box-shadow:0 22px 70px rgba(0,0,0,.42),0 0 34px rgba(245,183,0,.05)!important;
    -webkit-backdrop-filter:blur(30px)!important;
    backdrop-filter:blur(30px)!important;
    z-index:10040!important;
    -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 10px),transparent 100%);
    mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 10px),transparent 100%);
}
body.light #suggestions.suggestions{
    background:rgba(255,255,252,.975)!important;
    color:var(--text-dark)!important;
    box-shadow:0 20px 58px rgba(72,51,0,.15),0 0 28px rgba(245,183,0,.055)!important;
}
#suggestions .suggestion-item{
    margin:2px 3px!important;
    padding:12px 14px!important;
    border:0!important;
    border-radius:13px!important;
    font-weight:720!important;
    line-height:1.24;
}
#suggestions .suggestion-item:hover,
#suggestions .suggestion-item:active{background:rgba(245,183,0,.13)!important;color:inherit!important;}
#suggestions .suggestion-item .kcal-info{color:var(--gold)!important;white-space:nowrap;}
@media(max-width:360px){
    #suggestions.suggestions{width:calc(100vw - 18px)!important;max-width:calc(100vw - 18px)!important;}
}

/* Meal assignment trigger visually matches the Scan pill, including the oval
   shape and subtle gold glass. The native select remains only as its data source. */
.meal-slot-inline{flex:0 1 122px!important;}
.meal-slot-inline .select-wrapper{width:122px!important;}
.meal-slot-inline .custom-select-trigger{
    width:122px!important;
    min-width:0!important;
    min-height:36px!important;
    height:36px!important;
    box-sizing:border-box!important;
    padding:7px 27px 7px 11px!important;
    border-radius:999px!important;
    border:1px solid rgba(245,183,0,.82)!important;
    background:linear-gradient(145deg,rgba(245,183,0,.18),rgba(245,183,0,.06))!important;
    color:var(--gold)!important;
    box-shadow:inset 0 1px rgba(255,255,255,.08),0 5px 16px rgba(0,0,0,.12)!important;
    font-size:.72rem!important;
    font-weight:850!important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    position:relative;
}
.meal-slot-inline .custom-select-trigger:after{
    position:absolute;right:11px;top:50%;margin:0!important;
    transform:translateY(-65%) rotate(45deg)!important;
}
body.light .meal-slot-inline .custom-select-trigger{
    color:#9a6900!important;
    border-color:rgba(183,123,0,.5)!important;
    background:linear-gradient(145deg,rgba(245,183,0,.18),rgba(255,255,255,.82))!important;
    box-shadow:0 4px 13px rgba(90,65,0,.09)!important;
}
@media(max-width:390px){
    .meal-slot-inline{flex-basis:108px!important;}
    .meal-slot-inline .select-wrapper,
    .meal-slot-inline .custom-select-trigger{width:108px!important;}
    .meal-slot-inline .custom-select-trigger{font-size:.65rem!important;padding-left:9px!important;padding-right:24px!important;}
}


/* v61 — fake transparent widget setup */
.widget-transparency-card{margin-top:14px;padding:14px 15px;border-radius:18px;background:var(--card-bg,rgba(255,255,255,.06));box-shadow:0 10px 26px rgba(0,0,0,.10);}
.widget-transparency-title{font-weight:800;color:#f5b700;margin-bottom:6px;}
.widget-transparency-text{font-size:.92rem;line-height:1.42;opacity:.78;}
.widget-transparency-actions{display:flex;gap:9px;margin-top:12px;flex-wrap:wrap;}
.widget-transparency-btn{appearance:none;border:1px solid rgba(245,183,0,.38);border-radius:999px;padding:9px 14px;background:rgba(245,183,0,.08);color:inherit;font-weight:700;}
.widget-transparency-btn.primary{background:#f5b700;color:#111;border-color:#f5b700;}
[data-theme="light"] .widget-transparency-card,body.light .widget-transparency-card{background:rgba(255,255,255,.72);}

/* V72 · editable activities */
.activity-log{display:flex;flex-direction:column;gap:7px;margin-top:8px;}
.activity-log-row,.activity-legacy-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid var(--border-color);border-radius:11px;background:rgba(127,127,127,.06);}
.activity-log-main{display:flex;flex-direction:column;gap:2px;min-width:0;}
.activity-log-main b{font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.activity-log-main small{font-size:.72rem;opacity:.68;}
.activity-log-actions{display:flex;gap:6px;flex:0 0 auto;}
.activity-log-actions button,.activity-legacy-row button{border:1px solid var(--border-color);background:rgba(127,127,127,.08);color:var(--text-primary);border-radius:9px;min-width:34px;height:32px;padding:0 8px;font-weight:800;}
.activity-log-actions button.danger{color:#d9534f;}

/* V72 · custom saved foods */
.custom-food-manager-modal{max-width:720px;}
.custom-food-empty{padding:28px 14px;text-align:center;opacity:.6;font-size:.9rem;}
#foodManageCustomBtn{margin-top:-3px;}

/* V72 · recipe image gallery: 2 rows × 3 visible columns */
.recipe-visual-gallery{margin:3px 0 12px 0;}
.recipe-visual-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:3px 1px 8px 1px;}
.recipe-visual-head b{font-size:.92rem;color:var(--gold);}
.recipe-visual-head span{font-size:.72rem;opacity:.55;}
.recipe-visual-strip{display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;grid-auto-columns:calc((100% - 16px)/3);gap:8px;overflow-x:auto;overflow-y:hidden;padding:1px 1px 8px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
.recipe-visual-strip::-webkit-scrollbar{display:none;}
.recipe-visual-card{scroll-snap-align:start;appearance:none;-webkit-appearance:none;border:1px solid var(--border-color);background:var(--bg-card);border-radius:12px;padding:0;overflow:hidden;color:var(--text-primary);text-align:left;box-shadow:none;min-width:0;}
.recipe-visual-card img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;background:rgba(127,127,127,.08);}
.recipe-visual-card span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding:6px 7px 7px;font-size:.68rem;font-weight:750;line-height:1.16;min-height:2.25em;}
.generator-recipe-image{display:block;width:100%;max-height:320px;object-fit:cover;border-radius:14px;margin:8px 0 13px;border:1px solid var(--border-color);}


/* v73 unified edit/delete icons */
.action-icon{width:16px;height:16px;display:block;object-fit:contain;pointer-events:none;}
.btn-inline-icon{width:15px;height:15px;vertical-align:-2px;margin-right:6px;object-fit:contain;}
.icon-only-btn,.edit-food-btn,.recipe-edit-btn,.body-measure-action{display:inline-flex;align-items:center;justify-content:center;}
.food-db-edit,.food-db-delete,.generator-my-meal-tools .generator-builder-tool{display:inline-flex;align-items:center;justify-content:center;gap:6px;}
.food-db-edit .action-icon,.food-db-delete .action-icon,.generator-my-meal-tools .generator-builder-tool .action-icon{width:15px;height:15px;}
.activity-log-actions button .action-icon{width:16px;height:16px;}
.body-measure-action .action-icon,.edit-food-btn .action-icon,.recipe-edit-btn .action-icon{width:16px;height:16px;}
.del-btn,.edit-food-btn,.recipe-edit-btn,.body-measure-action,.activity-log-actions button{overflow:hidden;}


/* V74 · FINAL recipes: full-width 2-column image grid, no duplicate text list */
#recipeList{width:100%;}
.recipe-final-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  width:100%;
  margin-top:8px;
}
.recipe-grid-card{
  position:relative;
  min-width:0;
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:14px;
  border:1px solid var(--border-color);
  background:var(--bg-card);
  cursor:pointer;
  isolation:isolate;
  -webkit-tap-highlight-color:transparent;
}
.recipe-grid-card:active{transform:scale(.985);}
.recipe-grid-card:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
.recipe-grid-card>img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .22s ease;
}
.recipe-grid-card:active>img{transform:scale(1.018);}
.recipe-grid-shade{
  position:absolute;
  left:0;right:0;bottom:0;
  height:48%;
  z-index:1;
  pointer-events:none;
  background:linear-gradient(to top,rgba(0,0,0,.82) 0%,rgba(0,0,0,.46) 46%,rgba(0,0,0,0) 100%);
}
.recipe-grid-title{
  position:absolute;
  z-index:2;
  left:9px;right:9px;bottom:8px;
  color:#fff;
  font-size:.78rem;
  font-weight:800;
  line-height:1.14;
  text-align:left;
  text-shadow:0 1px 4px rgba(0,0,0,.82);
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.recipe-grid-edit{
  position:absolute;
  z-index:3;
  top:7px;right:7px;
  width:31px;height:31px;
  padding:6px;
  border-radius:10px;
  border:1px solid rgba(245,183,0,.42);
  background:rgba(12,12,12,.62);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  display:flex;align-items:center;justify-content:center;
}
.recipe-grid-edit .action-icon{width:18px;height:18px;}
@media(max-width:360px){
  .recipe-final-grid{gap:8px;}
  .recipe-grid-card{border-radius:12px;}
  .recipe-grid-title{font-size:.72rem;left:7px;right:7px;bottom:7px;}
}



/* v81 recipe nutrition panel, retained */
.generator-recipe-insight{margin:14px 0;padding:14px 15px;border:1px solid rgba(238,194,67,.30);border-radius:17px;background:linear-gradient(135deg,rgba(255,213,69,.10),rgba(255,255,255,.025));}
.generator-recipe-insight h3{margin:0 0 7px;color:#f4cc5a;font-size:.92rem;font-weight:850;}
.generator-recipe-insight p{margin:0;font-size:.88rem;line-height:1.55;color:inherit;opacity:.9;}
body.light .generator-recipe-insight{background:linear-gradient(135deg,rgba(255,228,132,.36),rgba(255,255,255,.78));border-color:rgba(163,119,14,.22);}
body.light .generator-recipe-insight h3{color:#765400;}
@media(max-width:420px){.generator-recipe-insight{margin:11px 0;padding:12px 13px;}.generator-recipe-insight p{font-size:.84rem;}}



/* v88 · iOS day food editor: prevent WKWebView focus zoom. */
.ios-wkwebview .daily-food-edit-grid input,.ios-wkwebview .daily-food-edit-grid select{font-size:16px!important;line-height:1.25!important;}
.ios-wkwebview .daily-food-edit-modal{touch-action:manipulation;}

/* Native iOS focus uses the ordinary document scroll area.
   Food actions remain in the card at all viewport sizes. */
body.food-keyboard-active {
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch;
    touch-action:auto !important;
}
body.wizard-active #app{visibility:hidden!important;pointer-events:none!important;}
body.wizard-active .bp-dock,body.wizard-active #bpHeader{display:none!important;}
/* v89: never trigger iOS focus zoom in the day-food editor. */
.daily-food-edit-grid input,.daily-food-edit-grid select{font-size:16px!important;}
/* v89: gold pencil stays clean; hit target remains 34 px without a permanent frame. */
.edit-food-btn{border:0!important;background:transparent!important;box-shadow:none!important;}
.edit-food-btn:active{background:rgba(245,183,0,.10)!important;}

.nutrition-scan-basis{display:flex;flex-direction:column;gap:8px;margin:12px 0;font-weight:700;}
.nutrition-scan-basis select{min-height:44px;width:100%;font:inherit;border:1px solid var(--primary);border-radius:12px;padding:10px;background:var(--bg-card,#111);color:var(--text-primary,#fff);}
#scanReviewCheck[hidden]{display:none!important;}
