body{
    background:#1e1e1e;
    color:#ffffff;
    font-family:"DM Sans", Arial, Helvetica, sans-serif;
    margin:0;
    overscroll-behavior-y:none;
}

.pull-to-refresh{
    position:fixed;
    top:0;
    left:50%;
    z-index:20;
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 14px;
    border:1px solid #555;
    border-radius:0 0 14px 14px;
    background:#2b2b2b;
    color:#c7c7c7;
    font-size:12px;
    font-weight:700;
    opacity:0;
    pointer-events:none;
    transform:translate(-50%, calc(-100% - 4px + var(--pull-distance, 0px)));
    transition:opacity .15s ease, transform .15s ease;
}
.pull-to-refresh.visible{
    opacity:1;
}
.pull-to-refresh.ready{
    border-color:#ff8c00;
    color:#ffab3d;
}
.pull-to-refresh-icon{
    font-size:18px;
    line-height:1;
    transition:transform .2s ease;
}
.pull-to-refresh.ready .pull-to-refresh-icon{
    transform:rotate(180deg);
}
.pull-to-refresh.refreshing .pull-to-refresh-icon{
    animation:refresh-spin .8s linear infinite;
}
@keyframes refresh-spin{
    to{transform:rotate(360deg)}
}

.container{

    position:relative;
    z-index:2;

    max-width:600px;
    margin:40px auto;
    padding:35px;
    text-align:center;

    background:#2b2b2b;
    border-radius:22px;
    box-shadow:0 15px 35px rgba(0,0,0,.45);
}
.tracker-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    text-align:left;
}
.tracker-header h1{
    margin:0;
}
.tracker-title-image{
    width:46px;
    height:46px;
    object-fit:contain;
    vertical-align:-11px;
}
.eyebrow{
    margin:0 0 6px;
    color:#ffa733;
    font-size:12px;
    font-weight:800;
    letter-spacing:1px;
    text-transform:uppercase;
}
.user-email{
    margin:6px 0 0;
    color:#999;
    font-size:12px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.theme-toggle{
    width:42px;
    height:42px;
    flex:0 0 auto;
    margin:0;
    padding:0;
    border:1px solid #555;
    border-radius:50%;
    background:#363636;
    font-size:19px;
}
.theme-toggle:hover{
    background:#4a4a4a;
}
.calorie-box{
    background:#363636;
    border-radius:18px;
    padding:22px;
    margin:30px 0;
}
.calorie-summary{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:28px;
}
.calorie-summary h2{
    margin:0;
}
.calorie-meta{
    padding-left:28px;
    border-left:1px solid #555;
    text-align:left;
}
.calorie-meta p{
    margin:4px 0;
    color:#d6d6d6;
    font-size:13px;
    font-weight:700;
}
.calorie-meta #remainingValue{
    color:#ffa733;
}
.login-container button{
    width:100%;
}
button{
    padding:16px;
    margin-top:15px;

    border:none;
    border-radius:12px;

    background:#000000;
    color:white;

    font-size:18px;
    font-weight:bold;

    cursor:pointer;

    transition:.25s;
}
button:hover{
    background:#ffa733;
    transform:translateY(-2px);
}
.hidden{

    display:none;

}

[hidden]{
    display:none !important;
}

.food{
    background:#3a3a3a;
    color:white;
    border:1px solid #555;
}
.amount{
    background:#444;
    color:white;
    border:1px solid #666;
}
.food-entry{
    position:relative;
    padding:15px 88px 15px 16px;
    margin-top:12px;
    border-radius:12px;

    background:#333;
    border-left:5px solid #ff8c00;
    text-align:left;
}


.food-entry h3 {

    margin: 0;

}


.food-entry p {

    margin: 5px 0 0;
    color:#bdbdbd;
    font-size:14px;

}
.delete-button{
    position:absolute;
    top:50%;
    right:12px;
    margin:0;
    padding:7px 10px;
    transform:translateY(-50%);

    border-radius:8px;

    background:#d9534f;
    color:white;
    font-size:13px;

    cursor:pointer;
}
.delete-button:hover{
    background:#b43a36;
    transform:translateY(-50%);
}
.login-container{
    z-index:2;
    width:100%;
    max-width:420px;
    padding:20px 30px 30px 30px;
    background:#2b2b2b;
    border-radius:20px;
    box-shadow:0 15px 40px rgba(0,0,0,.45);
    box-sizing:border-box;
    position:relative;
    top:auto;
    left:auto;
    transform:none;
    margin:32px auto;
    text-align:center;
}

.logo{
    width:250px;
    position:relative;
    top:-10px;
    margin-bottom:-10px;
}
.subtitle{

    color:#b5b5b5;

    margin-top:-8px;

    margin-bottom:30px;

}
#loginBox input{

    width:100%;

    padding:14px;

    margin-bottom:18px;

    border-radius:10px;

    border:1px solid #555;

    background:#363636;

    color:white;

    font-size:16px;

    box-sizing:border-box;

}

#loginBox > label:not(.stay-logged-in){
    display:block;
    margin:0 0 7px;
    color:#e6e6e6;
    font-size:14px;
    font-weight:700;
    text-align:left;
}

#authMessage{
    min-height:20px;
    margin:16px 0 0;
    color:#ff8f8f;
    font-size:14px;
}

.auth-divider{
    display:flex;
    align-items:center;
    gap:12px;
    margin:18px 0 2px;
    color:#999;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:1px;
}

.auth-divider::before,
.auth-divider::after{
    content:"";
    height:1px;
    flex:1;
    background:#555;
}

.google-sign-in{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    background:#000000;
    color:#ffffff;
    border:1px solid #000000;
    font-size:16px;
}

.google-sign-in:hover{
    background:#ffa733;
    border-color:#ffa733;
}

.google-mark{
    width:20px;
    height:20px;
    object-fit:contain;
}

#loginBox input:focus{

    outline:none;

    border-color:#ff8c00;

}
.stay-logged-in{

    display:flex;
    align-items:center;
    gap:8px;
    margin:0 0 4px;
    color:#d6d6d6;
    font-size:14px;
    text-align:left;
    cursor:pointer;

}

.stay-logged-in input{

    width:16px !important;
    height:16px;
    margin:0 !important;
    accent-color:#ff8c00;

}
#donutRain{
    position:fixed;

    top:0;
    left:0;

    width:100%;
    height:100%;

    overflow:hidden;

    pointer-events:none;

    z-index:-1;
}


.donut{
    position:absolute;

    width:50px;
    opacity:.45;

    animation:fall linear infinite;
}


@keyframes fall{

    0%{
        transform:translateY(-100px) rotate(0deg);
    }

    100%{
        transform:translateY(110vh) rotate(360deg);
    }

}

@media (prefers-reduced-motion: reduce){
    #donutRain{
        display:none;
    }
}

#goalControls {
    margin: 24px 0 18px;
    display: flex;
    justify-content: center;
    flex-direction:column;
    align-items:center;
}
.goal-toggle{
    width:100%;
    max-width:420px;
    margin:0;
    background:#414141;
    color:#f2f2f2;
}
.goal-toggle:hover{
    background:#555;
}

.goal-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #2f2f2f 0%, #252525 100%);
    border: 1px solid rgba(255, 140, 0, 0.35);
    border-radius: 18px;
    padding: 20px 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    text-align: left;
}

.goal-card h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
}

.goal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.goal-row label {
    color: #eaeaea;
    font-weight: 600;
    font-size: 0.95rem;
}

.goal-row input {
    width: 120px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #555;
    background: #1b1b1b;
    color: #ffffff;
    font-size: 1rem;
    box-sizing: border-box;
    text-align: right;
}

.goal-row input:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2);
}

.calorie-adjuster{
    display:flex;
    justify-content:center;
    gap:14px;
    margin-top:16px;
}

.calorie-adjuster button{
    width:44px;
    height:44px;
    padding:0;
    margin:0;
    border-radius:50%;
    font-size:28px;
    line-height:1;
    box-shadow:0 4px 10px rgba(0,0,0,.25);
}

#addCaloriesBtn{
    background:#3d9b57;
    color:#fff;
}

#subtractCaloriesBtn{
    background:#c94b4b;
    color:#fff;
}

.calorie-adjuster button:hover{
    filter:brightness(1.12);
}

#saveGoalButton {
    width: 100%;
    margin: 8px 0 14px;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(180deg, #ff9f2f 0%, #ff8c00 100%);
    color: #111;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

#saveGoalButton:hover {
    background: linear-gradient(180deg, #ffb347 0%, #ff9f2f 100%);
    transform: translateY(-1px);
}

.goal-progress{
    width:100%;
    height:10px;
    margin:18px 0 12px;
    overflow:hidden;
    border-radius:999px;
    background:#171717;
}

#goalProgressBar{
    width:0;
    height:100%;
    border-radius:inherit;
    background:#4caf50;
    transition:width .35s ease, background .25s ease;
}

#goalProgressBar.over-goal{
    background:#d9534f;
}

.macro-summary{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:8px;
    margin-top:20px;
}

.macro-summary div{
    padding:10px 6px;
    border:1px solid #4b4b4b;
    border-radius:10px;
    background:#2d2d2d;
}

.macro-summary strong,
.macro-summary span{
    display:block;
}

.macro-summary strong{
    color:#ffab3d;
    font-size:17px;
}

