/* Tool-specific styles only - base styles are in tool-layout.css */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.segmented-control {
    display: flex;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
}

.segment {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.segment:hover {
    color: #e5e7eb;
    background-color: #1a1a1a;
}

.segment.active {
    color: #ffffff;
    background-color: #3b82f6;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    width: 100%;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.text-input[type="number"]::-webkit-inner-spin-button,
.text-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.text-input[type="number"] {
    -moz-appearance: textfield;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit .text-input {
    padding-right: 52px;
}

.input-unit {
    position: absolute;
    right: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    pointer-events: none;
}

.input-row {
    display: flex;
    gap: 12px;
}

.input-row .input-with-unit {
    flex: 1;
}

.input-error {
    font-size: 13px;
    color: #f87171;
    padding: 4px 0;
}

.input-note {
    font-size: 13px;
    color: #9ca3af;
    padding: 4px 0;
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

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

.button-row {
    display: flex;
    gap: 12px;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    flex: 1;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.output-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.result-card {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.result-card-primary {
    border-color: #3b82f6;
    border-width: 2px;
}

.result-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.result-value-large {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 8px;
}

.result-value-medium {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e7eb;
    line-height: 1.2;
    margin-bottom: 8px;
}

.result-sublabel {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 16px;
}

.section-title .macro-preset-label {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
}

.targets-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 24px;
}

.targets-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.target-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 6px;
    background-color: #1a1a1a;
    position: relative;
    flex-wrap: wrap;
}

.target-row.target-loss {
    border-left: 3px solid #34d399;
}

.target-row.target-maintain {
    border-left: 3px solid #3b82f6;
}

.target-row.target-gain {
    border-left: 3px solid #fb923c;
}

.target-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.target-label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.target-rate {
    font-size: 12px;
    color: #6b7280;
}

.target-calories {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.target-warning {
    width: 100%;
    font-size: 12px;
    color: #fbbf24;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #374151;
}

.target-warning::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid #fbbf24;
    margin-right: 6px;
    vertical-align: middle;
}

.macros-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 24px;
}

.macro-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.macro-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.macro-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
    padding-left: 12px;
    border-left: 3px solid transparent;
}

.macro-name.macro-protein {
    border-left-color: #60a5fa;
}

.macro-name.macro-carbs {
    border-left-color: #34d399;
}

.macro-name.macro-fat {
    border-left-color: #fb923c;
}

.macro-grams {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    min-width: 80px;
    text-align: right;
}

.macro-pct {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    min-width: 48px;
    text-align: right;
}

.macro-bar {
    display: flex;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1a1a1a;
    margin-bottom: 12px;
}

.macro-bar-segment {
    transition: width 300ms ease;
    min-width: 2px;
}

.macro-bar-protein {
    background-color: #60a5fa;
}

.macro-bar-carbs {
    background-color: #34d399;
}

.macro-bar-fat {
}

.macro-bar-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.legend-protein {
    background-color: #60a5fa;
}

.legend-dot.legend-carbs {
    background-color: #34d399;
}

.legend-dot.legend-fat {
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 12px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    text-align: center;
}

.stat-card-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.stat-card-unit {
    font-size: 12px;
    color: #9ca3af;
}

.copy-section {
    display: flex;
}

.copy-section .button-secondary {
    width: 100%;
}

.disclaimer {
    padding: 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.disclaimer p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.pro-features-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid #374151;
}

.pro-feature-block {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 24px;
    position: relative;
}

.pro-feature-block::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 1;
    transition: opacity 150ms ease;
}

.pro-feature-block.unlocked::before {
    opacity: 0;
    pointer-events: none;
}

.pro-feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.pro-feature-header .section-title {
    margin-bottom: 0;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pro-feature-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.macro-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.preset-btn:hover {
    background-color: #374151;
}

.preset-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.macro-slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.macro-slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.macro-slider-header label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.macro-slider-values {
    display: flex;
    align-items: center;
    gap: 4px;
}

.macro-number-input {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    width: 52px;
    text-align: right;
    outline: none;
    transition: border-color 150ms ease;
}

.macro-number-input:focus {
    border-color: #3b82f6;
}

.macro-number-input::-webkit-inner-spin-button,
.macro-number-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.macro-number-input {
    -moz-appearance: textfield;
}

.macro-slider-pct {
    font-size: 13px;
    color: #6b7280;
}

.macro-slider-grams {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    min-width: 48px;
    text-align: right;
}

input[type="range"].slider {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: block;
}

input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"].slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"].slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.macro-slider-protein::-webkit-slider-thumb {
    background-color: #60a5fa;
}

.macro-slider-protein::-moz-range-thumb {
    background-color: #60a5fa;
}

.macro-slider-carbs::-webkit-slider-thumb {
    background-color: #34d399;
}

.macro-slider-carbs::-moz-range-thumb {
    background-color: #34d399;
}

.macro-slider-fat::-webkit-slider-thumb {
}

.macro-slider-fat::-moz-range-thumb {
}

.macro-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.macro-total.error {
    border: 1px solid #f87171;
}

.macro-total.valid {
    border: 1px solid #34d399;
}

.stepper-control {
    display: flex;
    align-items: center;
    gap: 0;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.stepper-btn {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: #e5e7eb;
    font-size: 18px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stepper-btn:hover {
    background-color: #1a1a1a;
}

.stepper-btn:active {
    background-color: #374151;
}

.stepper-value {
    width: 48px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    border-left: 1px solid #374151;
    border-right: 1px solid #374151;
    padding: 10px 0;
}

.meal-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meal-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.meal-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.meal-name-input {
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    padding: 2px 0;
    outline: none;
    flex: 1;
    min-width: 0;
    transition: border-color 150ms ease;
}

.meal-name-input:focus {
    border-bottom-color: #3b82f6;
}

.meal-calorie-badge {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #374151;
    padding: 2px 10px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.meal-card-details {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meal-pct-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    width: 52px;
    text-align: right;
    outline: none;
    transition: border-color 150ms ease;
}

.meal-pct-input:focus {
    border-color: #3b82f6;
}

.meal-pct-input::-webkit-inner-spin-button,
.meal-pct-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.meal-pct-input {
    -moz-appearance: textfield;
}

.meal-pct-label {
    font-size: 13px;
    color: #6b7280;
}

.meal-macro-pills {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.meal-macro-pill {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    color: #ffffff;
}

.meal-macro-pill.protein {
    background-color: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.meal-macro-pill.carbs {
    background-color: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

.meal-macro-pill.fat {
    background-color: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

.meal-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.meal-total.error {
    border: 1px solid #f87171;
}

.meal-total.valid {
    border: 1px solid #34d399;
}

.timeline-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-message {
    font-size: 14px;
    color: #9ca3af;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.timeline-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.timeline-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.timeline-calories {
    font-size: 12px;
    color: #6b7280;
}

.timeline-duration {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.timeline-weeks {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.timeline-date {
    font-size: 12px;
    color: #6b7280;
}

.timeline-note {
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.timeline-note p {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.export-description {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
}

.input-error {
    font-size: 13px;
    color: #f87171;
    padding: 4px 0;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #059669;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    pointer-events: none;
    animation: toast-in 300ms ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .result-card {
        padding: 24px;
    }

    .result-value-large {
        font-size: 2.5rem;
    }

    .targets-section,
    .macros-section,
    .pro-feature-block {
        padding: 16px;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-card-value {
        font-size: 18px;
    }

    .button-row {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .macro-presets {
        gap: 6px;
    }

    .preset-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .meal-card-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .meal-macro-pills {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .target-row {
        padding: 10px 12px;
    }

    .macro-row {
        padding: 8px 12px;
    }

    .input-row {
        gap: 8px;
    }
}