:root {
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --brand: #fc2a73;
    --brand-bright: #fd3579;
    --brand-light: #fe6f94;
    --brand-dark: #df1457;
    --blush: #fdeef2;
    --blush-soft: #fff7f9;
    --border: #f6dfe6;
    --ink: #101014;
    --muted: #62626d;
    --surface: #ffffff;
    --shadow: 0 14px 34px rgba(190, 37, 88, 0.09);
    --shadow-soft: 0 7px 20px rgba(190, 37, 88, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f8fafc;
    color: #17202a;
    -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

[dir="rtl"] body {
    font-family: Tahoma, Arial, sans-serif;
}

[dir="ltr"] body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-body {
    background: #fffdfd;
    color: var(--ink);
}

.app-shell {
    width: min(100%, 34rem);
    min-height: 100vh;
    margin-inline: auto;
    padding: 0.7rem 1rem 2rem;
}

.has-bottom-nav .app-shell {
    padding-bottom: calc(6.6rem + var(--safe-bottom));
}

.admin-shell {
    width: min(100%, 72rem);
    min-height: 100vh;
    margin-inline: auto;
    padding: 1rem;
}

.app-header {
    min-height: 5.7rem;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.brand-link {
    display: flex;
    min-width: 0;
    flex: 0 1 auto;
    align-items: center;
}

.brand-logo {
    width: 5.8rem;
    height: 4.8rem;
    display: block;
    object-fit: contain;
}

.header-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.header-actions form {
    margin: 0;
}

.header-pill {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    padding: 0.65rem 0.78rem;
    color: var(--ink);
    box-shadow: var(--shadow-soft);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.header-pill:active {
    transform: scale(0.97);
}

.header-pill .lucide {
    width: 1.18rem;
    height: 1.18rem;
}

.language-pill {
    color: var(--brand);
}

.app-alert {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.55;
}

.app-alert .lucide {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
}

.app-alert-success {
    border-color: #f7d4df;
    background: var(--blush-soft);
    color: var(--brand-dark);
}

.app-alert-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.glass-panel,
.app-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(246, 223, 230, 0.92);
    box-shadow: var(--shadow);
}

.app-body .glass-panel {
    border-color: rgba(246, 223, 230, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.daily-target-card {
    border-radius: 1.7rem;
    padding: 1.55rem 1.45rem 1.45rem;
}

.eyebrow {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.daily-target-grid {
    margin-top: 0.55rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.calorie-number {
    color: #08080b;
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.calorie-label {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 760;
}

.remaining-number {
    color: var(--brand);
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.remaining-label {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.metric-track {
    height: 0.82rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--blush);
}

.metric-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-bright) 48%, var(--brand-light) 100%);
    transition: width 300ms ease;
}

.daily-target-card .metric-track {
    margin-top: 1.35rem;
}

.calorie-balance-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    padding-top: 0.9rem;
}

.calorie-balance-grid > div {
    min-width: 0;
    padding-inline: 0.45rem;
    text-align: center;
}

.calorie-balance-grid > div + div {
    border-inline-start: 1px solid var(--border);
}

.calorie-balance-grid span,
.calorie-balance-grid strong {
    display: block;
    overflow-wrap: anywhere;
}

.calorie-balance-grid span {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 800;
}

.calorie-balance-grid strong {
    margin-top: 0.25rem;
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 950;
}

.calorie-balance-grid .exercise-credit-value {
    color: #07865f;
}

.macro-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.macro-card {
    min-width: 0;
    border-radius: 1.45rem;
    padding: 1rem 0.85rem;
}

.icon-bubble {
    width: 2.65rem;
    height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ffe7ee;
    color: var(--brand);
}

.icon-bubble .lucide {
    width: 1.42rem;
    height: 1.42rem;
}

.macro-label {
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 680;
}

.macro-value {
    margin-top: 0.45rem;
    color: #09090c;
    font-size: 0.93rem;
    font-weight: 900;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.macro-card .metric-track {
    height: 0.66rem;
    margin-top: 0.8rem;
}

.macro-suggestion {
    border: 1px solid #bbf7d0;
    border-radius: 1.45rem;
    background: #f7fff9;
    padding: 1rem;
    box-shadow: 0 10px 26px rgba(21, 128, 61, 0.08);
}

.macro-suggestion-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.macro-suggestion-icon {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
}

.macro-suggestion-icon .lucide {
    width: 1.35rem;
    height: 1.35rem;
}

.macro-suggestion-recipe {
    width: 100%;
    min-height: 5.5rem;
    margin-top: 0.85rem;
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #d1fae5;
    border-radius: 1rem;
    background: #ffffff;
    padding: 0.5rem;
    color: inherit;
    text-align: inherit;
}

.macro-suggestion-recipe img {
    width: 4.5rem;
    height: 4.5rem;
    display: block;
    border-radius: 0.8rem;
    object-fit: cover;
    background: #f1f5f9;
}

.macro-suggestion-recipe > .lucide {
    width: 1.25rem;
    height: 1.25rem;
    color: #15803d;
}

.diet-streak-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    border-color: #fde68a;
    border-radius: 1.45rem;
    background: #fffdf5;
    padding: 1.1rem;
    box-shadow: 0 10px 26px rgba(180, 83, 9, 0.08);
}

.diet-streak-trophy {
    width: 3.2rem;
    height: 3.2rem;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
}

.diet-streak-trophy .lucide {
    width: 1.6rem;
    height: 1.6rem;
}

.diet-streak-value {
    margin-top: 0.2rem;
    color: #111827;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.mode-list {
    display: grid;
    gap: 0.95rem;
}

.mode-card {
    min-height: 6.8rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 1.7rem;
    padding: 1rem 1.3rem;
    box-shadow: var(--shadow);
    font-size: 1.12rem;
    font-weight: 900;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.mode-card:active {
    transform: scale(0.985);
}

.mode-card .mode-icon {
    width: 3.4rem;
    height: 3.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.mode-card .mode-icon .lucide {
    width: 1.65rem;
    height: 1.65rem;
}

.mode-card > .lucide {
    width: 1.55rem;
    height: 1.55rem;
}

.mode-card-primary {
    border-color: transparent;
    background: linear-gradient(112deg, #fc2a73 0%, #fd5184 48%, #fe6f94 100%);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(252, 42, 115, 0.22);
}

.mode-card-primary .mode-icon {
    background: rgba(255, 255, 255, 0.17);
    color: #ffffff;
}

.mode-card-secondary {
    background: #fff9fb;
    color: var(--brand);
}

.mode-card-secondary .mode-icon {
    background: #ffffff;
    color: var(--brand);
    box-shadow: var(--shadow-soft);
}

.mode-card-ai {
    background: #fff9fb;
    color: var(--brand);
    box-shadow: var(--shadow);
}

.mode-card-ai .mode-icon {
    background: #ffffff;
    color: var(--brand);
    box-shadow: var(--shadow-soft);
}

.mode-card-caption {
    margin-top: 0.32rem;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.45;
    opacity: 0.72;
}

.weight-card {
    border-radius: 1.7rem;
    padding: 1.35rem;
}

.weight-card-header {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.weight-card-header h2 {
    font-size: 1rem;
    font-weight: 900;
}

.weight-percentage {
    color: var(--brand);
    font-size: 1rem;
    font-weight: 900;
}

.weight-points {
    margin-top: 1.15rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.weight-point {
    min-width: 0;
    padding-inline: 0.45rem;
    text-align: center;
}

.weight-point + .weight-point {
    border-inline-start: 1px solid var(--border);
}

.weight-value {
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.weight-label {
    margin-top: 0.3rem;
    color: var(--brand);
    font-size: 0.7rem;
    font-weight: 800;
}

.page-stack {
    display: grid;
    gap: 1rem;
}

.page-card {
    border-radius: 1.55rem;
    padding: 1.25rem;
}

.page-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title-row .icon-bubble {
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 auto;
}

.page-title {
    min-width: 0;
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.25;
}

.section-title {
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 900;
}

.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: var(--blush-soft);
    padding: 1rem;
    color: #7c2948;
    font-size: 0.84rem;
    font-weight: 720;
    line-height: 1.7;
}

.info-banner .lucide {
    width: 1.3rem;
    height: 1.3rem;
    flex: 0 0 auto;
    margin-top: 0.18rem;
    color: var(--brand);
}

.touch-button {
    min-height: 3.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 0;
    border-radius: 1.15rem;
    font-weight: 850;
    line-height: 1.25;
    text-align: center;
    transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.touch-button .lucide {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
}

.touch-button:active {
    transform: scale(0.98);
}

.touch-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.button-primary {
    background: linear-gradient(112deg, var(--brand) 0%, var(--brand-light) 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(252, 42, 115, 0.2);
}

.button-secondary {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--brand);
    box-shadow: var(--shadow-soft);
}

.button-dark {
    background: #16161b;
    color: #ffffff;
}

.text-link {
    color: var(--brand-dark);
    font-weight: 850;
}

.field-label {
    margin-bottom: 0.45rem;
    display: block;
    color: #35353d;
    font-size: 0.82rem;
    font-weight: 800;
}

.input-field {
    width: 100%;
    min-width: 0;
    min-height: 3.35rem;
    border: 1px solid #eadde1;
    border-radius: 1rem;
    outline: none;
    background: #ffffff;
    padding: 0.85rem 1rem;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-field::placeholder {
    color: #9b9398;
}

.input-field:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 4px rgba(252, 42, 115, 0.1);
}

textarea.input-field {
    resize: vertical;
}

select.input-field {
    cursor: pointer;
}

.ai-upload-zone {
    min-height: 6.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 1.5px dashed #efb8c9;
    border-radius: 1.15rem;
    background: var(--blush-soft);
    padding: 1rem;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.ai-upload-zone:active {
    border-color: var(--brand);
    background: #fff1f5;
}

.ai-upload-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ffffff;
    color: var(--brand);
    box-shadow: var(--shadow-soft);
}

.ai-upload-icon .lucide {
    width: 1.4rem;
    height: 1.4rem;
}

.ai-image-previews {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.ai-image-preview {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: #f1f5f9;
}

.ai-image-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ai-image-remove {
    position: absolute;
    inset-block-start: 0.35rem;
    inset-inline-end: 0.35rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(16, 16, 20, 0.88);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 16, 20, 0.2);
}

.ai-image-remove .lucide {
    width: 1rem;
    height: 1rem;
}

.ai-image-error {
    grid-column: 1 / -1;
    margin: 0;
    color: #be123c;
    font-size: 0.78rem;
    font-weight: 800;
}

.ai-result-header {
    border-color: #f7cada;
    background: #fffafb;
}

.ai-recipe-meta {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.ai-recipe-meta span {
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    background: #ffffff;
    padding: 0.45rem 0.7rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.ai-recipe-meta .lucide {
    width: 1rem;
    height: 1rem;
    color: var(--brand);
}

.ai-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.ai-nutrition-item {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: #ffffff;
    padding: 0.85rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.ai-nutrition-item strong,
.ai-nutrition-item span {
    display: block;
}

.ai-nutrition-item strong {
    color: var(--ink);
    font-size: 1.18rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.ai-nutrition-item span {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 750;
}

.ai-recipe-list {
    display: grid;
    gap: 0.65rem;
}

.ai-recipe-list li {
    min-height: 3.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--blush-soft);
    padding: 0.8rem 0.9rem;
    font-size: 0.84rem;
}

.ai-recipe-list li span {
    min-width: 0;
    font-weight: 800;
}

.ai-recipe-list li strong {
    flex: 0 0 auto;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
}

.ai-staples-banner,
.ai-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    border: 1px solid;
    border-radius: 1.25rem;
    padding: 1rem;
}

.ai-staples-banner {
    border-color: #bae6fd;
    background: #f5fbff;
    color: #0c4a6e;
}

.ai-staples-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
}

.ai-staples-icon .lucide {
    width: 1.25rem;
    height: 1.25rem;
}

.ai-staples-banner h2,
.ai-warning-banner h2 {
    font-size: 0.9rem;
    font-weight: 900;
}

.ai-staples-banner p,
.ai-warning-banner p {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.65;
}

.ai-steps {
    display: grid;
    gap: 0.85rem;
}

.ai-steps li {
    display: grid;
    grid-template-columns: 2.1rem minmax(0, 1fr);
    align-items: flex-start;
    gap: 0.7rem;
}

.ai-steps li > span {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.ai-steps p {
    min-height: 2.1rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.65rem 0.8rem;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.7;
}

.ai-warning-banner {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.ai-warning-banner > .lucide {
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 auto;
    margin-top: 0.15rem;
}

.ai-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.6;
}

.ai-disclaimer .lucide {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    margin-top: 0.18rem;
}

.password-input-wrap {
    position: relative;
    display: block;
}

.password-input-wrap .input-field {
    padding-inline-end: 3.5rem;
}

.password-toggle {
    position: absolute;
    inset-inline-end: 0.4rem;
    top: 50%;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.85rem;
    background: transparent;
    color: #5f5960;
}

.password-toggle:focus-visible {
    outline: 3px solid rgba(252, 42, 115, 0.22);
}

.password-toggle .lucide {
    width: 1.3rem;
    height: 1.3rem;
}

.profile-photo-field {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-block: 1px solid var(--border);
    padding-block: 1rem;
}

.profile-photo-preview {
    width: 5rem;
    height: 5rem;
    flex: 0 0 5rem;
    overflow: hidden;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--blush);
    box-shadow: 0 0 0 1px var(--border), var(--shadow-soft);
}

.profile-photo-image,
.profile-photo-placeholder {
    width: 100%;
    height: 100%;
}

.profile-photo-image {
    display: block;
    object-fit: cover;
}

.profile-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
}

.profile-photo-placeholder .lucide {
    width: 2rem;
    height: 2rem;
}

.profile-photo-input {
    width: 100%;
    color: #56515a;
    font-size: 0.76rem;
    font-weight: 750;
}

.profile-photo-input::file-selector-button {
    min-height: 2.75rem;
    margin-inline-end: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: var(--blush-soft);
    padding-inline: 0.9rem;
    color: var(--brand-dark);
    font-weight: 850;
}

.cycle-settings {
    border-block: 1px solid var(--border);
    padding-block: 1rem;
}

.cycle-reminder {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    border: 1px solid #f7bfd2;
    border-radius: 1.25rem;
    background: #fff4f8;
    padding: 0.95rem;
    color: #6f2440;
    box-shadow: var(--shadow-soft);
}

.cycle-reminder-icon {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    flex: 0 0 2.7rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    color: var(--brand);
}

.water-card {
    padding: 1.15rem;
}

.water-percentage {
    color: var(--brand);
    font-size: 1.1rem;
    font-weight: 900;
}

.water-total-row {
    margin-block: 1rem 0.75rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.water-total {
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 950;
}

.water-remaining {
    color: var(--brand);
    font-size: 1.05rem;
    font-weight: 900;
}

.water-caption {
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.water-quick-actions {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr));
    gap: 0.55rem;
}

.water-adjust-button,
.water-custom-submit {
    width: 100%;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 0.95rem;
    background: var(--brand);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

.water-adjust-secondary {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--brand-dark);
}

.water-adjust-button .lucide,
.water-custom-submit .lucide {
    width: 1rem;
    height: 1rem;
}

.water-custom-submit {
    width: 3.35rem;
    height: 3.35rem;
    flex: 0 0 3.35rem;
}

.step-card {
    padding: 1.15rem;
}

.step-card .section-title {
    font-size: 1rem;
}

.step-card .page-title-row {
    gap: 0.55rem;
}

.step-percentage {
    color: var(--brand);
    font-size: 1.1rem;
    font-weight: 900;
}

.step-metric-grid {
    margin-block: 1rem 0.85rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.step-metric {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--blush-soft);
    padding: 0.8rem 0.45rem;
    text-align: center;
}

.step-metric .lucide {
    width: 1.15rem;
    height: 1.15rem;
    margin-inline: auto;
    color: var(--brand);
}

.step-metric-value {
    margin-top: 0.45rem;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    white-space: nowrap;
}

.step-metric-label {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 750;
    line-height: 1.35;
}

.step-entry-form {
    margin-top: 1rem;
    display: grid;
    gap: 0.65rem;
}

.step-save-button {
    width: 100%;
}

.step-estimate-note {
    margin-top: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.75rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.55;
}

.step-estimate-note .lucide {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin-top: 0.15rem;
    color: var(--brand);
}

.food-search-card {
    padding: 1.15rem;
}

.exercise-search-card {
    padding: 1.15rem;
}

.food-search-tools {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
}

.food-tool-button {
    width: 3.4rem;
    height: 3.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: #ffffff;
    color: var(--brand);
    box-shadow: var(--shadow-soft);
}

.food-tool-button .lucide {
    width: 1.55rem;
    height: 1.55rem;
}

.food-search-form {
    min-height: 3.5rem;
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr) 2.7rem;
    align-items: center;
    gap: 0.45rem;
    border: 1.5px solid #f4b8cc;
    border-radius: 1rem;
    background: #ffffff;
    padding: 0.35rem 0.4rem 0.35rem 0.85rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[dir="rtl"] .food-search-form {
    padding: 0.35rem 0.85rem 0.35rem 0.4rem;
}

.food-search-form > .lucide {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--brand);
}

.food-search-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 750;
}

.food-search-form input::placeholder {
    color: #9b9296;
}

.food-search-form button {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.8rem;
    background: var(--brand);
    color: #ffffff;
}

.food-search-form button .lucide {
    width: 1.2rem;
    height: 1.2rem;
}

[dir="rtl"] .food-search-form button .lucide {
    transform: scaleX(-1);
}

.barcode-panel {
    margin-top: 0.9rem;
    border-top: 1px solid var(--border);
    padding-top: 0.9rem;
}

.barcode-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.icon-button {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #ffffff;
    color: var(--ink);
}

.icon-button .lucide {
    width: 1.15rem;
    height: 1.15rem;
}

.barcode-video-frame {
    position: relative;
    height: 12rem;
    margin-top: 0.75rem;
    overflow: hidden;
    border-radius: 1rem;
    background: #121216;
}

.barcode-video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.barcode-scan-line {
    position: absolute;
    inset-inline: 12%;
    top: 50%;
    height: 2px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

.barcode-status {
    margin-top: 0.65rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.5;
}

.barcode-manual-form {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.65rem;
}

.food-source-warning {
    margin-top: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border: 1px solid #fed7aa;
    border-radius: 0.9rem;
    background: #fff7ed;
    padding: 0.75rem;
    color: #9a3412;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.55;
}

.food-source-warning .lucide {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin-top: 0.15rem;
}

.food-results-heading {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
}

.food-result-list {
    margin-top: 0.35rem;
}

.food-result-row {
    min-height: 5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid #edf0f3;
    padding-block: 0.75rem;
}

.food-result-row:last-child {
    border-bottom: 0;
}

.food-result-name-row {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
}

.food-result-name-row h3 {
    min-width: 0;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.food-verified-icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: #0284c7;
}

.food-verified-icon .lucide {
    width: 1rem;
    height: 1rem;
}

.food-result-brand,
.food-result-meta {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 720;
    line-height: 1.4;
}

.food-result-calories {
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.food-result-calories span {
    color: var(--muted);
    font-size: 0.62rem;
}

.food-add-button {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    flex: 0 0 2.7rem;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f9f72;
    border-radius: 50%;
    background: #ffffff;
    color: #0f9f72;
}

.food-add-button .lucide {
    width: 1.35rem;
    height: 1.35rem;
    stroke-width: 2.6;
}

.food-empty-state {
    display: grid;
    place-items: center;
    padding: 1.4rem 0.5rem 0.4rem;
    text-align: center;
}

.food-empty-state .lucide {
    width: 2rem;
    height: 2rem;
    color: var(--brand);
}

.food-empty-state p {
    margin-top: 0.6rem;
    font-weight: 900;
}

.food-empty-state span {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
}

.exercise-result-row {
    min-height: 5rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid #edf0f3;
    padding-block: 0.75rem;
}

.exercise-result-row:last-child {
    border-bottom: 0;
}

.exercise-result-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    flex: 0 0 2.6rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: var(--blush-soft);
    color: var(--brand);
}

.exercise-result-icon .lucide {
    width: 1.2rem;
    height: 1.2rem;
}

.exercise-result-row h3 {
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.exercise-result-row p {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 750;
    line-height: 1.4;
}

.exercise-detail-card {
    border-radius: 1.55rem;
    padding: 1.15rem;
}

.exercise-detail-heading {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.exercise-detail-icon {
    width: 5rem;
    height: 5rem;
    display: inline-flex;
    flex: 0 0 5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--blush-soft);
    color: var(--brand);
}

.exercise-detail-icon .lucide {
    width: 2.2rem;
    height: 2.2rem;
}

.exercise-category {
    color: var(--brand-dark);
    font-size: 0.7rem;
    font-weight: 900;
}

.exercise-met {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
}

.exercise-calorie-preview {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-block: 1px solid var(--border);
    padding-block: 0.9rem;
}

.exercise-calorie-preview strong {
    color: var(--brand);
    font-size: 1.65rem;
    font-weight: 950;
    line-height: 1;
}

.exercise-calorie-preview p {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.exercise-log-form {
    margin-top: 1rem;
    display: grid;
    gap: 0.85rem;
}

.exercise-strength-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.field-label small {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
}

.exercise-data-note {
    margin-top: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.75rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 720;
    line-height: 1.55;
}

.exercise-data-note .lucide {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin-top: 0.15rem;
    color: #0284c7;
}

.exercise-data-warning {
    background: #fff7ed;
    color: #9a3412;
}

.exercise-data-warning .lucide {
    color: #ea580c;
}

.exercise-source-link {
    min-height: 2.75rem;
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--brand-dark);
    font-size: 0.7rem;
    font-weight: 850;
}

.exercise-source-link .lucide {
    width: 0.85rem;
    height: 0.85rem;
}

.food-detail-card {
    overflow: hidden;
    border-radius: 1.55rem;
    padding: 1.15rem;
}

.back-link {
    min-height: 2.75rem;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.4rem;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
}

.back-link .lucide {
    width: 1rem;
    height: 1rem;
}

.food-detail-heading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.food-detail-heading > img,
.food-detail-placeholder {
    width: 5rem;
    height: 5rem;
    display: flex;
    flex: 0 0 5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--blush-soft);
    object-fit: contain;
}

.food-detail-placeholder {
    color: var(--brand);
}

.food-detail-placeholder .lucide {
    width: 2rem;
    height: 2rem;
}

.food-detail-source {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.45;
}

.food-detail-source a {
    margin-inline-start: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--brand-dark);
    font-weight: 850;
}

.food-detail-source a .lucide {
    width: 0.75rem;
    height: 0.75rem;
}

.food-live-macros {
    margin-top: 1.1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-block: 1px solid var(--border);
    padding-block: 0.9rem;
}

.food-live-macros > div {
    min-width: 0;
    text-align: center;
}

.food-live-macros > div + div {
    border-inline-start: 1px solid var(--border);
}

.food-live-macros strong {
    display: block;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.food-live-macros span {
    margin-top: 0.25rem;
    display: block;
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 750;
    line-height: 1.3;
}

.food-total-weight {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 750;
}

.food-total-weight strong {
    color: var(--brand-dark);
}

.food-log-form {
    margin-top: 1rem;
    display: grid;
    gap: 0.85rem;
}

.food-amount-control {
    display: grid;
    grid-template-columns: 3.3rem minmax(0, 1fr) 3.3rem;
    gap: 0.45rem;
}

.food-amount-control button {
    min-height: 3.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--blush-soft);
    color: var(--brand);
}

.food-amount-control button .lucide {
    width: 1.15rem;
    height: 1.15rem;
}

.food-amount-control .input-field {
    text-align: center;
}

.food-data-note {
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.75rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 720;
    line-height: 1.55;
}

.food-data-note .lucide {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin-top: 0.15rem;
    color: #0284c7;
}

.tracked-food-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 1.2rem;
    padding: 1rem;
}

.tracked-meal-type {
    margin-bottom: 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    background: var(--blush-soft);
    padding: 0.3rem 0.55rem;
    color: var(--brand-dark);
    font-size: 0.65rem;
    font-weight: 900;
}

.tracked-meal-type .lucide {
    width: 0.85rem;
    height: 0.85rem;
}

.tracked-exercise-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 1.2rem;
    padding: 0.9rem;
}

.tracked-exercise-icon {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    flex: 0 0 2.7rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: #ecfdf5;
    color: #07865f;
}

.tracked-exercise-icon .lucide {
    width: 1.2rem;
    height: 1.2rem;
}

.tracked-exercise-row h3 {
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tracked-exercise-details {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 750;
}

.tracked-exercise-calories {
    margin-top: 0.35rem;
    color: #07865f;
    font-size: 0.75rem;
    font-weight: 950;
}

.tracked-food-delete {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fecdd3;
    border-radius: 50%;
    background: #fff1f2;
    color: #be123c;
}

.tracked-food-delete .lucide {
    width: 1.1rem;
    height: 1.1rem;
}

.speech-status {
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: var(--blush-soft);
    padding: 0.75rem;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.5;
}

.speech-status-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

[data-speech-target].is-listening {
    border-color: var(--brand);
    background: var(--blush);
    animation: listening-pulse 1.2s ease-in-out infinite;
}

@keyframes listening-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(252, 42, 115, 0.08);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(252, 42, 115, 0.12);
    }
}

.choice-row {
    min-height: 3.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    background: #ffffff;
    padding: 0.8rem 0.95rem;
    box-shadow: var(--shadow-soft);
    font-weight: 800;
}

.choice-row input[type="checkbox"],
.choice-row input[type="radio"],
.app-body input[type="checkbox"],
.app-body input[type="radio"] {
    accent-color: var(--brand);
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 40;
    width: min(100%, 34rem);
    transform: translateX(-50%);
    padding: 0.5rem 0.65rem calc(0.5rem + var(--safe-bottom));
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 1.7rem 1.7rem 0 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 28px rgba(135, 38, 72, 0.08);
    backdrop-filter: blur(18px);
}

.nav-item {
    min-width: 0;
    min-height: 4.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 1.2rem;
    color: #55555f;
    font-size: 0.67rem;
    font-weight: 760;
    line-height: 1;
    text-align: center;
    transition: color 160ms ease, background-color 160ms ease;
}

.nav-item .lucide {
    width: 1.45rem;
    height: 1.45rem;
}

.nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item.active {
    background: var(--blush-soft);
    color: var(--brand);
}

.meal-card {
    border-radius: 1.4rem;
    padding: 0.85rem;
}

.meal-thumb {
    width: 5.6rem;
    height: 5.6rem;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    background: var(--blush);
    object-fit: cover;
}

.favorite-heart {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: #6d6870;
    box-shadow: var(--shadow-soft);
    transition: transform 160ms ease, color 160ms ease, background-color 160ms ease;
}

.favorite-heart .lucide {
    width: 1.25rem;
    height: 1.25rem;
}

.favorite-heart:active {
    transform: scale(0.94);
}

.favorite-heart[data-favorited="1"] {
    background: var(--blush-soft);
    color: var(--brand);
}

.favorite-heart[data-favorited="1"] .lucide {
    fill: currentColor;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
}

.nutrition-chip {
    min-width: 0;
    border: 1px solid #fae7ed;
    border-radius: 0.75rem;
    background: var(--blush-soft);
    padding: 0.4rem 0.2rem;
    color: #5b5660;
    font-size: 0.64rem;
    font-weight: 850;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
}

.cost-line {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 760;
}

.cost-value {
    color: var(--brand-dark);
    font-weight: 900;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.summary-tile {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--blush-soft);
    padding: 0.85rem;
}

.summary-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 760;
}

.summary-value {
    margin-top: 0.25rem;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.ingredient-row,
.step-row {
    border: 1px solid #f5e5ea;
    border-radius: 1rem;
    background: #fff9fb;
    padding: 0.85rem;
    font-size: 0.82rem;
    font-weight: 720;
    line-height: 1.55;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--blush);
    padding: 0.45rem 0.75rem;
    color: var(--brand-dark);
    font-size: 0.7rem;
    font-weight: 850;
}

.tracking-status-success {
    border: 1px solid var(--border);
    background: var(--blush-soft);
    color: var(--brand-dark);
}

.tracking-status-error {
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.meal-option-card {
    width: 100%;
    min-width: 0;
    border-radius: 1.35rem;
    padding: 0.8rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: end;
    background: rgba(25, 15, 19, 0.55);
    backdrop-filter: blur(4px);
}

.modal-backdrop.open {
    display: flex;
}

.modal-sheet {
    width: min(100%, 34rem);
    max-height: 90vh;
    overflow-y: auto;
    margin-inline: auto;
    border: 1px solid var(--border);
    border-radius: 1.6rem 1.6rem 0 0;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 -16px 44px rgba(71, 17, 38, 0.18);
}

.modal-close {
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--blush-soft);
    color: var(--brand);
}

.modal-close .lucide {
    width: 1.3rem;
    height: 1.3rem;
}

.line-clamp-2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.scroll-snap-x {
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-light) var(--blush);
}

.scroll-snap-x > * {
    scroll-snap-align: start;
}

.lucide {
    stroke-width: 2.25;
}

.text-brand {
    color: var(--brand) !important;
}

.text-ink {
    color: var(--ink) !important;
}

@media (min-width: 390px) {
    .app-shell {
        padding-inline: 1.25rem;
    }

    .brand-logo {
        width: 6.5rem;
        height: 5rem;
    }

    .header-pill {
        padding-inline: 0.95rem;
        font-size: 0.8rem;
    }

    .macro-card {
        padding: 1.05rem;
    }

    .macro-value {
        font-size: 1rem;
    }
}

@media (max-width: 339px) {
    .app-shell {
        padding-inline: 0.7rem;
    }

    .brand-logo {
        width: 4.9rem;
        height: 4.2rem;
    }

    .header-pill {
        min-height: 2.8rem;
        gap: 0.3rem;
        padding-inline: 0.58rem;
        font-size: 0.68rem;
    }

    .header-pill .lucide {
        width: 1rem;
        height: 1rem;
    }

    .daily-target-card {
        padding-inline: 1.1rem;
    }

    .macro-grid {
        gap: 0.45rem;
    }

    .macro-card {
        padding-inline: 0.62rem;
    }

    .mode-card {
        gap: 0.7rem;
        padding-inline: 1rem;
        font-size: 1rem;
    }
}

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