.macro-summary span{
    margin-top:3px;
    color:#bdbdbd;
    font-size:12px;
    font-weight:600;
}
.macro-summary div:nth-child(1) strong{
    color:#65a9ff;
}
.macro-summary div:nth-child(2) strong{
    color:#f4c95d;
}
.macro-summary div:nth-child(3) strong{
    color:#f17b9a;
}
.food-entry{
    animation:entry-in .35s ease both;
}
@keyframes entry-in{
    from{opacity:0; transform:translateY(6px)}
    to{opacity:1; transform:translateY(0)}
}

body[data-theme="light"]{
    background:#eef1f4;
    color:#20252b;
}
body[data-theme="light"] .pull-to-refresh{
    background:#fff;
    border-color:#d4d9df;
    color:#66717c;
}
body[data-theme="light"] .pull-to-refresh.ready{
    border-color:#ff8c00;
    color:#d87500;
}
body[data-theme="light"] .container,
body[data-theme="light"] .login-container{
    background:#ffffff;
    box-shadow:0 15px 35px rgba(34,45,58,.12);
}
body[data-theme="light"] .calorie-box,
body[data-theme="light"] .goal-card{
    background:#f5f7f9;
}
body[data-theme="light"] .calculator-step{
    background:#f5f7f9;
    border-color:#d4d9df;
}
body[data-theme="light"] .daily-calories-intro > p:last-child,
body[data-theme="light"] .step-heading p,
body[data-theme="light"] .activity-option small,
body[data-theme="light"] .daily-calories-result > span,
body[data-theme="light"] .result-note{
    color:#66717c;
}
body[data-theme="light"] .calculator-fields input,
body[data-theme="light"] .calculator-fields select{
    background:#fff;
    color:#20252b;
    border-color:#c7cdd4;
}
body[data-theme="light"] .calculator-fields label,
body[data-theme="light"] .activity-option{
    color:#20252b;
}
body[data-theme="light"] .activity-option{
    border-color:#d4d9df;
}
body[data-theme="light"] .activity-option:has(input:checked){
    background:#fff4e6;
}
body[data-theme="light"] .daily-calories-result{
    background:linear-gradient(145deg,#fff4e6,#f5f7f9);
}
body[data-theme="light"] .calorie-targets div{
    background:rgba(255,255,255,.75);
}
body[data-theme="light"] .calorie-targets span{
    color:#66717c;
}
body[data-theme="light"] .calorie-targets strong{
    color:#20252b;
}
body[data-theme="light"] .calorie-targets small{
    color:#66717c;
}
body[data-theme="light"] .food-entry{
    background:#f5f7f9;
    border-color:#ff8c00;
}
body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .macro-summary div,
body[data-theme="light"] .food,
body[data-theme="light"] .amount{
    background:#edf0f3;
    color:#20252b;
    border-color:#d4d9df;
}
body[data-theme="light"] .calorie-meta{
    border-color:#d4d9df;
}
body[data-theme="light"] .calorie-meta p,
body[data-theme="light"] .food-entry p,
body[data-theme="light"] .macro-summary span,
body[data-theme="light"] .user-email{
    color:#66717c;
}
body[data-theme="light"] .goal-row label,
body[data-theme="light"] .goal-card h3{
    color:#20252b;
}
body[data-theme="light"] .goal-row input,
body[data-theme="light"] #loginBox input{
    background:#ffffff;
    color:#20252b;
    border-color:#c7cdd4;
}
body[data-theme="light"] #foodLog h2,
body[data-theme="light"] #foodMenu h2,
body[data-theme="light"] #amountMenu h2{
    color:#20252b;
}
@media (prefers-reduced-motion: reduce){
    .food-entry{
        animation:none;
    }
}

#goalValue,
#remainingValue {
    margin: 7px 0;
    color: #f3f3f3;
    font-size: 0.98rem;
    font-weight: 700;
}

#remainingValue {
    color: #ffa733;
}

.adjust-buttons {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.adjust-buttons button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 12px 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

#addCaloriesBtn {
    background: linear-gradient(180deg, #4caf50 0%, #3d8b40 100%);
    color: white;
}

#subtractCaloriesBtn {
    background: linear-gradient(180deg, #d9534f 0%, #b43a36 100%);
    color: white;
}

.adjust-buttons button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

#toggleFoodLogBtn {
    width: 100%;
    margin: 10px 0 14px;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #ff9f2f 0%, #ff8c00 100%);
    color: #111;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

#toggleFoodLogBtn:hover {
    background: linear-gradient(180deg, #ffb347 0%, #ff9f2f 100%);
    transform: translateY(-1px);
}

#foodLog {
    transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.25s ease;
    overflow: hidden;
    opacity: 1;
    max-height: 2000px;
}

#foodLog.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
}

@media (max-width:480px){
    .container{
        margin:16px 12px;
        padding:24px 16px;
        border-radius:16px;
    }

    .container h1{
        font-size:26px;
    }

    .calorie-box{
        margin:20px 0;
        padding:18px 12px;
    }

    #calories{
        font-size:30px;
    }

    .login-container{
        width:calc(100% - 24px);
        padding:18px 20px 24px;
        margin:16px auto;
    }

    .logo{
        width:200px;
    }

    #gramButtons,
    #pieceButtons{
        display:grid;
        grid-template-columns:repeat(3, 1fr);
        gap:8px;
    }

    #gramButtons.hidden,
    #pieceButtons.hidden{
        display:none;
    }

    .amount,
    .piece{
        margin:0;
        padding:13px 8px;
    }

    .food-entry{
        padding-right:78px;
    }

    .goal-row{
        align-items:flex-start;
    }

    .calculator-fields,
    .calorie-targets{
        grid-template-columns:1fr;
    }

    .daily-calories-intro h2{
        font-size:21px;
    }
}

#loginButton,
#addFoodButton{
    background:#ff8c00;
    color:#171717;
}

#loginButton:hover,
#addFoodButton:hover{
    background:#ffab3d;
}

#signupButton,
#customFoodButton,
#logoutButton,
#resetButton{
    background:#414141;
    color:#f2f2f2;
}

#signupButton:hover,
#customFoodButton:hover,
#logoutButton:hover{
    background:#555;
}

#resetButton:hover,
.delete-button:hover{
    background:#b43a36;
}

button:focus-visible,
input:focus-visible{
    outline:3px solid rgba(255,167,51,.55);
    outline-offset:2px;
}

.food-menu-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.food-menu-header h2{
    margin:0;
}

/* Section Tabs */
.section-tabs{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:10px;
    margin:24px 0 20px;
}

