:root {
    --bg: #f4efe6;
    --surface: rgba(255, 252, 247, 0.92);
    --text: #1f2933;
    --muted: #6b7280;
    --accent: #cb5b2c;
    --accent-dark: #993f1a;
    --line: rgba(31, 41, 51, 0.08);
    --success: #2f855a;
    --shadow: 0 18px 45px rgba(54, 42, 25, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(203, 91, 44, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(69, 123, 157, 0.16), transparent 30%),
        var(--bg);
    color: var(--text);
}

a {
    color: var(--accent-dark);
    text-decoration: none;
}

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

input,
select,
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

input[type="checkbox"] {
    width: auto;
}

input[type="range"] {
    padding: 0;
}

button {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
    padding: 1rem 1rem 5.5rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.topbar h1,
.hero-card h2,
.card h2,
.card h3 {
    margin: 0;
}

.eyebrow {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: var(--muted);
}

.content,
.stack-form,
.grid {
    display: grid;
    gap: 1rem;
}

.card,
.hero-card {
    background: var(--surface);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow);
}

.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(145deg, rgba(255, 250, 242, 0.98), rgba(254, 240, 220, 0.95));
}

.score {
    color: var(--accent-dark);
    font-size: 2rem;
}

.primary-button,
.ghost-button {
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.25rem;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), #e48d52);
    color: white;
}

.ghost-button {
    background: transparent;
    border: 1px solid var(--line);
}

.stats-list,
.field ul {
    margin: 0;
    padding-left: 1rem;
}

.entry {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
}

.entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.muted {
    color: var(--muted);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 250, 242, 0.9);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(31, 41, 51, 0.08);
}

.bottom-nav a {
    text-align: center;
    padding: 0.8rem 0.2rem;
    border-radius: 16px;
    color: var(--muted);
    font-size: 0.85rem;
}

.bottom-nav a.active {
    background: rgba(203, 91, 44, 0.12);
    color: var(--accent-dark);
    font-weight: 600;
}

.flash-stack {
    display: grid;
    gap: 0.5rem;
}

.flash {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(47, 133, 90, 0.12);
    color: var(--success);
}

.auth-wrapper {
    max-width: 480px;
    margin: 2rem auto 0;
}

.field {
    display: grid;
    gap: 0.4rem;
}

.label {
    font-weight: 600;
}

.hidden {
    display: none;
}

.muscle-panel {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(203, 91, 44, 0.08);
}

.exercise-input {
    margin-top: 0.75rem;
}

.range-readout {
    margin: 0;
    color: var(--muted);
}

.errorlist {
    margin: 0;
    padding-left: 1rem;
    color: #b42318;
}

@media (min-width: 760px) {
    .app-shell {
        padding: 1.5rem 1.5rem 1.5rem 7rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .two-up,
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bottom-nav {
        top: 1.5rem;
        bottom: auto;
        left: 1.5rem;
        right: auto;
        width: 88px;
        grid-template-columns: 1fr;
        border: 1px solid rgba(31, 41, 51, 0.08);
        border-radius: 24px;
    }
}
