:root {
    --met-accent: #68bdf2;
    --met-accent-strong: #3f8fd6;
    --met-surface-deep: linear-gradient(145deg, rgba(18, 28, 55, 0.98), rgba(30, 51, 83, 0.95));
    --met-surface-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.met-page,
.met-page *,
.met-page *::before,
.met-page *::after {
    box-sizing: border-box;
}

#wrapper {
    width: 100%;
}

.met-shell {
    max-width: 1480px;
}

.met-grid,
.met-right,
.met-form-stack,
.met-stat-grid,
.met-input-grid {
    display: grid;
    gap: 18px;
}

.met-right {
    gap: 24px;
}

.met-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 26px;
}

.met-hero {
    margin-bottom: 28px;
}

.met-kicker {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--met-accent);
}

.met-card {
    border-radius: 28px;
}

.met-input-card,
.met-note-card {
    background: var(--met-surface-soft);
}

.met-input-head {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.met-head-copy,
.met-note-copy,
.met-field-help {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.met-field-help,
.met-dropdown-meta {
    font-size: 13px;
}

.field-span-full {
    grid-column: 1 / -1;
}

.met-select-shell,
.met-search-shell,
.met-combobox {
    position: relative;
}

.met-select-shell select {
    width: 100%;
    min-height: 56px;
    padding-right: 46px;
    background: transparent;
    border: 0;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.met-select-shell i {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: var(--text-subtle);
    font-size: 14px;
    pointer-events: none;
}

.met-select-shell select option {
    color: #0f1724;
}

.met-search-shell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.met-search-shell i {
    color: var(--text-subtle);
    font-size: 15px;
    flex: 0 0 auto;
}

.met-search-shell input {
    flex: 1 1 auto;
}

.met-native-select {
    position: absolute;
    inset: auto;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.met-combobox {
    display: grid;
    gap: 10px;
}

.met-combobox-shell {
    min-height: 60px;
    padding-right: 8px;
}

.met-combobox-shell input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
}

.met-combobox-shell input::placeholder {
    color: var(--text-subtle);
    font-weight: 600;
}

.met-combobox-toggle {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease;
}

.met-combobox.is-open .met-combobox-toggle {
    transform: rotate(180deg);
    background: rgba(104, 189, 242, 0.16);
}

.met-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 30;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 16, 32, 0.98);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.32);
}

.met-dropdown[hidden] {
    display: none;
}

.met-dropdown-meta {
    padding: 4px 6px 10px;
    color: var(--text-secondary);
}

.met-dropdown-list {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
}

.met-dropdown-option {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    text-align: left;
    display: grid;
    gap: 6px;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.met-dropdown-option:hover,
.met-dropdown-option:focus-visible,
.met-dropdown-option.is-active {
    border-color: rgba(104, 189, 242, 0.45);
    background: rgba(104, 189, 242, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.met-dropdown-option.is-empty {
    cursor: default;
    opacity: 0.8;
}

.met-dropdown-option__title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.met-dropdown-option__meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.met-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.met-primary-action {
    min-height: 54px;
}

.met-result-card {
    background: var(--met-surface-deep) !important;
    color: #f7fbff;
    box-shadow: 0 28px 54px rgba(8, 18, 42, 0.35), 0 0 0 1px rgba(60, 128, 212, 0.12) inset;
}

.met-main-row {
    margin: 16px 0 22px;
}

#totalCaloriesOutput {
    font-size: clamp(76px, 8vw, 122px);
}

.unit-lg {
    font-size: 28px;
}

.result-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.22);
    margin: 0 0 24px;
}

.met-highlight {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.met-highlight span {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8ed2ff;
}

.met-highlight strong {
    font-size: 20px;
    line-height: 1.65;
    color: #f5fbff;
}

.met-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.met-stat-card {
    min-height: 148px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    display: grid;
    align-content: start;
    gap: 10px;
}

.met-stat-label {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.66);
}

.met-stat-card strong {
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.05;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.met-stat-card small {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.76);
}

.met-intensity-card {
    align-content: space-between;
}

.intensity-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 116px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.2;
}

.intensity-chip.is-light {
    color: #9bd7ff;
    border-color: rgba(99, 215, 255, 0.28);
    background: rgba(99, 215, 255, 0.12);
}

.intensity-chip.is-moderate {
    color: #7bf3c5;
    border-color: rgba(76, 242, 180, 0.26);
    background: rgba(76, 242, 180, 0.12);
}

.intensity-chip.is-vigorous {
    color: #ffca7b;
    border-color: rgba(255, 191, 105, 0.26);
    background: rgba(255, 191, 105, 0.13);
}

.intensity-chip.is-very-vigorous {
    color: #ff92bc;
    border-color: rgba(255, 126, 182, 0.28);
    background: rgba(255, 126, 182, 0.13);
}

.met-note-card {
    padding: 28px;
}

.met-note-copy {
    font-size: 15px;
}

@media (max-width: 1179px) {
    .met-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .met-intensity-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .met-hero {
        margin-bottom: 22px;
    }

    .met-input-grid,
    .met-stat-grid,
    .met-actions {
        grid-template-columns: 1fr;
    }

    .met-card,
    .met-note-card {
        border-radius: 22px;
    }

    .met-note-card {
        padding: 22px;
    }

    .met-dropdown {
        position: static;
        margin-top: 10px;
    }

    #totalCaloriesOutput {
        font-size: clamp(54px, 15vw, 86px);
    }

    .met-highlight strong {
        font-size: 18px;
    }

    .met-stat-card {
        min-height: 0;
    }
}