.tab-btn{
    --tab-accent:#ffab3d;
    flex:1;
    min-width:0;
    min-height:48px;
    padding:10px 8px;
    border:1px solid #484848;
    border-radius:12px;
    background:#2d2d2d;
    color:#999;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    position:relative;
    box-shadow:inset 0 -3px 0 var(--tab-accent), 0 4px 12px rgba(0,0,0,.12);
    transition:color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#trackerTabBtn{--tab-accent:#ff9f43}
#myMealsTabBtn{--tab-accent:#3dcc91}
#recipesTabBtn{--tab-accent:#5aa9ff}
#dailyCaloriesTabBtn{--tab-accent:#c38aff}

.tab-btn::before{
    content:"";
    display:inline-block;
    width:6px;
    height:6px;
    margin:0 7px 1px 0;
    border-radius:50%;
    background:var(--tab-accent);
    opacity:.85;
    vertical-align:middle;
}

.tab-btn:hover{
    color:#fff;
    background:#3a3a3a;
    border-color:var(--tab-accent);
    transform:translateY(-1px);
}

.tab-btn.active{
    color:#171717;
    background:var(--tab-accent);
    border-color:var(--tab-accent);
    box-shadow:0 5px 14px rgba(0,0,0,.2);
    transform:translateY(-1px);
}

.tab-btn.active::before{
    background:#171717;
    opacity:.7;
}

body[data-theme="light"] .tab-btn{color:#66717c}
body[data-theme="light"] .tab-btn{background:#fff;border-color:#d4d9df;box-shadow:inset 0 -3px 0 var(--tab-accent), 0 4px 12px rgba(34,45,58,.08)}
body[data-theme="light"] .tab-btn:hover{color:#20252b;background:#fff}
body[data-theme="light"] .tab-btn.active{color:#171717;background:var(--tab-accent)}

/* Section Content */
.section-content{
    display:none;
}

.section-content.active{
    display:block;
}

.daily-calories-intro{
    margin:26px 0 22px;
    text-align:left;
}
.daily-calories-intro h2{
    margin:0 0 8px;
    font-size:24px;
}
.daily-calories-intro > p:last-child{
    margin:0;
    color:#bdbdbd;
    font-size:14px;
    line-height:1.6;
}
.daily-calories-form{
    display:grid;
    gap:16px;
    text-align:left;
}
.calculator-step{
    padding:18px;
    background:#363636;
    border:1px solid #484848;
    border-radius:16px;
}
.step-heading{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin-bottom:18px;
}
.step-heading > span{
    display:grid;
    place-items:center;
    width:28px;
    height:28px;
    flex:0 0 28px;
    border-radius:50%;
    background:#ff8c00;
    color:#171717;
    font-weight:800;
}
.step-heading h3{
    margin:0 0 4px;
    font-size:17px;
}
.step-heading p{
    margin:0;
    color:#a9a9a9;
    font-size:12px;
    line-height:1.45;
}
.calculator-fields{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px;
}
.calculator-fields label,
.activity-option{
    color:#e7e7e7;
    font-size:13px;
    font-weight:700;
}
.calculator-fields input,
.calculator-fields select{
    display:block;
    width:100%;
    margin-top:7px;
    padding:12px;
    box-sizing:border-box;
    border:1px solid #555;
    border-radius:10px;
    background:#242424;
    color:#fff;
    font:inherit;
    font-weight:500;
}
.calculator-fields input:focus,
.calculator-fields select:focus{
    outline:none;
    border-color:#ff8c00;
}
.calculator-fields .unit-select{
    float:right;
    width:auto;
    margin-top:-7px;
    padding:5px 7px;
    font-size:11px;
    font-weight:700;
}
.imperial-height-fields{
    display:flex;
    gap:8px;
    margin-top:7px;
}
.imperial-height-fields input{
    flex:1;
    min-width:0;
    margin-top:0;
}
.imperial-height-fields.hidden{
    display:none;
}
.unit-label{
    float:right;
    color:#999;
    font-size:11px;
    font-weight:600;
}
.activity-option{
    display:flex;
    align-items:center;
    gap:11px;
    margin-top:9px;
    padding:12px;
    border:1px solid #4c4c4c;
    border-radius:10px;
    cursor:pointer;
    transition:.2s ease;
}
.activity-option:hover,
.activity-option:has(input:checked){
    border-color:#ff8c00;
    background:#3f352a;
}
.activity-option input{
    accent-color:#ff8c00;
}
.activity-option span{
    flex:1;
}
.activity-option strong,
.activity-option small{
    display:block;
}
.activity-option small{
    margin-top:3px;
    color:#a9a9a9;
    font-size:11px;
    font-weight:500;
}
.activity-option b{
    color:#ffab3d;
    font-size:13px;
}
.calculate-button{
    margin-top:0;
    background:#ff8c00;
    color:#171717;
}
.calculate-button:hover{
    background:#ffab3d;
}
.calculate-again-button{
    margin-top:16px;
    padding:11px 16px;
    background:transparent;
    border:1px solid #ff8c00;
    color:#ffab3d;
    font-size:14px;
}
.calculate-again-button:hover{
    background:#ff8c00;
    color:#171717;
}
.daily-calories-result{
    margin-top:18px;
    padding:22px 18px;
    border:1px solid rgba(255,140,0,.5);
    border-radius:16px;
    background:linear-gradient(145deg,#40301f,#2f2f2f);
    text-align:center;
}
.result-kicker{
    margin:0 0 7px;
    color:#ffab3d;
    font-size:12px;
    font-weight:800;
    letter-spacing:1px;
    text-transform:uppercase;
}
#maintenanceCalories{
    display:block;
    font-size:36px;
    line-height:1.1;
}
.daily-calories-result > span{
    display:block;
    margin-top:5px;
    color:#c7c7c7;
    font-size:13px;
}
.calorie-targets{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    margin-top:20px;
    text-align:left;
}
.calorie-targets div{
    padding:13px;
    border-radius:10px;
    background:rgba(0,0,0,.2);
}
.calorie-targets span,
.calorie-targets strong,
.calorie-targets small{
    display:block;
}
.calorie-targets span{
    color:#d6d6d6;
    font-size:12px;
    font-weight:700;
}
.calorie-targets strong{
    margin:5px 0 3px;
    color:#fff;
    font-size:16px;
}
.calorie-targets small{
    color:#aaa;
    font-size:11px;
}
.result-note{
    margin:16px 0 0;
    color:#bdbdbd;
    font-size:11px;
}

/* Recipes Grid */
.recipes-grid{
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:20px;
}

.recipe-card{
    display:flex;
    gap:16px;
    padding:16px;
    background:#363636;
    border-radius:14px;
    border:1px solid #444;
    align-items:center;
}

.recipe-card img{
    width:108px;
    height:108px;
    object-fit:contain;
    border-radius:10px;
    flex-shrink:0;
}

.recipe-info{
    flex:1;
}

.recipe-name{
    font-size:18px;
    font-weight:700;
    margin:0 0 8px;
    color:#fff;
}

.recipe-macros{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:8px;
    margin-bottom:12px;
}

.macro-item{
    font-size:12px;
    padding:6px;
    background:#2d2d2d;
    border-radius:6px;
    text-align:center;
}

.macro-item strong{
    display:block;
    font-size:14px;
    margin-bottom:2px;
}

.macro-item-kcal strong { color:#ffab3d; }
.macro-item-protein strong { color:#65a9ff; }
.macro-item-carbs strong { color:#f4c95d; }
.macro-item-fat strong { color:#f17b9a; }

.recipe-actions{
    display:flex;
    gap:8px;
}

.recipe-btn{
    padding:10px 14px;
    background:#ff8c00;
    color:#000;
    border:none;
    border-radius:8px;
    font-weight:700;
    font-size:14px;
    cursor:pointer;
    transition:.2s ease;
}

.recipe-btn:hover{
    background:#ffab3d;
    transform:translateY(-2px);
}

.add-recipe-btn{
    padding:10px 12px;
    background:#3d9b57;
    color:#fff;
    border:none;
    border-radius:8px;
    font-weight:700;
    font-size:14px;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:4px;
    transition:.2s ease;
}

.add-recipe-btn:hover{
    background:#2d7a44;
    transform:translateY(-2px);
}

/* Modal */
.modal{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.7);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:1000;
}

.modal.hidden{
    display:none;
}

.modal-content{
    position:relative;
    background:#2b2b2b;
    border-radius:16px;
    padding:24px;
    max-width:600px;
    width:90%;
    box-sizing:border-box;
    max-height:80vh;
    overflow-y:auto;
    box-shadow:0 20px 60px rgba(0,0,0,.6);
}

.modal-close{
    position:absolute;
    top:12px;
    right:12px;
    width:32px;
    height:32px;
    border:none;
    background:#444;
    color:#fff;
    font-size:24px;
    border-radius:50%;
    cursor:pointer;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.2s ease;
}

.modal-close:hover{
    background:#555;
    transform:scale(1.1);
}

.guide-modal-content{
    max-width:320px;
    width:calc(100% - 32px);
    padding:18px;
    text-align:left;
}

#beginnerGuide{
    position:fixed;
    inset:0;
    z-index:1100;
    box-sizing:border-box;
    align-items:center;
    justify-content:center;
    padding:16px;
    background:rgba(0,0,0,.72);
}

.guide-modal-content h2{
    margin:0 0 7px;
    color:#ff8c00;
    font-size:21px;
}

.guide-modal-content > p:not(.eyebrow){
    margin:0;
    color:#d2d2d2;
    font-size:13px;
    line-height:1.45;
}

.guide-progress{
    display:flex;
    gap:7px;
    margin:16px 0;
}

.guide-progress span{
    width:28px;
    height:4px;
    border-radius:2px;
    background:#555;
}

.guide-progress span.active{
    background:#ff8c00;
}

.guide-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.guide-skip-button{
    margin:0;
    padding:10px 0;
    background:transparent;
    color:#aeb5bb;
}

.guide-skip-button:hover{
    background:transparent;
    color:#fff;
    transform:none;
}

.support-modal-content{
    max-width:560px;
}

.support-header{
    padding-right:28px;
    text-align:left;
}

.support-header h2{
    margin:0 0 8px;
    color:#ff8c00;
    font-size:28px;
}

.support-header p:last-child{
    margin:0;
    color:#c8c8c8;
    line-height:1.6;
}

.support-form{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:24px;
    text-align:left;
}

.support-form label{
    color:#e6e6e6;
    font-size:14px;
    font-weight:700;
}

.support-form textarea{
    width:100%;
    box-sizing:border-box;
    margin:0 0 8px;
    padding:13px 14px;
    border:1px solid #555;
    border-radius:8px;
    background:#202020;
    color:#fff;
    font:inherit;
    resize:vertical;
}

.support-form textarea:focus{
    outline:2px solid #ff8c00;
    outline-offset:1px;
    border-color:#ff8c00;
}

.support-form button[type="submit"]{
    margin-top:4px;
}

.support-form button:disabled{
    cursor:wait;
    opacity:.65;
}

.support-status{
    min-height:22px;
    margin:4px 0 0;
    color:#8fda9e;
    font-size:13px;
    line-height:1.5;
}

.support-threads-section{
    margin-top:28px;
    border-top:1px solid #444;
    padding-top:20px;
    text-align:left;
}

.support-threads-section h3{
    margin:0 0 12px;
    color:#ffab3d;
    font-size:17px;
}

.support-threads{
    display:grid;
    gap:8px;
}

.support-thread-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    width:100%;
    margin:0;
    padding:12px 14px;
    border:1px solid #555;
    border-radius:8px;
    background:#353535;
    color:#fff;
    text-align:left;
}

.support-thread-card:hover{
    background:#444;
    transform:none;
}

.support-thread-card span{
    display:grid;
    gap:4px;
    min-width:0;
}

.support-thread-card strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.support-thread-card small,
.support-thread-card b,
.support-conversation-status{
    color:#aeb5bb;
    font-size:12px;
}

.support-thread-card b{
    flex:0 0 auto;
    color:#8fda9e;
}

.support-conversation{
    margin-top:24px;
    text-align:left;
}

.support-conversation-header,
.support-reply-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.support-back-button{
    margin:0;
    padding:8px 10px;
    background:transparent;
    color:#ffab3d;
    font-size:13px;
}

.support-back-button:hover{
    background:transparent;
    transform:none;
}

.support-messages{
    display:grid;
    gap:10px;
    max-height:320px;
    margin:16px 0;
    overflow-y:auto;
    padding:4px;
}

.support-message{
    max-width:85%;
    padding:11px 13px;
    border-radius:10px 10px 10px 2px;
    background:#3a3a3a;
}

.support-message.own{
    justify-self:end;
    border-radius:10px 10px 2px 10px;
    background:#5a3c1d;
}

.support-message strong,
.support-message small{
    color:#ffab3d;
    font-size:12px;
}

.support-message p{
    margin:5px 0;
    color:#f2f2f2;
    line-height:1.5;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}

.support-message small{
    color:#aeb5bb;
}

.support-reply-form{
    border-top:1px solid #444;
    margin-top:18px;
    padding:18px;
    border:1px solid #444;
    border-radius:12px;
    background:#252525;
}

.support-reply-label{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
    color:#f2f2f2;
    font-size:14px;
    font-weight:700;
}

.support-reply-label small{
    color:#9da5ac;
    font-size:11px;
    font-weight:400;
}

.support-reply-form textarea{
    width:100%;
    box-sizing:border-box;
    min-height:92px;
    margin:0 0 12px;
    padding:13px 14px;
    border:1px solid #555;
    border-radius:9px;
    background:#1d1d1d;
    color:#fff;
    font:inherit;
    line-height:1.5;
    resize:vertical;
}

.support-reply-form textarea:focus{
    outline:2px solid #ff8c00;
    outline-offset:1px;
    border-color:#ff8c00;
}

.support-close-thread-button{
    margin:0;
    padding:10px 12px;
    background:#633b3b;
    color:#fff;
}

.support-close-thread-button:hover{
    background:#814747;
}

.support-empty,
.support-loading{
    margin:8px 0;
    color:#aeb5bb;
    font-size:13px;
}

.recipe-detail{
    color:#fff;
}

.recipe-detail h2{
    margin:0 0 16px;
    color:#ff8c00;
    font-size:24px;
}

.recipe-detail h3{
    margin:16px 0 8px;
    color:#ffab3d;
    font-size:16px;
}

.recipe-detail a{
    display:inline-block;
    margin:8px 0;
    padding:10px 14px;
    background:#ff8c00;
    color:#000;
    text-decoration:none;
    border-radius:8px;
    font-weight:700;
    transition:.2s ease;
}

.recipe-detail a:hover{
    background:#ffab3d;
}

.recipe-detail p{
    line-height:1.6;
    color:#d6d6d6;
    margin:8px 0;
}

/* Notification */
.notification{
    position:fixed;
    bottom:20px;
    left:20px;
    background:#3d9b57;
    color:#fff;
    padding:16px 20px;
    border-radius:10px;
    font-weight:700;
    font-size:14px;
    box-shadow:0 4px 12px rgba(0,0,0,.3);
    animation:slideIn .3s ease, slideOut .3s ease 2.7s forwards;
    z-index:999;
}

.notification.hidden{
    display:none;
}

@keyframes slideIn{
    from{
        transform:translateX(-400px);
        opacity:0;
    }
    to{
        transform:translateX(0);
        opacity:1;
    }
}

@keyframes slideOut{
    from{
        transform:translateX(0);
        opacity:1;
    }
    to{
        transform:translateX(-400px);
        opacity:0;
    }
}

.bottom-buttons{
    display:flex;
    gap:12px;
    margin-top:20px;
}

.bottom-buttons button{
    flex:1;
}

.my-meals-header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:16px;
    margin:24px 0 20px;
    text-align:left;
}
.my-meals-header h2{
    margin:0 0 6px;
}
.my-meals-header p:last-child{
    margin:0;
    color:#bdbdbd;
    font-size:13px;
}
.primary-action,
.secondary-action{
    margin:0;
    padding:11px 14px;
    font-size:14px;
    white-space:nowrap;
}
.primary-action{
    background:#ff8c00;
    color:#171717;
}
.primary-action:hover{background:#ffab3d}
.secondary-action{
    background:transparent;
    border:1px solid #666;
    color:#ddd;
}
.my-meals-list{
    display:grid;
    gap:14px;
    text-align:left;
}
.meal-card,
.empty-meals{
    padding:16px;
    border:1px solid #484848;
    border-radius:14px;
    background:#363636;
}
.meal-card-heading{
    display:flex;
    align-items:center;
    gap:8px;
}
.meal-open-button{
    flex:1;
    margin:0;
    padding:0;
    background:transparent;
    color:#fff;
    text-align:left;
    font-size:18px;
}
.meal-open-button:hover{background:transparent;transform:none;color:#ffab3d}
.meal-open-button h3{margin:0}
.meal-favorite-button{
    width:38px;
    height:38px;
    margin:0;
    padding:0;
    background:transparent;
    color:#ffab3d;
    font-size:25px;
}
.meal-favorite-button:hover{background:#4a4a4a;transform:none}
.meal-macros{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
    margin:14px 0;
}
.meal-macros span{
    padding:8px 5px;
    border-radius:8px;
    background:#2d2d2d;
    color:#bbb;
    font-size:11px;
    text-align:center;
}
.meal-macros strong{display:block;color:#ffab3d;font-size:14px}
.meal-card-actions,
.meal-editor-actions{
    display:flex;
    gap:8px;
}
.meal-card-actions button,
.meal-editor-actions button{
    flex:1;
    margin:0;
    padding:10px 8px;
    font-size:12px;
}
.meal-view-button{background:#454545}
.meal-add-button{background:#3d9b57}
.meal-delete-button{background:#633b3b}
.empty-meals{text-align:center;color:#bbb}
.empty-meals h3{margin:0 0 6px;color:#fff}
.empty-meals p{margin:0;font-size:13px}
.meal-modal-content{text-align:left}
.meal-modal-content h2{margin:0 0 18px;color:#ff8c00}
.meal-name-label{display:block;color:#ddd;font-weight:700;font-size:13px}
.meal-name-label input,
.ingredient-row select,
.ingredient-row input,
.custom-ingredient-inputs input{
    width:100%;
    box-sizing:border-box;
    margin-top:7px;
    padding:11px;
    border:1px solid #555;
    border-radius:9px;
    background:#242424;
    color:#fff;
    font:inherit;
}
.meal-total-panel,
.ingredient-adder,
.custom-ingredient-adder{
    margin-top:16px;
    padding:14px;
    border:1px solid #484848;
    border-radius:12px;
    background:#303030;
}
.meal-total-panel > span{color:#aaa;font-size:12px;font-weight:700;text-transform:uppercase}
.meal-total-panel .meal-macros{margin:10px 0 0}
.meal-editor-heading{margin:20px 0 8px;font-size:16px}
.meal-ingredients{display:grid;gap:8px}
.meal-ingredient{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border-radius:9px;background:#3b3b3b}
.meal-ingredient strong,.meal-ingredient span{display:block}
.meal-ingredient span{margin-top:3px;color:#bbb;font-size:11px}
.meal-ingredient button{margin:0;padding:7px 9px;border-radius:7px;background:#633b3b;font-size:11px;white-space:nowrap}
.ingredient-adder h3,.custom-ingredient-adder h3{margin:0 0 8px;font-size:14px}
.meal-food-search{margin:0 0 8px}
.meal-food-search.hidden{display:none}
.meal-food-list{display:grid;gap:6px;max-height:190px;overflow-y:auto;padding-right:3px}
.meal-food-list.hidden{display:none}
.meal-food-option{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin:0;padding:9px 10px;border:1px solid #4d4d4d;border-radius:8px;background:#3a3a3a;color:#eee;font-size:12px;text-align:left}
.meal-food-option:hover,.meal-food-option.selected{border-color:#ffab3d;background:#463b2d;transform:none}
.meal-food-option small{color:#aaa;font-size:10px;white-space:nowrap}
.meal-food-empty{margin:5px 0 8px;color:#999;font-size:12px}
.meal-selected-food{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#ddd;font-size:12px}
.ingredient-row{display:grid;grid-template-columns:1fr 82px auto auto;align-items:end;gap:7px}
.ingredient-row.hidden{display:none}
.ingredient-row select,.ingredient-row input{margin:0}
.ingredient-row span{padding-bottom:10px;color:#bbb;font-size:11px}
.ingredient-row button,.custom-ingredient-adder > button{margin:0;padding:11px 12px;font-size:12px}
.meal-hint{margin:8px 0 0;color:#999;font-size:11px}
.custom-ingredient-toggle{
    width:100%;
    text-align:left;
    background:#454545;
}
.custom-ingredient-toggle:hover{background:#505050}
.custom-ingredient-fields h3{margin:0 0 9px;font-size:13px;color:#ddd}
.custom-ingredient-inputs{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.custom-ingredient-inputs input{margin:0}
.custom-ingredient-adder > button{margin-top:8px;width:100%;background:#454545}
.custom-ingredient-adder > .custom-ingredient-toggle{margin-top:0}
.meal-editor-actions{margin-top:18px}
body[data-theme="light"] .my-meals-header p:last-child,
body[data-theme="light"] .meal-ingredient span,
body[data-theme="light"] .meal-hint{color:#66717c}
body[data-theme="light"] .meal-card,
body[data-theme="light"] .empty-meals,
body[data-theme="light"] .meal-total-panel,
body[data-theme="light"] .ingredient-adder,
body[data-theme="light"] .custom-ingredient-adder{background:#f5f7f9;border-color:#d4d9df}
body[data-theme="light"] .meal-open-button,
body[data-theme="light"] .empty-meals h3{color:#20252b}
body[data-theme="light"] .meal-macros span,
body[data-theme="light"] .meal-ingredient{background:#edf0f3}
body[data-theme="light"] .meal-food-option{border-color:#d4d9df;background:#fff;color:#20252b}
body[data-theme="light"] .meal-food-option:hover,
body[data-theme="light"] .meal-food-option.selected{background:#fff4e6;border-color:#ffab3d}
body[data-theme="light"] .meal-food-option small,
body[data-theme="light"] .meal-food-empty{color:#66717c}
body[data-theme="light"] .meal-selected-food{color:#20252b}
body[data-theme="light"] .meal-name-label{color:#20252b}
body[data-theme="light"] .meal-name-label input,
body[data-theme="light"] .ingredient-row select,
body[data-theme="light"] .ingredient-row input,
body[data-theme="light"] .custom-ingredient-inputs input{background:#fff;color:#20252b;border-color:#c7cdd4}

@media (max-width:480px){
    .section-tabs{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:8px;
    }

    .tab-btn{
        min-width:0;
        margin-top:0;
        min-height:44px;
        padding:10px 4px;
        font-size:12px;
    }

    .my-meals-header{align-items:stretch;flex-direction:column}
    .my-meals-header .primary-action{width:100%}
    .meal-macros{grid-template-columns:repeat(2,1fr)}
    .meal-card-actions{flex-wrap:wrap}
    .meal-card-actions button{flex:1 1 30%}
    .ingredient-row{grid-template-columns:1fr 70px auto;}
    .ingredient-row span{grid-column:3;grid-row:1}
    .ingredient-row button{grid-column:1 / -1}
    .meal-ingredient{align-items:flex-start}
    .meal-ingredient span{max-width:210px}

    .recipe-card{
        flex-direction:column;
        align-items:stretch;
        gap:12px;
        padding:12px;
    }

    .recipe-card img{
        width:100%;
        height:auto;
        max-height:220px;
        object-fit:contain;
        object-position:center;
    }

    .recipe-info{
        min-width:0;
    }

    .recipe-macros{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:6px;
    }

    .recipe-actions{
        width:100%;
        gap:8px;
    }

    .recipe-actions button{
        flex:1;
        min-width:0;
        margin-top:0;
    }
}

body[data-theme="light"] .recipe-card,
body[data-theme="light"] .modal-content{
    background:#f5f7f9;
    border-color:#d4d9df;
}

body[data-theme="light"] .macro-item{
    background:#edf0f3;
}

body[data-theme="light"] .recipe-name,
body[data-theme="light"] .recipe-detail h2,
body[data-theme="light"] .recipe-detail h3{
    color:#20252b;
}

body[data-theme="light"] .recipe-detail p{
    color:#66717c;
}

body[data-theme="light"] .support-header p:last-child,
body[data-theme="light"] .support-form label{
    color:#4f5a64;
}

body[data-theme="light"] .support-form textarea{
    background:#fff;
    border-color:#c7cdd4;
    color:#20252b;
}

body[data-theme="light"] .support-threads-section,
body[data-theme="light"] .support-reply-form{
    border-color:#d4d9df;
}

body[data-theme="light"] .support-thread-card{
    border-color:#c7cdd4;
    background:#edf0f3;
    color:#20252b;
}

body[data-theme="light"] .support-thread-card:hover{
    background:#e1e5e9;
}

body[data-theme="light"] .support-message{
    background:#edf0f3;
}

body[data-theme="light"] .support-message.own{
    background:#ffe7c7;
}

body[data-theme="light"] .support-message p{
    color:#20252b;
}

body[data-theme="light"] .support-reply-form{
    background:#f5f7f9;
    border-color:#d4d9df;
}

body[data-theme="light"] .support-reply-label{
    color:#20252b;
}

body[data-theme="light"] .support-reply-form textarea{
    background:#fff;
    border-color:#c7cdd4;
    color:#20252b;
}

body[data-theme="light"] .modal-close{
    background:#d4d9df;
    color:#20252b;
}

body[data-theme="light"] .modal-close:hover{
    background:#c7cdd4;
}

.food-search{
    position:relative;
    display:flex;
    align-items:center;
    margin-top:12px;
}

.food-search input{
    width:100%;
    box-sizing:border-box;
    margin:0;
    padding:13px 42px 13px 15px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#122022;
    color:var(--text);
    font:inherit;
    transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.food-search input::placeholder{
    color:#7f9795;
}

.food-search input:focus{
    outline:none;
    border-color:var(--accent);
    background:#152729;
    box-shadow:0 0 0 3px rgba(97,209,195,.14);
}

#clearFoodSearch,
#clearMealFoodSearch{
    position:absolute;
    right:8px;
    width:30px;
    height:30px;
    margin:0;
    padding:0;
    border:0;
    border-radius:50%;
    background:transparent;
    color:#b8b8b8;
    font-size:22px;
    line-height:1;
    transform:none;
    box-shadow:none;
}

#clearFoodSearch:hover,
#clearMealFoodSearch:hover{
    background:#555;
    color:#fff;
    transform:none;
}

.menu-close{
    width:36px;
    height:36px;
    margin:0;
    padding:0;
    border:1px solid #555;
    border-radius:50%;
    background:#414141;
    color:#f2f2f2;
    font-size:25px;
    font-weight:400;
    line-height:1;
}

.menu-close:hover{
    background:#d9534f;
}

.food{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    width:100%;
    margin-top:10px;
    padding:14px 16px;
    background:linear-gradient(135deg, #414141, #343434);
    text-align:left;
    box-shadow:0 5px 12px rgba(0,0,0,.16);
}

.food:hover{
    border-color:#ffa733;
    background:linear-gradient(135deg, #4b4b4b, #393939);
}

.food-name{
    font-size:15px;
    font-weight:800;
}

.food-details{
    flex:0 0 auto;
    color:#ffb24d;
    font-size:12px;
    font-weight:700;
    text-align:right;
}

#foodMenu.custom-mode > h2,
#foodMenu.custom-mode > .food-search,
#foodMenu.custom-mode > #customFoodButton,
#foodMenu.custom-mode > #foodList{
    display:none;
}

#customFoodMenu{
    margin-top:16px;
    padding:18px;
    border:1px solid rgba(255,167,51,.35);
    border-radius:16px;
    background:linear-gradient(145deg, #393939, #292929);
    text-align:left;
}

#customFoodMenu input{
    width:100%;
    box-sizing:border-box;
    margin-top:10px;
    padding:13px 14px;
    border:1px solid #5c5c5c;
    border-radius:10px;
    background:#222;
    color:#fff;
    font:inherit;
}

#customFoodMenu input:focus{
    outline:none;
    border-color:#ff9f2f;
    box-shadow:0 0 0 3px rgba(255,159,47,.14);
}

#addCustomFood{
    width:100%;
    margin-top:14px;
    background:#ff8c00;
    color:#171717;
}

#addCustomFood:hover{
    background:#ffab3d;
}

body[data-theme="light"] #customFoodMenu{
    background:linear-gradient(145deg, #ffffff, #f1f4f6);
    border-color:rgba(214,125,0,.35);
}

body[data-theme="light"] #customFoodMenu input{
    background:#fff;
    color:#20252b;
    border-color:#c7cdd4;
}

body[data-theme="light"] .food-details{
    color:#c46c00;
}

@media (max-width:480px){
    .food{
        align-items:flex-start;
        flex-direction:column;
        gap:4px;
    }
}


/* Refined visual system */
:root{
    --page:#10191b;
    --surface:#192628;
    --surface-raised:#223536;
    --surface-soft:#2a4141;
    --border:rgba(187,220,216,.17);
    --text:#eef7f5;
    --muted:#9db2b0;
    --accent:#61d1c3;
    --accent-strong:#3eb5aa;
    --mint:#91d878;
    --danger:#f27b73;
}

body{
    min-height:100vh;
    background:
        linear-gradient(135deg, rgba(97,209,195,.055), transparent 38%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 28px),
        var(--page);
    color:var(--text);
}

.install-prompt{
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1200;
    display:flex;
    align-items:center;
    gap:12px;
    min-height:52px;
    padding:8px 14px 8px 18px;
    box-sizing:border-box;
    background:var(--accent);
    color:#132326;
    box-shadow:0 5px 18px rgba(0,0,0,.24);
    font-weight:800;
}

.install-prompt[hidden]{
    display:none;
}

.install-prompt-message{
    flex:1;
}

.install-prompt-get,
.install-prompt-close{
    width:auto;
    margin:0;
    padding:8px 14px;
    border-radius:8px;
    font-size:14px;
}

.install-prompt-get{
    background:#132326;
    color:#fff;
}

.install-prompt-get:hover{
    background:#29484a;
    transform:none;
}

.install-prompt-close{
    padding:4px 9px;
    background:transparent;
    color:#132326;
    font-size:24px;
    line-height:1;
}

.install-prompt-close:hover{
    background:rgba(19,35,38,.12);
    transform:none;
}

.install-tutorial-content{
    max-width:560px;
}

.install-tutorial-content h2{
    margin:0 0 22px;
    color:var(--accent);
}

.install-tutorial-content section + section{
    margin-top:22px;
    padding-top:18px;
    border-top:1px solid var(--border);
}

.install-tutorial-content h3{
    margin:0 0 8px;
    color:var(--text);
}

.install-tutorial-content ol{
    margin:0;
    padding-left:22px;
    color:var(--muted);
    line-height:1.7;
}

@media (max-width:480px){
    .install-prompt{
        padding-left:12px;
    }

    .install-prompt-get{
        padding:8px 11px;
    }
}

.container,
.login-container{
    border:1px solid var(--border);
    background:rgba(23,35,46,.94);
    box-shadow:0 24px 60px rgba(0,0,0,.28);
}

.container{
    max-width:680px;
    margin:32px auto;
    padding:32px;
    border-radius:18px;
}

.tracker-header{
    padding-bottom:22px;
    border-bottom:1px solid var(--border);
}

.tracker-header h1{
    color:var(--text);
    font-size:30px;
    letter-spacing:-.3px;
}

.eyebrow{
    color:var(--accent);
    letter-spacing:1.6px;
}

.user-email,
.food-entry p,
.macro-summary span{
    color:var(--muted);
}

.theme-toggle{
    border-color:var(--border);
    background:var(--surface-raised);
}

.calorie-box{
    margin:24px 0;
    padding:26px;
    border:1px solid rgba(97,209,195,.24);
    border-radius:14px;
    background:linear-gradient(145deg, #27403f, #1d2e30);
}

.calorie-box > p:first-child{
    margin:0 0 14px;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    letter-spacing:1.4px;
    text-transform:uppercase;
}

.calorie-summary{
    justify-content:space-between;
}

.calorie-summary h2{
    color:var(--text);
    font-size:36px;
    letter-spacing:-.5px;
}

.calorie-meta{
    border-color:var(--border);
}

.calorie-meta p{
    color:#d6e0e4;
}

.calorie-meta #remainingValue{
    color:var(--accent);
}

.calorie-adjuster button{
    box-shadow:none;
}

#addCaloriesBtn{
    background:var(--mint);
}

#subtractCaloriesBtn{
    background:#bd6266;
}

.macro-summary{
    gap:10px;
}

.macro-summary div{
    border:1px solid var(--border);
    border-radius:10px;
    background:rgba(13,21,28,.28);
}

.macro-summary strong{
    color:var(--accent);
}

.food-entry{
    border:1px solid var(--border);
    border-left:4px solid var(--accent);
    border-radius:10px;
    background:var(--surface-raised);
}

#addFoodButton,
#loginButton,
#addCustomFood,
#saveGoalButton{
    background:var(--accent);
    color:#18212a;
    box-shadow:0 8px 18px rgba(62,181,170,.18);
}

#addFoodButton:hover,
#loginButton:hover,
#addCustomFood:hover,
#saveGoalButton:hover{
    background:#8be0d7;
}

#signupButton,
#customFoodButton,
#logoutButton,
#resetButton,
.goal-toggle{
    border:1px solid var(--border);
    background:var(--surface-soft);
    color:var(--text);
}

#signupButton:hover,
#customFoodButton:hover,
#logoutButton:hover,
#resetButton:hover,
.goal-toggle:hover{
    background:#355452;
}

.food,
.amount{
    border:1px solid var(--border);
    background:var(--surface-raised);
    color:var(--text);
    box-shadow:none;
}

.food:hover,
.amount:hover{
    border-color:var(--accent);
    background:#2f4a49;
}

.food-details{
    color:var(--accent);
}

.login-container{
    max-width:440px;
    padding:28px 34px 34px;
    border-radius:18px;
}

.subtitle{
    color:var(--muted);
}

#loginBox input,
.goal-row input,
#customFoodMenu input{
    border-color:var(--border);
    background:#101b23;
    color:var(--text);
}

#loginBox input:focus,
.goal-row input:focus,
#customFoodMenu input:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(255,177,74,.14);
}

.goal-card,
#customFoodMenu{
    border-color:rgba(97,209,195,.24);
    background:linear-gradient(145deg, #223c3c, #192a2c);
}

.goal-progress{
    background:#0e171e;
}

#goalProgressBar{
    background:var(--mint);
}

.delete-button{
    background:var(--danger);
}

@media (max-width:480px){
    .container{
        margin:14px 10px;
        padding:22px 16px;
    }

    .tracker-header h1{
        font-size:25px;
    }

    .calorie-summary{
        align-items:flex-start;
        flex-direction:column;
        gap:16px;
    }

    .calorie-meta{
        width:100%;
        box-sizing:border-box;
        padding:12px 0 0;
        border-top:1px solid var(--border);
        border-left:0;
    }

    .login-container{
        width:calc(100% - 20px);
        padding:22px 20px 26px;
    }
    .food-details{
        text-align:left;
    }
}

body[data-theme="light"]{
    --page:#f1f6f5;
    --surface:#ffffff;
    --surface-raised:#f7fbfa;
    --surface-soft:#e4f0ee;
    --border:rgba(35,73,71,.18);
    --text:#183331;
    --muted:#627876;
    --accent:#168f84;
    --accent-strong:#08766d;
    --mint:#4d9f62;
    --danger:#c95755;
    background:
        linear-gradient(135deg, rgba(22,143,132,.08), transparent 38%),
        repeating-linear-gradient(135deg, rgba(24,51,49,.025) 0, rgba(24,51,49,.025) 1px, transparent 1px, transparent 28px),
        var(--page);
    color:var(--text);
}

body[data-theme="light"] .container,
body[data-theme="light"] .login-container{
    border-color:var(--border);
    background:rgba(255,255,255,.94);
    box-shadow:0 24px 60px rgba(34,75,71,.13);
}

body[data-theme="light"] .tracker-header{
    border-color:var(--border);
}

body[data-theme="light"] .tracker-header h1,
body[data-theme="light"] .calorie-summary h2,
body[data-theme="light"] .food-name,
body[data-theme="light"] .goal-card h3{
    color:var(--text);
}

body[data-theme="light"] .user-email,
body[data-theme="light"] .food-entry p,
body[data-theme="light"] .macro-summary span,
body[data-theme="light"] .subtitle{
    color:var(--muted);
}

body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .macro-summary div,
body[data-theme="light"] .food,
body[data-theme="light"] .amount,
body[data-theme="light"] #signupButton,
body[data-theme="light"] #customFoodButton,
body[data-theme="light"] #logoutButton,
body[data-theme="light"] #resetButton,
body[data-theme="light"] .goal-toggle{
    border-color:var(--border);
    background:var(--surface-soft);
    color:var(--text);
}

body[data-theme="light"] .food:hover,
body[data-theme="light"] .amount:hover,
body[data-theme="light"] #signupButton:hover,
body[data-theme="light"] #customFoodButton:hover,
body[data-theme="light"] #logoutButton:hover,
body[data-theme="light"] #resetButton:hover,
body[data-theme="light"] .goal-toggle:hover{
    background:#d6e8e5;
}

body[data-theme="light"] .calorie-box{
    border-color:rgba(22,143,132,.22);
    background:linear-gradient(145deg, #e9f5f2, #f7fbfa);
}

body[data-theme="light"] .calorie-meta,
body[data-theme="light"] .calorie-meta p{
    border-color:var(--border);
    color:#365452;
}

body[data-theme="light"] .calorie-meta #remainingValue,
body[data-theme="light"] .eyebrow,
body[data-theme="light"] .food-details{
    color:var(--accent-strong);
}

body[data-theme="light"] .calorie-meta #goalValue{
    color:var(--text);
}

body[data-theme="light"] .calorie-meta #remainingValue{
    color:var(--accent-strong);
}

body[data-theme="light"] .food-entry{
    border-color:var(--border);
    border-left-color:var(--accent);
    background:var(--surface-raised);
}

body[data-theme="light"] .food-search input,
body[data-theme="light"] #loginBox input,
body[data-theme="light"] .goal-row input,
body[data-theme="light"] #customFoodMenu input{
    border-color:var(--border);
    background:#ffffff;
    color:var(--text);
}

body[data-theme="light"] .food-search input::placeholder{
    color:#7d9692;
}

body[data-theme="light"] .food-search input:focus,
body[data-theme="light"] #loginBox input:focus,
body[data-theme="light"] .goal-row input:focus,
body[data-theme="light"] #customFoodMenu input:focus{
    border-color:var(--accent);
    background:#ffffff;
}

body[data-theme="light"] .goal-card,
body[data-theme="light"] #customFoodMenu{
    border-color:rgba(22,143,132,.22);
    background:linear-gradient(145deg, #ffffff, #edf7f5);
}

body[data-theme="light"] .goal-progress{
    background:#dcebe8;
}

.signup-prompt{
    margin:-4px 0 18px;
    color:#ffa733;
    font-size:13px;
    font-weight:700;
}

.signup-mode #loginButton,
.signup-mode .stay-logged-in{
    display:none;
}

.signup-mode .signup-only:not([hidden]),
.signup-mode #signupPrompt:not([hidden]){
    display:block;
}

.signup-only.hidden,
#signupPrompt.hidden{
    display:none;
}

/* Monochrome palette */
:root{
    --page:#000000;
    --surface:#202020;
    --surface-raised:#2d2d2d;
    --surface-soft:#3a3a3a;
    --border:rgba(255,255,255,.18);
    --text:#ffffff;
    --muted:#bdbdbd;
    --accent:#ffffff;
    --accent-strong:#ffffff;
    --mint:#ffffff;
    --danger:#555555;
}

body{
    background:
        linear-gradient(135deg, rgba(255,255,255,.06), transparent 38%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 1px, transparent 28px),
        var(--page);
    color:var(--text);
}

.container,
.login-container{
    border-color:var(--border);
    background:rgba(32,32,32,.96);
    box-shadow:0 24px 60px rgba(0,0,0,.45);
}

.eyebrow,
.calorie-meta #remainingValue,
.food-details,
.macro-summary strong,
.signup-prompt{
    color:var(--text);
}

.theme-toggle,
.macro-summary div,
.food,
.amount,
#signupButton,
#customFoodButton,
#logoutButton,
#resetButton,
.goal-toggle{
    border-color:var(--border);
    background:var(--surface-soft);
    color:var(--text);
}

.theme-toggle:hover,
.food:hover,
.amount:hover,
#signupButton:hover,
#customFoodButton:hover,
#logoutButton:hover,
#resetButton:hover,
.goal-toggle:hover{
    border-color:#ffffff;
    background:#4a4a4a;
}

.calorie-box{
    border-color:var(--border);
    background:linear-gradient(145deg, #383838, #252525);
}

.calorie-meta,
.calorie-meta p{
    border-color:var(--border);
    color:#dddddd;
}

.food-entry{
    border-color:var(--border);
    border-left-color:#ffffff;
    background:var(--surface-raised);
}

#addFoodButton,
#loginButton,
#addCustomFood,
#saveGoalButton{
    background:#ffffff;
    color:#000000;
    box-shadow:0 8px 18px rgba(0,0,0,.25);
}

#addFoodButton:hover,
#loginButton:hover,
#addCustomFood:hover,
#saveGoalButton:hover{
    background:#d8d8d8;
}

#addCaloriesBtn,
#subtractCaloriesBtn{
    background:#444444;
    color:#ffffff;
}

.goal-card,
#customFoodMenu{
    border-color:var(--border);
    background:linear-gradient(145deg, #333333, #222222);
}

.goal-progress{
    background:#111111;
}

#goalProgressBar,
#goalProgressBar.over-goal{
    background:#ffffff;
}

.delete-button{
    background:#555555;
    color:#ffffff;
}

.delete-button:hover{
    background:#707070;
}

#loginBox input,
.goal-row input,
#customFoodMenu input,
.food-search input{
    border-color:var(--border);
    background:#151515;
    color:#ffffff;
}

#loginBox input:focus,
.goal-row input:focus,
#customFoodMenu input:focus,
.food-search input:focus{
    border-color:#ffffff;
    background:#1d1d1d;
    box-shadow:0 0 0 3px rgba(255,255,255,.14);
}

.food-search input::placeholder{
    color:#999999;
}

#clearFoodSearch:hover,
#clearMealFoodSearch:hover{
    background:#4a4a4a;
    color:#ffffff;
}

body[data-theme="light"]{
    --page:#ffffff;
    --surface:#ffffff;
    --surface-raised:#f2f2f2;
    --surface-soft:#e2e2e2;
    --border:rgba(0,0,0,.18);
    --text:#000000;
    --muted:#555555;
    --accent:#000000;
    --accent-strong:#000000;
    --mint:#000000;
    --danger:#555555;
    background:
        linear-gradient(135deg, rgba(0,0,0,.04), transparent 38%),
        repeating-linear-gradient(135deg, rgba(0,0,0,.025) 0, rgba(0,0,0,.025) 1px, transparent 1px, transparent 28px),
        var(--page);
    color:var(--text);
}

body[data-theme="light"] .container,
body[data-theme="light"] .login-container{
    border-color:var(--border);
    background:rgba(255,255,255,.96);
    box-shadow:0 24px 60px rgba(0,0,0,.12);
}

body[data-theme="light"] .calorie-box{
    border-color:var(--border);
    background:linear-gradient(145deg, #f0f0f0, #ffffff);
}

body[data-theme="light"] .calorie-meta p,
body[data-theme="light"] .calorie-meta{
    color:#333333;
}

body[data-theme="light"] .food,
body[data-theme="light"] .amount,
body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .macro-summary div,
body[data-theme="light"] #signupButton,
body[data-theme="light"] #customFoodButton,
body[data-theme="light"] #logoutButton,
body[data-theme="light"] #resetButton,
body[data-theme="light"] .goal-toggle{
    border-color:var(--border);
    background:var(--surface-soft);
    color:var(--text);
}

body[data-theme="light"] .food:hover,
body[data-theme="light"] .amount:hover,
body[data-theme="light"] #signupButton:hover,
body[data-theme="light"] #customFoodButton:hover,
body[data-theme="light"] #logoutButton:hover,
body[data-theme="light"] #resetButton:hover,
body[data-theme="light"] .goal-toggle:hover{
    background:#cccccc;
}

body[data-theme="light"] .food-entry{
    border-color:var(--border);
    border-left-color:#000000;
    background:#f2f2f2;
}

body[data-theme="light"] .goal-card,
body[data-theme="light"] #customFoodMenu{
    border-color:var(--border);
    background:linear-gradient(145deg, #ffffff, #eeeeee);
}

body[data-theme="light"] #loginBox input,
body[data-theme="light"] .goal-row input,
body[data-theme="light"] #customFoodMenu input,
body[data-theme="light"] .food-search input{
    border-color:var(--border);
    background:#ffffff;
    color:#000000;
}

body[data-theme="light"] .food-search input:focus,
body[data-theme="light"] #loginBox input:focus,
body[data-theme="light"] .goal-row input:focus,
body[data-theme="light"] #customFoodMenu input:focus{
    background:#ffffff;
}

.calorie-summary{
    position:relative;
    justify-content:center;
}

.calorie-summary h2{
    margin-left:auto;
    margin-right:auto;
}

.calorie-meta{
    position:absolute;
    right:0;
}

#addCaloriesBtn{
    background:#245b36;
    color:#ffffff;
}

#subtractCaloriesBtn{
    background:#702b2b;
    color:#ffffff;
}

@media (max-width:480px){
    .calorie-summary{
        align-items:flex-start;
        flex-direction:column;
    }

    .calorie-summary h2{
        width:100%;
        margin-left:0;
        margin-right:0;
        text-align:center;
    }

    .calorie-meta{
        position:static;
    }
}

.custom-amount-button{
    width:100%;
    margin-top:16px;
    padding:12px;
    background:#414141;
    color:#f2f2f2;
    font-size:15px;
}

.custom-amount-button:hover{
    background:#555;
}

.custom-amount-menu{
    margin-top:12px;
    padding:14px;
    border:1px solid #4b4b4b;
    border-radius:12px;
    background:#363636;
    text-align:left;
}

.custom-amount-menu label{
    display:block;
    margin-bottom:8px;
    color:#d6d6d6;
    font-size:13px;
    font-weight:700;
}

.custom-amount-row{
    display:flex;
    gap:8px;
}

.custom-amount-row input{
    min-width:0;
    flex:1;
    box-sizing:border-box;
    padding:12px;
    border:1px solid #666;
    border-radius:10px;
    background:#444;
    color:#fff;
    font:inherit;
}

.custom-amount-row button{
    margin:0;
    padding:12px 16px;
    background:#ff8c00;
    color:#171717;
    font-size:15px;
}

.calorie-ring{
    --calorie-progress:0%;
    --ring-track:#334648;
    --ring-progress:var(--accent);
    display:grid;
    width:168px;
    height:168px;
    flex:0 0 168px;
    place-items:center;
    border-radius:50%;
    background:conic-gradient(var(--ring-progress) var(--calorie-progress), var(--ring-track) var(--calorie-progress) 100%);
    box-shadow:0 10px 24px rgba(0,0,0,.2);
}

.calorie-ring::before{
    content:"";
    grid-area:1 / 1;
    width:calc(100% - 18px);
    height:calc(100% - 18px);
    border-radius:50%;
    background:var(--surface);
}

.calorie-ring-center{
    position:relative;
    z-index:1;
    grid-area:1 / 1;
    display:flex;
    align-items:center;
    flex-direction:column;
    justify-content:center;
    gap:2px;
}

.calorie-ring-center h2{
    margin:0;
    font-size:27px;
    line-height:1.1;
}

.calorie-ring-center span{
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    letter-spacing:1px;
    text-transform:uppercase;
}

.calorie-ring.over-goal{
    --ring-progress:var(--danger);
}

@media (max-width:480px){
    .calorie-ring{
        align-self:center;
    }
}

@media (max-width:480px){
    #beginnerGuide{
        align-items:center;
        justify-content:center;
        padding:16px;
    }
}

.ai-food-menu{
    margin-top:16px;
    padding:18px;
    border:1px solid rgba(255,167,51,.4);
    border-radius:16px;
    background:linear-gradient(145deg,#40372d,#292929);
    text-align:left;
}
.ai-food-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.ai-food-heading h3,
.ai-food-menu h4{
    margin:0;
}
.ai-food-menu textarea,
.ai-food-menu input[type="text"]{
    width:100%;
    box-sizing:border-box;
    margin-top:12px;
    padding:13px 14px;
    border:1px solid #5c5c5c;
    border-radius:10px;
    background:#222;
    color:#fff;
    font:inherit;
    resize:vertical;
}
.ai-photo-label{
    display:block;
    margin-top:12px;
    color:#d6d6d6;
    font-size:13px;
    font-weight:700;
}
.ai-photo-label input{display:block;width:100%;margin-top:7px;color:#bbb}
.ai-primary-button{width:100%;background:#ff8c00;color:#171717}
.ai-primary-button:hover{background:#ffab3d}
.ai-food-status,.ai-help-text{color:#c7c7c7;font-size:13px}
.ai-food-status{min-height:18px}
.ai-ingredient-row{display:grid;grid-template-columns:1fr 100px 90px;gap:8px;align-items:center;margin:9px 0}
.ai-ingredient-row input,.ai-ingredient-row select{width:100%;box-sizing:border-box;padding:10px;border:1px solid #5c5c5c;border-radius:8px;background:#222;color:#fff;font:inherit}
body[data-theme="light"] .ai-food-menu{background:linear-gradient(145deg,#fff8ee,#f1f4f6)}
body[data-theme="light"] .ai-food-menu textarea,
body[data-theme="light"] .ai-ingredient-row input,
body[data-theme="light"] .ai-ingredient-row select{background:#fff;color:#20252b;border-color:#c7cdd4}
@media (max-width:480px){.ai-ingredient-row{grid-template-columns:1fr 82px 78px}}

/* Public entry page */
.home-page{position:relative;z-index:2;max-width:1180px;min-height:100vh;margin:0 auto;padding:28px 42px 54px;box-sizing:border-box}
.home-nav{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px 0 16px;border-bottom:1px solid rgba(255,255,255,.16)}
.home-brand img{display:block;width:126px;height:auto}
.home-auth-actions,.home-hero-actions{display:flex;align-items:center;gap:10px}
.home-auth-actions button,.home-hero-actions button{width:auto;margin:0;padding:12px 18px;border-radius:9px;font-size:14px}
.home-login-button,.home-secondary-action{background:transparent;border:1px solid rgba(255,255,255,.28);color:var(--text)}
.home-login-button:hover,.home-secondary-action:hover{background:var(--surface-soft);border-color:var(--text)}
.home-signup-button,.home-primary-action{background:var(--accent);border:1px solid var(--accent);color:#080808}
.home-signup-button:hover,.home-primary-action:hover{background:#ffa733;border-color:#ffa733}
.home-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,420px);align-items:center;gap:90px;min-height:570px;padding:42px 0 68px}
.home-hero-copy{max-width:650px;text-align:left}
.home-hero h1{margin:14px 0 22px;font-family:"Space Grotesk", "DM Sans", sans-serif;font-size:clamp(44px,6vw,78px);font-weight:600;line-height:1.02;letter-spacing:-1.5px}
.home-hero h1 span{color:#ffa733;font-weight:500}
.home-hero-description{max-width:520px;margin:0 0 30px;color:#bdbdbd;font-size:17px;line-height:1.7}
.home-hero-actions{justify-content:flex-start}.home-primary-action{padding:15px 20px !important}.home-primary-action span{margin-left:12px;font-size:18px}
.home-hero-art{position:relative;display:flex;justify-content:center}.home-hero-art::before{content:"";position:absolute;width:330px;height:330px;border:1px solid rgba(255,167,51,.24);border-radius:50%;transform:rotate(18deg)}
.home-carousel{position:relative;width:100%;min-height:500px}.home-preview-card{position:absolute;inset:0;width:100%;height:max-content;min-height:500px;padding:25px;border:1px solid rgba(255,255,255,.16);border-radius:18px;background:linear-gradient(145deg,#2d2d2d,#171717);box-shadow:18px 22px 0 rgba(255,167,51,.14),0 28px 70px rgba(0,0,0,.45);box-sizing:border-box;opacity:0;transform:translateX(28px);transition:opacity .65s ease,transform .65s ease;pointer-events:none}.home-preview-card.active{opacity:1;transform:translateX(0);pointer-events:auto}
.home-preview-topline{display:flex;justify-content:space-between;color:#bdbdbd;font-size:13px;font-weight:700}.home-preview-dot{width:8px;height:8px;border-radius:50%;background:#ffa733;box-shadow:0 0 0 5px rgba(255,167,51,.12)}
.home-ring{display:flex;flex-direction:column;align-items:center;justify-content:center;width:190px;height:190px;margin:26px auto;border:10px solid #ffa733;border-left-color:#555;border-radius:50%;box-sizing:border-box;transform:rotate(32deg)}.home-ring strong,.home-ring span{transform:rotate(-32deg)}.home-ring strong{font-size:34px}.home-ring span{margin-top:4px;color:#aaa;font-size:12px}
.home-macro-row{display:flex;justify-content:space-between;padding:16px 0;border-top:1px solid #444;border-bottom:1px solid #444;color:#999;font-size:10px;text-transform:uppercase;letter-spacing:.5px}.home-macro-row b{display:block;margin-bottom:4px;color:#fff;font-size:14px;letter-spacing:0;text-transform:none}
.home-preview-meal{display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:10px;margin-top:16px;font-size:13px}.home-preview-meal span:nth-child(2){display:flex;flex-direction:column}.home-preview-meal small{margin-top:3px;color:#999;font-size:11px}.home-meal-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#3a3a3a;color:#ffa733;font-size:17px}.home-preview-meal>strong{font-size:13px}
.home-slide-kicker{margin:72px 0 12px;color:#ffa733;font-size:12px;font-weight:800;letter-spacing:1px;text-transform:uppercase}.home-slide h2{margin:0 0 28px;font-size:34px;line-height:1.1}.home-slide h2 span{color:#ffa733}.home-meal-list{border-top:1px solid #444}.home-meal-list>div{display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:11px;padding:17px 0;border-bottom:1px solid #444;font-size:13px}.home-meal-list b{display:flex;flex-direction:column}.home-meal-list small{margin-top:4px;color:#999;font-size:11px;font-weight:400}.home-meal-list strong,.home-recipe-feature>strong{color:#ffa733;font-size:19px}.home-recipe-feature{display:grid;grid-template-columns:72px 1fr auto;align-items:center;gap:15px;margin-top:46px;padding:14px;border:1px solid #4b4b4b;border-radius:12px}.home-recipe-image{display:grid;place-items:center;width:72px;height:72px;border-radius:9px;background:#545c4d;font-size:34px}.home-recipe-feature b,.home-recipe-feature small{display:block}.home-recipe-feature small{margin-top:5px;color:#999;font-size:11px}.home-recipe-tags{display:flex;gap:8px;margin-top:18px}.home-recipe-tags span{padding:7px 9px;border-radius:6px;background:#3a3a3a;color:#bbb;font-size:10px}.home-calorie-estimate{margin-top:54px;padding:19px;border:1px solid #4b4b4b;border-radius:12px}.home-calorie-estimate>span{color:#aaa;font-size:12px}.home-calorie-estimate>strong{display:block;margin:8px 0 22px;font-size:38px}.home-calorie-estimate>strong small{color:#999;font-size:13px;font-weight:400}.home-calorie-estimate>div{display:grid;gap:12px;border-top:1px solid #444;padding-top:16px;color:#999;font-size:11px}.home-calorie-estimate>div span{display:flex;justify-content:space-between}.home-calorie-estimate b{color:#fff}
.home-carousel-progress{position:absolute;right:25px;bottom:18px;left:25px;z-index:3;display:flex;gap:6px}.home-carousel-progress span{position:relative;height:3px;flex:1;overflow:hidden;border-radius:3px;background:#555}.home-carousel-progress span::after{content:"";position:absolute;inset:0;background:#ffa733;transform:scaleX(0);transform-origin:left;}.home-carousel-progress span.active::after{animation:home-carousel-fill 4s linear forwards}@keyframes home-carousel-fill{to{transform:scaleX(1)}}
.home-features{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;border-top:1px solid rgba(255,255,255,.14);padding-top:30px;text-align:left}.home-features article{padding-right:20px;border-right:1px solid rgba(255,255,255,.14)}.home-features article:last-child{border-right:0}.feature-number{color:#ffa733;font-size:12px;font-weight:800;letter-spacing:1px}.home-features h2{margin:12px 0 8px;font-size:18px}.home-features p{margin:0;color:#999;font-size:13px;line-height:1.6}
.auth-modal{position:fixed;top:50%;left:50%;z-index:10;margin:0;transform:translate(-50%,-50%);max-height:calc(100vh - 32px);overflow:auto;box-shadow:0 0 0 100vmax rgba(0,0,0,.78),0 24px 70px rgba(0,0,0,.65)}
.auth-close-button{position:absolute;top:12px;right:14px;width:32px !important;height:32px;margin:0;padding:0;border:1px solid #555;background:#363636;color:#bbb;font-size:22px;line-height:1}.auth-close-button:hover{background:#ffa733;color:#111}.auth-title{margin:0;color:#fff;font-size:22px}.auth-title + .subtitle{margin-top:8px}
@media (max-width:700px){.home-page{padding:22px 20px 40px}.home-hero{grid-template-columns:1fr;gap:38px;min-height:auto;padding-top:70px}.home-hero h1{font-size:48px;letter-spacing:-1px}.home-hero-description{font-size:15px}.home-hero-art{max-width:390px;margin:0 auto;width:100%}.home-carousel,.home-preview-card{min-height:500px}.home-features{grid-template-columns:1fr;gap:22px}.home-features article{padding:0 0 20px;border-right:0;border-bottom:1px solid rgba(255,255,255,.14)}.home-features article:last-child{border-bottom:0}}
@media (max-width:480px){.home-brand img{width:104px}.home-auth-actions{gap:5px}.home-auth-actions button{padding:10px 11px;font-size:12px}.home-hero{padding-top:52px}.home-hero h1{font-size:42px}.home-hero-actions{align-items:stretch;flex-direction:column}.home-hero-actions button{width:100%}.auth-modal{width:calc(100% - 20px);max-height:calc(100vh - 20px)}}